Skip to content

Commit

Permalink
Merge pull request #211 from adamjw24/develop_v3.0.0
Browse files Browse the repository at this point in the history
 Prepare v3.0.0
  • Loading branch information
K-os authored Oct 25, 2024
2 parents 2207e9c + a646129 commit 31d0e25
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 55 deletions.
68 changes: 38 additions & 30 deletions .gitlab-ci-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ variables:
EMSDK_VERSION:
value: "3.1.26"
description: "EMSDK version used for WASM build (either version number or latest)"
ENABLE_LTO:
value: 0
description: "enable link-time optimization (OFF by default in CI to improve caching)"
CCACHE_DIR: "${CI_PROJECT_DIR}/ext/ccache"
CCACHE_MAXSIZE: 500M

Expand All @@ -35,46 +38,53 @@ variables:
.build_only_template:
extends: .base_template
script:
- make disable-lto=1 all
- make enable-lto=${ENABLE_LTO} all
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_PROJECT_PATH == "git/vvdec" && $CI_COMMIT_BRANCH == "master"'

.build_only_template_full:
extends: .build_only_template
rules:
- if: '$FULL_BUILD == "1"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_PROJECT_PATH == "git/vvdec" && $CI_COMMIT_BRANCH == "master"'

.build_test_template:
extends: .base_template
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_PARALLEL_LEVEL: 2
script:
- make enable-bitstream-download=1 enable-local-bitstream-download=1 disable-lto=1 all
- make enable-bitstream-download=1 enable-local-bitstream-download=1 enable-lto=${ENABLE_LTO} all
- make test
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "develop"'
- if: '$CI_PROJECT_PATH == "git/vvdec" && $CI_COMMIT_BRANCH == "master"'
- if: '$CI_PROJECT_PATH == "git/vvdec" && $CI_COMMIT_BRANCH == "develop"'
when: delayed
start_in: 1 hour

.build_test_template_full:
extends: .build_test_template
rules:
- if: '$FULL_BUILD == "1"'
- if: '$CI_PROJECT_PATH == "git/vvdec" && $CI_COMMIT_BRANCH == "master"'


.build_test_macos_template:
extends: .build_test_template
script:
- make osx-arch=${OSX_ARCH} enable-bitstream-download=1 enable-local-bitstream-download=1 disable-lto=1 all
- make osx-arch=${OSX_ARCH} enable-bitstream-download=1 enable-local-bitstream-download=1 enable-lto=${ENABLE_LTO} all
- make osx-arch=${OSX_ARCH} test

.build_test_msvc_template:
extends: .build_test_template
script:
- make msvc-arch=${MSVC_ARCH} enable-bitstream-download=1 enable-local-bitstream-download=1 disable-lto=1 all
- make msvc-arch=${MSVC_ARCH} enable-bitstream-download=1 enable-local-bitstream-download=1 enable-lto=${ENABLE_LTO} all
- make msvc-arch=${MSVC_ARCH} test


Expand Down Expand Up @@ -128,14 +138,14 @@ build_gcc11_ubuntu2204:
CXX: g++-11

build_gcc12_ubuntu2204:
extends: .build_only_template
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: gcc-12
CXX: g++-12

build_gcc13_ubuntu2404:
extends: .build_only_template
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
CC: gcc-13
Expand Down Expand Up @@ -232,21 +242,21 @@ build_clang18_ubuntu2404:
CC: clang-18
CXX: clang++-18

build_mingw_ubuntu2204:
build_mingw_ubuntu2404:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
toolchainfile: cmake/toolchains/x86_64-w64-mingw32-gcc-posix-ubuntu.cmake

build_aarch64_gcc_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
build_aarch64_gcc_ubuntu2404:
extends: .build_only_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
toolchainfile: cmake/toolchains/aarch64-linux-gnu-gcc-ubuntu.cmake

