Commit 06e237c7 authored by Sebastian Ramacher's avatar Sebastian Ramacher

New upstream version 2.5.0+ds1

parent ac936061
......@@ -187,8 +187,8 @@ CSCOPE = cscope
DIST_SUBDIRS = common decode encode vainfo videoprocess vendor/intel \
vendor/intel/sfcsample putsurface test
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in COPYING \
INSTALL NEWS compile config.guess config.sub install-sh \
ltmain.sh missing
INSTALL NEWS compile config.guess config.sub depcomp \
install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......
libva-utils NEWS -- summary of changes. 2018-09-30
Copyright (C) 2009-2018 Intel Corporation
libva-utils NEWS -- summary of changes. 2019-07-08
Copyright (C) 2009-2019 Intel Corporation
Version 2.5.0 - 8.Jul.2019
* meson: rename the h264enc binary to be in line with the autotools build
* unify NEWS format
* sfcsample: don't include X11 headers
* test: update vaInitialize_vaTerminate_Bad_vaSetDriverName
* Check for -fstack-protector
* vavpp: csc with AYUV format
* vavpp: requires BGRA frame when saving a BGRA file
Version 2.4.0 - 1.Feb.2019
fix make dist issue caused by decode streamout sample
add VP sample for Blending.
add VP seperate sample for scaling,csc,sharpness,denoise,chromasitting.
* fix make dist issue caused by decode streamout sample
* add VP sample for Blending.
* add VP seperate sample for scaling,csc,sharpness,denoise,chromasitting.
Version 2.3.0 - 30.Sep.2018
add HEVC encode sample code
Add sample code for avc decode streamout
Add VP8 sample encoder application (SVCT supported)
* add HEVC encode sample code
* Add sample code for avc decode streamout
* Add VP8 sample encoder application (SVCT supported)
Version 2.2.0 - DD.Jul.2018
* Bump version to 2.2.0
......
......@@ -401,9 +401,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign common/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu common/Makefile
$(AUTOMAKE) --foreign common/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if SSP C support is enabled. */
#undef ENABLE_SSP_CC
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libva_utils 2.4.0.
# Generated by GNU Autoconf 2.69 for libva_utils 2.5.0.
#
# Report bugs to <https://github.com/intel/libva-utils/issues/new>.
#
......@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libva_utils'
PACKAGE_TARNAME='libva-utils'
PACKAGE_VERSION='2.4.0'
PACKAGE_STRING='libva_utils 2.4.0'
PACKAGE_VERSION='2.5.0'
PACKAGE_STRING='libva_utils 2.5.0'
PACKAGE_BUGREPORT='https://github.com/intel/libva-utils/issues/new'
PACKAGE_URL='https://github.com/intel/libva-utils'
......@@ -659,6 +659,8 @@ LIBVA_DRM_LIBS
LIBVA_DRM_CFLAGS
DRM_LIBS
DRM_CFLAGS
USE_SSP_FALSE
USE_SSP_TRUE
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
......@@ -1384,7 +1386,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libva_utils 2.4.0 to adapt to many kinds of systems.
\`configure' configures libva_utils 2.5.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1455,7 +1457,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libva_utils 2.4.0:";;
short | recursive ) echo "Configuration of libva_utils 2.5.0:";;
esac
cat <<\_ACEOF
......@@ -1594,7 +1596,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libva_utils configure 2.4.0
libva_utils configure 2.5.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1993,7 +1995,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libva_utils $as_me 2.4.0, which was
It was created by libva_utils $as_me 2.5.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -2858,7 +2860,7 @@ fi
# Define the identity of the package.
PACKAGE='libva-utils'
VERSION='2.4.0'
VERSION='2.5.0'
cat >>confdefs.h <<_ACEOF
......@@ -2998,9 +3000,9 @@ TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
LIBVA_UTILS_MAJOR_VERSION=2
LIBVA_UTILS_MINOR_VERSION=4
LIBVA_UTILS_MINOR_VERSION=5
LIBVA_UTILS_MICRO_VERSION=0
LIBVA_UTILS_VERSION=2.4.0
LIBVA_UTILS_VERSION=2.5.0
......@@ -17096,6 +17098,50 @@ $as_echo "#define HAVE_GNUC_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
fi
# Check for -fstack-protector
ssp_cc=yes
if test "X$CC-cc" != "X"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC-cc} accepts -fstack-protector" >&5
$as_echo_n "checking whether ${CC-cc} accepts -fstack-protector... " >&6; }
ssp_old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fstack-protector"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
alloca(100);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
else
ssp_cc=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssp_cc" >&5
$as_echo "$ssp_cc" >&6; }
if test "X$ssp_cc" = "Xno"; then
CFLAGS="$ssp_old_cflags"
else
$as_echo "#define ENABLE_SSP_CC 1" >>confdefs.h
fi
fi
if test "$ssp_cc" = "yes"; then
USE_SSP_TRUE=
USE_SSP_FALSE='#'
else
USE_SSP_TRUE='#'
USE_SSP_FALSE=
fi
# Check for DRM (mandatory)
LIBDRM_VERSION=2.4
......@@ -17793,6 +17839,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_SSP_TRUE}" && test -z "${USE_SSP_FALSE}"; then
as_fn_error $? "conditional \"USE_SSP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_DRM_TRUE}" && test -z "${USE_DRM_FALSE}"; then
as_fn_error $? "conditional \"USE_DRM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
......@@ -18206,7 +18256,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libva_utils $as_me 2.4.0, which was
This file was extended by libva_utils $as_me 2.5.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -18273,7 +18323,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libva_utils config.status 2.4.0
libva_utils config.status 2.5.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -29,7 +29,7 @@
# - micro version is libva_micro_version
# - pre version is libva_pre_version, usually development version
m4_define([libva_utils_major_version], [2])
m4_define([libva_utils_minor_version], [4])
m4_define([libva_utils_minor_version], [5])
m4_define([libva_utils_micro_version], [0])
m4_define([libva_utils_pre_version], [0])
......@@ -129,6 +129,22 @@ if test "$ac_cv_have_gnuc_visibility_attribute" = "yes"; then
[Defined to 1 if GCC visibility attribute is supported])
fi
# Check for -fstack-protector
ssp_cc=yes
if test "X$CC-cc" != "X"; then
AC_MSG_CHECKING([whether ${CC-cc} accepts -fstack-protector])
ssp_old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -fstack-protector"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])], [], [ssp_cc=no])
AC_MSG_RESULT([$ssp_cc])
if test "X$ssp_cc" = "Xno"; then
CFLAGS="$ssp_old_cflags"
else
AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
fi
fi
AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes")
# Check for DRM (mandatory)
LIBDRM_VERSION=libdrm_version
PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION])
......
......@@ -24,11 +24,14 @@ bin_PROGRAMS = mpeg2vldemo loadjpeg
AM_CPPFLAGS = \
-Wall \
-fstack-protector \
$(LIBVA_CFLAGS) \
-I$(top_srcdir)/common \
$(NULL)
if USE_SSP
AM_CPPFLAGS += -fstack-protector
endif
TEST_LIBS = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......
......@@ -111,6 +111,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = mpeg2vldemo$(EXEEXT) loadjpeg$(EXEEXT)
@USE_SSP_TRUE@am__append_1 = -fstack-protector
subdir = decode
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -363,13 +364,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = \
-Wall \
-fstack-protector \
$(LIBVA_CFLAGS) \
-I$(top_srcdir)/common \
$(NULL)
AM_CPPFLAGS = -Wall $(LIBVA_CFLAGS) -I$(top_srcdir)/common $(NULL) \
$(am__append_1)
TEST_LIBS = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......@@ -397,9 +393,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu decode/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign decode/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu decode/Makefile
$(AUTOMAKE) --foreign decode/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -25,10 +25,13 @@ noinst_PROGRAMS = svctenc
AM_CPPFLAGS = \
-Wall \
-fstack-protector \
$(LIBVA_CFLAGS) \
$(NULL)
if USE_SSP
AM_CPPFLAGS += -fstack-protector
endif
h264encode_SOURCES = h264encode.c
h264encode_CFLAGS = -I$(top_srcdir)/common -g
h264encode_LDADD = \
......
......@@ -114,6 +114,7 @@ bin_PROGRAMS = avcenc$(EXEEXT) mpeg2vaenc$(EXEEXT) h264encode$(EXEEXT) \
jpegenc$(EXEEXT) vp9enc$(EXEEXT) vp8enc$(EXEEXT) \
hevcencode$(EXEEXT)
noinst_PROGRAMS = svctenc$(EXEEXT)
@USE_SSP_TRUE@am__append_1 = -fstack-protector
subdir = encode
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -400,12 +401,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = \
-Wall \
-fstack-protector \
$(LIBVA_CFLAGS) \
$(NULL)
AM_CPPFLAGS = -Wall $(LIBVA_CFLAGS) $(NULL) $(am__append_1)
h264encode_SOURCES = h264encode.c
h264encode_CFLAGS = -I$(top_srcdir)/common -g
h264encode_LDADD = \
......@@ -479,9 +475,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu encode/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign encode/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu encode/Makefile
$(AUTOMAKE) --foreign encode/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -26,9 +26,12 @@ TEST_CFLAGS = \
$(LIBVA_CFLAGS) \
-I$(top_srcdir)/common \
-Wall \
-fstack-protector \
$(NULL)
if USE_SSP
TEST_CFLAGS += -fstack-protector
endif
TEST_LIBS = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......
......@@ -111,8 +111,9 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
@USE_X11_TRUE@am__append_1 = putsurface
@USE_WAYLAND_TRUE@am__append_2 = putsurface_wayland
@USE_SSP_TRUE@am__append_1 = -fstack-protector
@USE_X11_TRUE@am__append_2 = putsurface
@USE_WAYLAND_TRUE@am__append_3 = putsurface_wayland
subdir = putsurface
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -362,13 +363,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
TEST_CFLAGS = \
$(LIBVA_CFLAGS) \
-I$(top_srcdir)/common \
-Wall \
-fstack-protector \
$(NULL)
TEST_CFLAGS = $(LIBVA_CFLAGS) -I$(top_srcdir)/common -Wall $(NULL) \
$(am__append_1)
TEST_LIBS = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......@@ -395,9 +391,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu putsurface/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign putsurface/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu putsurface/Makefile
$(AUTOMAKE) --foreign putsurface/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -448,9 +448,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu test/Makefile
$(AUTOMAKE) --foreign test/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -74,12 +74,32 @@ TEST_F(VAAPIInitTerminate, vaInitialize_vaTerminate_Bad_Environment)
TEST_F(VAAPIInitTerminate, vaInitialize_vaTerminate_Bad_vaSetDriverName)
{
char driver[4] = "bad";
int major, minor;
VADisplay display = getDisplay();
ASSERT_TRUE(display);
EXPECT_STATUS_EQ(
VA_STATUS_ERROR_INVALID_PARAMETER, vaSetDriverName(display, driver));
{ // driver name length == 0 invalid
char driver[1] = "";
EXPECT_STATUS_EQ(
VA_STATUS_ERROR_INVALID_PARAMETER, vaSetDriverName(display, driver));
}
{ // driver name length >= 256 invalid
char driver[257];
driver[256] = '\0';
std::string(256, 'x').copy(driver, 256);
EXPECT_STATUS_EQ(
VA_STATUS_ERROR_INVALID_PARAMETER, vaSetDriverName(display, driver));
}
{ // acceptable driver name, but does not exist
char driver[4] = "bad";
EXPECT_STATUS(vaSetDriverName(display, driver));
EXPECT_STATUS_EQ(
VA_STATUS_ERROR_UNKNOWN, vaInitialize(display, &major, &minor));
}
EXPECT_STATUS(vaTerminate(display));
}
......
......@@ -27,9 +27,12 @@ vainfo_cflags = \
$(LIBVA_CFLAGS) \
-DLIBVA_VERSION_S="\"$(LIBVA_VERSION)\"" \
-Wall \
-fstack-protector \
$(NULL)
if USE_SSP
vainfo_cflags += -fstack-protector
endif
vainfo_libs = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......
......@@ -112,6 +112,7 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
bin_PROGRAMS = vainfo$(EXEEXT)
@USE_SSP_TRUE@am__append_1 = -fstack-protector
subdir = vainfo
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -348,14 +349,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
vainfo_cflags = \
-I$(top_srcdir)/common \
$(LIBVA_CFLAGS) \
-DLIBVA_VERSION_S="\"$(LIBVA_VERSION)\"" \
-Wall \
-fstack-protector \
$(NULL)
vainfo_cflags = -I$(top_srcdir)/common $(LIBVA_CFLAGS) \
-DLIBVA_VERSION_S="\"$(LIBVA_VERSION)\"" -Wall $(NULL) \
$(am__append_1)
vainfo_libs = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......@@ -378,9 +374,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vainfo/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign vainfo/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu vainfo/Makefile
$(AUTOMAKE) --foreign vainfo/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -374,9 +374,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vendor/intel/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign vendor/intel/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu vendor/intel/Makefile
$(AUTOMAKE) --foreign vendor/intel/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -377,9 +377,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu vendor/intel/sfcsample/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign vendor/intel/sfcsample/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu vendor/intel/sfcsample/Makefile
$(AUTOMAKE) --foreign vendor/intel/sfcsample/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -42,7 +42,6 @@
#include "VDecAccelVA.h"
#include <va/va.h>
#include <va/va_drm.h>
#include <va/va_x11.h>
#define VASUCCEEDED(err) (err == VA_STATUS_SUCCESS)
#define VAFAILED(err) (err != VA_STATUS_SUCCESS)
......
......@@ -39,9 +39,6 @@
#include <va/va.h>
#include "DecodeParamBuffer.h"
#include <X11/Xlib.h>
typedef Display* HDISP;
namespace mvaccel
{
/**
......
......@@ -24,11 +24,14 @@ bin_PROGRAMS = vavpp vppscaling_csc vppdenoise vppsharpness vppchromasitting vpp
AM_CPPFLAGS = \
-Wall \
-fstack-protector \
$(LIBVA_CFLAGS) \
-I$(top_srcdir)/common \
$(NULL)
if USE_SSP
AM_CPPFLAGS += -fstack-protector
endif
TEST_LIBS = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......
......@@ -113,6 +113,7 @@ host_triplet = @host@
bin_PROGRAMS = vavpp$(EXEEXT) vppscaling_csc$(EXEEXT) \
vppdenoise$(EXEEXT) vppsharpness$(EXEEXT) \
vppchromasitting$(EXEEXT) vppblending$(EXEEXT)
@USE_SSP_TRUE@am__append_1 = -fstack-protector
subdir = videoprocess
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -363,13 +364,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = \
-Wall \
-fstack-protector \
$(LIBVA_CFLAGS) \
-I$(top_srcdir)/common \
$(NULL)
AM_CPPFLAGS = -Wall $(LIBVA_CFLAGS) -I$(top_srcdir)/common $(NULL) \
$(am__append_1)
TEST_LIBS = \
$(LIBVA_LIBS) \
$(top_builddir)/common/libva-display.la \
......@@ -400,9 +396,9 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu videoprocess/Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign videoprocess/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu videoprocess/Makefile
$(AUTOMAKE) --foreign videoprocess/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
......
......@@ -374,8 +374,12 @@ upload_yuv_frame_to_yuv_surface(FILE *fp,
} else if ((surface_image.format.fourcc == VA_FOURCC_YUY2 &&
g_src_file_fourcc == VA_FOURCC_YUY2) ||
(surface_image.format.fourcc == VA_FOURCC_UYVY &&
g_src_file_fourcc == VA_FOURCC_UYVY)) {
frame_size = surface_image.width * surface_image.height * 2;
g_src_file_fourcc == VA_FOURCC_UYVY) ||
(surface_image.format.fourcc == VA_FOURCC_AYUV &&
g_src_file_fourcc == VA_FOURCC_AYUV)) {
uint32_t byte_per_pixel = (g_src_file_fourcc == VA_FOURCC_AYUV) ? 4 : 2;
frame_size = surface_image.width * surface_image.height * byte_per_pixel;
newImageBuffer = (unsigned char*)malloc(frame_size);
assert(newImageBuffer);
......@@ -388,8 +392,8 @@ upload_yuv_frame_to_yuv_surface(FILE *fp,
/* plane 0, directly copy */
for (row = 0; row < surface_image.height; row++) {
memcpy(y_dst, y_src, surface_image.width * 2);
y_src += surface_image.width * 2;
memcpy(y_dst, y_src, surface_image.width * byte_per_pixel);
y_src += surface_image.width * byte_per_pixel;
y_dst += surface_image.pitches[0];
}
} else if ((surface_image.format.fourcc == VA_FOURCC_P010 &&
......@@ -829,8 +833,10 @@ store_packed_yuv_surface_to_packed_file(FILE *fp,
/* store the surface to one YUY2 or UYVY file */
if (surface_image.format.fourcc == VA_FOURCC_YUY2 ||
surface_image.format.fourcc == VA_FOURCC_UYVY) {
uint32_t frame_size = surface_image.width * surface_image.height * 2;
surface_image.format.fourcc == VA_FOURCC_UYVY ||
surface_image.format.fourcc == VA_FOURCC_AYUV) {
uint32_t byte_per_pixel = (surface_image.format.fourcc == VA_FOURCC_AYUV ? 4 : 2);
uint32_t frame_size = surface_image.width * surface_image.height * byte_per_pixel;
newImageBuffer = (unsigned char*)malloc(frame_size);
assert(newImageBuffer);
......@@ -843,9 +849,9 @@ store_packed_yuv_surface_to_packed_file(FILE *fp,
/* Plane 0 copy */
for (row = 0; row < surface_image.height; row++) {
memcpy(y_dst, y_src, surface_image.width * 2);
memcpy(y_dst, y_src, surface_image.width * byte_per_pixel);
y_src += surface_image.pitches[0];
y_dst += surface_image.width * 2;
y_dst += surface_image.width * byte_per_pixel;
}
/* write frame to file */
......@@ -1022,7 +1028,9 @@ store_yuv_surface_to_file(FILE *fp,
} else if ((g_out_fourcc == VA_FOURCC_YUY2 &&
g_dst_file_fourcc == VA_FOURCC_YUY2) ||
(g_out_fourcc == VA_FOURCC_UYVY &&
g_dst_file_fourcc == VA_FOURCC_UYVY)) {
g_dst_file_fourcc == VA_FOURCC_UYVY) ||
(g_out_fourcc == VA_FOURCC_AYUV &&
g_dst_file_fourcc == VA_FOURCC_AYUV)) {
return store_packed_yuv_surface_to_packed_file(fp, surface_id);
} else if ((g_out_fourcc == VA_FOURCC_I010 &&
g_dst_file_fourcc == VA_FOURCC_I010) ||
......@@ -1033,7 +1041,7 @@ store_yuv_surface_to_file(FILE *fp,
g_dst_file_fourcc == VA_FOURCC_RGBA) ||
(g_out_fourcc == VA_FOURCC_RGBX &&
g_dst_file_fourcc == VA_FOURCC_RGBX) ||
(g_out_fourcc == VA_FOURCC_RGBA &&
(g_out_fourcc == VA_FOURCC_BGRA &&
g_dst_file_fourcc == VA_FOURCC_BGRA) ||
(g_out_fourcc == VA_FOURCC_BGRX &&
g_dst_file_fourcc == VA_FOURCC_BGRX)) {
......@@ -1624,9 +1632,12 @@ parse_fourcc_and_format(char *str, uint32_t *fourcc, uint32_t *format)
} else if (!strcmp(str, "BGRX")) {
tfourcc = VA_FOURCC_BGRX;
tformat = VA_RT_FORMAT_RGB32;
} else if (!strcmp(str, "AYUV")) {
tfourcc = VA_FOURCC_AYUV;
tformat = VA_RT_FORMAT_YUV444;
} else{
printf("Not supported format: %s! Currently only support following format: %s\n",
str, "YV12, I420, NV12, YUY2(YUYV), UYVY, P010, I010, RGBA, RGBX, BGRA or BGRX");
str, "YV12, I420, NV12, YUY2(YUYV), UYVY, AYUV, P010, I010, RGBA, RGBX, BGRA or BGRX");
assert(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment