Skip to content

Commit 95d70fb

Browse files
committed
main profile
1 parent a548a91 commit 95d70fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+25991
-1040
lines changed

CMakeLists.txt

+21-10
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@ cmake_minimum_required (VERSION 3.5)
22

33
# Check input arguments.
44
if(NOT SET_PROF)
5-
set(SET_PROF "BASE")
5+
set(SET_PROF "MAIN")
66
endif()
77

88
if(("${SET_PROF}" STREQUAL "MAIN") OR ("${SET_PROF}" STREQUAL "BASE"))
99
message("SET_PROF=${SET_PROF}")
10-
if("${SET_PROF}" STREQUAL "MAIN")
11-
message("Main profile is not yet supported ")
12-
return()
13-
endif()
1410
else()
1511
message("SET_PORF should be BASE or MAIN [Input error: ${SET_PROF}]")
1612
return()
1713
endif()
1814

19-
option(XEVD_APP_STATIC_BUILD "app will be statically linked against static library" ON)
15+
option(XEVD_APP_STATIC_BUILD "xevd_app will be statically linked against static xevd library" ON)
2016
if(XEVD_APP_STATIC_BUILD)
2117
add_definitions(-DXEVD_STATIC_DEFINE)
2218
endif(XEVD_APP_STATIC_BUILD)
2319

20+
cmake_policy(SET CMP0048 NEW)
21+
set(CMAKE_C_STANDARD 99)
22+
2423
# Maps to a solution file (XEVD.sln).
25-
project (XEVD)
24+
project (XEVD VERSION 1.0.0)
2625
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
2726