build_armv7_gcc_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
build_armv7_gcc_ubuntu2404:
extends: .build_only_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
toolchainfile: cmake/toolchains/arm-linux-gnueabihf-gcc-ubuntu.cmake

Expand All @@ -258,15 +268,11 @@ build_ios:
BUILD_TOOL_OPTIONS: "-t vvdec"
script:
# static build only:
- make disable-lto=1 static
- make enable-lto=${ENABLE_LTO} static
tags:
- macos-arm


test_ubuntu1804:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_1804_dev:latest

test_ubuntu2004:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_dev:latest
Expand All @@ -275,6 +281,10 @@ test_ubuntu2204:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_dev:latest

test_ubuntu2404:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_dev:latest

test_vc191x:
extends: .build_test_msvc_template
variables:
Expand Down Expand Up @@ -303,14 +313,12 @@ test_vc193x_Win32:
tags:
- vc193x

build_vc193x_arm64:
extends: .build_only_template_full
test_vc193x_arm64:
extends: .build_test_msvc_template
variables:
MSVC_ARCH: arm64
tags:
- vc193x
script:
- make msvc-arch=${MSVC_ARCH} all
- vc193x-arm

test_macos_arm64:
extends: .build_test_macos_template
Expand Down Expand Up @@ -357,10 +365,10 @@ rebuild_selenium_docker_image:
DOCKER_IMAGE_TAG: "$CI_REGISTRY_IMAGE/selenium-debian:emsdk-$EMSDK_VERSION"
IMAGE_BUILD_ARGS: "--build-arg EMSDK_VER=$EMSDK_VERSION"
rules:
- if: '$CI_PROJECT_PATH == "git/vvdec"'
- if: '$CI_PROJECT_PATH == "git/vvdec" && $FULL_BUILD == "1"'

test_wasm:
extends: .build_test_template
extends: .build_test_template_full
image: $CI_REGISTRY/git/vvdec/selenium-debian:emsdk-$EMSDK_VERSION
needs:
- job: rebuild_selenium_docker_image
Expand Down
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cmake_policy( VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} )
# project name
project( vvdec VERSION 3.0.0 )
# set alternative version numbering for release candidates
set( PROJECT_VERSION_RC rc3 )
#set( PROJECT_VERSION_RC rc3 )
if( PROJECT_VERSION_RC )
set( PROJECT_VERSION "${PROJECT_VERSION}-${PROJECT_VERSION_RC}" )
endif()
Expand Down Expand Up @@ -91,8 +91,8 @@ if( VVDEC_TARGET_ARCH STREQUAL "WASM" )
endif()

# set common warning flags
add_compile_options( "$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall;-Wno-unused-function;-Wno-enum-compare-switch;-Wno-unknown-attributes>" )
add_compile_options( "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wno-unused-function;-Wno-sign-compare;-fdiagnostics-show-option;-Wno-ignored-attributes>" )
add_compile_options( "$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall;-Wno-unused-function;-Wno-enum-compare-switch;-Wno-unknown-attributes;-pedantic;-Wno-error=pedantic;-Wno-c++2a-extensions>" )
add_compile_options( "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wno-unused-function;-Wno-sign-compare;-fdiagnostics-show-option;-Wno-ignored-attributes;-pedantic;-Wno-error=pedantic>" )
add_compile_options( "$<$<CXX_COMPILER_ID:MSVC>:/W4;/wd4100;/wd4127;/wd4244;/wd4245;/wd4389;/wd4456;/wd4457;/wd4458;/wd4459;/wd4505;/wd4701;/wd4702;/wd4703>" )


Expand Down Expand Up @@ -208,6 +208,7 @@ endif()

# set c++14
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_EXTENSIONS OFF )
set( CMAKE_CXX_STANDARD_REQUIRED ON )

# compile everything position independent (even static libraries)
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ CONFIG_OPTIONS += -G '$(CMAKE_GENERATOR_CUSTOM)'
endif

