use new openh264 version v2.1.0

This commit is contained in:
Taner Sener
2020-04-13 21:26:43 +01:00
parent 3c398cb8a0
commit 56621fbffb
674 changed files with 5312 additions and 2346 deletions
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
+3 -3
View File
@@ -1,5 +1,5 @@
language: cpp
dist: trusty
dist: xenial
compiler:
- g++
@@ -7,8 +7,8 @@ compiler:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq nasm g++-multilib gcc-multilib libc6-dev-i386 python3-pip unzip
- sudo python3 -m pip install meson==0.44.1
- sudo apt-get install -qq nasm g++-multilib gcc-multilib libc6-dev-i386 python3-pip python3-setuptools unzip
- sudo python3 -m pip install meson==0.47.0
- wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
- unzip ninja-linux.zip
- export PATH=$PATH:$PWD
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
+3 -3
View File
@@ -36,7 +36,7 @@ STATIC_LDFLAGS=-lstdc++
STRIP ?= strip
SHAREDLIB_MAJORVERSION=5
FULL_VERSION := 2.0.0
FULL_VERSION := 2.1.0
ifeq (,$(wildcard $(SRC_PATH)gmp-api))
HAVE_GMP_API=No
@@ -285,10 +285,10 @@ endif
endif
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@libdir@;$(PREFIX)/lib;' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
$(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@libdir@;$(PREFIX)/lib;' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
install-headers:
mkdir -p $(DESTDIR)$(PREFIX)/include/wels
Executable → Regular
View File
Executable → Regular
+6
View File
@@ -1,6 +1,12 @@
Releases
-----------
v2.1.0
------
- Experimentally support for multi-thread decoding(default disabled,and may result in random problems if enabled)
- Assembly optimization for loongson platform
- Update meson version to 5
- Some minor bug fixes
v2.0.0
------
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
Executable → Regular
+16 -4
View File
@@ -30,14 +30,26 @@ CFLAGS += -DHAVE_NEON_AARCH64
endif
endif
#for loongson
#for mips
ifneq ($(filter mips mips64, $(ARCH)),)
ifeq ($(USE_ASM), Yes)
ENABLE_MMI=Yes
ENABLE_MSA=Yes
ASM_ARCH = mips
ASMFLAGS += -I$(SRC_PATH)codec/common/mips/
LOONGSON3A = $(shell g++ -dM -E - < /dev/null | grep '_MIPS_TUNE ' | cut -f 3 -d " ")
ifeq ($(LOONGSON3A), "loongson3a")
CFLAGS += -DHAVE_MMI
#mmi
ifeq ($(ENABLE_MMI), Yes)
ENABLE_MMI = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) mmi)
ifeq ($(ENABLE_MMI), Yes)
CFLAGS += -DHAVE_MMI -Wa,-mloongson-mmi,-mloongson-ext
endif
endif
#msa
ifeq ($(ENABLE_MSA), Yes)
ENABLE_MSA = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) msa)
ifeq ($(ENABLE_MSA), Yes)
CFLAGS += -DHAVE_MSA -mmsa
endif
endif
endif
endif
Executable → Regular
View File
View File
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
#**********************************************************************************
# This script is using in build/arch.mk for mips to detect the simd instructions:
# mmi, msa (maybe more in the future).
#
# --usage:
# ./mips-simd-check.sh $(CC) mmi
# or ./mips-simd-check.sh $(CC) msa
#
# date: 10/17/2019 Created
#**********************************************************************************
TMPC=$(mktemp tmp.XXXXXX.c)
TMPO=$(mktemp tmp.XXXXXX.o)
if [ $2 == "mmi" ]
then
echo "void main(void){ __asm__ volatile(\"punpcklhw \$f0, \$f0, \$f0\"); }" > $TMPC
$1 -Wa,-mloongson-mmi $TMPC -o $TMPO &> /dev/null
if test -s $TMPO
then
echo "Yes"
fi
elif [ $2 == "msa" ]
then
echo "void main(void){ __asm__ volatile(\"addvi.b \$w0, \$w1, 1\"); }" > $TMPC
$1 -mmsa $TMPC -o $TMPO &> /dev/null
if test -s $TMPO
then
echo "Yes"
fi
fi
rm -f $TMPC $TMPO
+31 -12
View File
@@ -119,9 +119,9 @@ for file in sfiles:
armfiles.append(file)
mipsfiles = []
for file in cfiles:
c = file.split('/')
if 'mips' in c:
mipsfiles.append(file)
c = file.split('/')
if 'mips' in c:
mipsfiles.append(file)
cfiles = [x for x in cfiles if x not in mipsfiles]
@@ -181,15 +181,34 @@ if len(arm64files) > 0:
f.write("OBJS += $(%s_OBJSARM64)\n\n"%(PREFIX))
if len(mipsfiles) > 0:
f.write("%s_ASM_MIPS_SRCS=\\\n"%(PREFIX))
for c in mipsfiles:
f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
f.write("\n")
f.write("%s_OBJSMIPS += $(%s_ASM_MIPS_SRCS:.c=.$(OBJ))\n"%(PREFIX, PREFIX))
f.write("ifeq ($(ASM_ARCH), mips)\n")
f.write("%s_OBJS += $(%s_OBJSMIPS)\n"%(PREFIX,PREFIX))
f.write("endif\n")
f.write("OBJS += $(%s_OBJSMIPS)\n\n"%(PREFIX))
mmifiles = []
for file in mipsfiles:
if '_mmi' in file:
mmifiles.append(file)
f.write("%s_ASM_MIPS_MMI_SRCS=\\\n"%(PREFIX))
for c in mmifiles:
f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
f.write("\n")
f.write("%s_OBJSMIPS_MMI += $(%s_ASM_MIPS_MMI_SRCS:.c=.$(OBJ))\n\n"%(PREFIX, PREFIX))
msafiles = []
for file in mipsfiles:
if '_msa' in file:
msafiles.append(file)
f.write("%s_ASM_MIPS_MSA_SRCS=\\\n"%(PREFIX))
for c in msafiles:
f.write("\t$(%s_SRCDIR)/%s\\\n"%(PREFIX, c))
f.write("\n")
f.write("%s_OBJSMIPS_MSA += $(%s_ASM_MIPS_MSA_SRCS:.c=.$(OBJ))\n"%(PREFIX, PREFIX))
f.write("ifeq ($(ASM_ARCH), mips)\n")
f.write("ifeq ($(ENABLE_MMI), Yes)\n")
f.write("%s_OBJS += $(%s_OBJSMIPS_MMI)\n"%(PREFIX,PREFIX))
f.write("endif\n")
f.write("ifeq ($(ENABLE_MSA), Yes)\n")
f.write("%s_OBJS += $(%s_OBJSMIPS_MSA)\n"%(PREFIX,PREFIX))
f.write("endif\n")
f.write("endif\n")
f.write("OBJS += $(%s_OBJSMIPS_MMI)\n"%(PREFIX))
f.write("OBJS += $(%s_OBJSMIPS_MSA)\n\n"%(PREFIX))
f.write("OBJS += $(%s_OBJS)\n\n"%(PREFIX))
write_cpp_rule_pattern(f)
Executable → Regular
View File
View File
+12 -1
View File
@@ -49,6 +49,7 @@ CFLAGS += -isystem $(NDKROOT)/sysroot/usr/include -isystem $(NDKROOT)/sysroot/us
CXXFLAGS += -fno-rtti -fno-exceptions
LDFLAGS += --sysroot=$(SYSROOT)
SHLDFLAGS = -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,lib$(PROJECT_NAME).so
UTSHLDFLAGS = -Wl,-soname,libut.so
ifeq ($(NDK_TOOLCHAIN_VERSION), clang)
HOST_OS = $(shell uname -s | tr [A-Z] [a-z])
@@ -70,9 +71,11 @@ ifeq ($(NDK_TOOLCHAIN_VERSION), clang)
CFLAGS += -target $(TARGET_NAME)
LDFLAGS += -target $(TARGET_NAME) -gcc-toolchain $(GCC_TOOLCHAIN_PATH)
LDFLAGS += -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a
endif
# background reading: https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#unwinding
LDFLAGS += -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libunwind.a
ifneq ($(findstring /,$(CXX)),$(findstring \,$(CXX)))
ifneq ($(CXX),$(wildcard $(CXX)))
ifneq ($(CXX).exe,$(wildcard $(CXX).exe))
@@ -81,10 +84,18 @@ endif
endif
endif
ifeq ($(NDK_TOOLCHAIN_VERSION), clang)
STL_INCLUDES = \
-I$(NDKROOT)/sources/cxx-stl/llvm-libc++/include \
-I$(NDKROOT)/sources/cxx-stl/llvm-libc++abi/include
STL_LIB = \
$(NDKROOT)/sources/cxx-stl/llvm-libc++/libs/$(APP_ABI)/libc++_static.a
else
STL_INCLUDES = \
-I$(NDKROOT)/sources/cxx-stl/stlport/stlport
STL_LIB = \
$(NDKROOT)/sources/cxx-stl/stlport/libs/$(APP_ABI)/libstlport_static.a
endif
GTEST_INCLUDES = $(STL_INCLUDES)
CODEC_UNITTEST_INCLUDES = $(STL_INCLUDES)
View File
View File
+2 -2
View File
@@ -3,8 +3,8 @@ SHAREDLIB_DIR = $(PREFIX)/lib
SHAREDLIBSUFFIX = dylib
SHAREDLIBSUFFIXFULLVER=$(FULL_VERSION).$(SHAREDLIBSUFFIX)
SHAREDLIBSUFFIXMAJORVER=$(SHAREDLIB_MAJORVERSION).$(SHAREDLIBSUFFIX)
CURRENT_VERSION := 2.0.0
COMPATIBILITY_VERSION := 2.0.0
CURRENT_VERSION := 2.1.0
COMPATIBILITY_VERSION := 2.1.0
SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \
-fno-common -headerpad_max_install_names -install_name \
$(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER)
View File
View File
View File
View File
View File
View File
Executable → Regular
View File
View File
View File
+2 -2
View File
@@ -167,8 +167,8 @@ typedef enum {
DECODER_OPTION_LEVEL, ///< get current AU level info,only is used in GetOption
DECODER_OPTION_STATISTICS_LOG_INTERVAL,///< set log output interval
DECODER_OPTION_IS_REF_PIC, ///< feedback current frame is ref pic or not
DECODER_OPTION_NUM_OF_FRAMES_REMAINING_IN_BUFFER ///< number of frames remaining in decoder buffer when pictures are required to re-ordered into display-order.
DECODER_OPTION_NUM_OF_FRAMES_REMAINING_IN_BUFFER, ///< number of frames remaining in decoder buffer when pictures are required to re-ordered into display-order.
DECODER_OPTION_NUM_OF_THREADS, ///< number of decoding threads. The maximum thread count is equal or less than lesser of (cpu core counts and 16).
} DECODER_OPTION;
/**
+1
View File
@@ -201,6 +201,7 @@ typedef struct TagBufferInfo {
union {
SSysMEMBuffer sSystemBuffer; ///< memory info for one picture
} UsrData; ///< output buffer info
unsigned char* pDst[3]; //point to picture YUV data
} SBufferInfo;
+4 -4
View File
@@ -4,12 +4,12 @@
#include "codec_app_def.h"
static const OpenH264Version g_stCodecVersion = {2, 0, 0, 1905};
static const char* const g_strCodecVer = "OpenH264 version:2.0.0.1905";
static const OpenH264Version g_stCodecVersion = {2, 1, 0, 2002};
static const char* const g_strCodecVer = "OpenH264 version:2.1.0.2002";
#define OPENH264_MAJOR (2)
#define OPENH264_MINOR (0)
#define OPENH264_MINOR (1)
#define OPENH264_REVISION (0)
#define OPENH264_RESERVED (1905)
#define OPENH264_RESERVED (2002)
#endif // CODEC_VER_H
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+8
View File
@@ -860,6 +860,10 @@
RelativePath="..\..\..\common\inc\wels_const_common.h"
>
</File>
<File
RelativePath="..\..\..\decoder\core\inc\wels_decoder_thread.h"
>
</File>
</Filter>
<Filter
Name="Source Files"
@@ -977,6 +981,10 @@
RelativePath="..\..\..\common\src\utils.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\core\src\wels_decoder_thread.cpp"
>
</File>
</Filter>
</Files>
<Globals>
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More