Commit e474c0a3 authored by Jeff Moguillansky's avatar Jeff Moguillansky Committed by Vlad Zakharchenko
Browse files

The OpenIMF basic functionality for v-pcc content decoding and rendering

parent 6e86f1ea
build_win64
build_linux
out
log.txt
.vs
tmp
cmake_minimum_required (VERSION 3.6)
project (OpenIMF)
IF( WIN32 OR MSVC )
set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++14 -DMSVC /openmp -DGIT_COMMIT_HASH=\\\"proto\\\"") # -DBITSTREAM_TRACE
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++14 -DGIT_COMMIT_HASH=\\\"proto\\\"") # -DBITSTREAM_TRACE
ENDIF()
IF(APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++14 -DGIT_COMMIT_HASH=\\\"proto\\\"") # -DBITSTREAM_TRACE
set (CMAKE_EXE_LINKER_FLAGS "-framework OpenGL")
ENDIF()
file(GLOB_RECURSE VPCC_PROTO_SRC "src/*.cpp" "src/*.h")
list(FILTER VPCC_PROTO_SRC EXCLUDE REGEX ".*_Android.cpp$")
include_directories(
"src"
"external/stb/include"
"external/glfw/include"
"external/glew-2.1.0/include"
"external/glm/include"
"external/ffmpeg-4.2.2-win64-dev-lgpl/include"
)
link_directories(
"external/glfw/lib"
"external/glew-2.1.0/lib/Release/x64/"
"external/ffmpeg-4.2.2-win64-dev-lgpl/lib"
)
add_library(PccDecoderLib ${VPCC_PROTO_SRC} ${VPCC_PROTO_DEBUG})
IF( WIN32 OR MSVC )
target_link_libraries(PccDecoderLib
avcodec.lib avformat.lib avutil.lib swscale.lib
glfw3 glew32 OpenGL32
)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
target_link_libraries(PccDecoderLib
avcodec avformat avutil swscale
glfw3 GLEW OpenGL GL
dl m pthread Xxf86vm X11 Xi Xcursor
)
ENDIF()
IF(APPLE)
target_link_libraries(PccDecoderLib
avcodec avformat avutil swscale
glfw glew
)
ENDIF()
IF( WIN32 OR MSVC )
target_compile_definitions(PccDecoderLib PUBLIC FFMPEG_HW_DEVICE_STR="d3d11va" FFMPEG_HW_CODEC_STR="hevc")
ENDIF()
IF( APPLE )
target_compile_definitions(PccDecoderLib PUBLIC FFMPEG_HW_DEVICE_STR="dxva2" FFMPEG_HW_CODEC_STR="hevc")
ENDIF()
IF( CMAKE_COMPILER_IS_GNUCXX )
target_compile_definitions(PccDecoderLib PUBLIC FFMPEG_HW_DEVICE_STR="nvdec" FFMPEG_HW_CODEC_STR="hevc")
ENDIF()
add_executable(PccDecoder "console/src/Main.cpp")
target_link_libraries(PccDecoder PccDecoderLib)
cmake --build build_win64 -- /m /p:Configuration=Release /p:Platform=x64
cmake -H. -Bbuild_win64 -G "Visual Studio 15 2017 Win64"
\ No newline at end of file
This diff is collapsed.
/* Copyright (c) 2020, Futurewei Technologies., Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "VPCCApplication.h"
#include "DebugUtil.h"
int main(int argc, char** argv) {
if (argc < 2) ERR("usage: PCCDecoder <file>");
VPCCApplication app;
app.init(argv[1]);
app.run();
}
\ No newline at end of file
export PATH=/d/Program\ Files/CMake/bin/:$PATH
This diff is collapsed.
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Zeranoe FFmpeg Builds <http://ffmpeg.zeranoe.com/builds/>
Build: ffmpeg-4.2.2-win64-shared-lgpl
Configuration:
--enable-version3
--enable-sdl2
--enable-fontconfig
--enable-gnutls
--enable-iconv
--enable-libass
--enable-libdav1d
--enable-libbluray
--enable-libfreetype
--enable-libmp3lame
--enable-libopencore-amrnb
--enable-libopencore-amrwb
--enable-libopenjpeg
--enable-libopus
--enable-libshine
--enable-libsnappy
--enable-libsoxr
--enable-libtheora
--enable-libtwolame
--enable-libvpx
--enable-libwavpack
--enable-libwebp
--enable-libxml2
--enable-libzimg
--enable-lzma
--enable-zlib
--enable-gmp
--enable-libvorbis
--enable-libvo-amrwbenc
--enable-libmysofa
--enable-libspeex
--enable-libaom
--enable-libmfx
--enable-amf
--enable-ffnvcodec
--enable-cuvid
--enable-d3d11va
--enable-nvenc
--enable-nvdec
--enable-dxva2
--enable-libopenmpt
Libraries:
SDL 20200120-cb4dae5 <https://libsdl.org>
Fontconfig 2.13.92 <http://freedesktop.org/wiki/Software/fontconfig>
GnuTLS 3.6.11.1 <https://gnutls.org/>
libiconv 1.16 <http://gnu.org/software/libiconv>
libass 0.14.0 <https://github.com/libass/libass>
dav1d 20200115-010eae8 <https://code.videolan.org/videolan/dav1d>
libbluray 20191112-137974c <https://www.videolan.org/developers/libbluray.html>
FreeType 2.10.1 <http://freetype.sourceforge.net>
LAME 3.100 <http://lame.sourceforge.net>
OpenCORE AMR 20170731-07a5be4 <https://sourceforge.net/projects/opencore-amr>
OpenJPEG 20200113-b63a433 <https://github.com/uclouvain/openjpeg>
Opus 20200119-6d29f51 <https://opus-codec.org>
shine 20190420-76ea4f0 <https://github.com/savonet/shine>
Snappy 1.1.7 <https://github.com/google/snappy>
libsoxr 20180224-945b592 <http://sourceforge.net/projects/soxr>
Theora 20171023-e5d205b <http://theora.org>
TwoLAME 0.4.0 <http://twolame.org>
vpx 20200118-b78d3b2 <http://webmproject.org>
WavPack 5.2.0 <http://wavpack.com>
WebP 20200106-0fa56f3 <https://developers.google.com/speed/webp>
libxml2 2.9.10 <http://xmlsoft.org>
z.lib 20191204-9ae36d7 <https://github.com/sekrit-twc/zimg>
XZ Utils 5.2.4 <http://tukaani.org/xz>
zlib 1.2.11 <http://zlib.net>
GMP 6.1.2 <https://gmplib.org>
Vorbis 20190128-9eadecc <http://vorbis.com>
VisualOn AMR-WB 20141107-3b3fcd0 <https://sourceforge.net/projects/opencore-amr>
libmysofa 20190907-e07edb3 <https://github.com/hoene/libmysofa>
Speex 20190808-58ac1d4 <http://speex.org>
aom 20200120-412efe2 <https://aomedia.googlesource.com/aom>
libmfx 1.28 <https://software.intel.com/en-us/media-sdk>
AMF 20191216-acbd877 <https://gpuopen.com/gaming-product/advanced-media-framework>
nv-codec-headers 20191126-250292d <https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git>
OpenMPT 20191010-51cb021 <https://openmpt.org>
Copyright (C) 2020 Kyle Schwarz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_VERSION_H
#define AVCODEC_VERSION_H
/**
* @file
* @ingroup libavc
* Libavcodec version macros.
*/
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 54
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
LIBAVCODEC_VERSION_MICRO)
#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
LIBAVCODEC_VERSION_MICRO)
#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
/**
* FF_API_* defines may be placed below to indicate public API that will be
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
*
* @note, when bumping the major version it is recommended to manually
* disable each FF_API_* in its own commit instead of disabling them all
* at once through the bump. This improves the git bisect-ability of the change.
*/
#ifndef FF_API_LOWRES
#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
#ifndef FF_API_AVCTX_TIMEBASE
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_CODED_FRAME
#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_SIDEDATA_ONLY_PKT
#define FF_API_SIDEDATA_ONLY_PKT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_VDPAU_PROFILE
#define FF_API_VDPAU_PROFILE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_CONVERGENCE_DURATION
#define FF_API_CONVERGENCE_DURATION (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_AVPICTURE
#define FF_API_AVPICTURE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_AVPACKET_OLD_API
#define FF_API_AVPACKET_OLD_API (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_RTP_CALLBACK
#define FF_API_RTP_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_VBV_DELAY
#define FF_API_VBV_DELAY (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_CODER_TYPE
#define FF_API_CODER_TYPE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_STAT_BITS
#define FF_API_STAT_BITS (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_PRIVATE_OPT
#define FF_API_PRIVATE_OPT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_ASS_TIMING
#define FF_API_ASS_TIMING (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_OLD_BSF
#define FF_API_OLD_BSF (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_COPY_CONTEXT
#define FF_API_COPY_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_GET_CONTEXT_DEFAULTS
#define FF_API_GET_CONTEXT_DEFAULTS (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_NVENC_OLD_NAME
#define FF_API_NVENC_OLD_NAME (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_STRUCT_VAAPI_CONTEXT
#define FF_API_STRUCT_VAAPI_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_MERGE_SD_API
#define FF_API_MERGE_SD_API (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_TAG_STRING
#define FF_API_TAG_STRING (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_GETCHROMA
#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_CODEC_GET_SET
#define FF_API_CODEC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_USER_VISIBLE_AVHWACCEL
#define FF_API_USER_VISIBLE_AVHWACCEL (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_LOCKMGR
#define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_NEXT
#define FF_API_NEXT (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_UNSANITIZED_BITRATES
#define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
#endif /* AVCODEC_VERSION_H */
Supports Markdown
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