ifneq ($(verbose),)
CONFIG_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE=ON
CONFIG_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE=$(verbose)
endif

ifneq ($(enable-bitstream-download),)
CONFIG_OPTIONS += -DVVDEC_ENABLE_BITSTREAM_DOWNLOAD=ON
CONFIG_OPTIONS += -DVVDEC_ENABLE_BITSTREAM_DOWNLOAD=$(enable-bitstream-download)
endif

ifneq ($(enable-local-bitstream-download),)
CONFIG_OPTIONS += -DVVDEC_ENABLE_LOCAL_BITSTREAM_DOWNLOAD=ON
CONFIG_OPTIONS += -DVVDEC_ENABLE_LOCAL_BITSTREAM_DOWNLOAD=$(enable-local-bitstream-download)
endif

ifneq ($(enable-build-type-postfix),)
CONFIG_OPTIONS += -DVVDEC_ENABLE_BUILD_TYPE_POSTFIX=ON
CONFIG_OPTIONS += -DVVDEC_ENABLE_BUILD_TYPE_POSTFIX=$(enable-build-type-postfix)
endif

ifneq ($(install-prefix),)
Expand All @@ -51,12 +51,12 @@ ifneq ($(install-vvdecapp),)
CONFIG_OPTIONS += -DVVDEC_INSTALL_VVDECAPP=$(install-vvdecapp)
endif

ifneq ($(enable-arch),)
CONFIG_OPTIONS += -DVVDEC_OPT_TARGET_ARCH=$(enable-arch)
ifneq ($(opt-target-arch),)
CONFIG_OPTIONS += -DVVDEC_OPT_TARGET_ARCH=$(opt-target-arch)
endif

ifneq ($(disable-lto),)
CONFIG_OPTIONS += -DVVDEC_ENABLE_LINK_TIME_OPT=OFF
ifneq ($(enable-lto),)
CONFIG_OPTIONS += -DVVDEC_ENABLE_LINK_TIME_OPT=$(enable-lto)
endif

ifneq ($(enable-werror),)
Expand Down
2 changes: 1 addition & 1 deletion source/App/vvdecapp/vvdecHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ VVDEC_DECL void rescalePlane( const vvdecPlane& srcPlane,
int bitDepth,
const bool horCollocatedChromaFlag,
const bool verCollocatedChromaFlag );
}; // namespace vvdec
} // namespace vvdec

