From 00783ecc1b4b46fb9bebf6602a082bbc8eb0ac14 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 25 Aug 2023 09:44:21 +0200 Subject: [PATCH 1/3] cleanup --- scripts/find_unused_symbols.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/find_unused_symbols.sh b/scripts/find_unused_symbols.sh index 1a6d93745f..aa760188f7 100755 --- a/scripts/find_unused_symbols.sh +++ b/scripts/find_unused_symbols.sh @@ -30,7 +30,6 @@ # the United Nations Convention on Contracts on the International Sales of Goods. # -options=$1 WORKDIR=.. OBJDIR=obj @@ -65,7 +64,7 @@ while getopts ":ftnhd:" OPT; do done if [ $help -ne 0 ]; then - echo "Usage: $0 [-ftn]" + echo "Usage: $0 [-dftn]" echo " where" echo " -d : set C-code dir (default: ${WORKDIR})" echo " -f: functions only" -- GitLab From 46e4212a19d16936d616ab49694b96c7cd371337 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 25 Aug 2023 14:44:04 +0200 Subject: [PATCH 2/3] script for patching headers for delivered code, to remove the IVAS PC header and replace by proper spec number and code reviesion; also patches revision number for printout --- scripts/patch_code_headers.sh | 154 ++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100755 scripts/patch_code_headers.sh diff --git a/scripts/patch_code_headers.sh b/scripts/patch_code_headers.sh new file mode 100755 index 0000000000..acbd2431bc --- /dev/null +++ b/scripts/patch_code_headers.sh @@ -0,0 +1,154 @@ +#!/bin/bash + +# +# (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. +# +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. +# +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. +# +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. +# +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. +# + +WORKDIR=c-code + +help=0 + +while getopts ":hd:" OPT; do + case "$OPT" in + d) + WORKDIR=$(realpath -s "${OPTARG}") + ;; + h) + help=1 + ;; + *) # getopts produces error + exit 1 + ;; + esac +done + +if [ $help -ne 0 ]; then + echo "Usage: $0 [-dh]" + echo " where" + echo " -d : set C-code dir (default: ${WORKDIR})" + exit 0 +fi + + +# +# C-Code +# + +c_header_new=\ +'/*==================================================================================== + 3GPP TS26.258 Aug 24, 2023. IVAS Codec Version IVAS-FL-1.0 + ====================================================================================*/' + + +#### +c_header_patch=\ +'@@ -1,31 +1,0 @@ +-/****************************************************************************************************** +- +- (C) 2022-2023 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +- contributors to this repository. All Rights Reserved. +- +- This software is protected by copyright law and by international treaties. +- The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +- Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +- Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +- Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +- contributors to this repository retain full ownership rights in their respective contributions in +- the software. This notice grants no license of any kind, including but not limited to patent +- license, nor is any license granted by implication, estoppel or otherwise. +- +- Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +- contributions. +- +- This software is provided "AS IS", without any express or implied warranties. The software is in the +- development stage. It is intended exclusively for experts who have experience with such software and +- solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +- and fitness for a particular purpose are hereby disclaimed and excluded. +- +- Any dispute, controversy or claim arising under or in relation to providing this software shall be +- submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +- accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +- the United Nations Convention on Contracts on the International Sales of Goods. +- +-*******************************************************************************************************/ +' + +# +# Patch *.[ch]-files by means of a generalized patch +# + +#tmpfile=test.txt +#rm -f $tmpfile +#touch $tmpfile +#echo "$c_header_patch" >> $tmpfile +#find $WORKDIR -name "*.[ch]" -not -name "wmc_auto.[ch]" -exec patch -i $tmpfile \{\} \; +#rm -f $tmpfile + +# +# Alternative approach (currently disabled): +# Strip everying between beginning and ending of block +# + +find $WORKDIR -name "*.[ch]" -not -name "wmc_auto.[ch]" -exec sed -i.bak -e "1,/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\//d" \{\} \; +sed -i.bak -e "1,/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\//d" $WORKDIR/readme.txt + +# or +# +# find $WORKDIR -name "*.[ch]" -not -name "wmc_auto.[ch]" -exec sed -i.bak -e "/^\/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/,/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\//d" \{\} \; +# + +# add new header +tmpfile=`mktemp` +rm -f $tmpfile +touch $tmpfile +echo "$c_header_new" >> $tmpfile +find $WORKDIR -name "*.[ch]" -exec sed -i.bak -e "1 e cat $tmpfile" \{\} \; +rm -f $tmpfile + +# +# Patch Printout +# + +sed -i.bak -e "s/IVAS\ Codec\ Baseline/IVAS\ Codec\ Version\ IVAS-FL-1\.0/g" $WORKDIR/lib_com/disclaimer.c + + +# +# Remove License file +# + +rm $WORKDIR/LICENSE.md + +# +# Cleanup +# +find $WORKDIR -name "*.bak" -exec rm \{\} \; + -- GitLab From 660e9895895a24e59d0b219a27e06323c2124de9 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 28 Aug 2023 13:17:33 +0200 Subject: [PATCH 3/3] add new header also to readme.txt --- scripts/patch_code_headers.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/patch_code_headers.sh b/scripts/patch_code_headers.sh index acbd2431bc..5fd18eaee7 100755 --- a/scripts/patch_code_headers.sh +++ b/scripts/patch_code_headers.sh @@ -132,6 +132,7 @@ rm -f $tmpfile touch $tmpfile echo "$c_header_new" >> $tmpfile find $WORKDIR -name "*.[ch]" -exec sed -i.bak -e "1 e cat $tmpfile" \{\} \; +sed -i.bak -e "1 e cat $tmpfile" $WORKDIR/readme.txt rm -f $tmpfile # -- GitLab