28-
# Set compiler flags and options.
27+
# Set compiler flags and options.
2928
if( MSVC )
3029
elseif( UNIX OR MINGW )
3130
if(NOT CMAKE_BUILD_TYPE)
3231
set(CMAKE_BUILD_TYPE "Release")
3332
endif()
33+
message("CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
3434

3535
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
3636
set(OPT_LV "O0")
3737
else()
3838
set(OPT_LV "O3")
3939
endif()
40-
41-
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fomit-frame-pointer -Wall -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-attributes -Werror -Wno-strict-overflow -Wno-unknown-pragmas -Wno-stringop-overflow -std=c99")
40+
41+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -${OPT_LV} -fomit-frame-pointer -Wall -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-attributes -Werror -Wno-strict-overflow -Wno-unknown-pragmas -Wno-stringop-overflow -std=c99")
4242
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-sign -pthread -Wno-pointer-to-int-cast -Wno-maybe-uninitialized")
4343
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lm")
4444
endif()
@@ -55,3 +55,14 @@ if(("${SET_PROF}" STREQUAL "MAIN"))
5555
add_subdirectory(src_main)
5656
endif()
5757
add_subdirectory(app)
58+
59+
# uninstall target
60+
if(NOT TARGET uninstall)
61+
configure_file(
62+
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
63+
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
64+
IMMEDIATE @ONLY)
65+
66+
add_custom_target(uninstall
67+
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
68+
endif()

COPYING

+41
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-------------------------------------------------------------------------------
2+
< 'inc' and 'src_base' folders for EVC baseline profile >
3+
-------------------------------------------------------------------------------
14
Copyright(c) 2020 Samsung Electronics Co., Ltd.
25
All Rights Reserved.
36

@@ -27,6 +30,44 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2730
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2831
POSSIBILITY OF SUCH DAMAGE.
2932

33+
-------------------------------------------------------------------------------
34+
< 'src_main' folder for EVC main profile >
35+
-------------------------------------------------------------------------------
36+
The copyright in this software is being made available under the BSD
37+
License, included below. This software may be subject to contributor and
38+
other third party rights, including patent rights, and no such rights are
39+
granted under this license.
40+
41+
Copyright(c) 2020 Samsung Electronics Co., Ltd.
42+
All Rights Reserved.
43+
44+
Redistribution and use in source and binary forms, with or without
45+
modification, are permitted provided that the following conditions are met:
46+
47+
- Redistributions of source code must retain the above copyright notice,
48+
this list of conditions and the following disclaimer.
49+
50+
- Redistributions in binary form must reproduce the above copyright notice,
51+
this list of conditions and the following disclaimer in the documentation
52+
and/or other materials provided with the distribution.
53+
54+
- Neither the name of the copyright owner, nor the names of its contributors
55+
may be used to endorse or promote products derived from this software
56+
without specific prior written permission.
57+
58+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
59+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61+
ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
62+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
63+
CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
64+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
65+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
66+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
67+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
68+
POSSIBILITY OF SUCH DAMAGE.
69+
70+
3071
-------------------------------------------------------------------------------
3172
This software is based on the official ISO/IEC essential video coding (EVC)
3273
reference software. The software is licensed as follows:

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# eXtra-fast Essential Video Decoder (XEVD)
22
The **eXtra-fast Essential Video Decoder** (XEVD) is an opensource and fast MPEG-5 EVC decoder.
33

4-
**MPEG-5 Essential Video Coding** (EVC) is a future video compression standard of ISO/IEC Moving Picture Experts Grop (MPEG). The main goal of the EVC is to provide a significantly improved compression capability over existing video coding standards with timely publication of terms.
4+
**MPEG-5 Essential Video Coding** (EVC) is a future video compression standard of ISO/IEC Moving Picture Experts Group (MPEG). The main goal of the EVC is to provide a significantly improved compression capability over existing video coding standards with timely publication of terms.
55
The EVC defines two profiles, including "**Baseline Profile**" and "**Main Profile**". The "Baseline profile" contains only technologies that are older than 20 years or otherwise freely available for use in the standard. In addition, the "Main profile" adds a small number of additional tools, each of which can be either cleanly disabled or switched to the corresponding baseline tool on an individual basis.
66

77
## How to build
@@ -45,7 +45,7 @@ The EVC defines two profiles, including "**Baseline Profile**" and "**Main Profi
4545
You can change '-G' option with proper version of Visual Studio.
4646
4747
## How to use
48-
XEVD supports baseline profiles of EVC.
48+
XEVD supports mainline and baseline profiles of EVC.
4949
5050
| OPTION | DEFAULT | DESCRIPTION |
5151
|-----------------------|-----------|------------------------------------------------|
@@ -54,11 +54,10 @@ XEVD supports baseline profiles of EVC.
5454
| -m, --parallel_task | 1 | mumber of threads to be created |
5555
5656
57-
>More optins can be found when type **xevdb_app** only.
57+
>More optins can be found when type **xevd_app** only.
5858
5959
### Example
60-
$xevdb_app -i xevd.bin -o xevd.yuv
61-
60+
$xevd_app -i input_bitstream.evc -o output_video.yuv
6261
6362
## License
6463
See [COPYING](COPYING) file for details.

app/CMakeLists.txt

+55-24
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,63 @@
11
include_directories (${PROJECT_SOURCE_DIR}/app)
2+
include_directories (${CMAKE_BINARY_DIR})
3+
4+
set( EXE_NAME xevd_app )
5+
set( EXE_NAME_BASE xevdb_app)
6+
7+
file (GLOB ENC_SRC "*.c" )
8+
file (GLOB ENC_INC "*.h" )
29

310
if(("${SET_PROF}" STREQUAL "MAIN"))
4-
set( EXE_NAME xevd_app )
5-
set( LIB_NAME xevd )
6-
set( INC_PATH . .. ../inc ../src_base ../src_main )
7-
elseif(("${SET_PROF}" STREQUAL "BASE"))
8-
set( EXE_NAME xevdb_app )
9-
set( LIB_NAME xevdb )
10-
set( INC_PATH . .. ../inc ../src_base )
11-
endif()
11+
add_executable (${EXE_NAME} ${ENC_SRC} ${ENC_INC} )
12+
include_directories( ${EXE_NAME} PUBLIC . .. ../inc ../src_base ../src_main ${BASE_SRC_PATH})
13+
14+
if(XEVD_APP_STATIC_BUILD)
15+
target_link_libraries (${EXE_NAME} xevd)
16+
else()
17+
target_link_libraries (${EXE_NAME} xevd_dynamic)
18+
endif()
19+
20+
set_property(TARGET ${EXE_NAME} PROPERTY FOLDER "app")
21+
set_target_properties(${EXE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
22+
23+
if( MSVC )
24+
target_compile_definitions( ${EXE_NAME} PUBLIC _CRT_SECURE_NO_WARNINGS ANY )
25+
elseif( UNIX OR MINGW )
26+
target_compile_definitions( ${EXE_NAME} PUBLIC LINUX ANY )
27+
target_link_libraries (${EXE_NAME} m)
28+
endif()
1229

13-
file (GLOB DEC_SRC "*.c" )
14-
file (GLOB DEC_INC "*.h" )
30+
# Install rules
31+
#
32+
# Install executable to <prefix>/bin
33+
include( GNUInstallDirs)
34+
install( TARGETS ${EXE_NAME} RUNTIME COMPONENT Runtime DESTINATION ${CMAKE_INSTALL_BINDIR})
35+
36+
endif()
1537

16-
add_executable (${EXE_NAME} ${DEC_SRC} ${DEC_INC} )
17-
include_directories( ${EXE_NAME} PUBLIC ${INC_PATH} )
38+
if(("${SET_PROF}" STREQUAL "BASE"))
39+
add_executable (${EXE_NAME_BASE} ${ENC_SRC} ${ENC_INC} )
40+
include_directories( ${EXE_NAME_BASE} PUBLIC . .. ../inc ../src_base ${BASE_SRC_PATH})
41+
42+
if(XEVD_APP_STATIC_BUILD)
43+
target_link_libraries (${EXE_NAME_BASE} xevdb)
44+
else()
45+
target_link_libraries (${EXE_NAME_BASE} xevdb_dynamic)
46+
endif()
1847

19-
if(XEVD_APP_STATIC_BUILD)
20-
target_link_libraries (${EXE_NAME} ${LIB_NAME})
21-
else()
22-
target_link_libraries (${EXE_NAME} ${LIB_NAME}_dynamic)
48+
set_property(TARGET ${EXE_NAME_BASE} PROPERTY FOLDER "app")
49+
set_target_properties(${EXE_NAME_BASE} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
50+
if( MSVC )
51+
target_compile_definitions( ${EXE_NAME_BASE} PUBLIC _CRT_SECURE_NO_WARNINGS ANY )
52+
elseif( UNIX OR MINGW )
53+
target_compile_definitions( ${EXE_NAME_BASE} PUBLIC LINUX ANY )
54+
target_link_libraries (${EXE_NAME_BASE} m)
55+
endif()
56+
57+
# Install rules
58+
#
59+
# Install executable to <prefix>/bin
60+
include( GNUInstallDirs)
61+
install( TARGETS ${EXE_NAME_BASE} RUNTIME COMPONENT Runtime DESTINATION ${CMAKE_INSTALL_BINDIR})
2362
endif()
2463

25-
set_property(TARGET ${EXE_NAME} PROPERTY FOLDER "app")
26-
set_target_properties(${EXE_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
27-
if( MSVC )
28-
target_compile_definitions( ${EXE_NAME} PUBLIC _CRT_SECURE_NO_WARNINGS ANY )
29-
elseif( UNIX OR MINGW )
30-
target_compile_definitions( ${EXE_NAME} PUBLIC LINUX ANY )
31-
target_link_libraries (${EXE_NAME} m)
32-
endif()

0 commit comments

Comments
 (0)