static void upscaleFrame( const vvdecFrame* srcFrame, vvdecFrame* dstFrame )
{
Expand Down
46 changes: 42 additions & 4 deletions source/App/vvdecapp/vvdecapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,11 +1046,49 @@ static bool handle_frame( vvdecFrame* pcFrame,
{
if(logLevel >= VVDEC_INFO )
{
*logStream << "vvdecapp [info]: SizeInfo: " << pcFrame->width << "x" << pcFrame->height << " (" << pcFrame->bitDepth << "b)" << std::endl;
if( pcFrame->picAttributes && pcFrame->picAttributes->vui && pcFrame->picAttributes->vui->colourDescriptionPresentFlag )
*logStream << "vvdecapp [info]: SizeInfo: " << pcFrame->width << "x" << pcFrame->height << " (" << pcFrame->bitDepth << "b) " << std::endl;
if( pcFrame->picAttributes && pcFrame->picAttributes->vui )
{
*logStream << "vvdecapp [info]: VUI ColourDescription: colourPrim: " << pcFrame->picAttributes->vui->colourPrimaries << " transCharacteristics: " << pcFrame->picAttributes->vui->transferCharacteristics
<< " matrixCoefficients: " << pcFrame->picAttributes->vui->matrixCoefficients << std::endl;
if(logLevel >= VVDEC_VERBOSE )
{
*logStream << "vvdecapp [verbose]: VUI : progressive_source_flag : " << pcFrame->picAttributes->vui->progressiveSourceFlag << std::endl
<< " interlaced_source_flag : " << pcFrame->picAttributes->vui->interlacedSourceFlag << std::endl
<< " non_packed_constraint_flag : " << pcFrame->picAttributes->vui->nonPackedFlag << std::endl
<< " non_projected_constraint_flag : " << pcFrame->picAttributes->vui->nonProjectedFlag << std::endl
<< " aspect_ratio_info_present_flag : " << pcFrame->picAttributes->vui->aspectRatioInfoPresentFlag << std::endl;
if ( pcFrame->picAttributes->vui->aspectRatioConstantFlag )
{
*logStream << " AspectRatio : aspectRatioConstantFlag : " << pcFrame->picAttributes->vui->aspectRatioConstantFlag << std::endl
<< " aspectRatioIdc : " << pcFrame->picAttributes->vui->aspectRatioIdc << std::endl
<< " sarWidth : " << pcFrame->picAttributes->vui->sarWidth << std::endl
<< " sarHeight : " << pcFrame->picAttributes->vui->sarHeight << std::endl;
}
*logStream << " overscan_info_present_flag : " << pcFrame->picAttributes->vui->overscanInfoPresentFlag << std::endl;
if ( pcFrame->picAttributes->vui->overscanInfoPresentFlag )
{
*logStream << " OverscanInfo : overscan_appropriate_flag : " << pcFrame->picAttributes->vui->overscanAppropriateFlag << std::endl;
}
*logStream << " colour_description_present_flag : " << pcFrame->picAttributes->vui->colourDescriptionPresentFlag << std::endl;
if ( pcFrame->picAttributes->vui->colourDescriptionPresentFlag )
{
*logStream << " ColourDescription : colour_primaries : " << pcFrame->picAttributes->vui->colourPrimaries << std::endl
<< " transfer_characteristics : " << pcFrame->picAttributes->vui->transferCharacteristics << std::endl
<< " matrix_coeffs : " << pcFrame->picAttributes->vui->matrixCoefficients << std::endl
<< " full_range_flag : " << pcFrame->picAttributes->vui->videoFullRangeFlag << std::endl;
}
*logStream << " chroma_loc_info_present_flag : " << pcFrame->picAttributes->vui->chromaLocInfoPresentFlag << std::endl;
if ( pcFrame->picAttributes->vui->chromaLocInfoPresentFlag )
{
*logStream << " chromaLocInfo : chromaSampleLocTypeTopField : " << pcFrame->picAttributes->vui->chromaSampleLocTypeTopField << std::endl
<< " chromaSampleLocTypeBottomField : " << pcFrame->picAttributes->vui->chromaSampleLocTypeBottomField << std::endl
<< " chromaSampleLocType : " << pcFrame->picAttributes->vui->chromaSampleLocType << std::endl;
}
}
else if( pcFrame->picAttributes->vui->colourDescriptionPresentFlag )
{
*logStream << "vvdecapp [info]: VUI ColourDescription: colourPrim: " << pcFrame->picAttributes->vui->colourPrimaries << " transCharacteristics: " << pcFrame->picAttributes->vui->transferCharacteristics
<< " matrixCoefficients: " << pcFrame->picAttributes->vui->matrixCoefficients << std::endl;
}
}
}
prevFrameW = pcFrame->width;
Expand Down
2 changes: 1 addition & 1 deletion source/Lib/CommonLib/Picture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,4 +652,4 @@ void Picture::stopProcessingTimer()
m_dProcessingTime += std::chrono::duration<double>(endTime - m_processingStartTime).count();
}

};
} // namespace vvdec
2 changes: 1 addition & 1 deletion source/Lib/CommonLib/Slice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ class PPS : public BasePS<PPS>
bool m_qpDeltaInfoInPhFlag = false;
bool m_mixedNaluTypesInPicFlag = false;

