From c9b09181fa2b14b2cddd305fede36918fbd8a6a6 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 27 Oct 2022 12:18:23 +0200 Subject: [PATCH 01/20] First draft of clang-format job --- .gitlab-ci.yml | 9 +++++++++ scripts/check-format.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27d3656175..bfe1aecd79 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -400,6 +400,15 @@ evs-pytest-on-merge-request: junit: - report-junit-evs.xml +clang-format-check: + extends: + - .test-job-linux + - .rules-merge-request + stage: maintenance + needs: [] + timeout: "5 minutes" + script: + - scripts/check-format.sh -a -p 8 # --------------------------------------------------------------- # Test jobs for main branch diff --git a/scripts/check-format.sh b/scripts/check-format.sh index 1302b5e03d..9b6911f289 100755 --- a/scripts/check-format.sh +++ b/scripts/check-format.sh @@ -229,7 +229,7 @@ else rm "$NUMFAILSTMPFILE" if [[ $NUMFAILS -gt 0 ]]; then echo "Total fails: $NUMFAILS" -# exit $NUMFAILS ## uncomment if script should have num fails as return code + exit $NUMFAILS ## uncomment if script should have num fails as return code fi fi -- GitLab From ee96f217b9be9f9b6260939f83b97a2f95a6dff6 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 27 Oct 2022 13:30:17 +0200 Subject: [PATCH 02/20] Move clang-format check to "validate" stage --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bfe1aecd79..3b5f7a3081 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -404,7 +404,7 @@ clang-format-check: extends: - .test-job-linux - .rules-merge-request - stage: maintenance + stage: validate needs: [] timeout: "5 minutes" script: -- GitLab From 8671fbd9219d0d7c016efbc55aa0597efd88e0c7 Mon Sep 17 00:00:00 2001 From: knj Date: Thu, 27 Oct 2022 17:45:47 +0200 Subject: [PATCH 03/20] change version parsing --- scripts/check-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-format.sh b/scripts/check-format.sh index 9b6911f289..f372403115 100755 --- a/scripts/check-format.sh +++ b/scripts/check-format.sh @@ -62,7 +62,7 @@ EOM } cl-format-check-version() { - ${CLANG_FORMAT} --version | awk '{print $3}' + ${CLANG_FORMAT} --version | sed 's/.*version \([1-9]*\.[0-9]*\).*/\1/' } cl-format-apply() { -- GitLab From 7830d91217a17185bd2d4ce06868f9e1ed615634 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 13:38:01 +0100 Subject: [PATCH 04/20] Expose patch with formatting fix as artifact of clang-format job --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3b5f7a3081..1f1d01fb3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -404,11 +404,21 @@ clang-format-check: extends: - .test-job-linux - .rules-merge-request + variables: + ARTIFACT_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix.patch" stage: validate needs: [] timeout: "5 minutes" script: - - scripts/check-format.sh -a -p 8 + - format_problems=$(scripts/check-format.sh -af -p 8) + - if [ $format_problems == 0 ] then; exit 0; fi + - git diff > formatting-fix.patch + artifacts: + paths: + - formatting-fix.patch + when: on_failure + name: $ARTIFACT_NAME + expose_as: 'formatting patch' # --------------------------------------------------------------- # Test jobs for main branch -- GitLab From 24b052f3cbcad0240ff48500b6ed4c02043f117e Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 13:46:16 +0100 Subject: [PATCH 05/20] Do not stop job early if formatting problems were found --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f1d01fb3b..b2c072b04e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -410,7 +410,7 @@ clang-format-check: needs: [] timeout: "5 minutes" script: - - format_problems=$(scripts/check-format.sh -af -p 8) + - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] then; exit 0; fi - git diff > formatting-fix.patch artifacts: -- GitLab From 026253912f7c00b399cbc48928e19d5f532f2678 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 13:48:26 +0100 Subject: [PATCH 06/20] Fix incorrectly placed semicolon --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2c072b04e..6fec7ef5f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -411,7 +411,7 @@ clang-format-check: timeout: "5 minutes" script: - scripts/check-format.sh -af -p 8 || format_problems=$? - - if [ $format_problems == 0 ] then; exit 0; fi + - if [ $format_problems == 0 ] ; then exit 0; fi - git diff > formatting-fix.patch artifacts: paths: -- GitLab From c61dc1ff4d9295fe8ae87b832181e26f6d2e289c Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 13:50:18 +0100 Subject: [PATCH 07/20] Fail job if format problems found --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6fec7ef5f0..1388b4a1f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -413,6 +413,7 @@ clang-format-check: - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - git diff > formatting-fix.patch + - exit $format_problems artifacts: paths: - formatting-fix.patch -- GitLab From f63b146231d11adb9cecc3f8f46cd4928145bd7b Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:13:45 +0100 Subject: [PATCH 08/20] Add instructions --- .gitlab-ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1388b4a1f1..5fcd5e62e7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -406,17 +406,35 @@ clang-format-check: - .rules-merge-request variables: ARTIFACT_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix.patch" + INSTRUCTIONS_GITLAB: "To fix formatting issues:\n + - download the diff patch available as artifact of this job\n + - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n + - run: git apply $ARTIFACT_NAME + - commit new changes" + INSTRUCTIONS_README: "To fix formatting issues:\n + - place the patch file in the root directory of your local IVAS repo\n + - run: git apply $ARTIFACT_NAME + - commit new changes" stage: validate needs: [] timeout: "5 minutes" script: - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - - git diff > formatting-fix.patch + + - mkdir tmp-formatting + - git diff > "tmp-formatting/$ARTIFACT_NAME" + + # Print instructions to job output + - echo $INSTRUCTIONS_GITLAB + + # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) + - echo $INSTRUCTIONS_README > "tmp-formatting/readme.txt" + - exit $format_problems artifacts: paths: - - formatting-fix.patch + - tmp-formatting/ when: on_failure name: $ARTIFACT_NAME expose_as: 'formatting patch' -- GitLab From 9b40acc17e79dde14535dead9fd7cac37bb092f9 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:24:33 +0100 Subject: [PATCH 09/20] Try to fix echo problems --- .gitlab-ci.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5fcd5e62e7..b6a05d63ef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -405,15 +405,16 @@ clang-format-check: - .test-job-linux - .rules-merge-request variables: - ARTIFACT_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix.patch" + ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" + PATCH_FILE_NAME: "$ARTIFACT_BASE_NAME.patch" INSTRUCTIONS_GITLAB: "To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply $ARTIFACT_NAME + - run: git apply $PATCH_FILE_NAME - commit new changes" INSTRUCTIONS_README: "To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - - run: git apply $ARTIFACT_NAME + - run: git apply $PATCH_FILE_NAME - commit new changes" stage: validate needs: [] @@ -422,21 +423,21 @@ clang-format-check: - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - - mkdir tmp-formatting - - git diff > "tmp-formatting/$ARTIFACT_NAME" + - mkdir tmp-formatting-fix + - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output - - echo $INSTRUCTIONS_GITLAB + - echo -e "$INSTRUCTIONS_GITLAB" # Include readme in the artifact, in case someone misses the job printout (e.g. getting the artifact via MR interface) - - echo $INSTRUCTIONS_README > "tmp-formatting/readme.txt" + - echo -e "$INSTRUCTIONS_README" > "tmp-formatting-fix/readme.txt" - exit $format_problems artifacts: paths: - - tmp-formatting/ + - tmp-formatting-fix/ when: on_failure - name: $ARTIFACT_NAME + name: "$ARTIFACT_BASE_NAME" expose_as: 'formatting patch' # --------------------------------------------------------------- -- GitLab From c1f5291ee295e6637746dc6351663ac6b712bd4f Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:27:55 +0100 Subject: [PATCH 10/20] Fix missing newline --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6a05d63ef..12cf864a77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -410,11 +410,11 @@ clang-format-check: INSTRUCTIONS_GITLAB: "To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME + - run: git apply $PATCH_FILE_NAME\n - commit new changes" INSTRUCTIONS_README: "To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME + - run: git apply $PATCH_FILE_NAME\n - commit new changes" stage: validate needs: [] -- GitLab From 58265cb2a52b043401592fddf87a62a052ae741e Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:38:20 +0100 Subject: [PATCH 11/20] Try fix issues with variable expansion --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 12cf864a77..a38a3aa41a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -406,7 +406,6 @@ clang-format-check: - .rules-merge-request variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" - PATCH_FILE_NAME: "$ARTIFACT_BASE_NAME.patch" INSTRUCTIONS_GITLAB: "To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n @@ -424,6 +423,7 @@ clang-format-check: - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix + - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME.patch" # Must be assigned here so that all variables get expanded - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output -- GitLab From a4d8fe7090b4883f4c2f2ea906db6889ffa5d2aa Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:46:29 +0100 Subject: [PATCH 12/20] Another attempt to fix issues with variable expansion --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a38a3aa41a..6f782de96e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -406,15 +406,16 @@ clang-format-check: - .rules-merge-request variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" - INSTRUCTIONS_GITLAB: "To fix formatting issues:\n + PATCH_FILE_NAME: '"$ARTIFACT_BASE_NAME".patch' + INSTRUCTIONS_GITLAB: 'To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME\n - - commit new changes" - INSTRUCTIONS_README: "To fix formatting issues:\n + - run: git apply "$PATCH_FILE_NAME"\n + - commit new changes' + INSTRUCTIONS_README: 'To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME\n - - commit new changes" + - run: git apply "$PATCH_FILE_NAME"\n + - commit new changes' stage: validate needs: [] timeout: "5 minutes" @@ -423,7 +424,6 @@ clang-format-check: - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix - - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME.patch" # Must be assigned here so that all variables get expanded - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output -- GitLab From 55ec5cbb61e38510e7d6be20addc2a63ba88dd4a Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:49:31 +0100 Subject: [PATCH 13/20] Another attempt to get quotes right --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f782de96e..76f21a14d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -407,15 +407,15 @@ clang-format-check: variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" PATCH_FILE_NAME: '"$ARTIFACT_BASE_NAME".patch' - INSTRUCTIONS_GITLAB: 'To fix formatting issues:\n + INSTRUCTIONS_GITLAB: "To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply "$PATCH_FILE_NAME"\n - - commit new changes' - INSTRUCTIONS_README: 'To fix formatting issues:\n + - run: git apply $PATCH_FILE_NAME\n + - commit new changes" + INSTRUCTIONS_README: "To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - - run: git apply "$PATCH_FILE_NAME"\n - - commit new changes' + - run: git apply $PATCH_FILE_NAME\n + - commit new changes" stage: validate needs: [] timeout: "5 minutes" -- GitLab From 728e81263b55c031fe6b2bca88d9a6dd47f102e4 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 14:58:12 +0100 Subject: [PATCH 14/20] Remove one nesting level from variables --- .gitlab-ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76f21a14d0..fb7b1d0919 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -406,16 +406,15 @@ clang-format-check: - .rules-merge-request variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" - PATCH_FILE_NAME: '"$ARTIFACT_BASE_NAME".patch' - INSTRUCTIONS_GITLAB: "To fix formatting issues:\n + INSTRUCTIONS_GITLAB: 'To fix formatting issues:\n - download the diff patch available as artifact of this job\n - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME\n - - commit new changes" - INSTRUCTIONS_README: "To fix formatting issues:\n + - run: git apply "$ARTIFACT_BASE_NAME".patch\n + - commit new changes' + INSTRUCTIONS_README: 'To fix formatting issues:\n - place the patch file in the root directory of your local IVAS repo\n - - run: git apply $PATCH_FILE_NAME\n - - commit new changes" + - run: git apply "$ARTIFACT_BASE_NAME".patch\n + - commit new changes' stage: validate needs: [] timeout: "5 minutes" @@ -424,7 +423,7 @@ clang-format-check: - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix - - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" + - git diff > "tmp-formatting-fix/$ARTIFACT_BASE_NAME".patch" # Print instructions to job output - echo -e "$INSTRUCTIONS_GITLAB" -- GitLab From 185466b10bdce82877296edbae6e190313bc25c6 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 15:01:03 +0100 Subject: [PATCH 15/20] Fix stray double-quote --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb7b1d0919..2aabe3e63a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -423,7 +423,7 @@ clang-format-check: - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix - - git diff > "tmp-formatting-fix/$ARTIFACT_BASE_NAME".patch" + - git diff > "tmp-formatting-fix/$ARTIFACT_BASE_NAME.patch" # Print instructions to job output - echo -e "$INSTRUCTIONS_GITLAB" -- GitLab From 430a97342ebd173e00471914c0d9743f8d962fd9 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 15:27:36 +0100 Subject: [PATCH 16/20] Try to set variables within the script --- .gitlab-ci.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2aabe3e63a..0d1919af1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -406,24 +406,29 @@ clang-format-check: - .rules-merge-request variables: ARTIFACT_BASE_NAME: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--formatting-fix" - INSTRUCTIONS_GITLAB: 'To fix formatting issues:\n - - download the diff patch available as artifact of this job\n - - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n - - run: git apply "$ARTIFACT_BASE_NAME".patch\n - - commit new changes' - INSTRUCTIONS_README: 'To fix formatting issues:\n - - place the patch file in the root directory of your local IVAS repo\n - - run: git apply "$ARTIFACT_BASE_NAME".patch\n - - commit new changes' stage: validate needs: [] timeout: "5 minutes" script: + # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there + - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch + - > + INSTRUCTIONS_GITLAB="To fix formatting issues: + - download the diff patch available as artifact of this job + - unzip the artifact and place the patch file in the root directory of your local IVAS repo + - run: git apply $PATCH_FILE_NAME + - commit new changes" + - > + INSTRUCTIONS_README="To fix formatting issues: + - place the patch file in the root directory of your local IVAS repo + - run: git apply $PATCH_FILE_NAME + - commit new changes" + - scripts/check-format.sh -af -p 8 || format_problems=$? - if [ $format_problems == 0 ] ; then exit 0; fi - mkdir tmp-formatting-fix - - git diff > "tmp-formatting-fix/$ARTIFACT_BASE_NAME.patch" + - git diff > "tmp-formatting-fix/$PATCH_FILE_NAME" # Print instructions to job output - echo -e "$INSTRUCTIONS_GITLAB" -- GitLab From 3d2067fa27983d4e42550e799f32f2e4c0e24516 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Wed, 2 Nov 2022 15:30:18 +0100 Subject: [PATCH 17/20] Re-introduce newlines --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d1919af1b..627c46da15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -413,15 +413,15 @@ clang-format-check: # Set up variables. This can't be done in the "variables" section because variables are not expanded properly there - PATCH_FILE_NAME="$ARTIFACT_BASE_NAME".patch - > - INSTRUCTIONS_GITLAB="To fix formatting issues: - - download the diff patch available as artifact of this job - - unzip the artifact and place the patch file in the root directory of your local IVAS repo - - run: git apply $PATCH_FILE_NAME + INSTRUCTIONS_GITLAB="To fix formatting issues:\n + - download the diff patch available as artifact of this job\n + - unzip the artifact and place the patch file in the root directory of your local IVAS repo\n + - run: git apply $PATCH_FILE_NAME\n - commit new changes" - > - INSTRUCTIONS_README="To fix formatting issues: - - place the patch file in the root directory of your local IVAS repo - - run: git apply $PATCH_FILE_NAME + INSTRUCTIONS_README="To fix formatting issues:\n + - place the patch file in the root directory of your local IVAS repo\n + - run: git apply $PATCH_FILE_NAME\n - commit new changes" - scripts/check-format.sh -af -p 8 || format_problems=$? -- GitLab From 980ca09dc0a3359fb1dbb31231d47053322afd79 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Thu, 3 Nov 2022 14:06:39 +0100 Subject: [PATCH 18/20] Apply formatting to make clang-format job pass --- lib_com/ivas_stereo_psychlpc_com.c | 16 ++++++++-------- lib_com/vlpc_2st_com.c | 3 +-- lib_dec/igf_dec.c | 7 +++---- lib_dec/ivas_core_dec.c | 4 ++-- lib_dec/ivas_spar_md_dec.c | 2 +- lib_dec/ivas_stereo_mdct_stereo_dec.c | 14 +++++++------- lib_enc/igf_enc.c | 6 +++--- lib_enc/ivas_agc_enc.c | 4 ++-- lib_enc/ivas_sns_enc.c | 1 - 9 files changed, 27 insertions(+), 30 deletions(-) mode change 100755 => 100644 lib_enc/igf_enc.c diff --git a/lib_com/ivas_stereo_psychlpc_com.c b/lib_com/ivas_stereo_psychlpc_com.c index 3cbca73cc0..8a50caaa29 100644 --- a/lib_com/ivas_stereo_psychlpc_com.c +++ b/lib_com/ivas_stereo_psychlpc_com.c @@ -68,14 +68,14 @@ static void SpectrumWeighting_Init( * initialize a PsychoacousticParameters structure *-------------------------------------------------------------------*/ - ivas_error - PsychoacousticParameters_Init( - const int32_t sr_core, /* i : sampling rate of core-coder */ - const int16_t nBins, /* i : Number of bins (spectral lines) */ - const int8_t nBands, /* i : Number of spectrum subbands */ - const int16_t isTCX20, /* i : Flag indicating if the subband division is for TCX20 or TCX10 */ - const int16_t isWarped, /* i : Flag indicating if the scale is linear or warped */ - PsychoacousticParameters *pPsychParams ) +ivas_error +PsychoacousticParameters_Init( + const int32_t sr_core, /* i : sampling rate of core-coder */ + const int16_t nBins, /* i : Number of bins (spectral lines) */ + const int8_t nBands, /* i : Number of spectrum subbands */ + const int16_t isTCX20, /* i : Flag indicating if the subband division is for TCX20 or TCX10 */ + const int16_t isWarped, /* i : Flag indicating if the scale is linear or warped */ + PsychoacousticParameters *pPsychParams ) { if ( pPsychParams == NULL ) diff --git a/lib_com/vlpc_2st_com.c b/lib_com/vlpc_2st_com.c index f027ecd8ea..86fdf68c5f 100644 --- a/lib_com/vlpc_2st_com.c +++ b/lib_com/vlpc_2st_com.c @@ -52,8 +52,7 @@ void lsf_weight_2st( const float *lsfq, float *w, const int16_t mode, - const int32_t sr_core -) + const int32_t sr_core ) { int16_t i; float d[M + 1]; diff --git a/lib_dec/igf_dec.c b/lib_dec/igf_dec.c index f876391b2d..2cded75928 100644 --- a/lib_dec/igf_dec.c +++ b/lib_dec/igf_dec.c @@ -679,8 +679,8 @@ static void IGF_appl( float *pSpectralData, /* i/o: Q31 | MDCT spectrum */ const float *igf_spec, /* i : Q31 | prepared IGF spectrum */ float *virtualSpec, /* o : Q31 | virtual IGF spectrum, used for temp flattening */ - int16_t *flag_sparse, /* o : Q0 | temp flattening indicator */ - const int16_t bfi_apply_damping /* i : flag to indicate if damping for lost frames should be applied */ + int16_t *flag_sparse, /* o : Q0 | temp flattening indicator */ + const int16_t bfi_apply_damping /* i : flag to indicate if damping for lost frames should be applied */ ) { H_IGF_GRID hGrid; @@ -1240,8 +1240,7 @@ void IGFDecApplyStereo( const int16_t *coreMsMask, const int16_t restrict_hopsize, const int16_t bfi, /* i : frame loss == 1, frame good == 0 */ - const int16_t bfi_apply_damping -) + const int16_t bfi_apply_damping ) { IGF_DEC_PRIVATE_DATA_HANDLE hPrivateDataL, hPrivateDataR; H_IGF_GRID hGrid; diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index fd5d5b3c1e..e18f0e3e5d 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -186,8 +186,8 @@ ivas_error ivas_core_dec( { float gain; - gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : - ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain : 0.0f; + gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain + : 0.0f; if ( ( st->element_mode == IVAS_CPE_MDCT && hMCT == NULL ) || ( st->hPlcInfo != NULL ) ) { diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index 3d5f03b208..d670741610 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -1419,7 +1419,7 @@ void ivas_spar_dec_gen_umx_mat( } } } - + #ifdef DEBUG_SBA_MD_DUMP { static FILE *f_mat = 0; diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c index 1bdbb5eda7..020d9f96df 100644 --- a/lib_dec/ivas_stereo_mdct_stereo_dec.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c @@ -215,15 +215,15 @@ void stereo_decoder_tcx( const int16_t core_r, /* i : core for right channel (TCX20/TCX10) */ const int16_t igf, /* i : flag for IGF activity */ #ifdef FIX_TCX10_STEREO_PROC - const int16_t L_frameTCX_l, /* i : TCX frame length of left channel */ - const int16_t L_frameTCX_r, /* i : TCX frame length of right channel */ + const int16_t L_frameTCX_l, /* i : TCX frame length of left channel */ + const int16_t L_frameTCX_r, /* i : TCX frame length of right channel */ #else - const int16_t L_frame, /* i : TCX frame length */ + const int16_t L_frame, /* i : TCX frame length */ #endif - const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ - const int16_t last_core_l, /* i : last core for left channel */ - const int16_t last_core_r, /* i : last core for right channel */ - const int16_t tmp_plc_upmix /* i : indicates temp upmix for PLC decision */ + const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ + const int16_t last_core_l, /* i : last core for left channel */ + const int16_t last_core_r, /* i : last core for right channel */ + const int16_t tmp_plc_upmix /* i : indicates temp upmix for PLC decision */ ) { int16_t i, k, sfb, nSubframes; diff --git a/lib_enc/igf_enc.c b/lib_enc/igf_enc.c old mode 100755 new mode 100644 index 6050354a8f..e355cd2083 --- a/lib_enc/igf_enc.c +++ b/lib_enc/igf_enc.c @@ -462,7 +462,7 @@ static void IGF_CalculateEnvelope( float diffSFM; float shiftedSFM = 0.f; - tmp_tb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ); + tmp_tb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ); tmp_sb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, tmp, strt_cpy ) / IGF_getCrest_new( hPrivateData->logSpec, tmp, strt_cpy ); if ( last_core_acelp || hPrivateData->wasTransient ) @@ -494,12 +494,12 @@ static void IGF_CalculateEnvelope( if ( slope < -threshold ) { int16_t shift = width >> 1; - shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ) / IGF_getCrest_new ( hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ); + shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ); } else if ( ( slope > 1.f * threshold ) && ( sfb != hGrid->sfbWrap[hGrid->nTiles] - 1 ) ) { int16_t shift = width >> 1; - shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ) / IGF_getCrest_new ( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ); + shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ); } if ( shiftedSFM > 0.04f ) diff --git a/lib_enc/ivas_agc_enc.c b/lib_enc/ivas_agc_enc.c index 0f3274f43c..b0012ee469 100644 --- a/lib_enc/ivas_agc_enc.c +++ b/lib_enc/ivas_agc_enc.c @@ -74,8 +74,8 @@ int16_t ivas_agc_enc_get_enablement_flag( int16_t nchan_transport ) { return (int16_t) ( ( agc_configuration == IVAS_ENC_AGC_UNDEFINED ) - ? ( nchan_transport == 1 ) - : agc_configuration ); + ? ( nchan_transport == 1 ) + : agc_configuration ); } #endif diff --git a/lib_enc/ivas_sns_enc.c b/lib_enc/ivas_sns_enc.c index 6790f0cf6d..45c04ac9ea 100644 --- a/lib_enc/ivas_sns_enc.c +++ b/lib_enc/ivas_sns_enc.c @@ -44,7 +44,6 @@ #include "wmops.h" - /*------------------------------------------------------------------- * sns_1st_cod() * -- GitLab From d9abd3a88523619bced553f3962637d95c6d7cea Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 4 Nov 2022 12:13:52 +0100 Subject: [PATCH 19/20] Revert "Apply formatting to make clang-format job pass" This reverts commit 980ca09dc0a3359fb1dbb31231d47053322afd79. --- lib_com/ivas_stereo_psychlpc_com.c | 16 ++++++++-------- lib_com/vlpc_2st_com.c | 3 ++- lib_dec/igf_dec.c | 7 ++++--- lib_dec/ivas_core_dec.c | 4 ++-- lib_dec/ivas_spar_md_dec.c | 2 +- lib_dec/ivas_stereo_mdct_stereo_dec.c | 14 +++++++------- lib_enc/igf_enc.c | 6 +++--- lib_enc/ivas_agc_enc.c | 4 ++-- lib_enc/ivas_sns_enc.c | 1 + 9 files changed, 30 insertions(+), 27 deletions(-) mode change 100644 => 100755 lib_enc/igf_enc.c diff --git a/lib_com/ivas_stereo_psychlpc_com.c b/lib_com/ivas_stereo_psychlpc_com.c index 8a50caaa29..3cbca73cc0 100644 --- a/lib_com/ivas_stereo_psychlpc_com.c +++ b/lib_com/ivas_stereo_psychlpc_com.c @@ -68,14 +68,14 @@ static void SpectrumWeighting_Init( * initialize a PsychoacousticParameters structure *-------------------------------------------------------------------*/ -ivas_error -PsychoacousticParameters_Init( - const int32_t sr_core, /* i : sampling rate of core-coder */ - const int16_t nBins, /* i : Number of bins (spectral lines) */ - const int8_t nBands, /* i : Number of spectrum subbands */ - const int16_t isTCX20, /* i : Flag indicating if the subband division is for TCX20 or TCX10 */ - const int16_t isWarped, /* i : Flag indicating if the scale is linear or warped */ - PsychoacousticParameters *pPsychParams ) + ivas_error + PsychoacousticParameters_Init( + const int32_t sr_core, /* i : sampling rate of core-coder */ + const int16_t nBins, /* i : Number of bins (spectral lines) */ + const int8_t nBands, /* i : Number of spectrum subbands */ + const int16_t isTCX20, /* i : Flag indicating if the subband division is for TCX20 or TCX10 */ + const int16_t isWarped, /* i : Flag indicating if the scale is linear or warped */ + PsychoacousticParameters *pPsychParams ) { if ( pPsychParams == NULL ) diff --git a/lib_com/vlpc_2st_com.c b/lib_com/vlpc_2st_com.c index 86fdf68c5f..f027ecd8ea 100644 --- a/lib_com/vlpc_2st_com.c +++ b/lib_com/vlpc_2st_com.c @@ -52,7 +52,8 @@ void lsf_weight_2st( const float *lsfq, float *w, const int16_t mode, - const int32_t sr_core ) + const int32_t sr_core +) { int16_t i; float d[M + 1]; diff --git a/lib_dec/igf_dec.c b/lib_dec/igf_dec.c index 2cded75928..f876391b2d 100644 --- a/lib_dec/igf_dec.c +++ b/lib_dec/igf_dec.c @@ -679,8 +679,8 @@ static void IGF_appl( float *pSpectralData, /* i/o: Q31 | MDCT spectrum */ const float *igf_spec, /* i : Q31 | prepared IGF spectrum */ float *virtualSpec, /* o : Q31 | virtual IGF spectrum, used for temp flattening */ - int16_t *flag_sparse, /* o : Q0 | temp flattening indicator */ - const int16_t bfi_apply_damping /* i : flag to indicate if damping for lost frames should be applied */ + int16_t *flag_sparse, /* o : Q0 | temp flattening indicator */ + const int16_t bfi_apply_damping /* i : flag to indicate if damping for lost frames should be applied */ ) { H_IGF_GRID hGrid; @@ -1240,7 +1240,8 @@ void IGFDecApplyStereo( const int16_t *coreMsMask, const int16_t restrict_hopsize, const int16_t bfi, /* i : frame loss == 1, frame good == 0 */ - const int16_t bfi_apply_damping ) + const int16_t bfi_apply_damping +) { IGF_DEC_PRIVATE_DATA_HANDLE hPrivateDataL, hPrivateDataR; H_IGF_GRID hGrid; diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index e18f0e3e5d..fd5d5b3c1e 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -186,8 +186,8 @@ ivas_error ivas_core_dec( { float gain; - gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain - : 0.0f; + gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : + ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain : 0.0f; if ( ( st->element_mode == IVAS_CPE_MDCT && hMCT == NULL ) || ( st->hPlcInfo != NULL ) ) { diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index d670741610..3d5f03b208 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -1419,7 +1419,7 @@ void ivas_spar_dec_gen_umx_mat( } } } - + #ifdef DEBUG_SBA_MD_DUMP { static FILE *f_mat = 0; diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c index 020d9f96df..1bdbb5eda7 100644 --- a/lib_dec/ivas_stereo_mdct_stereo_dec.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c @@ -215,15 +215,15 @@ void stereo_decoder_tcx( const int16_t core_r, /* i : core for right channel (TCX20/TCX10) */ const int16_t igf, /* i : flag for IGF activity */ #ifdef FIX_TCX10_STEREO_PROC - const int16_t L_frameTCX_l, /* i : TCX frame length of left channel */ - const int16_t L_frameTCX_r, /* i : TCX frame length of right channel */ + const int16_t L_frameTCX_l, /* i : TCX frame length of left channel */ + const int16_t L_frameTCX_r, /* i : TCX frame length of right channel */ #else - const int16_t L_frame, /* i : TCX frame length */ + const int16_t L_frame, /* i : TCX frame length */ #endif - const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ - const int16_t last_core_l, /* i : last core for left channel */ - const int16_t last_core_r, /* i : last core for right channel */ - const int16_t tmp_plc_upmix /* i : indicates temp upmix for PLC decision */ + const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ + const int16_t last_core_l, /* i : last core for left channel */ + const int16_t last_core_r, /* i : last core for right channel */ + const int16_t tmp_plc_upmix /* i : indicates temp upmix for PLC decision */ ) { int16_t i, k, sfb, nSubframes; diff --git a/lib_enc/igf_enc.c b/lib_enc/igf_enc.c old mode 100644 new mode 100755 index e355cd2083..6050354a8f --- a/lib_enc/igf_enc.c +++ b/lib_enc/igf_enc.c @@ -462,7 +462,7 @@ static void IGF_CalculateEnvelope( float diffSFM; float shiftedSFM = 0.f; - tmp_tb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ); + tmp_tb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb], swb_offset[sfb + 1] ); tmp_sb = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, tmp, strt_cpy ) / IGF_getCrest_new( hPrivateData->logSpec, tmp, strt_cpy ); if ( last_core_acelp || hPrivateData->wasTransient ) @@ -494,12 +494,12 @@ static void IGF_CalculateEnvelope( if ( slope < -threshold ) { int16_t shift = width >> 1; - shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ); + shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ) / IGF_getCrest_new ( hPrivateData->logSpec, swb_offset[sfb] - shift, swb_offset[sfb + 1] - shift ); } else if ( ( slope > 1.f * threshold ) && ( sfb != hGrid->sfbWrap[hGrid->nTiles] - 1 ) ) { int16_t shift = width >> 1; - shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ) / IGF_getCrest_new( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ); + shiftedSFM = IGF_getSFM_new( pPowerSpectrum, hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ) / IGF_getCrest_new ( hPrivateData->logSpec, swb_offset[sfb] + shift, swb_offset[sfb + 1] + shift ); } if ( shiftedSFM > 0.04f ) diff --git a/lib_enc/ivas_agc_enc.c b/lib_enc/ivas_agc_enc.c index b0012ee469..0f3274f43c 100644 --- a/lib_enc/ivas_agc_enc.c +++ b/lib_enc/ivas_agc_enc.c @@ -74,8 +74,8 @@ int16_t ivas_agc_enc_get_enablement_flag( int16_t nchan_transport ) { return (int16_t) ( ( agc_configuration == IVAS_ENC_AGC_UNDEFINED ) - ? ( nchan_transport == 1 ) - : agc_configuration ); + ? ( nchan_transport == 1 ) + : agc_configuration ); } #endif diff --git a/lib_enc/ivas_sns_enc.c b/lib_enc/ivas_sns_enc.c index 45c04ac9ea..6790f0cf6d 100644 --- a/lib_enc/ivas_sns_enc.c +++ b/lib_enc/ivas_sns_enc.c @@ -44,6 +44,7 @@ #include "wmops.h" + /*------------------------------------------------------------------- * sns_1st_cod() * -- GitLab From 46d2a5d3ecafe443056236f9191a253586dfac42 Mon Sep 17 00:00:00 2001 From: Kacper Sagnowski Date: Fri, 4 Nov 2022 12:53:23 +0100 Subject: [PATCH 20/20] Fix formatting --- lib_dec/ivas_core_dec.c | 3 ++- lib_dec/ivas_tcx_core_dec.c | 5 ++--- lib_enc/ivas_sba_enc.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index 5c189b7d32..1d98e39e2b 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -206,7 +206,8 @@ ivas_error ivas_core_dec( { float gain; - gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain : 0.0f; + gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain + : 0.0f; if ( ( st->element_mode == IVAS_CPE_MDCT && hMCT == NULL ) || ( st->hPlcInfo != NULL ) ) { diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index 8e56ed5ef7..54af577fd1 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -835,7 +835,7 @@ static void dec_prm_tcx( #ifdef FIX_TCX_DEC_RECONF_BFI const int16_t last_element_mode, #endif - int16_t *bitsRead /* o : number of read bits */ + int16_t *bitsRead /* o : number of read bits */ ) { int16_t start_bit_pos, bits_common; @@ -963,8 +963,7 @@ static void dec_prm_tcx( static void stereo_tcx_dec_mode_switch_reconf( Decoder_State *st, const int16_t MCT_flag, - const int16_t last_element_mode -) + const int16_t last_element_mode ) { int16_t frame_size_index; diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c index aca565b64d..d987b41d51 100644 --- a/lib_enc/ivas_sba_enc.c +++ b/lib_enc/ivas_sba_enc.c @@ -150,8 +150,8 @@ ivas_error ivas_sba_enc_reinit( ind_list_metadata = hMetaData->ind_list; /*------------------------------------------------------------------------------------------* - * Closing Encoder handles before Reinitialisation - *------------------------------------------------------------------------------------------*/ + * Closing Encoder handles before Reinitialisation + *------------------------------------------------------------------------------------------*/ /* Q Metadata handle */ ivas_qmetadata_close( &( st_ivas->hQMetaData ) ); @@ -208,8 +208,8 @@ ivas_error ivas_sba_enc_reinit( } /*------------------------------------------------------------------------------------------* - * Reopening Encoder handles for Reinitialisation - *------------------------------------------------------------------------------------------*/ + * Reopening Encoder handles for Reinitialisation + *------------------------------------------------------------------------------------------*/ if ( ( error = ivas_qmetadata_open( &( st_ivas->hQMetaData ) ) ) != IVAS_ERR_OK ) { -- GitLab