bool m_scalingListPresentFlag = false;;
bool m_scalingListPresentFlag = false;
ScalingList m_scalingList; //!< ScalingList class
uint32_t m_picWidthInLumaSamples = 0;
uint32_t m_picHeightInLumaSamples = 0;
Expand Down
2 changes: 1 addition & 1 deletion source/Lib/CommonLib/UnitPartitioner.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,6 @@ namespace PartitionerImpl
int getMaxTuTiling ( const UnitArea &area, const CodingStructure &cs, Partitioning& dst );
int getTUIntraSubPartitions( const UnitArea &area, const CodingStructure &cs, const bool isDualITree, const PartSplit splitType, Partitioning &sub, const TreeType treeType );
int getSbtTuTiling ( const UnitArea &area, const CodingStructure &cs, const PartSplit splitType, Partitioning& dst );
};
}

}
4 changes: 4 additions & 0 deletions source/Lib/CommonLib/arm/BufferARM.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ void applyLut_SIMD( Pel* ptr, ptrdiff_t ptrStride, int width, int height, const
{
for( int x = 0; x < width; x += 8 )
{
GCC_WARNING_DISABLE_maybe_uninitialized

xtmp1 = vsetq_lane_s16( lut[ ptr[ x + 0 ] ], xtmp1, 0 );
xtmp1 = vsetq_lane_s16( lut[ ptr[ x + 1 ] ], xtmp1, 1 );
xtmp1 = vsetq_lane_s16( lut[ ptr[ x + 2 ] ], xtmp1, 2 );
Expand Down Expand Up @@ -367,6 +369,8 @@ void applyLut_SIMD( Pel* ptr, ptrdiff_t ptrStride, int width, int height, const
xtmp4 = vsetq_lane_s16( lut[ ptr[ x + 3 * ptrStride + 6 ] ], xtmp4, 6 );
xtmp4 = vsetq_lane_s16( lut[ ptr[ x + 3 * ptrStride + 7 ] ], xtmp4, 7 );

GCC_WARNING_RESET

vst1q_s16( &ptr[ x ], xtmp1 );
vst1q_s16( &ptr[ x + 1 * ptrStride ], xtmp2 );
vst1q_s16( &ptr[ x + 2 * ptrStride ], xtmp3 );
Expand Down
12 changes: 11 additions & 1 deletion source/Lib/CommonLib/arm/neon/InterpolationFilter_neon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ POSSIBILITY OF SUCH DAMAGE.
namespace vvdec
{

#if __ARM_ARCH >= 8

static void simdInterpolateN2_2D_neon( const ClpRng& clpRng, const Pel* src, const ptrdiff_t srcStride, Pel* dst, const ptrdiff_t dstStride, int width, int height, TFilterCoeff const *ch, TFilterCoeff const *cv )
{
const int shift1st = IF_FILTER_PREC_BILINEAR - ( IF_INTERNAL_PREC_BILINEAR - clpRng.bd );
Expand Down Expand Up @@ -167,7 +169,7 @@ static int16x8x2_t filter16xX_N8_neon( Pel const* src, int16x8_t ch, int32x4_t v
{
int16x8_t a = filter8xX_N8_neon( src + 0, ch, voffset1, invshift1st );
int16x8_t b = filter8xX_N8_neon( src + 8, ch, voffset1, invshift1st );
return ( int16x8x2_t ){ a, b };
return int16x8x2_t({ a, b });
}

template<bool isLast>
Expand Down Expand Up @@ -511,6 +513,14 @@ void InterpolationFilter::_initInterpolationFilterARM<NEON>()
m_filterN2_2D = simdInterpolateN2_2D_neon;
}

#else // !__ARM_ARCH >= 8

template<>
void InterpolationFilter::_initInterpolationFilterARM<NEON>()
{}

#endif // !__ARM_ARCH >= 8

} // namespace vvdec
#endif
//! \}
Loading

0 comments on commit 31d0e25

Please sign in to comment.