diff --git a/.gitignore b/.gitignore index c87c691a4af7f6c50a681db4a373b100e84c7558..52512506d7ea2d862997249c9557810148623e3a 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,15 @@ Externals/ # coan output files that are created when cleaning out switches coan_out_* +/COMPLEXITY +/res +/tv +/wmops +/Workspace_msvc/renderer.args.json +/Workspace_msvc/encoder.args.json +/Workspace_msvc/decoder.args.json +/scripts/mem_analysis_enc_VBR_5k9.csv +/scripts/mem_analysis_enc_STEREO_sw.png +/scripts/mem_analysis_enc_STEREO_sw.csv +/scripts/mem_analysis_enc_STEREO_16k4_DTX.csv +*.pwv diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ce29dfd65b178d2be3fbaaaaef1cad592537bbc..ea7344210a5234091b5ed814aec7dd838f2bb52f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ variables: LTV_DIR: "/usr/local/ltv" BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" + EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" SANITIZER_TESTS: "CLANG1 CLANG2" OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" @@ -12,8 +13,6 @@ variables: default: interruptible: true # Make all jobs by default interruptible - artifacts: - expire_in: 2 weeks # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: @@ -314,7 +313,7 @@ codec-smoke-test: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request - timeout: "5 minutes" + timeout: "10 minutes" stage: test needs: ["build-codec-linux-cmake"] script: @@ -327,6 +326,7 @@ codec-smoke-test: - if cat smoke_test_output_hrtf.txt | grep -c "failed"; then echo "Smoke test with external hrtf files failed"; exit 1; fi artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 1 week paths: - smoke_test_output.txt - smoke_test_output_plc.txt @@ -351,6 +351,7 @@ codec-msan: - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang memory-sanitizer"; exit 1; fi artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 1 week paths: - scripts/ref/logs/ - test_output.txt @@ -373,6 +374,7 @@ codec-asan: - if [ $run_errors != 0 ] ; then echo "Run errors in self_test.py with Clang address-sanitizer"; exit 1; fi artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 1 week paths: - scripts/ref/logs/ - test_output.txt @@ -390,6 +392,7 @@ renderer-smoke-test: - python3 -m pytest -q -n auto -rA --junit-xml=report-junit.xml tests/renderer/test_renderer.py artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + expire_in: 1 week when: always paths: - report-junit.xml @@ -413,6 +416,7 @@ renderer-asan: artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + expire_in: 1 week when: always paths: - report-junit.xml @@ -436,6 +440,7 @@ renderer-msan: artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + expire_in: 1 week when: always paths: - report-junit.xml @@ -489,6 +494,7 @@ renderer-pytest-on-merge-request: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--job-$CI_JOB_NAME--results" + expire_in: 2 week when: always paths: - report-junit.xml @@ -539,6 +545,7 @@ ivas-pytest-on-merge-request: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 2 week when: always paths: - report-junit.xml @@ -585,6 +592,7 @@ evs-pytest-on-merge-request: - 123 artifacts: name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 2 week when: always paths: - report-junit-evs.xml @@ -643,6 +651,7 @@ clang-format-check: - exit $format_problems artifacts: + expire_in: 2 days paths: - tmp-formatting-fix/ when: on_failure @@ -653,6 +662,30 @@ clang-format-check: # Test jobs for main branch # --------------------------------------------------------------- +# check bitexactness to EVS windows binaries +be-2-evs-windows: + extends: + - .rules-main-push + tags: + - ivas-windows + stage: test + needs: ["build-codec-windows-msbuild"] + timeout: "20 minutes" # To be revisited + script: + - *print-common-info-windows + + - $winoutdata = $null + - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Release | tee -variable winoutdata + - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 + + # copy over to never change the testvector dir + - cp -r $EVS_BE_WIN_TEST_DIR ./evs_be_win_test + - cp IVAS_cod.exe ./evs_be_win_test/bin/IVAS_cod.exe + - cp IVAS_dec.exe ./evs_be_win_test/bin/IVAS_dec.exe + + - cd evs_be_win_test + - python ../ci/run_evs_be_win_test.py + # check bitexactness to EVS be-2-evs-linux: extends: @@ -751,6 +784,7 @@ codec-comparison-on-main-push: - 123 artifacts: name: "main-push--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" + expire_in: 2 week when: always paths: - report-junit.xml @@ -772,6 +806,7 @@ codec-comparison-on-main-push: - sanitizer_test_main artifacts: name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" + expire_in: 1 week when: always paths: - ep_015.g192 @@ -1035,6 +1070,7 @@ coverage-test-on-main-scheduled: stage: test artifacts: name: "$CI_JOB_NAME--$CI_COMMIT_REF_NAME--sha-$CI_COMMIT_SHA" + expire_in: 1 week paths: - $CI_JOB_NAME-public diff --git a/Workspace_msvc/lib_com.vcxproj b/Workspace_msvc/lib_com.vcxproj index 23aa2ae3f0b6722871f7f9d2c37b27e41f46862f..bfe36b1f4812b8e44a7cb32fca8793c1b443c962 100644 --- a/Workspace_msvc/lib_com.vcxproj +++ b/Workspace_msvc/lib_com.vcxproj @@ -78,7 +78,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks diff --git a/Workspace_msvc/lib_debug.vcxproj b/Workspace_msvc/lib_debug.vcxproj index 3b648fae048920ae06aa709785d4b49d2e58d710..9b7b5806615c336f40e3f5850ded7b2c2d4103ec 100644 --- a/Workspace_msvc/lib_debug.vcxproj +++ b/Workspace_msvc/lib_debug.vcxproj @@ -73,7 +73,7 @@ Disabled - ..\lib_com;..\lib_debug;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_util;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) false diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj index e1c0f9ead1e80039fb23607500d3580bece6215c..760621d7a40ce2113110aed02262c1d0f8f40ff9 100644 --- a/Workspace_msvc/lib_dec.vcxproj +++ b/Workspace_msvc/lib_dec.vcxproj @@ -89,7 +89,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;..\lib_rend;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -282,6 +282,7 @@ + @@ -290,6 +291,7 @@ + diff --git a/Workspace_msvc/lib_dec.vcxproj.filters b/Workspace_msvc/lib_dec.vcxproj.filters index d1dedc413cef958bb637b92972c2b95ef1656319..6284884920f332ea486df52e269e1eb51e5ef8f3 100644 --- a/Workspace_msvc/lib_dec.vcxproj.filters +++ b/Workspace_msvc/lib_dec.vcxproj.filters @@ -518,6 +518,12 @@ dec_ivas_c + + dec_ivas_c + + + dec_ivas_c + diff --git a/Workspace_msvc/lib_enc.vcxproj b/Workspace_msvc/lib_enc.vcxproj index 15f0d535745d95fec1fd22eb4d139f5ca5e8d06f..d9f8e974f0a9fbb885386ff137db1a0b8ef49c0c 100644 --- a/Workspace_msvc/lib_enc.vcxproj +++ b/Workspace_msvc/lib_enc.vcxproj @@ -89,7 +89,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_rend;..\lib_util;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -213,6 +213,7 @@ + diff --git a/Workspace_msvc/lib_enc.vcxproj.filters b/Workspace_msvc/lib_enc.vcxproj.filters index 21941038ec37e6a53cc81c9c3c915e69cbe0ac5f..b3970764c0f9218533e6f7e63c8f1d270540c0e1 100644 --- a/Workspace_msvc/lib_enc.vcxproj.filters +++ b/Workspace_msvc/lib_enc.vcxproj.filters @@ -587,6 +587,9 @@ enc_ivas_c + + enc_ivas_c + diff --git a/Workspace_msvc/lib_rend.vcxproj b/Workspace_msvc/lib_rend.vcxproj index 865652649a8a320ff0769bd83170528445da8ab3..4bd0ca9a93af1b4580271f339f0670bdc1a26bac 100644 --- a/Workspace_msvc/lib_rend.vcxproj +++ b/Workspace_msvc/lib_rend.vcxproj @@ -89,7 +89,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_util;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks diff --git a/Workspace_msvc/lib_util.vcxproj b/Workspace_msvc/lib_util.vcxproj index 5b5e5f30ccdc3697e60b72e2b74750fe06e90598..72ff2dfe6182abfbe7d1a6783c324a3958d398a6 100644 --- a/Workspace_msvc/lib_util.vcxproj +++ b/Workspace_msvc/lib_util.vcxproj @@ -158,6 +158,7 @@ + @@ -183,6 +184,7 @@ + diff --git a/apps/decoder.c b/apps/decoder.c index 22dc235fff728ec606d58391b20e72d04e625efc..d28ce9f88fce4c9aab0e3e7243a5dfec0716b3db 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -45,6 +45,9 @@ #include "vector3_pair_file_reader.h" #include "jbm_file_writer.h" #include "evs_rtp_payload.h" +#ifdef VARIABLE_SPEED_DECODING +#include "tsm_scale_file_reader.h" +#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -76,6 +79,14 @@ static #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC ( 3 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ( 4 ) +#ifdef VARIABLE_SPEED_DECODING +#define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 +#endif +#ifdef JBM_TSM_ON_TCS +#define JBM_FRONTEND_FETCH_FRAMESIZE_MS 20 +#define FRAME_SIZE_NS 20000000L +#endif + typedef struct { char *inputBitstreamFilename; @@ -106,9 +117,11 @@ typedef struct bool customLsOutputEnabled; char *customLsSetupFilename; int16_t orientation_tracking; - float no_diegetic_pan; + int16_t Opt_non_diegetic_pan; + float non_diegetic_pan_gain; bool renderConfigEnabled; char *renderConfigFilename; + IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; #ifdef DEBUGGING IVAS_DEC_FORCED_REND_MODE forcedRendMode; @@ -116,6 +129,20 @@ typedef struct FILE *agcBitstream; /* temporary */ #endif +#endif +#ifdef DEBUG_JBM_CMD_OPTION + bool noBadFrameDelay; +#endif +#ifdef VARIABLE_SPEED_DECODING + bool variableSpeedMode; + bool tsmScaleFileEnabled; + char *tsmScaleFileName; + uint16_t tsmScale; +#endif +#ifdef JBM_TSM_ON_TCS +#ifdef DEBUG_JBM_CMD_OPTION + uint16_t frontendFetchSizeMs; +#endif #endif } DecArguments; @@ -129,6 +156,9 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); +#ifdef VARIABLE_SPEED_DECODING +static ivas_error decodeVariableSpeed( DecArguments arg, BS_READER_HANDLE hBsReader, HeadRotFileReader *headRotReader, HeadRotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); +#endif #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); @@ -190,7 +220,11 @@ int main( * Open decoder handle *------------------------------------------------------------------------------------------*/ - if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking, arg.no_diegetic_pan ) ) != IVAS_ERR_OK ) +#ifdef FIX_439_OTR_PARAMS + if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) +#else + if ( ( error = IVAS_DEC_Open( &hIvasDec, arg.decMode, arg.orientation_tracking ) ) != IVAS_ERR_OK ) +#endif { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -355,7 +389,11 @@ int main( * Configure the decoder *------------------------------------------------------------------------------------------*/ - if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled ) ) != IVAS_ERR_OK ) +#ifdef FIX_439_OTR_PARAMS + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) +#else + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputFormat, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain ) ) != IVAS_ERR_OK ) +#endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -555,8 +593,15 @@ int main( if ( arg.voipMode ) { - +#ifdef JBM_TSM_ON_TCS + if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#else +#ifdef VARIABLE_SPEED_DECODING + if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VOIP, 100, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) +#endif +#endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -564,6 +609,17 @@ int main( error = decodeVoIP( arg, hBsReader, hIvasDec ); } +#ifdef VARIABLE_SPEED_DECODING + else if ( arg.variableSpeedMode ) + { + if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, IVAS_DEC_VOIP_MODE_VARIABLE_SPEED, arg.tsmScale, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nCould not enable Variable Play Speed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + error = decodeVariableSpeed( arg, hBsReader, headRotReader, refRotReader, referenceVectorReader, hIvasDec ); + } +#endif else { error = decodeG192( arg, hBsReader, headRotReader, refRotReader, referenceVectorReader, hIvasDec, pcmBuf ); @@ -757,6 +813,7 @@ static bool parseCmdlIVAS_dec( arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; + arg->complexityLevel = IVAS_DEC_COMPLEXITY_LEVEL_THREE; arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; @@ -787,7 +844,22 @@ static bool parseCmdlIVAS_dec( arg->renderConfigFilename = NULL; arg->inputFormat = IVAS_DEC_INPUT_FORMAT_G192; - arg->no_diegetic_pan = 0.f; + arg->Opt_non_diegetic_pan = 0; + arg->non_diegetic_pan_gain = 0.f; +#ifdef VARIABLE_SPEED_DECODING + arg->variableSpeedMode = 0; + arg->tsmScale = 100; + arg->tsmScaleFileEnabled = false; + arg->tsmScaleFileName = NULL; +#endif +#ifdef JBM_TSM_ON_TCS +#ifdef DEBUG_JBM_CMD_OPTION + arg->frontendFetchSizeMs = JBM_FRONTEND_FETCH_FRAMESIZE_MS; +#endif +#endif +#ifdef DEBUG_JBM_CMD_OPTION + arg->noBadFrameDelay = false; +#endif /*-----------------------------------------------------------------* * Initialization @@ -914,6 +986,62 @@ static bool parseCmdlIVAS_dec( #endif /* #ifdef DEBUG_MODE_INFO_TWEAK */ #endif /* #ifdef DEBUG_MODE_INFO */ #endif /* #ifdef DEBUGGING */ +#ifdef DEBUG_JBM_CMD_OPTION + else if ( strcmp( argv_to_upper, "-VOIP_NO_BAD_FRAME" ) == 0 ) + { + arg->noBadFrameDelay = true; + i++; + } +#endif +#ifdef VARIABLE_SPEED_DECODING + + else if ( strcmp( argv_to_upper, "-VS" ) == 0 ) + { + i++; + int tmp = 100; + arg->variableSpeedMode = true; + if ( i < argc - 3 ) + { + if ( !is_digits_only( argv[i] ) ) + { + arg->tsmScaleFileEnabled = true; + arg->tsmScaleFileName = argv[i]; + i++; + } + + else + { + if ( ( sscanf( argv[i], "%d", &tmp ) > 0 ) ) + { + i++; + } + } + arg->tsmScale = (uint16_t) tmp; + } + } +#endif +#ifdef JBM_TSM_ON_TCS +#ifdef DEBUG_JBM_CMD_OPTION + else if ( strcmp( argv_to_upper, "-VOIP_FRAMESIZE" ) == 0 ) + { + i++; + int tmp; + if ( i < argc - 3 ) + { + if ( !is_digits_only( argv[i] ) ) + { + return false; + } + + if ( sscanf( argv[i], "%d", &tmp ) > 0 ) + { + i++; + } + arg->frontendFetchSizeMs = (uint16_t) tmp; + } + } +#endif +#endif else if ( strcmp( argv_to_upper, "-MIME" ) == 0 ) { @@ -1013,44 +1141,55 @@ static bool parseCmdlIVAS_dec( } i += 2; } - else if ( strcmp( argv_to_upper, "-NO_DIEGETIC_PAN" ) == 0 ) + else if ( strcmp( argv_to_upper, "-NON_DIEGETIC_PAN" ) == 0 ) { i++; - - if ( argc - i <= 4 || argv[i][0] == '-' ) - { - fprintf( stderr, "Error: Argument for panning option not specified!\n\n" ); - usage_dec(); - return false; - } - + arg->Opt_non_diegetic_pan = 1; strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; + to_upper( argv_to_upper ); if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) { - arg->no_diegetic_pan = 0.f; + arg->non_diegetic_pan_gain = 0.f; } else if ( ( strcmp( argv_to_upper, "LEFT" ) == 0 ) || ( strchr( argv_to_upper, 'L' ) != NULL ) ) { - arg->no_diegetic_pan = -1.f; + arg->non_diegetic_pan_gain = 1.f; } else if ( ( strcmp( argv_to_upper, "RIGHT" ) == 0 ) || ( strchr( argv_to_upper, 'R' ) != NULL ) ) { - arg->no_diegetic_pan = 1.f; + arg->non_diegetic_pan_gain = -1.f; } else { - arg->no_diegetic_pan = (float) atof( argv_to_upper ); + arg->non_diegetic_pan_gain = (float) atof( argv_to_upper ) / 90.f; - if ( arg->no_diegetic_pan > 1.0f || arg->no_diegetic_pan < -1.0f ) + if ( arg->non_diegetic_pan_gain > 1.0f || arg->non_diegetic_pan_gain < -1.0f ) { - fprintf( stderr, "Error: Incorrect value for panning option argument specified: %s\n\n", argv[i] ); + fprintf( stderr, "Error: Incorrect value for panning gain value specified: %s\n\n", argv[i] ); usage_dec(); return false; } } i++; } + else if ( strcmp( argv_to_upper, "-LEVEL" ) == 0 ) + { + int16_t level; + + ++i; + level = (int16_t) atoi( argv[i++] ); + if ( level < IVAS_DEC_COMPLEXITY_LEVEL_ONE || level > IVAS_DEC_COMPLEXITY_LEVEL_THREE ) + { + fprintf( stdout, "Invalid complexity level specified.\n" ); + usage_dec(); + return false; + } + else if ( level == IVAS_DEC_COMPLEXITY_LEVEL_ONE || level == IVAS_DEC_COMPLEXITY_LEVEL_TWO ) + { + fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); + } + } /*-----------------------------------------------------------------* * Option not recognized @@ -1079,11 +1218,21 @@ static bool parseCmdlIVAS_dec( arg->customLsSetupFilename = argv[i]; } i++; + if ( ( arg->Opt_non_diegetic_pan ) && ( arg->outputFormat != IVAS_DEC_OUTPUT_STEREO ) ) + { + fprintf( stderr, "Error: non-diegetic panning is supported in stereo only\n\n" ); + usage_dec(); + return false; + } } else { arg->outputFormat = IVAS_DEC_OUTPUT_MONO; arg->decMode = IVAS_DEC_MODE_EVS; + if ( ( arg->Opt_non_diegetic_pan ) ) + { + arg->outputFormat = IVAS_DEC_OUTPUT_STEREO; + } } /*-----------------------------------------------------------------* @@ -1166,6 +1315,18 @@ static void usage_dec( void ) fprintf( stdout, "-VOIP : VoIP mode: RTP in G192\n" ); fprintf( stdout, "-VOIP_hf_only=0 : VoIP mode: EVS RTP Payload Format hf_only=0 in rtpdump\n" ); fprintf( stdout, "-VOIP_hf_only=1 : VoIP mode: EVS RTP Payload Format hf_only=1 in rtpdump\n" ); +#ifdef DEBUG_JBM_CMD_OPTION + fprintf( stdout, "-VOIP_no_bad_frame : VoIP mode: do not put out bad frames in the beginning as silence \n" ); +#endif +#ifdef VARIABLE_SPEED_DECODING + fprintf( stdout, "-VS fac : Varaible Speed mode: change speed of playout fac as integer in percent. fac<100 faster, fac>100 slower\n" ); +#endif +#ifdef JBM_TSM_ON_TCS +#ifdef DEBUG_JBM_CMD_OPTION + fprintf( stdout, "-VOIP_framesize : VoIP mode: acoustic frontend fetch frame size (must be multiples of 5!)\n" ); +#endif + +#endif fprintf( stdout, " The decoder may read rtpdump files containing TS26.445 Annex A.2.2\n" ); fprintf( stdout, " EVS RTP Payload Format. The SDP parameter hf_only is required.\n" ); fprintf( stdout, " Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.\n" ); @@ -1191,8 +1352,8 @@ static void usage_dec( void ) fprintf( stdout, "-rvf File : Reference vector specified by external trajectory file\n" ); fprintf( stdout, " works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes\n" ); fprintf( stdout, "-render_config File : Renderer configuration File\n" ); - fprintf( stdout, "-no_diegetic_pan : panning mono non-diegetic sound to stereo -1<= pan <=1,\n" ); - fprintf( stdout, " left or l or 1->left, right or r or -1->right, center or c or 0->middle\n" ); + fprintf( stdout, "-non_diegetic_pan P : panning mono non-diegetic sound to stereo with paning P, -90<= P <=90,\n" ); + fprintf( stdout, " left or l or 90->left, right or r or -90->right, center or c or 0->middle\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); #ifdef DEBUGGING @@ -1202,6 +1363,8 @@ static void usage_dec( void ) fprintf( stdout, " containing FEC pattern (short values of 0 (good) or 1 (bad))\n" ); fprintf( stdout, " default is OFF, if this option is not used\n" ); fprintf( stdout, "-force R : Force specific binaural rendering mode, R = (TDREND, CLDFBREND),\n" ); + fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); + fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #endif #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK @@ -1853,8 +2016,13 @@ static ivas_error decodeVoIP( uint32_t nextPacketRcvTime_ms = 0; uint32_t systemTime_ms = 0; +#ifdef JBM_TSM_ON_TCS + uint32_t systemTimeInc_ms = (uint32_t) JBM_FRONTEND_FETCH_FRAMESIZE_MS; + int32_t nFramesWritten = 0; +#endif int32_t nFramesFed = 0; + uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3]; int16_t auSize; uint16_t rtpSequenceNumber; @@ -1987,10 +2155,27 @@ static ivas_error decodeVoIP( * Main receiving/decoding loop *------------------------------------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS +#ifdef DEBUG_JBM_CMD_OPTION + systemTimeInc_ms = arg.frontendFetchSizeMs; +#endif +#endif + while ( 1 ) { int16_t nOutSamples = 0; - +#if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) + uint16_t nSamplesAvailableNext = 0; +#endif +#ifdef JBM_TSM_ON_TCS +#ifdef DEBUG_JBM_CMD_OPTION + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * arg.frontendFetchSizeMs ); +#else + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS ); +#endif +#else + nOutSamples = (int16_t) ( arg.output_Fs / 50 ); +#endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) { @@ -2034,15 +2219,24 @@ static ivas_error decodeVoIP( /* we are finished when all packets have been received and jitter buffer is empty */ /* also stop when the input file contains less than two frames, because JBM cannot calculate a delay value and won't start decoding */ +#ifdef JBM_TSM_ON_TCS + /* last clause should make sure that for BE tests we end up with the same number of samples...*/ + if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec, nOutSamples ) || nFramesFed < 2 ) ) +#else if ( nextPacketRcvTime_ms == (uint32_t) ( -1 ) && ( IVAS_DEC_VoIP_IsEmpty( hIvasDec ) || nFramesFed < 2 ) ) +#endif { break; } - nOutSamples = (int16_t) ( arg.output_Fs / 50 ); /* decode and get samples */ - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, + pcmBuf, systemTime_ms +#if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) + , + &nSamplesAvailableNext +#endif #ifdef SUPPORT_JBM_TRACEFILE , writeJbmTraceFileFrameWrapper, @@ -2104,7 +2298,11 @@ static ivas_error decodeVoIP( goto cleanup; } } +#ifdef DEBUG_JBM_CMD_OPTION + else if ( arg.noBadFrameDelay == false ) +#else else +#endif { ++numInitialBadFrames; } @@ -2127,6 +2325,55 @@ static ivas_error decodeVoIP( { delayNumSamples -= nOutSamples; } + +#ifdef JBM_TSM_ON_TCS + /* Write ISM metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + int16_t i; + + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } +#endif } if ( !arg.quietModeEnabled ) @@ -2135,7 +2382,12 @@ static ivas_error decodeVoIP( } frame++; +#ifdef JBM_TSM_ON_TCS + systemTime_ms += systemTimeInc_ms; + nFramesWritten++; +#else systemTime_ms += 20; +#endif #ifdef WMOPS update_mem(); @@ -2193,6 +2445,547 @@ cleanup: } +#ifdef VARIABLE_SPEED_DECODING +/*---------------------------------------------------------------------* + * decodeVariableSpeed() + * + * Read G.192 or decode with variable Speed + *---------------------------------------------------------------------*/ + +static ivas_error decodeVariableSpeed( + DecArguments arg, + BS_READER_HANDLE hBsReader, + HeadRotFileReader *headRotReader, + HeadRotFileReader *refRotReader, + Vector3PairFileReader *referenceVectorReader, + IVAS_DEC_HANDLE hIvasDec ) + +{ + bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ + uint16_t bit_stream[IVAS_MAX_BITS_PER_FRAME + 4 * 8]; + int16_t i, num_bits; + int16_t bfi = 0; +#ifdef DEBUGGING + int16_t fec_seed = 12558; /* FEC_SEED */ +#endif + AudioFileWriter *afWriter = NULL; + MasaFileWriter *masaWriter = NULL; + bool decodedGoodFrame = false; + int16_t numInitialBadFrames = 0; /* Number of bad frames received until first good frame is decoded */ + int16_t nOutChannels = 0; + int16_t delayNumSamples = -1; + int16_t delayNumSamples_orig[3]; + int16_t nOutSamples = 0; + int32_t delayTimeScale = 0; + ivas_error error = IVAS_ERR_UNKNOWN; + uint16_t numObj = 0; + IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; + uint16_t nSamplesAvailableNext; + int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE]; +#ifdef SUPPORT_JBM_TRACEFILE + JbmTraceFileWriter *jbmTraceWriter = NULL; +#endif + TsmScaleFileReader *tsmScaleFileReader = NULL; + IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; + IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + int16_t scale; + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) + { + ismWriters[i] = NULL; + } + + /*------------------------------------------------------------------------------------------* + * Open TSM scale file + *------------------------------------------------------------------------------------------*/ + + if ( arg.tsmScaleFileEnabled ) + { + if ( ( tsmScaleFileReader = TsmScaleFileReader_open( arg.tsmScaleFileName ) ) == NULL ) + { + fprintf( stderr, "\nError: Can't open TSM scale file %s \n\n", arg.tsmScaleFileName ); + goto cleanup; + } + } + + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "\n------ Running the decoder ------\n\n" ); + fprintf( stdout, "Frames processed: " ); + } + else + { + fprintf( stdout, "\n-- Start the decoder (quiet mode) --\n\n" ); + } + + delayNumSamples_orig[0] = -1; + +#ifdef WMOPS + reset_stack(); + reset_wmops(); +#endif + nSamplesAvailableNext = 0; + nOutSamples = (int16_t) ( arg.output_Fs / 1000 * VARIABLE_SPEED_FETCH_FRAMESIZE_MS ); + /*------------------------------------------------------------------------------------------* + * Loop for every packet (frame) of bitstream data + * - Read the bitstream packet + * - Run the decoder + * - Write the synthesized signal into output file + *------------------------------------------------------------------------------------------*/ + + while ( 1 ) + { + /* Read next frame if not enough samples availble */ + + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) + { + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } + } + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions, Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + /* decode and get samples */ + do + { + error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, + pcmBuf, 0, + &nSamplesAvailableNext +#ifdef SUPPORT_JBM_TRACEFILE + , + writeJbmTraceFileFrameWrapper, + jbmTraceWriter +#endif + ); + if ( error != IVAS_ERR_OK && error != IVAS_ERR_VS_FRAME_NEEDED ) + + { + fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + if ( error == IVAS_ERR_VS_FRAME_NEEDED ) + { + if ( arg.tsmScaleFileEnabled ) + { + if ( ( error = TsmScaleFileReader_readScale( tsmScaleFileReader, &scale ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + IVAS_DEC_VoIP_SetScale( hIvasDec, scale ); + } + + if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK ) + { + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; + } + fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + +#ifdef DEBUGGING + /* Random FEC simulation */ + if ( arg.FER > 0.0f ) + { + float ftmp = (float) app_own_random( &fec_seed ) + 32768.0f; + if ( ftmp <= arg.FER / 100.0f * 65535.0f ) + { + bfi = 1; + } + else + { + bfi = 0; + } + } +#endif + + /* Feed into decoder */ + if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + error = IVAS_ERR_VS_FRAME_NEEDED; + } + } while ( error != IVAS_ERR_OK ); + + if ( error == IVAS_ERR_END_OF_FILE ) + { + break; + } + + /* Continue checking for first good frame until it is found */ + if ( !decodedGoodFrame ) + { + if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); + goto cleanup; + } + + /* Once good frame decoded, catch up */ + if ( decodedGoodFrame ) + { + error = initOnFirstGoodFrame( + hIvasDec, + arg, + numInitialBadFrames, + nOutSamples, + delayNumSamples_orig, + &delayNumSamples, + &delayTimeScale, + &bsFormat, + &afWriter, + &masaWriter, + ismWriters, + &nOutChannels, + &numObj ); + if ( error != IVAS_ERR_OK ) + { + goto cleanup; + } + } + else + { + ++numInitialBadFrames; + } + } + + + /* Write current frame */ + if ( decodedGoodFrame ) + { + if ( delayNumSamples < nOutSamples ) + { + if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + delayNumSamples = 0; + } + else + { + delayNumSamples -= nOutSamples; + } + } + + /* Write ISm metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } + + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); +#ifdef DEBUGGING + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); + } +#endif + } +#ifdef WMOPS + update_wmops(); +#ifdef MEM_COUNT_DETAILS + export_mem( "mem_analysis.csv" ); +#endif +#endif + } + + + /*------------------------------------------------------------------------------------------* + * Flush what is still left in the VoIP Buffers.... + *------------------------------------------------------------------------------------------*/ + while ( nSamplesAvailableNext > 0 ) + { + int16_t nSamplesFlushed; + + /* Feed into decoder */ + + /* reference vector */ + if ( arg.enableReferenceVectorTracking ) + { + IVAS_VECTOR3 listenerPosition, referencePosition; + if ( ( error = Vector3PairFileReader_read( referenceVectorReader, &listenerPosition, &referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading listener and reference positions from %s\n", IVAS_DEC_GetErrorMessage( error ), Vector3PairFileReader_getFilePath( referenceVectorReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefVectorData( hIvasDec, listenerPosition, referencePosition ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefVectorData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Reference rotation */ + if ( arg.enableReferenceRotation ) + { + IVAS_QUATERNION quaternion; + if ( ( error = HeadRotationFileReading( refRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading reference rotation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( refRotReader ) ); + goto cleanup; + } + + if ( ( error = IVAS_DEC_FeedRefRotData( hIvasDec, quaternion ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedRefRotData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + /* Head-tracking input simulation */ + if ( arg.enableHeadRotation ) + { + IVAS_QUATERNION Quaternions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( i = 0; i < IVAS_MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), HeadRotationFileReader_getFilePath( headRotReader ) ); + goto cleanup; + } + } + + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions, Pos ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + } + + /* decode and get samples */ + if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, + pcmBuf, + &nSamplesAvailableNext, + &nSamplesFlushed ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + + /* Write current frame */ + + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nOutput audio file writer error\n" ); + goto cleanup; + } + + + /* Write ISm metadata to external file(s) */ + if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + for ( i = 0; i < numObj; ++i ) + { + IVAS_ISM_METADATA IsmMetadata; + + if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); + goto cleanup; + } + } + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; + if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } + + if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + goto cleanup; + } + } + } + + frame++; + if ( !arg.quietModeEnabled ) + { + fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); +#ifdef DEBUGGING + if ( IVAS_DEC_GetBerDetectFlag( hIvasDec ) ) + { + fprintf( stdout, "\n Decoding error: BER detected in frame %d !!!!!\n", frame - 1 ); + } +#endif + } + } + /*------------------------------------------------------------------------------------------* + * Printouts after decoding has finished + *------------------------------------------------------------------------------------------*/ + + if ( !arg.quietModeEnabled ) + { + printf( "\n\nDecoder+renderer delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[1] / (float) delayTimeScale, delayNumSamples_orig[1], delayTimeScale ); + + if ( delayNumSamples_orig[2] > 0 ) + { + printf( "HRIR/BRIR delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale ); + printf( "Total delay: %4.2f ms (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale ); + } + } + + /* Print output metadata file name(s) */ + if ( arg.outputFormat == IVAS_DEC_OUTPUT_EXT ) + { + if ( bsFormat == IVAS_DEC_BS_OBJ ) + { + for ( i = 0; i < numObj; i++ ) + { + fprintf( stdout, "\nOutput metadata file: %s", IsmFileWriter_getFilePath( ismWriters[i] ) ); + } + fprintf( stdout, "\n" ); + } + else if ( bsFormat == IVAS_DEC_BS_MASA ) + { + fprintf( stdout, "\nOutput metadata file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); + } + } + + /* add zeros at the end to have equal length of synthesized signals */ + memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); + if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } + + /*------------------------------------------------------------------------------------------* + * Close files and deallocate resources + *------------------------------------------------------------------------------------------*/ + + decodingFailed = false; /* This will stay set to true if cleanup is reached via a goto due to an error */ + +cleanup: + + AudioFileWriter_close( &afWriter ); + MasaFileWriter_close( &masaWriter ); + TsmScaleFileReader_close( &tsmScaleFileReader ); + for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) + { + IsmFileWriter_close( &ismWriters[i] ); + } + + if ( decodingFailed && error == IVAS_ERR_OK ) + { + return IVAS_ERR_UNKNOWN; + } + + return error; +} + +#endif + #ifdef DEBUGGING /*---------------------------------------------------------------------* * parseForcedRendModeDec() diff --git a/apps/encoder.c b/apps/encoder.c index 7f6d6baa30cd993bb1ab57849fcdbc78b027b1ec..df7c0915d4f6b5f1306d69b25b011cdc75ece738 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -111,6 +111,7 @@ typedef struct IVAS_ENC_CHANNEL_AWARE_CONFIG caConfig; const char *ca_config_file; bool mimeOutput; + IVAS_ENC_COMPLEXITY_LEVEL complexityLevel; #ifdef DEBUGGING IVAS_ENC_FORCED_MODE forcedMode; @@ -878,6 +879,7 @@ static void initArgStruct( EncArguments *arg ) arg->ca_config_file = NULL; arg->mimeOutput = false; arg->ism_extended_metadata = false; + arg->complexityLevel = IVAS_ENC_COMPLEXITY_LEVEL_THREE; #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; @@ -1130,31 +1132,18 @@ static bool parseCmdlIVAS_enc( { strncpy( stmp, argv[i], sizeof( stmp ) ); stmp[sizeof( stmp ) - 1] = '\0'; -#ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING to_upper( stmp ); if ( strcmp( stmp, "LO" ) == 0 ) -#else - to_upper( argv[i] ); - if ( strcmp( argv[i], "LO" ) == 0 ) -#endif { arg->caConfig.fec_indicator = IVAS_ENC_FEC_LO; } -#ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING else if ( strcmp( stmp, "HI" ) == 0 ) -#else - else if ( strcmp( argv[i], "HI" ) == 0 ) -#endif { arg->caConfig.fec_indicator = IVAS_ENC_FEC_HI; } else { -#ifdef FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING arg->ca_config_file = argv[i]; -#else - arg->ca_config_file = stmp; -#endif } i++; @@ -1190,6 +1179,30 @@ static bool parseCmdlIVAS_enc( ++i; } + + /*-----------------------------------------------------------------* + * Complexity Level + *-----------------------------------------------------------------*/ + + /* actual parsing of level will be implemented after characterization */ + else if ( strcmp( argv_to_upper, "-LEVEL" ) == 0 ) + { + int16_t level; + + ++i; + level = (int16_t) atoi( argv[i++] ); + if ( level < IVAS_ENC_COMPLEXITY_LEVEL_ONE || level > IVAS_ENC_COMPLEXITY_LEVEL_THREE ) + { + fprintf( stdout, "Invalid complexity level specified.\n" ); + usage_enc(); + return false; + } + else if ( level == IVAS_ENC_COMPLEXITY_LEVEL_ONE || level == IVAS_ENC_COMPLEXITY_LEVEL_TWO ) + { + fprintf( stdout, "Complexity levels 1 and 2 will be defined after characterisation - default to level 3 (full functionality).\n" ); + } + } + /*-----------------------------------------------------------------* * IVAS Formats *-----------------------------------------------------------------*/ @@ -1697,6 +1710,8 @@ static void usage_enc( void ) fprintf( stdout, " default output bitstream file format is G.192\n" ); fprintf( stdout, "-bypass mode : SBA PCA by-pass, mode = (1, 2), 1 = PCA off, 2 = signal adaptive, default is 1\n" ); + fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); + fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); #ifdef DEBUGGING fprintf( stdout, "-force T : Force specific mode, T = (speech, music, ACELP, GSC, TCX, HQ),\n" ); fprintf( stdout, " alternatively, T can be a text file where each line contains \"nb_frames T\"\n" ); diff --git a/apps/renderer.c b/apps/renderer.c index 9045bbeaa02161270702583fcb114320143104ae..3ed5d4996e9fb6fcfc6ec21a70808f390d0d9278 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -135,8 +135,13 @@ typedef struct char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH]; +#ifdef FIX_439_OTR_PARAMS + int8_t orientation_tracking; +#else int8_t orientationTracking; - float noDiegeticPan; +#endif + int16_t nonDiegeticPan; + float nonDiegeticPanGain; bool delayCompensationEnabled; bool quietModeEnabled; bool sceneDescriptionInput; @@ -160,7 +165,7 @@ typedef enum CmdLnOptionId_refRotFile, CmdLnOptionId_customHrtfFile, CmdLnOptionId_renderConfigFile, - CmdLnOptionId_noDiegeticPan, + CmdLnOptionId_nonDiegeticPan, CmdLnOptionId_orientationTracking, CmdlnOptionId_lfePosition, CmdlnOptionId_lfeMatrix, @@ -234,10 +239,10 @@ static const CmdLnParser_Option cliOptions[] = { .description = "Binaural renderer configuration file (only for BINAURAL and BINAURAL_ROOM outputs)", }, { - .id = CmdLnOptionId_noDiegeticPan, - .match = "no_diegetic_pan", + .id = CmdLnOptionId_nonDiegeticPan, + .match = "non_diegetic_pan", .matchShort = "ndp", - .description = "Panning mono no diegetic sound to stereo -1<= pan <= 1\nleft or l or 1->left, right or r or -1->right, center or c or 0 ->middle\n(todo: implementation)", + .description = "Panning mono non diegetic sound to stereo -90<= pan <= 90\nleft or l or 90->left, right or r or -90->right, center or c or 0 ->middle\n(todo: implementation)", }, { .id = CmdLnOptionId_orientationTracking, @@ -551,6 +556,19 @@ int main( CmdlnArgs args = parseCmdlnArgs( argc, argv ); + if ( args.nonDiegeticPan && !( ( args.inConfig.numAudioObjects == 0 && args.inConfig.multiChannelBuses[0].audioConfig == IVAS_REND_AUDIO_CONFIG_MONO ) || + ( args.inConfig.numAudioObjects > 0 && args.inConfig.audioObjects[0].audioConfig == IVAS_REND_AUDIO_CONFIG_OBJECT && args.inConfig.numAudioObjects == 1 ) ) ) + { + fprintf( stderr, "\ninvalid configuration - non-diegetic panning requires mono or ISM1 input\n" ); + exit( -1 ); + } + + if ( args.nonDiegeticPan && args.outConfig.audioConfig != IVAS_REND_AUDIO_CONFIG_STEREO ) + { + fprintf( stderr, "\ninvalid configuration - non-diegetic panning requires stereo output\n" ); + exit( -1 ); + } + positionProvider = IsmPositionProvider_open(); convert_backslash( args.inputFilePath ); @@ -665,7 +683,7 @@ int main( IVAS_REND_InputId sbaIds[RENDERER_MAX_SBA_INPUTS] = { 0 }; IVAS_REND_InputId masaIds[RENDERER_MAX_MASA_INPUTS] = { 0 }; - if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, args.nonDiegeticPan, args.nonDiegeticPanGain ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Error opening renderer handle: %s\n", ivas_error_to_string( error ) ); exit( -1 ); @@ -708,7 +726,11 @@ int main( } } +#ifdef FIX_439_OTR_PARAMS + if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientation_tracking ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -1336,61 +1358,85 @@ static bool parseOutConfig( static bool parseDiegeticPan( char *value, - float *noDiegeticPan ) + float *nonDiegeticPan ) { to_upper( value ); if ( ( strcmp( value, "CENTER" ) == 0 ) || ( strchr( value, 'C' ) != NULL ) ) { - *noDiegeticPan = 0.f; + *nonDiegeticPan = 0.f; } else if ( ( strcmp( value, "LEFT" ) == 0 ) || ( strchr( value, 'L' ) != NULL ) ) { - *noDiegeticPan = -1.f; + *nonDiegeticPan = 1.f; } else if ( ( strcmp( value, "RIGHT" ) == 0 ) || ( strchr( value, 'R' ) != NULL ) ) { - *noDiegeticPan = 1.f; + *nonDiegeticPan = -1.f; } else { - *noDiegeticPan = (float) atof( value ); + *nonDiegeticPan = (float) atof( value ) / 90.f; - if ( *noDiegeticPan > 1.0f || *noDiegeticPan < -1.0f ) + if ( *nonDiegeticPan > 1.0f || *nonDiegeticPan < -1.0f ) { fprintf( stderr, "Error: Incorrect value for panning option argument specified!\n\n" ); return false; } } - return false; + return true; } static bool parseOrientationTracking( char *value, - int8_t *tracking_type ) +#ifdef FIX_439_OTR_PARAMS + int8_t *orientation_tracking +#else + int8_t *tracking_type +#endif +) { - to_upper( value ); if ( strcmp( value, "NONE" ) == 0 ) { +#ifdef FIX_439_OTR_PARAMS + *orientation_tracking = HEAD_ORIENT_TRK_NONE; +#else *tracking_type = IVAS_ORIENT_TRK_NONE; +#endif } else if ( strcmp( value, "REF" ) == 0 ) { +#ifdef FIX_439_OTR_PARAMS + *orientation_tracking = HEAD_ORIENT_TRK_REF; +#else *tracking_type = IVAS_ORIENT_TRK_REF; +#endif } else if ( strcmp( value, "AVG" ) == 0 ) { +#ifdef FIX_439_OTR_PARAMS + *orientation_tracking = HEAD_ORIENT_TRK_AVG; +#else *tracking_type = IVAS_ORIENT_TRK_AVG; +#endif } else if ( strcmp( value, "REF_VEC" ) == 0 ) { +#ifdef FIX_439_OTR_PARAMS + *orientation_tracking = HEAD_ORIENT_TRK_REF_VEC; +#else *tracking_type = IVAS_ORIENT_TRK_REF_VEC; +#endif } else if ( strcmp( value, "REF_VEC_LEV" ) == 0 ) { +#ifdef FIX_439_OTR_PARAMS + *orientation_tracking = HEAD_ORIENT_TRK_REF_VEC_LEV; +#else *tracking_type = IVAS_ORIENT_TRK_REF_VEC_LEV; +#endif } else { @@ -1614,8 +1660,13 @@ static CmdlnArgs defaultArgs( clearString( args.customHrtfFilePath ); clearString( args.renderConfigFilePath ); +#ifdef FIX_439_OTR_PARAMS + args.orientation_tracking = HEAD_ORIENT_TRK_NONE; +#else args.orientationTracking = IVAS_ORIENT_TRK_NONE; - args.noDiegeticPan = 0.0f; +#endif + args.nonDiegeticPan = 0; + args.nonDiegeticPanGain = 0.f; args.delayCompensationEnabled = true; args.quietModeEnabled = false; @@ -1705,17 +1756,22 @@ static void parseOption( assert( numOptionValues == 1 ); strncpy( args->renderConfigFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 ); break; - case CmdLnOptionId_noDiegeticPan: + case CmdLnOptionId_nonDiegeticPan: assert( numOptionValues == 1 ); - if ( !parseDiegeticPan( optionValues[0], &args->noDiegeticPan ) ) + if ( !parseDiegeticPan( optionValues[0], &args->nonDiegeticPanGain ) ) { fprintf( stderr, "Unknown option for diegetic panning: %s\n", optionValues[0] ); exit( -1 ); } + args->nonDiegeticPan = 1; break; case CmdLnOptionId_orientationTracking: assert( numOptionValues == 1 ); +#ifdef FIX_439_OTR_PARAMS + if ( !parseOrientationTracking( optionValues[0], &args->orientation_tracking ) ) +#else if ( !parseOrientationTracking( optionValues[0], &args->orientationTracking ) ) +#endif { fprintf( stderr, "Unknown option for orientation tracking: %s\n", optionValues[0] ); exit( -1 ); @@ -1822,6 +1878,7 @@ void getMetadataFromFileReader( objectMetadataBuffer->positions[objIdx].radius = ismMetadata.radius; objectMetadataBuffer->positions[objIdx].yaw = ismMetadata.yaw; objectMetadataBuffer->positions[objIdx].pitch = ismMetadata.pitch; + objectMetadataBuffer->positions[objIdx].non_diegetic_flag = ismMetadata.non_diegetic_flag; return; } @@ -1879,6 +1936,7 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].radius = 1.0f; objectMetadataBuffer->positions[objIdx].yaw = 0.0f; objectMetadataBuffer->positions[objIdx].pitch = 0.0f; + objectMetadataBuffer->positions[objIdx].non_diegetic_flag = 0; } /* Wrap azimuth to lie within (-180, 180] range */ @@ -2140,13 +2198,14 @@ static void parseObjectPosition( { char *endptr; int16_t read_values; - float meta_prm[7] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f }; + float meta_prm[8] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f }; + readNextMetadataChunk( line, "," ); *positionDuration = (uint16_t) strtol( line, &endptr, 10 ); readNextMetadataChunk( line, "\n" ); - read_values = (int16_t) sscanf( line, "%f,%f,%f,%f,%f,%f,%f", &meta_prm[0], &meta_prm[1], &meta_prm[2], &meta_prm[3], &meta_prm[4], &meta_prm[5], &meta_prm[6] ); + read_values = (int16_t) sscanf( line, "%f,%f,%f,%f,%f,%f,%f,%f", &meta_prm[0], &meta_prm[1], &meta_prm[2], &meta_prm[3], &meta_prm[4], &meta_prm[5], &meta_prm[6], &meta_prm[7] ); if ( read_values < 2 ) { @@ -2159,6 +2218,7 @@ static void parseObjectPosition( position->radius = meta_prm[2]; position->yaw = meta_prm[5]; position->pitch = meta_prm[6]; + position->non_diegetic_flag = (int16_t) meta_prm[7]; return; } diff --git a/ci/run_evs_be_win_test.py b/ci/run_evs_be_win_test.py new file mode 100644 index 0000000000000000000000000000000000000000..f1bcd7f3a4e7e69634878431d56a29be111642b3 --- /dev/null +++ b/ci/run_evs_be_win_test.py @@ -0,0 +1,149 @@ +""" + (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. +""" + +from multiprocessing import Pool +import argparse +import subprocess +import os +import shutil +import sys + + +def run_condition(eval_cmd, diff_cmd, id_count): + """ Run ENC or DEC command string and compare output with EVS test vectors. """ + + cmd = subprocess.run(eval_cmd.split(), capture_output=True, text=True, check=True) + + # diff + diff_success = 1 + if ';' in diff_cmd: + diff_cmd1, diff_cmd2 = diff_cmd.split(';') + cmd1 = subprocess.run(diff_cmd1.split(), capture_output=True, text=True, check=True) + cmd2 = subprocess.run(diff_cmd2.split(), capture_output=True, text=True, check=True) + diff_success = cmd1.returncode + cmd2.returncode + else: + cmd = subprocess.run(diff_cmd.split(), capture_output=True, text=True, check=True) + diff_success = cmd.returncode + if diff_success == 0: + return None + else: + return f'[{str(id_count).rjust(3)}] FAIL: {" ".join(eval_cmd)}\n {diff_cmd}\n' + + +def environment_is_correct(paths): + """ + Check that the folder with the test resources is set up correctly: + - all Readme files there + - EVS binaries available in bin/ + - testv and switchPaths folder exist - Content is not checked, though + """ + ret = True + + for pth in paths: + if not os.path.exists(pth): + print(f"Environment setup is incorrect - {pth} not found.") + ret = False + + return ret + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description='Run 26.444 test with parallel processes ') + parser.add_argument('-p', type=int, default=os.cpu_count(), + help='Number of processes (default cpu_count)') + parser.add_argument('-test_dir', type=str, default='./', + help='testvec directory from 26.444)') + parser.add_argument('-enc_bin', type=str, default='./bin/IVAS_cod.exe', + help='Encoder binary (default ./bin/IVAS_cod.exe)') + parser.add_argument('-dec_bin', type=str, default='./bin/IVAS_dec.exe', + help='Decoder binary (default ./bin/IVAS_dec.exe)') + + args = parser.parse_args() + test_vec_dir = args.test_dir + processes = args.p + enc_bin = args.enc_bin + dec_bin = args.dec_bin + + README_FILES = ['Readme_AMRWB_IO_dec.txt', 'Readme_AMRWB_IO_enc.txt', 'Readme_EVS_dec.txt', + 'Readme_EVS_enc.txt', 'Readme_JBM_dec.txt'] + + scripts = [os.path.join(test_vec_dir, script) for script in README_FILES] + + if not environment_is_correct([f'{test_vec_dir}/testv'] + scripts + [enc_bin, dec_bin]): + sys.exit(1) + + pool = Pool(processes) + results = [] + id_count = 0 + + for script in scripts: + with open(script) as file: + tmp_dir = None + eval_cmd = None + diff_cmd = '' + for line in file: + if line.startswith('TMP='): + assert tmp_dir is None + tmp_dir = line.split('"')[1] + if os.path.exists(tmp_dir): + shutil.rmtree(tmp_dir) + os.makedirs(tmp_dir) + line = line if tmp_dir is None else line.replace( + '$TMP/', f'{tmp_dir}/') + if '$CUT_DEC_BIN' in line: + eval_cmd = dec_bin + ' -q ' + ' '.join(line.split()[1:]) + if '$CUT_ENC_BIN' in line: + eval_cmd = enc_bin + ' -q ' + ' '.join(line.split()[1:]) + if '$DIFF_BIN' in line: + if 'Readme_JBM_dec.txt' in script: + if '-w' not in line.split()[1]: + diff_cmd = 'FC.exe ' + ' '.join(line.split()[1:]).replace('/', '\\').replace('\n', '/n') + continue + diff_cmd += '; FC.exe ' + ' '.join(line.split()[1:]).replace('/', '\\').replace('\n', '/n').replace('-w', '/W') + else: + diff_cmd = 'FC.exe ' + ' '.join(line.split()[1:]).replace('/', '\\').replace('\n', '/n') + results.append(pool.apply_async( + run_condition, args=(eval_cmd, diff_cmd, id_count))) + id_count = id_count + 1 + print('Total number of conditions for', '"' + + os.path.basename(script) + '": ' + str(id_count - 1)) + + results = [r.get() for r in results if r.get()] + if results: + print(f'\n{len(results)} test conditions failed:') + print('\n'.join(results)) + with open('failed.txt', 'w') as f: + print(f'\n{len(results)} test conditions failed:', file=f) + print('\n'.join(results), file=f) + sys.exit(1) + else: + print('\n *** All tests passed! ***') + sys.exit(0) diff --git a/ci/smoke_test.sh b/ci/smoke_test.sh index 852b74fe47d23c5a7a60503370781f5dbb2ae46d..b1b9e024b46711fc7b8ced20dfb3d1f1b19b3144 100755 --- a/ci/smoke_test.sh +++ b/ci/smoke_test.sh @@ -63,7 +63,7 @@ if [ $BUILD -eq 1 ];then make clean # Replace free -> free_, malloc -> malloc_, calloc -> calloc_ - ./scripts/prepare_mem_dryrun.py + python3 ./scripts/prepare_mem_dryrun.py # Enable WMOPS and disable DEBUGGING sed -i.bak -e "s/\/\*\s*\(#define\s*WMOPS\)\s*\*\//\1/g" lib_com/options.h @@ -78,28 +78,37 @@ fi # treat ISM modes separately because passing the metadata files to MASA modes causes crashes ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM) non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM) +echo "\n======================= 1. non-ism modes no FEC =======================\n\n" ./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt +echo "\n======================= 2. ism modes no FEC =======================\n\n" ./scripts/runIvasCodec.py -m $ism_modes -p $cfg -U 1 $WORKERS $ism_md_cmd | tee smoke_test_output.txt # run the decoding again, but with 15% frame loss +echo "\n======================= 3. all modes with FEC =======================\n\n" ./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt # run JBM modes - EXT is excluded as not supported yet modes_with_no_ext_out=$(./scripts/runIvasCodec.py -l | grep -v MASA | grep -v ISM) +modes_with_ext_out=$(./scripts/runIvasCodec.py -l | grep 'MASA\|ISM' | grep -v ISM+) +echo "\n======================= 4. JBM, modes with no EXT =======================\n\n" ./scripts/runIvasCodec.py -m $modes_with_no_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile | tee smoke_test_output_jbm_noEXT.txt -./scripts/runIvasCodec.py -C MASA ISM1 ISM2 ISM3 ISM4 -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt +echo "\n======================= 5. JBM, modes with EXT =======================\n\n" +./scripts/runIvasCodec.py -m $modes_with_ext_out -p $cfg -U 1 $WORKERS --decoder_only --jbm_file $dly_profile --oc BINAURAL BINAURAL_ROOM mono stereo FOA HOA3 5_1 7_1_4 | tee -a smoke_test_output_jbm_noEXT.txt # run all modes with binaural output using external files modes_with_bin_out="SBA PlanarSBA MASA MC ISM1 ISM2 ISM3 ISM4" bin_out_modes="BINAURAL BINAURAL_ROOM" +echo "\n======================= 6. binaural out with HRTF files - WB =======================\n\n" wb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _wb_) hrtf_wb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin" ./scripts/runIvasCodec.py -p $cfg -m $wb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_wb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt +echo "\n======================= 7. binaural out with HRTF files - SWB =======================\n\n" swb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _swb_) hrtf_swb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_32kHz.bin" ./scripts/runIvasCodec.py -p $cfg -m $swb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_swb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt +echo "\n======================= 8. binaural out with HRTF files - FB =======================\n\n" fb_modes=$(./scripts/runIvasCodec.py -l -C $modes_with_bin_out | grep _fb_) hrtf_fb="../scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_48kHz.bin" ./scripts/runIvasCodec.py -p $cfg -m $fb_modes -U 1 $WORKERS -D="-hrtf ${hrtf_fb}" --decoder_only --oc $bin_out_modes | tee -a smoke_test_output_hrtf.txt diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index 886509b5ac96d65923b4f13872021fd74414c2f2..d2aae93ed416c50f8086b2b43b62f32b1c7e9de6 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -62,6 +62,11 @@ FILE *FEC_pattern = NULL; /* FEC pattern file (for simulation of FEC) */ #endif +#ifdef IND_LIST_DYN +#define STEP_MAX_NUM_INDICES 100 /* increase the maximum number of allowed indices in the list by this amount */ +#endif + +#ifndef IND_LIST_DYN /*-------------------------------------------------------------------* * pack_bit() * @@ -113,106 +118,855 @@ static Word16 unpack_bit( ( *pt )++; } - return bit; + return bit; +} +#endif + +/*-------------------------------------------------------------------* + * rate2AMRWB_IOmode() + * + * lookup AMRWB IO mode + *-------------------------------------------------------------------*/ + +static Word16 rate2AMRWB_IOmode( + Word32 brate /* i : bitrate */ +) +{ + switch ( brate ) + { + /* EVS AMR-WB IO modes */ + case SID_1k75: + return AMRWB_IO_SID; + case ACELP_6k60: + return AMRWB_IO_6600; + case ACELP_8k85: + return AMRWB_IO_8850; + case ACELP_12k65: + return AMRWB_IO_1265; + case ACELP_14k25: + return AMRWB_IO_1425; + case ACELP_15k85: + return AMRWB_IO_1585; + case ACELP_18k25: + return AMRWB_IO_1825; + case ACELP_19k85: + return AMRWB_IO_1985; + case ACELP_23k05: + return AMRWB_IO_2305; + case ACELP_23k85: + return AMRWB_IO_2385; + default: + break; + } + + return -1; +} + +/*-------------------------------------------------------------------* + * rate2EVSmode() + * + * lookup EVS mode + *-------------------------------------------------------------------*/ +Word16 rate2EVSmode( + const Word32 brate, /* i : bitrate */ + int16_t *is_amr_wb /* o : (flag) does the bitrate belong to AMR-WB? Can be NULL */ +) +{ + if ( is_amr_wb != NULL ) + { + *is_amr_wb = 0; + } + + switch ( brate ) + { + /* EVS Primary modes */ + case FRAME_NO_DATA: + return NO_DATA_RECEIVED; + case SID_2k40: + return PRIMARY_SID; + case PPP_NELP_2k80: + return PRIMARY_2800; + case ACELP_7k20: + return PRIMARY_7200; + case ACELP_8k00: + return PRIMARY_8000; + case ACELP_9k60: + return PRIMARY_9600; + case ACELP_13k20: + return PRIMARY_13200; + case ACELP_16k40: + return PRIMARY_16400; + case ACELP_24k40: + return PRIMARY_24400; + case ACELP_32k: + return PRIMARY_32000; + case ACELP_48k: + return PRIMARY_48000; + case ACELP_64k: + return PRIMARY_64000; + case HQ_96k: + return PRIMARY_96000; + case HQ_128k: + return PRIMARY_128000; + default: + break; + } + + if ( is_amr_wb != NULL ) + { + *is_amr_wb = 1; + } + + return rate2AMRWB_IOmode( brate ); +} + +#ifdef IND_LIST_DYN +/*-------------------------------------------------------------------* + * ind_list_realloc() + * + * Re-allocate the list of indices + *-------------------------------------------------------------------*/ + +ivas_error ind_list_realloc( + BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ + int16_t max_num_indices /* i : new maximum number of allowed indices in the list */ +) +{ + int16_t i, ind_list_pos; + INDICE_HANDLE new_ind_list; + + /* allocate new buffer of indices */ + if ( ( new_ind_list = (INDICE_HANDLE) malloc( max_num_indices * sizeof( Indice ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for buffer of indices!\n" ) ); + } + + /* move indices from the old list to the new list */ + for ( i = 0; i < min( max_num_indices, *( hBstr->ivas_max_num_indices ) ); i++ ) + { + if ( ( *hBstr->ivas_ind_list_zero )[i].nb_bits > -1 ) + { + new_ind_list[i].id = ( *hBstr->ivas_ind_list_zero )[i].id; + new_ind_list[i].value = ( *hBstr->ivas_ind_list_zero )[i].value; + } + new_ind_list[i].nb_bits = ( *hBstr->ivas_ind_list_zero )[i].nb_bits; + } + + /* reset nb_bits of all other indices to -1 */ + for ( ; i < max_num_indices; i++ ) + { + new_ind_list[i].nb_bits = -1; + } + + /* get the current position inside the old list */ + ind_list_pos = (int16_t) ( hBstr->ind_list - ( *hBstr->ivas_ind_list_zero ) ); + + /* free the old list */ + free( ( *hBstr->ivas_ind_list_zero ) ); + + /* set pointers in the new list */ + hBstr->ind_list = &new_ind_list[ind_list_pos]; + *( hBstr->ivas_ind_list_zero ) = new_ind_list; + + /* set the new maximum number of indices */ + *( hBstr->ivas_max_num_indices ) = max_num_indices; + + return IVAS_ERR_OK; +} + + +/*-----------------------------------------------------------------------* + * get_ivas_max_num_indices() + * + * Get the maximum allowed number of indices in the encoder + *-----------------------------------------------------------------------*/ + +int16_t get_ivas_max_num_indices( /* o : maximum number of indices */ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const int32_t ivas_total_brate /* i : IVAS total bitrate */ +) +{ + if ( ivas_format == STEREO_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 300; + } + else if ( ivas_total_brate <= IVAS_24k4 ) + { + return 400; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 450; + } + else if ( ivas_total_brate <= IVAS_48k ) + { + return 650; + } + else if ( ivas_total_brate <= IVAS_80k ) + { + return 750; + } + else if ( ivas_total_brate <= IVAS_128k ) + { + return 850; + } + else if ( ivas_total_brate <= IVAS_192k ) + { + return 950; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 1350; + } + else + { + return 1650; + } + } + else if ( ivas_format == ISM_FORMAT || ivas_format == MONO_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 250; + } + else if ( ivas_total_brate <= IVAS_24k4 ) + { + return 350; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 450; + } + else if ( ivas_total_brate <= IVAS_48k ) + { + return 550; + } + else if ( ivas_total_brate <= IVAS_64k ) + { + return 620; + } + else if ( ivas_total_brate <= IVAS_80k ) + { + return 670; + } + else if ( ivas_total_brate <= IVAS_96k ) + { + return 780; + } + else if ( ivas_total_brate <= IVAS_128k ) + { + return 880; + } + else if ( ivas_total_brate <= IVAS_192k ) + { + return 950; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 1100; + } + else if ( ivas_total_brate <= IVAS_384k ) + { + return 1300; + } + else + { + return 1650; + } + } + else if ( ivas_format == SBA_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 250; + } + else if ( ivas_total_brate <= IVAS_24k4 ) + { + return 350; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 400; + } + else if ( ivas_total_brate <= IVAS_48k ) + { + return 650; + } + else if ( ivas_total_brate <= IVAS_80k ) + { + return 750; + } + else if ( ivas_total_brate <= IVAS_128k ) + { + return 1020; + } + else if ( ivas_total_brate <= IVAS_160k ) + { + return 1160; + } + else if ( ivas_total_brate <= IVAS_192k ) + { + return 1220; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 1300; + } + else if ( ivas_total_brate <= IVAS_384k ) + { + return 1720; + } + else + { + return 2000; + } + } + else if ( ivas_format == MASA_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 300; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 400; + } + else if ( ivas_total_brate <= IVAS_48k ) + { + return 650; + } + else if ( ivas_total_brate <= IVAS_80k ) + { + return 750; + } + else if ( ivas_total_brate <= IVAS_160k ) + { + return 850; + } + else if ( ivas_total_brate <= IVAS_192k ) + { + return 950; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 1150; + } + else if ( ivas_total_brate <= IVAS_384k ) + { + return 1450; + } + else + { + return 1650; + } + } + else if ( ivas_format == MC_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 250; + } + else if ( ivas_total_brate <= IVAS_24k4 ) + { + return 350; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 400; + } + else if ( ivas_total_brate <= IVAS_48k ) + { + return 650; + } + else if ( ivas_total_brate <= IVAS_64k ) + { + return 750; + } + else if ( ivas_total_brate <= IVAS_80k ) + { + return 850; + } + else if ( ivas_total_brate <= IVAS_128k ) + { + return 1150; + } + else if ( ivas_total_brate <= IVAS_160k ) + { + return 1420; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 2120; + } + else if ( ivas_total_brate <= IVAS_384k ) + { + return 2250; + } + else + { + return 2450; + } + } + + return 2450; +} + +/*-----------------------------------------------------------------------* + * get_core_max_num_indices() + * + * Get the maximum allowed number of indices in the core coder + *-----------------------------------------------------------------------*/ + +int16_t get_core_max_num_indices( /* o : maximum number of indices */ + const int16_t core, /* i : core */ + const int32_t total_brate /* i : total bitrate */ +) +{ + /* set the maximum number of indices in the core coder */ + if ( core == ACELP_CORE || core == AMR_WB_CORE ) + { + if ( total_brate <= 9600 ) + { + return 60; + } + else if ( total_brate <= IVAS_13k2 ) + { + return 70; + } + else if ( total_brate <= IVAS_16k4 ) + { + return 80; + } + else if ( total_brate <= IVAS_24k4 ) + { + return 100; + } + else if ( total_brate <= IVAS_32k ) + { + return 180; + } + else if ( total_brate <= IVAS_48k ) + { + return 340; + } + else if ( total_brate <= IVAS_80k ) + { + return 450; + } + else if ( total_brate <= IVAS_96k ) + { + return 500; + } + else if ( total_brate <= IVAS_128k ) + { + return 550; + } + else if ( total_brate <= IVAS_160k ) + { + return 600; + } + else if ( total_brate <= IVAS_192k ) + { + return 650; + } + else if ( total_brate <= IVAS_256k ) + { + return 700; + } + else + { + return 800; + } + } + else if ( core == TCX_20_CORE || core == TCX_10_CORE ) + { + if ( total_brate <= 9600 ) + { + return 100; + } + else if ( total_brate <= IVAS_13k2 ) + { + return 150; + } + else if ( total_brate <= IVAS_16k4 ) + { + return 200; + } + else if ( total_brate <= IVAS_24k4 ) + { + return 310; + } + else if ( total_brate <= IVAS_32k ) + { + return 330; + } + else if ( total_brate <= IVAS_48k ) + { + return 340; + } + else if ( total_brate <= IVAS_80k ) + { + return 380; + } + else if ( total_brate <= IVAS_96k ) + { + return 400; + } + else if ( total_brate <= IVAS_128k ) + { + return 460; + } + else if ( total_brate <= IVAS_160k ) + { + return 470; + } + else if ( total_brate <= IVAS_192k ) + { + return 570; + } + else if ( total_brate <= IVAS_256k ) + { + return 680; + } + else + { + return 800; + } + } + else if ( core == HQ_CORE ) + { + if ( total_brate <= 9600 ) + { + return 100; + } + else if ( total_brate <= IVAS_16k4 ) + { + return 200; + } + else if ( total_brate <= IVAS_24k4 ) + { + return 240; + } + else if ( total_brate <= IVAS_32k ) + { + return 300; + } + else if ( total_brate <= IVAS_48k ) + { + return 380; + } + else if ( total_brate <= IVAS_96k ) + { + return 400; + } + else if ( total_brate <= IVAS_128k ) + { + return 450; + } + else if ( total_brate <= IVAS_160k ) + { + return 550; + } + else if ( total_brate <= IVAS_192k ) + { + return 600; + } + else if ( total_brate <= IVAS_256k ) + { + return 700; + } + else + { + return 800; + } + } + else + { + return 50; + } +} + +/*-----------------------------------------------------------------------* + * get_BWE_max_num_indices() + * + * Get the maximum number of indices in the BWE + *-----------------------------------------------------------------------*/ + +int16_t get_BWE_max_num_indices( /* o : maximum number of indices */ + const int32_t extl_brate /* i : extensiona layer bitrate */ +) +{ + /* set the maximum number of indices in the BWE */ + if ( extl_brate < SWB_BWE_16k ) + { + return 30; + } + else + { + return 150; + } +} + + +/*-----------------------------------------------------------------------* + * get_ivas_max_num_indices_metadata() + * + * Set the maximum allowed number of metadata indices in the list + *-----------------------------------------------------------------------*/ + +int16_t get_ivas_max_num_indices_metadata( /* o : maximum number of indices */ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const int32_t ivas_total_brate /* i : IVAS total bitrate */ +) +{ + /* set the maximum required number of metadata indices */ + if ( ivas_format == MONO_FORMAT ) + { + return 0; + } + else if ( ivas_format == STEREO_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 60; + } + else + { + return 80; + } + } + else if ( ivas_format == ISM_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 20; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 65; + } + else + { + return 80; + } + } + else if ( ivas_format == SBA_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 100; + } + else if ( ivas_total_brate <= IVAS_24k4 ) + { + return 200; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 300; + } + else if ( ivas_total_brate <= IVAS_192k ) + { + return 500; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 1000; + } + else if ( ivas_total_brate <= IVAS_384k ) + { + return 1500; + } + else + { + return 2000; + } + } + else if ( ivas_format == MASA_FORMAT ) + { + if ( ivas_total_brate <= IVAS_16k4 ) + { + return 80; + } + else if ( ivas_total_brate <= IVAS_32k ) + { + return 110; + } + else if ( ivas_total_brate <= IVAS_48k ) + { + return 180; + } + else if ( ivas_total_brate <= IVAS_96k ) + { + return 200; + } + else if ( ivas_total_brate <= IVAS_128k ) + { + return 250; + } + else if ( ivas_total_brate <= IVAS_160k ) + { + return 320; + } + else if ( ivas_total_brate <= IVAS_192k ) + { + return 430; + } + else if ( ivas_total_brate <= IVAS_256k ) + { + return 600; + } + else if ( ivas_total_brate <= IVAS_384k ) + { + return 1000; + } + else + { + return 1500; + } + } + else if ( ivas_format == MC_FORMAT ) + { + if ( ivas_total_brate <= IVAS_13k2 ) + { + return 80; + } + else if ( ivas_total_brate <= IVAS_24k4 ) + { + return 100; + } + else if ( ivas_total_brate <= IVAS_64k ) + { + return 200; + } + else if ( ivas_total_brate <= IVAS_96k ) + { + return 220; + } + else + { + return 300; + } + } + + return 50; } /*-------------------------------------------------------------------* - * rate2AMRWB_IOmode() + * move_indices() * - * lookup AMRWB IO mode + * Move indices inside the buffer or among two buffers *-------------------------------------------------------------------*/ -static Word16 rate2AMRWB_IOmode( - Word32 brate /* i : bitrate */ +ivas_error move_indices( + INDICE_HANDLE old_ind_list, /* i/o: old location of indices */ + INDICE_HANDLE new_ind_list, /* i/o: new location of indices */ + const int16_t nb_indices /* i : number of moved indices */ ) { - switch ( brate ) + int16_t i; + ivas_error error; + + error = IVAS_ERR_OK; + + if ( new_ind_list < old_ind_list ) { - /* EVS AMR-WB IO modes */ - case SID_1k75: - return AMRWB_IO_SID; - case ACELP_6k60: - return AMRWB_IO_6600; - case ACELP_8k85: - return AMRWB_IO_8850; - case ACELP_12k65: - return AMRWB_IO_1265; - case ACELP_14k25: - return AMRWB_IO_1425; - case ACELP_15k85: - return AMRWB_IO_1585; - case ACELP_18k25: - return AMRWB_IO_1825; - case ACELP_19k85: - return AMRWB_IO_1985; - case ACELP_23k05: - return AMRWB_IO_2305; - case ACELP_23k85: - return AMRWB_IO_2385; - default: - break; + for ( i = 0; i < nb_indices; i++ ) + { + new_ind_list[i].id = old_ind_list[i].id; + new_ind_list[i].value = old_ind_list[i].value; + new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; + + old_ind_list[i].nb_bits = -1; + } } + else if ( new_ind_list > old_ind_list ) + { + for ( i = nb_indices - 1; i >= 0; i-- ) + { + new_ind_list[i].id = old_ind_list[i].id; + new_ind_list[i].value = old_ind_list[i].value; + new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; - return -1; + old_ind_list[i].nb_bits = -1; + } + } + + return error; } +#endif + +#ifdef IND_LIST_DYN /*-------------------------------------------------------------------* - * rate2EVSmode() + * check_ind_list_limits() * - * lookup EVS mode + * Check, if the maximum number of indices has been reached -> reallocate + * Check, if we will not overwrite an existing indice -> adjust the location *-------------------------------------------------------------------*/ -Word16 rate2EVSmode( - const Word32 brate, /* i : bitrate */ - int16_t *is_amr_wb /* o : (flag) does the bitrate belong to AMR-WB? Can be NULL */ + +ivas_error check_ind_list_limits( + BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */ ) { - if ( is_amr_wb != NULL ) - { - *is_amr_wb = 0; - } + Indice *ivas_ind_list_zero, *ivas_ind_list_last; + ivas_error error; - switch ( brate ) + error = IVAS_ERR_OK; + ivas_ind_list_zero = *( hBstr->ivas_ind_list_zero ); + + /* check, if the maximum number of indices has been reached and re-allocate the buffer */ + /* the re-allocation can be avoided by increasing the limits in get_ivas_max_num_indices() or get_ivas_max_num_indices_metadata() */ + if ( ( &hBstr->ind_list[hBstr->nb_ind_tot] - ivas_ind_list_zero ) >= *( hBstr->ivas_max_num_indices ) ) { - /* EVS Primary modes */ - case FRAME_NO_DATA: - return NO_DATA_RECEIVED; - case SID_2k40: - return PRIMARY_SID; - case PPP_NELP_2k80: - return PRIMARY_2800; - case ACELP_7k20: - return PRIMARY_7200; - case ACELP_8k00: - return PRIMARY_8000; - case ACELP_9k60: - return PRIMARY_9600; - case ACELP_13k20: - return PRIMARY_13200; - case ACELP_16k40: - return PRIMARY_16400; - case ACELP_24k40: - return PRIMARY_24400; - case ACELP_32k: - return PRIMARY_32000; - case ACELP_48k: - return PRIMARY_48000; - case ACELP_64k: - return PRIMARY_64000; - case HQ_96k: - return PRIMARY_96000; - case HQ_128k: - return PRIMARY_128000; - default: - break; +#ifdef DEBUGGING + /* TODO: replace with the warning message below before the finalization of the IVAS codec */ + /* fprintf( stderr, "Warning: The maximum number of indices %d has been exceeded in frame %d! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata().\n", *( hBstr->ivas_max_num_indices ), frame ); */ + assert( 0 && "The maximum number of indices has been exceeded! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata()." ); +#endif + + /* reallocate the buffer of indices with increased limit */ + ind_list_realloc( hBstr, *( hBstr->ivas_max_num_indices ) + STEP_MAX_NUM_INDICES ); } - if ( is_amr_wb != NULL ) + /* check, if we will not overwrite an existing indice */ + if ( hBstr->ind_list[hBstr->nb_ind_tot].nb_bits > 0 ) { - *is_amr_wb = 1; + if ( hBstr->nb_ind_tot == 0 ) + { +#ifdef DEBUGGING + fprintf( stderr, "Warning: Trying to overwrite an existing indice ID = %d in frame %d!\n", hBstr->ind_list[hBstr->nb_ind_tot].id, frame ); +#endif + /* move the pointer to the next available empty slot */ + ivas_ind_list_last = &ivas_ind_list_zero[*( hBstr->ivas_max_num_indices )]; + while ( hBstr->ind_list[0].nb_bits > 0 && hBstr->ind_list < ivas_ind_list_last ) + { + hBstr->ind_list++; + } + + if ( hBstr->ind_list >= ivas_ind_list_last ) + { +#ifdef DEBUGGING + /* TODO: replace with the warning message below before the finalization of the IVAS codec */ + /* fprintf( stderr, "Warning: The maximum number of indices %d has been exceeded in frame %d! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata().\n", *( hBstr->ivas_max_num_indices ), frame ); */ + assert( 0 && "The maximum number of indices has been exceeded! Increase the limits in get_ivas_max_num_indices() or get_max_num_indices_metadata()." ); +#endif + + /* no available empty slot -> need to re-allocate the buffer */ + ind_list_realloc( hBstr, *( hBstr->ivas_max_num_indices ) + STEP_MAX_NUM_INDICES ); + } + } + else + { + return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Buffer of indices corrupted in frame %d! Attempt to overwrite indice ID = %d (value: %d, bits: %d)!\n", frame, hBstr->ind_list[hBstr->nb_ind_tot].id, hBstr->ind_list[hBstr->nb_ind_tot].value, hBstr->ind_list[hBstr->nb_ind_tot].nb_bits ); + } } - return rate2AMRWB_IOmode( brate ); + return error; } +#endif + /*-------------------------------------------------------------------* * push_indice() @@ -237,6 +991,9 @@ ivas_error push_indice( ) { int16_t i; +#ifdef IND_LIST_DYN + int16_t j; +#endif ivas_error error; error = IVAS_ERR_OK; @@ -250,6 +1007,7 @@ ivas_error push_indice( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Indice ID = %d with value %d exceeds the range of %d bits (frame %d) !\n", id, value, nb_bits, frame ); } +#ifndef IND_LIST_DYN #if 0 /* mul, 2020-11-19: to be de-activated until proper solution found */ if ( nb_bits < 1 ) @@ -257,18 +1015,45 @@ ivas_error push_indice( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, " Trying to push indice ID = %d with value %d that has %d bits (frame %d) !\n", id, value, nb_bits, frame ); } else +#endif #endif if ( nb_bits > 16 ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Indice ID = %d with value %d is trying to allocate %d bits which exceeds 16 bits (frame %d) !\n", id, value, nb_bits, frame ); } +#ifndef IND_LIST_DYN if ( id >= MAX_NUM_INDICES ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Indice ID = %d exceeds the total number of indices: %d (frame %d) !\n", id, MAX_NUM_INDICES, frame ); } #endif +#endif + +#ifdef IND_LIST_DYN + /* check the limits of the list of indices */ + error = check_ind_list_limits( hBstr ); +#endif + +#ifdef IND_LIST_DYN + /* find the location in the list of indices based on ID */ + i = hBstr->nb_ind_tot; + while ( i > 0 && id < hBstr->ind_list[i - 1].id ) + { + i--; + } + /* shift indices, if the new ID is to be written somewhere inside the list */ + if ( i < hBstr->nb_ind_tot ) + { + for ( j = hBstr->nb_ind_tot; j > i; j-- ) + { + hBstr->ind_list[j].id = hBstr->ind_list[j - 1].id; + hBstr->ind_list[j].nb_bits = hBstr->ind_list[j - 1].nb_bits; + hBstr->ind_list[j].value = hBstr->ind_list[j - 1].value; + } + } +#else if ( hBstr->last_ind == id ) { /* indice with the same name as the previous one */ @@ -283,21 +1068,31 @@ ivas_error push_indice( i++; } } +#endif +#ifndef IND_LIST_DYN #ifdef DEBUGGING if ( hBstr->ind_list[i].nb_bits > 0 ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Indice ID = %d with value %d is trying to re-write an existing indice (frame %d) !\n", id, value, frame ); } +#endif #endif /* store the new indice in the list */ +#ifdef IND_LIST_DYN + hBstr->ind_list[i].id = id; +#endif hBstr->ind_list[i].value = value; hBstr->ind_list[i].nb_bits = nb_bits; /* updates */ +#ifdef IND_LIST_DYN + hBstr->nb_ind_tot++; +#else hBstr->next_ind = i + 1; hBstr->last_ind = id; +#endif hBstr->nb_bits_tot += nb_bits; return error; @@ -324,6 +1119,9 @@ ivas_error push_next_indice( #endif ) { +#ifdef IND_LIST_DYN + int16_t prev_id; +#endif ivas_error error; error = IVAS_ERR_OK; @@ -342,6 +1140,7 @@ ivas_error push_next_indice( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Indice with value %d is trying to allocate %d bits which exceeds 16 bits !\n", value, nb_bits ); } +#ifndef IND_LIST_DYN if ( hBstr->next_ind >= MAX_NUM_INDICES ) { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Total number of indices exceeded: %d !\n", MAX_NUM_INDICES ); @@ -352,16 +1151,43 @@ ivas_error push_next_indice( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Indice with value %d is trying to re-write an existing indice (frame %d) !\n", value, frame ); } #endif +#endif + +#ifdef IND_LIST_DYN + /* check the limits of the list of indices */ + error = check_ind_list_limits( hBstr ); +#endif + +#ifdef IND_LIST_DYN + /* get the id of the previous indice -> it will be re-used */ + if ( hBstr->nb_ind_tot > 0 ) + { + prev_id = hBstr->ind_list[hBstr->nb_ind_tot - 1].id; + } + else + { + prev_id = 0; + } +#endif /* store the values in the list */ +#ifdef IND_LIST_DYN + hBstr->ind_list[hBstr->nb_ind_tot].id = prev_id; + hBstr->ind_list[hBstr->nb_ind_tot].value = value; + hBstr->ind_list[hBstr->nb_ind_tot].nb_bits = nb_bits; +#else hBstr->ind_list[hBstr->next_ind].value = value; hBstr->ind_list[hBstr->next_ind].nb_bits = nb_bits; - hBstr->next_ind++; +#endif - /* update the total number of bits already written */ + /* updates */ +#ifdef IND_LIST_DYN + hBstr->nb_ind_tot++; +#else + hBstr->next_ind++; +#endif hBstr->nb_bits_tot += nb_bits; - return error; } @@ -389,39 +1215,161 @@ void push_next_bits( uint16_t code; int16_t i, nb_bits_m15; Indice *ptr; +#ifdef IND_LIST_DYN + int16_t prev_id; +#endif #ifdef DEBUG_BS_READ_WRITE printf( "%s: %d: %d\n", func, line, nb_bits ); #endif + +#ifdef IND_LIST_DYN + ptr = &hBstr->ind_list[hBstr->nb_ind_tot]; + + /* get the id of the previous indice -> will be re-used */ + if ( hBstr->nb_ind_tot > 0 ) + { + prev_id = hBstr->ind_list[hBstr->nb_ind_tot - 1].id; + } + else + { + prev_id = 0; + } +#else ptr = &hBstr->ind_list[hBstr->next_ind]; +#endif nb_bits_m15 = nb_bits - 15; for ( i = 0; i < nb_bits_m15; i += 16 ) { code = (uint16_t) ( ( bits[i] << 15 ) | ( ( bits[i + 1] << 14 ) | ( ( bits[i + 2] << 13 ) | ( ( bits[i + 3] << 12 ) | ( ( bits[i + 4] << 11 ) | ( ( bits[i + 5] << 10 ) | ( ( bits[i + 6] << 9 ) | ( ( bits[i + 7] << 8 ) | ( ( bits[i + 8] << 7 ) | ( ( bits[i + 9] << 6 ) | ( ( bits[i + 10] << 5 ) | ( ( bits[i + 11] << 4 ) | ( ( bits[i + 12] << 3 ) | ( ( bits[i + 13] << 2 ) | ( ( bits[i + 14] << 1 ) | bits[i + 15] ) ) ) ) ) ) ) ) ) ) ) ) ) ) ); +#ifdef IND_LIST_DYN + /* check the limits of the list of indices */ + check_ind_list_limits( hBstr ); + ptr = &hBstr->ind_list[hBstr->nb_ind_tot]; +#endif + ptr->value = code; #ifdef DEBUG_BS_READ_WRITE printf( "code: %d\n", code ); #endif ptr->nb_bits = 16; +#ifdef IND_LIST_DYN + ptr->id = prev_id; + hBstr->nb_ind_tot++; +#endif ++ptr; } + for ( ; i < nb_bits; ++i ) { +#ifdef IND_LIST_DYN + /* check the limits of the list of indices */ + check_ind_list_limits( hBstr ); + ptr = &hBstr->ind_list[hBstr->nb_ind_tot]; +#endif + ptr->value = bits[i]; #ifdef DEBUG_BS_READ_WRITE printf( "value: %d\n", ptr->value ); #endif ptr->nb_bits = 1; +#ifdef IND_LIST_DYN + ptr->id = prev_id; + hBstr->nb_ind_tot++; +#endif ++ptr; } + +#ifndef IND_LIST_DYN hBstr->next_ind = (int16_t) ( ptr - hBstr->ind_list ); +#endif hBstr->nb_bits_tot = hBstr->nb_bits_tot + nb_bits; return; } +#ifdef IND_LIST_DYN +/*-------------------------------------------------------------------* + * find_indice() + * + * Find indice based on its id + *-------------------------------------------------------------------*/ + +/*! r: result: index of the indice in the list, -1 if not found */ +int16_t find_indice( + BSTR_ENC_HANDLE hBstr, /* i : encoder bitstream handle */ + int16_t id, /* i : ID of the indice */ + uint16_t *value, /* o : value of the quantized indice */ + int16_t *nb_bits /* o : number of bits used to quantize the indice */ +) +{ + int16_t i; + + for ( i = 0; i < hBstr->nb_ind_tot; i++ ) + { + if ( hBstr->ind_list[i].id == id && hBstr->ind_list[i].nb_bits > 0 ) + { + *value = hBstr->ind_list[i].value; + *nb_bits = hBstr->ind_list[i].nb_bits; + return i; + } + } + + return -1; +} + +/*-------------------------------------------------------------------* + * delete_indice() + * + * Delete indice based on its id (note, that nb_ind_tot and nb_bits_tot are updated) + *-------------------------------------------------------------------*/ + +/*! r: number of deleted indices */ +uint16_t delete_indice( + BSTR_ENC_HANDLE hBstr, /* i : encoder bitstream handle */ + int16_t id /* i : ID of the indice */ +) +{ + int16_t i, j; + + j = 0; + for ( i = 0; i < hBstr->nb_ind_tot; i++ ) + { + if ( hBstr->ind_list[i].id == id ) + { + hBstr->nb_bits_tot -= hBstr->ind_list[i].nb_bits; + continue; + } + + if ( j < i ) + { + /* shift the indice left */ + hBstr->ind_list[j].id = hBstr->ind_list[i].id; + hBstr->ind_list[j].value = hBstr->ind_list[i].value; + hBstr->ind_list[j].nb_bits = hBstr->ind_list[i].nb_bits; + } + + j++; + } + + hBstr->nb_ind_tot = j; +#ifndef IND_LIST_DYN + hBstr->next_ind = j; +#endif + + for ( ; j < i; j++ ) + { + /* reset the shifted indices at the end of the list */ + hBstr->ind_list[j].nb_bits = -1; + } + + return i - j; +} +#endif + + /*-------------------------------------------------------------------* * get_next_indice() * @@ -638,8 +1586,12 @@ void reset_indices_enc( int16_t i; hBstr->nb_bits_tot = 0; +#ifdef IND_LIST_DYN + hBstr->nb_ind_tot = 0; +#else hBstr->next_ind = 0; hBstr->last_ind = -1; +#endif for ( i = 0; i < max_num_indices; i++ ) { @@ -670,7 +1622,11 @@ void reset_indices_dec( *-------------------------------------------------------------------*/ static int16_t write_indices_to_stream( +#ifdef IND_LIST_DYN + Indice *ind_list, +#else Indice *ind_list_metadata, +#endif uint16_t **pt_stream, const int16_t inc, const int16_t num_indices ) @@ -684,8 +1640,13 @@ static int16_t write_indices_to_stream( for ( i = 0; i < num_indices; i++ ) { +#ifdef IND_LIST_DYN + value = ind_list[i].value; + nb_bits = ind_list[i].nb_bits; +#else value = ind_list_metadata[i].value; nb_bits = ind_list_metadata[i].nb_bits; +#endif if ( nb_bits > 0 ) { @@ -717,6 +1678,10 @@ static int16_t write_indices_to_stream( { /* fprintf( stderr, "Warning: %s: nb_bits == 0!\n", __func__ ); */ } + else + { + /* fprintf( stderr, "Warning: %s: nb_bits == %d!\n", __func__, nb_bits ); */ + } #endif } #ifdef ENABLE_BITRATE_VERIFICATION @@ -745,6 +1710,10 @@ static ivas_error write_indices_element( uint16_t *pt_stream_backup; uint16_t *pt_stream_end; int16_t nb_bits_tot_metadata; +#ifdef IND_LIST_DYN + int16_t nb_ind_tot_metadata; +#endif + Indice *ind_list_metadata; int16_t n, n_channels; #ifdef ENABLE_BITRATE_VERIFICATION @@ -755,6 +1724,9 @@ static ivas_error write_indices_element( error = IVAS_ERR_OK; ind_list_metadata = NULL; +#ifdef IND_LIST_DYN + nb_ind_tot_metadata = 0; +#endif if ( st_ivas->hEncoderConfig->ivas_format == MONO_FORMAT ) { @@ -772,6 +1744,9 @@ static ivas_error write_indices_element( { nb_bits_tot_metadata = st_ivas->hSCE[element_id]->hMetaData->nb_bits_tot; ind_list_metadata = st_ivas->hSCE[element_id]->hMetaData->ind_list; +#ifdef IND_LIST_DYN + nb_ind_tot_metadata = st_ivas->hSCE[element_id]->hMetaData->nb_ind_tot; +#endif } } else if ( !is_SCE && st_ivas->hCPE[element_id] != NULL ) @@ -782,6 +1757,9 @@ static ivas_error write_indices_element( { nb_bits_tot_metadata = st_ivas->hCPE[element_id]->hMetaData->nb_bits_tot; ind_list_metadata = st_ivas->hCPE[element_id]->hMetaData->ind_list; +#ifdef IND_LIST_DYN + nb_ind_tot_metadata = st_ivas->hCPE[element_id]->hMetaData->nb_ind_tot; +#endif } } #ifdef DEBUGGING @@ -822,7 +1800,13 @@ static ivas_error write_indices_element( #ifdef ENABLE_BITRATE_VERIFICATION total_nb_bits = #endif - write_indices_to_stream( ind_list_metadata, &pt_stream_loc, -1, MAX_BITS_METADATA ); + write_indices_to_stream( ind_list_metadata, &pt_stream_loc, -1, +#ifdef IND_LIST_DYN + nb_ind_tot_metadata +#else + MAX_BITS_METADATA +#endif + ); #ifdef ENABLE_BITRATE_VERIFICATION if ( total_nb_bits != nb_bits_tot_metadata ) @@ -836,7 +1820,13 @@ static ivas_error write_indices_element( #ifdef ENABLE_BITRATE_VERIFICATION total_nb_bits = #endif - write_indices_to_stream( sts[n]->hBstr->ind_list, &pt_stream_loc, 1, MAX_NUM_INDICES ); + write_indices_to_stream( sts[n]->hBstr->ind_list, &pt_stream_loc, 1, +#ifdef IND_LIST_DYN + sts[n]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); #ifdef ENABLE_BITRATE_VERIFICATION if ( total_nb_bits != sts[n]->hBstr->nb_bits_tot ) @@ -859,21 +1849,41 @@ static ivas_error write_indices_element( { if ( st_ivas->hSCE[element_id]->hMetaData != NULL ) { +#ifdef IND_LIST_DYN + reset_indices_enc( st_ivas->hSCE[element_id]->hMetaData, st_ivas->hSCE[element_id]->hMetaData->nb_ind_tot ); +#else reset_indices_enc( st_ivas->hSCE[element_id]->hMetaData, MAX_BITS_METADATA ); +#endif } - reset_indices_enc( sts[0]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( sts[0]->hBstr, +#ifdef IND_LIST_DYN + sts[0]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } else { if ( st_ivas->hCPE[element_id]->hMetaData != NULL ) { +#ifdef IND_LIST_DYN + reset_indices_enc( st_ivas->hCPE[element_id]->hMetaData, st_ivas->hCPE[element_id]->hMetaData->nb_ind_tot ); +#else reset_indices_enc( st_ivas->hCPE[element_id]->hMetaData, MAX_BITS_METADATA ); +#endif } for ( n = 0; n < n_channels; n++ ) { - reset_indices_enc( sts[n]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( sts[n]->hBstr, +#ifdef IND_LIST_DYN + sts[n]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } } @@ -920,6 +1930,7 @@ ivas_error write_indices_ivas( { sts = st_ivas->hSCE[n]->hCoreCoder; i += sts[0]->hBstr->nb_bits_tot; + if ( st_ivas->hSCE[n]->hMetaData != NULL ) { i += st_ivas->hSCE[n]->hMetaData->nb_bits_tot; @@ -933,6 +1944,7 @@ ivas_error write_indices_ivas( { i += sts[ch]->hBstr->nb_bits_tot; } + if ( st_ivas->hCPE[n]->hMetaData != NULL ) { i += st_ivas->hCPE[n]->hMetaData->nb_bits_tot; @@ -950,6 +1962,7 @@ ivas_error write_indices_ivas( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Bitstream write size mismatch! Actual bitrate: %ld vs. Reference bitrate: %d\n", i * 50L, ivas_total_brate ); } #endif + /*-----------------------------------------------------------------* * Encode Payload *-----------------------------------------------------------------*/ @@ -969,7 +1982,7 @@ ivas_error write_indices_ivas( return error; } - +#ifndef IND_LIST_DYN /*-------------------------------------------------------------------* * indices_to_serial_generic() * @@ -1019,6 +2032,7 @@ void indices_to_serial_generic( return; } +#endif /*---------------------------------------------------------------------* * convertSerialToBytestream( ) @@ -1914,11 +2928,7 @@ ivas_error preview_indices( k = IVAS_FORMAT_SIGNALING_NBITS; if ( st_ivas->ivas_format == MASA_FORMAT ) { -#ifdef COMBINED_FORMAT_SIGNALING k = IVAS_FORMAT_SIGNALING_NBITS_EXTENDED; -#else - k = IVAS_FORMAT_SIGNALING_NBITS_SBA; -#endif } if ( total_brate < MIN_BRATE_MDCT_STEREO ) @@ -1958,15 +2968,9 @@ ivas_error preview_indices( else if ( st_ivas->ivas_format == SBA_FORMAT ) { /* Read SBA planar flag and SBA order */ -#ifdef COMBINED_FORMAT_SIGNALING st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 1] == 1 ); -#else - st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); - st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); - st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); -#endif st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order ); diff --git a/lib_com/cnst.h b/lib_com/cnst.h index 261ef6f907f1777ec47a9c01f3ff7661b5999b80..d518dff0df3cce6bdc2ac6b56907403c49643e27 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -447,7 +447,9 @@ enum IND_STEREO_2ND_CODER_T, IND_UNUSED, +#ifndef IND_LIST_DYN MAX_NUM_INDICES = IND_UNUSED + 772 /* Total 2640 in line with MAX_BITS_METADATA */ +#endif }; /*----------------------------------------------------------------------------------* @@ -1431,11 +1433,7 @@ typedef enum _DCTTYPE #define CNA_MAX_BRATE ACELP_13k20 -#ifdef FIX_I414_OOA_CNA #define CNA_INIT_NBANDS 6 -#else -#define MAX_CNA_NBANDS 12 -#endif #define GAIN_Q_OFFSET_EVS 60.f #define GAIN_Q_OFFSET_IVAS 45.f @@ -1533,9 +1531,7 @@ typedef enum _DCTTYPE #define TOD_NSPEC 80 /* number of spectral bins of the tonal detector */ #define TOD_THR_MASS 0.86f /* initial value for the adaptive threshold of the tonal detector */ #define P2A_FACT 0.9f /* long-term averaging factor for peak-to-average ratio */ -#ifdef FIX_SP2A #define THR_P2A_HIGH 95.0f /* higher threshold to detect strongly peaky signals at low bitrates*/ -#endif #define THR_P2A 80.0f /* lower threshold to detect strongly peaky signals at higher bitrates */ /*----------------------------------------------------------------------------------* @@ -2142,7 +2138,7 @@ enum #define IGF_GRID_LB_SHORT 2 /* constants for IGFSCFDecoder and IGFSCFEncoder */ -#define IGF_CTX_OFFSET 3 /* offset added to make the context values nonnegative, for array indexing */ +#define IGF_CTX_OFFSET 3 /* offset added to make the context values non negative, for array indexing */ #define IGF_CTX_COUNT ( 2 * IGF_CTX_OFFSET + 1 ) /* number of contexts for the AC statistical model */ #define IGF_MIN_ENC_SEPARATE -12 /* minimum residual value coded separately, without escape coding */ #define IGF_MAX_ENC_SEPARATE +12 /* maximum residual value coded separately, without escape coding */ diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 61c68eae5d5bc8ceeb717b7bd4a7b2cc1112575c..33ddc9e881d865970af564c2b21c974af44c6844 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -80,6 +80,7 @@ typedef struct _IVAS_ISM_METADATA float gainFactor; float yaw; float pitch; + int16_t non_diegetic_flag; } IVAS_ISM_METADATA; typedef struct @@ -93,6 +94,16 @@ typedef struct float x, y, z; } IVAS_VECTOR3; +#ifdef FIX_439_OTR_PARAMS +typedef enum +{ + HEAD_ORIENT_TRK_NONE, + HEAD_ORIENT_TRK_REF, + HEAD_ORIENT_TRK_AVG, + HEAD_ORIENT_TRK_REF_VEC, + HEAD_ORIENT_TRK_REF_VEC_LEV +} HEAD_ORIENT_TRK_T; +#endif typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_decoder_ext_out_meta_struct *MASA_DECODER_EXT_OUT_META_HANDLE; @@ -118,6 +129,7 @@ typedef struct float radius; float yaw; float pitch; + int16_t non_diegetic_flag; } IVAS_REND_AudioObjectPosition; typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG diff --git a/lib_com/fd_cng_com.c b/lib_com/fd_cng_com.c index f2dbf746b6f18d5e6b9fc07aaa570384733702be..99ae9894f44a26c5b29d70b3cb5e8bc4497f39ce 100644 --- a/lib_com/fd_cng_com.c +++ b/lib_com/fd_cng_com.c @@ -940,6 +940,74 @@ void SynthesisSTFT( return; } +#ifdef JBM_TSM_ON_TCS +/*------------------------------------------------------------------- + * SynthesisSTFT_dirac() + * + * STFT synthesis filterbank + *-------------------------------------------------------------------*/ + +void SynthesisSTFT_dirac( + float *fftBuffer, /* i : FFT bins */ + float *timeDomainOutput, + float *olapBuffer, + const float *olapWin, + const int16_t samples_out, + HANDLE_FD_CNG_COM hFdCngCom /* i/o: FD_CNG structure containing all buffers and variables */ +) +{ + int16_t i; + float buf[M + 1 + 320], tmp; + + /* Perform IFFT */ + RFFTN( fftBuffer, hFdCngCom->fftSineTab, hFdCngCom->fftlen, 1 ); + + /* Handle overlap in P/S domain for stereo */ + mvr2r( olapBuffer + hFdCngCom->frameSize, olapBuffer, hFdCngCom->frameSize ); + set_f( olapBuffer + hFdCngCom->frameSize, 0.0f, hFdCngCom->frameSize ); /*olapBuffer, fftBuffer, olapWin*/ + + + for ( i = hFdCngCom->frameSize / 4; i < 3 * hFdCngCom->frameSize / 4; i++ ) + { + olapBuffer[i] += fftBuffer[i] * olapWin[i - hFdCngCom->frameSize / 4]; + } + for ( ; i < 5 * hFdCngCom->frameSize / 4; i++ ) + { + olapBuffer[i] = fftBuffer[i]; + } + + for ( ; i < 7 * hFdCngCom->frameSize / 4; i++ ) + { + olapBuffer[i] = fftBuffer[i]; + } + + for ( ; i < hFdCngCom->fftlen; i++ ) + { + olapBuffer[i] = 0; + } + + /* Get time-domain signal */ + v_multc( olapBuffer + hFdCngCom->frameSize / 4, (float) ( hFdCngCom->fftlen / 2 ), timeDomainOutput, samples_out ); + + /* Get excitation */ + v_multc( olapBuffer + hFdCngCom->frameSize / 4 - ( M + 1 ), (float) ( hFdCngCom->fftlen / 2 ), buf, M + 1 + hFdCngCom->frameSize ); + tmp = buf[0]; + preemph( buf + 1, PREEMPH_FAC, M + hFdCngCom->frameSize, &tmp ); + residu( hFdCngCom->A_cng, M, buf + 1 + M, hFdCngCom->exc_cng, hFdCngCom->frameSize ); + + /* update and window olapBuf if we have a output frame that is shorter than the default frame size...*/ + if ( samples_out < hFdCngCom->frameSize ) + { + mvr2r( olapBuffer + samples_out, olapBuffer + hFdCngCom->frameSize, 3 * hFdCngCom->frameSize / 4 ); + } + for ( i = 5 * hFdCngCom->frameSize / 4; i < 7 * hFdCngCom->frameSize / 4; i++ ) + { + olapBuffer[i] *= olapWin[i - 3 * hFdCngCom->frameSize / 4]; + } + + return; +} +#endif /*------------------------------------------------------------------- * mhvals() diff --git a/lib_com/hq_tools.c b/lib_com/hq_tools.c index 1d89d0314597493852e85af60f0e57247410d33c..0008cb957ce7b5a85d8c0b50478b02995f5f7eeb 100644 --- a/lib_com/hq_tools.c +++ b/lib_com/hq_tools.c @@ -1290,7 +1290,6 @@ int16_t calc_nor_delta_hf( ynrm[i] += delta; add_bits_denv += bitsforDelta; - temp_num++; } } diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h old mode 100644 new mode 100755 index f3b07ba2a2d53cc51bcf4a87cb7459c3b8807b3f..bc5907a34ad007da5f208e43567e9583d38f1573 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -78,11 +78,7 @@ typedef enum *----------------------------------------------------------------------------------*/ #define IVAS_FORMAT_SIGNALING_NBITS 2 /* number of bits for signaling the IVAS format */ -#ifdef COMBINED_FORMAT_SIGNALING #define IVAS_FORMAT_SIGNALING_NBITS_EXTENDED ( IVAS_FORMAT_SIGNALING_NBITS + 1 ) -#else -#define IVAS_FORMAT_SIGNALING_NBITS_SBA ( IVAS_FORMAT_SIGNALING_NBITS + 1 ) -#endif /*----------------------------------------------------------------------------------* @@ -156,7 +152,8 @@ typedef enum RENDERER_MCMASA_MONO_STEREO, RENDERER_PARAM_ISM, RENDERER_BINAURAL_MIXER_CONV, - RENDERER_BINAURAL_MIXER_CONV_ROOM + RENDERER_BINAURAL_MIXER_CONV_ROOM, + RENDERER_NON_DIEGETIC_DOWNMIX } RENDERER_TYPE; @@ -170,18 +167,28 @@ typedef enum #define HEAD_ROTATION_HOA_ORDER 3 /* HOA 3rd order */ #define MAX_CICP_CHANNELS 16 /* max channels for loudspeaker layouts (16 for custom layouts)*/ #define MAX_OUTPUT_CHANNELS 16 /* Maximum number of output channels (HOA 3rd order) */ +#define MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN 2 /* Maximum number of output channels with non diegetic panning */ #define BINAURAL_CHANNELS 2 /* number of channels for binaural output configuration */ #define CPE_CHANNELS 2 /* number of CPE (stereo) channels */ #define FOA_CHANNELS 4 /* number of FOA channels */ +#define HOA2_CHANNELS 9 + #define MAX_NUM_OBJECTS 4 /* max. number of audio objects */ #define MAX_SCE MAX_NUM_OBJECTS /* max. number of SCEs */ #define MAX_CPE ( MAX_TRANSPORT_CHANNELS / CPE_CHANNELS ) /* max. number of CPEs */ #define MAX_BITS_METADATA 2640 /* max. bit-budget of metadata, one channel */ /* IVAS_fmToDo: to be confirmed for final value once mature */ +#ifndef IND_LIST_DYN #define MAX_NUM_METADATA max( 2, MAX_NUM_OBJECTS ) /* number of max. metadata (now only 2 for DirAC) */ - +#endif +#ifdef IND_LIST_DYN +#define MIN_NUM_IND 10 /* minimum number of indices in the core coder */ +#define MAX_NUM_IND_LFE 100 /* maximum number of indices in the LFE encoder */ +#define MAX_NUM_IND_TEMP_LIST 10 /* maximum number of indices in the temporary list */ +#define MAX_IND_TDM_TMP 10 /* maximum number of indices in the temporary list of TD stereo spatial parameters */ +#endif #define IVAS_ENC_DELAY_NS ACELP_LOOK_NS #define IVAS_DEC_DELAY_NS 3250000L /* 3.25 ms: IVAS decoder delay (without renderer delay) */ @@ -196,6 +203,25 @@ typedef enum #define IVAS_NUM_SUPPORTED_FS 3 /* number of supported sampling-rates in IVAS */ +#ifdef JBM_TSM_ON_TCS +#define CLDFB_SLOT_NS 1250000L /* 1.25ms: CLDFB slot length */ +#define MAX_JBM_SUBFRAMES_5MS 8 +#define DEFAULT_JBM_SUBFRAMES_5MS 4 +#define JBM_CLDFB_SLOTS_IN_SUBFRAME 4 +#define MAX_JBM_CLDFB_TIMESLOTS 32 +#define DEFAULT_JBM_CLDFB_TIMESLOTS 16 +#define MAX_JBM_L_FRAME48k 1920 +#define MAX_JBM_L_FRAME_NS 40000000L +#define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH +#define MAX_CLDFB_DIGEST_CHANNELS 4 +typedef enum +{ + TC_BUFFER_MODE_NONE = 0, + TC_BUFFER_MODE_RENDERER, + TC_BUFFER_MODE_BUFFER +} TC_BUFFER_MODE; +#endif + /*----------------------------------------------------------------------------------* * IVAS Bitrates *----------------------------------------------------------------------------------*/ @@ -328,6 +354,7 @@ typedef enum #define ISM_RADIUS_MIN 0.0f #define ISM_RADIUS_DELTA 0.25f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */ #define ISM_EXTENDED_METADATA_BRATE IVAS_64k +#define ISM_METADATA_IS_NDP_BITS 1 #define ISM_EXTENDED_METADATA_BITS 1 #define ISM_METADATA_RS_MAX_FRAMES 5 /* Number of frames with opposite extended metadata flags before switching */ @@ -369,6 +396,7 @@ enum { IND_ISM_NUM_OBJECTS, IND_ISM_EXTENDED_FLAG = IND_ISM_NUM_OBJECTS + MAX_NUM_OBJECTS, + IND_ISM_EXTENDED_NDP_FLAG, IND_ISM_METADATA_FLAG, IND_ISM_VAD_FLAG = IND_ISM_METADATA_FLAG + MAX_NUM_OBJECTS, IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, @@ -377,6 +405,7 @@ enum /* ------------- loop for objects -------------- */ TAG_ISM_LOOP_START = IND_ISM_DTX_COH_SCA + MAX_NUM_OBJECTS, + IND_ISM_NDP_FLAG = TAG_ISM_LOOP_START, IND_ISM_AZIMUTH_DIFF_FLAG = TAG_ISM_LOOP_START, IND_ISM_AZIMUTH = TAG_ISM_LOOP_START, IND_ISM_ELEVATION_DIFF_FLAG = TAG_ISM_LOOP_START, @@ -829,22 +858,21 @@ enum fea_names #define SNS_LOW_BR_MODE -1 #define SNS_NPTS 16 /* Number of downsampled SNS parameters */ -#ifdef SNS_MSVQ #define SNS_STEREO_MODE_LR 0 #define SNS_STEREO_MODE_MS 1 #define SNS_STEREO_MODE_OFFSET_INDICES 4 #define SNS_MSVQ_NSTAGES_TCX20 4 #define SNS_MSVQ_NSTAGES_TCX10 3 #define SNS_MSVQ_NSTAGES_SIDE 2 -#endif -#ifdef FIX_445_SNS_BUGFIXES #define SNS_CDBKS_BITS_4_FRAC 12 #define SNS_MEANS_BITS_4_FRAC 14 -#endif #define MDCT_ST_PLC_FADEOUT_MIN_NOISE_NRG 0.001f #define MDCT_ST_PLC_FADEOUT_MAX_CONC_FRAME 2 * FRAMES_PER_SEC #define MDCT_ST_PLC_FADEOUT_TO_ZERO_LEN 20 +#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY +#define MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE 3 +#endif typedef enum { EQUAL_CORES, @@ -872,9 +900,7 @@ typedef enum { // VE: this should be renamed to e.g. N_SPATIAL_SUBFRAMES #define MAX_PARAM_SPATIAL_SUBFRAMES 4 /* Maximum number of subframes for parameteric spatial coding */ #define L_SPATIAL_SUBFR_48k (L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES) -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS #define CLDFB_SLOTS_PER_SUBFRAME ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ) /* Number of CLDFB slots per subframe */ -#endif /*----------------------------------------------------------------------------------* @@ -905,7 +931,7 @@ typedef enum * DirAC Constants *----------------------------------------------------------------------------------*/ -#define DIRAC_MAX_ANA_CHANS FOA_CHANNELS /* Maximum number of channels for DirAC analysis */ +#define DIRAC_MAX_ANA_CHANS 11 /* Maximum number of channels for DirAC analysis */ #define DIRAC_NUM_DIMS 3 /* number of directions to estimate (X,Y,Z) */ #define DIRAC_MAX_NBANDS 12 /* Maximum number of frequency bands for the DirAC Side Parameter decoding */ @@ -919,6 +945,9 @@ typedef enum #define DIRAC_NO_FB_BANDS_MAX MDFT_FB_BANDS_240 #define DELAY_DIRAC_ENC_CMP_NS_PARAM_ISM ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) /* == 12 ms */ +#define DIRAC_HO_NUMSECTORS 2 +#define NUM_ANA_SECTORS 2 + /* DirAC renderer setup */ typedef enum @@ -977,7 +1006,10 @@ typedef enum #define SPAR_CONFIG_BW FB -#define IVAS_SPAR_MAX_CH (FOA_CHANNELS + 2 * ( IVAS_MAX_SBA_ORDER - 1 )) /* FOA + planar HOA */ +#define IVAS_SPAR_MAX_CH ((( IVAS_MAX_SBA_ORDER ) * ( IVAS_MAX_SBA_ORDER )) + 2) /* HOA2 + pHOA3*/ +#define IVAS_HBR_MAX_DECOR_CHS (2) + +#define IVAS_SPAR_MAX_FB_IN_CHAN 11 #define IVAS_SPAR_P_LOWERTRI ((IVAS_SPAR_MAX_CH - 1) * (IVAS_SPAR_MAX_CH - 2)) >> 1 #define IVAS_SPAR_MAX_C_COEFF (IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS) * ( IVAS_SPAR_MAX_DMX_CHS - 1) @@ -1174,6 +1206,9 @@ enum #define MASA_MAX_BITS_HR 2000 /* max. bit-budget for MASA metadata in HR mode*/ #define HR_MASA_ER_LEVELS 16 #endif +#ifdef FIX_HBR_MASAMETA +#define MAX_REDUCED_NBANDS 18 /* max number of subbands that is less than the default value 24 */ +#endif #define LIMIT_ER_ELEVATION_ENC 4 #define LIMIT_ER_SIMPLE_ENC 6 @@ -1186,7 +1221,9 @@ enum #define MASA_ANGLE_TOLERANCE 0.5f #define MASA_LIMIT_NO_BANDS_SUR_COH 8 #define MINIMUM_BIT_BUDGET_NORMAL_META 100 +#define DIFF_DFRATIO_2BIT_LIMIT_IDX_HODIRAC 4 #define DIFF_DFRATIO_2BIT_LIMIT_IDX 3 + #define DIFF_DFRATIO_1BIT_LIMIT_IDX 6 #define DIFF_EC_HUFF_BAND_LIMIT 8 #define DIFF_EC_HUFF_GR0_LIMIT 8 @@ -1204,10 +1241,10 @@ enum #define MASA_BIT_REDUCT_PARAM 10 #ifdef HR_METADATA -#define MASA_MAXIMUM_TWO_DIR_BANDS 24 -#define NBITS_HR_COH 4 +#define MASA_MAXIMUM_TWO_DIR_BANDS 24 +#define NBITS_HR_COH 4 #else -#define MASA_MAXIMUM_TWO_DIR_BANDS 18 +#define MASA_MAXIMUM_TWO_DIR_BANDS 18 #endif typedef enum { @@ -1234,7 +1271,8 @@ typedef enum MC_MODE_NONE, MC_MODE_MCT, MC_MODE_PARAMMC, - MC_MODE_MCMASA + MC_MODE_MCMASA, + MC_MODE_PARAMUPMIX } MC_MODE; typedef enum @@ -1294,6 +1332,55 @@ typedef enum MCT_CHAN_MODE_IGNORE } MCT_CHAN_MODE; +/*----------------------------------------------------------------------------------* + * MC Param-Upmix Mode Constants + *----------------------------------------------------------------------------------*/ +#define MC_PARAMUPMIX_MAX_TRANSPORT_CHANS 8 +#define MC_PARAMUPMIX_MAX_INPUT_CHANS 12 +#define MC_PARAMUPMIX_MAX_BITS 1024 /* Maximum number of bits for the MC Param-Upmix metadata */ +#define MC_PARAMUPMIX_COMBINATIONS 4 /* number of sets of 2 channels combined */ +#define MC_PARAMUPMIX_NCH 2 /* number of channels to combine into 1 */ +#define MC_PARAMUPMIX_MIN_CLDFB 8 + +typedef struct { + const int32_t *value; + const uint16_t *length; +} HUFF_TAB; + +typedef struct { + int32_t value[81]; + unsigned short length[81]; +} HUFF_ELEMENTS; + +typedef struct { + HUFF_ELEMENTS df0; + HUFF_ELEMENTS df; + HUFF_ELEMENTS dt; +} HUFF_TABLE; + +typedef enum { + ALPHA, + BETA +} PAR_TYPE; + +typedef enum { + FINE, + COARSE +} QUANT_TYPE; + +typedef struct { + int16_t nquant; + int16_t offset; + float data[35]; +} ACPL_QUANT_TABLE; + +typedef struct +{ + const int16_t (*alpha[2])[2]; + const int16_t (*beta[2])[2]; +} HUFF_NODE_TABLE; + + /*----------------------------------------------------------------------------------* * Parametric MC Constants *----------------------------------------------------------------------------------*/ @@ -1310,7 +1397,11 @@ typedef enum #define PARAM_MC_REG_GHAT (0.001f) /* Regularization factor for mixing matrix calculation */ #define PARAM_MC_MAX_PARAMETER_BANDS 20 /* Maximum number of parameter bands */ #define PARAM_MC_MAX_PARAMETER_BANDS_RES 14 /* Maximum number of parameter bands with decorrelation */ +#ifdef JBM_TSM_ON_TCS +#define PARAM_MC_MAX_NSLOTS MAX_JBM_CLDFB_TIMESLOTS /* Maximum number of CLDFB slots in a frame */ +#else #define PARAM_MC_MAX_NSLOTS 16 /* Maximum number of CLDFB slots in a frame */ +#endif #define PARAM_MC_MAX_NSLOTS_IN_SUBFRAME 4 /* Maximum number of CLDFB slots in a subframe */ #define PARAM_MC_NSUBFRAMES_DEC 4 /* Number of subframes for the synthesis in the decoder */ #define PARAM_MC_MAX_BANDS_IN_PARAMETER_BAND 30 /* Maximum number of CLDFB frequency bands within a parameter band */ @@ -1341,9 +1432,7 @@ typedef enum #define PARAM_MC_BAND_TO_MDCT_BAND_RATIO 16 /* Ratio of resolution of CLDFB Bands to MDCT Bands */ #define PARAM_MC_SLOT_ENC_NS 2500000L #define PARAM_MC_MDFT_NO_SLOTS 8 -#ifdef PARAMMC_SHORT_ENC_MDFT #define PARAM_MC_CLDFB_TO_MDFT_FAC 2 -#endif /*----------------------------------------------------------------------------------* * LFE Coding Constants @@ -1464,11 +1553,7 @@ typedef enum #define SFX_SPAT_BIN_NUM_SUBSAMPLES 64 #define ITD_MEM_LEN (MAX_ITD + SFX_SPAT_BIN_SINC_M) #define L_SUBFRAME5MS_48k (L_FRAME48k/4) -#ifdef FIX_421_TD_INT_TUNE #define MAX_ANGULAR_STEP (0.01f) -#else -#define MAX_ANGULAR_STEP (1.0f) -#endif #define MAX_ANGULAR_STEP_INV ( 1.0f / MAX_ANGULAR_STEP ) #define MAX_INTERPOLATION_STEPS 12 @@ -1489,7 +1574,8 @@ typedef enum typedef enum { TDREND_PLAYSTATUS_INITIAL, - TDREND_PLAYSTATUS_PLAYING + TDREND_PLAYSTATUS_PLAYING, + TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC } TDREND_PlayStatus_t; typedef enum @@ -1512,6 +1598,7 @@ typedef enum } SFX_OpMode_t; +#ifndef FIX_439_OTR_PARAMS /*----------------------------------------------------------------------------------* * Orientation tracking constants *----------------------------------------------------------------------------------*/ @@ -1532,7 +1619,7 @@ typedef enum OTR_TRACKING_REF_VEC = IVAS_ORIENT_TRK_REF_VEC, /* track orientation relative to external reference vector */ OTR_TRACKING_REF_VEC_LEV = IVAS_ORIENT_TRK_REF_VEC_LEV /* track orientation relative to level component of external reference vector */ } OTR_TRACKING_T; - +#endif /*----------------------------------------------------------------------------------* * Reverberator constants @@ -1558,9 +1645,7 @@ typedef enum #define IVAS_320_PT_LEN 320 #define IVAS_240_PT_LEN 240 #define IVAS_160_PT_LEN 160 -#ifdef PARAMMC_SHORT_ENC_MDFT #define IVAS_120_PT_LEN 120 -#endif #define IVAS_80_PT_LEN 80 #define IVAS_40_PT_LEN 40 diff --git a/lib_com/ivas_cov_smooth.c b/lib_com/ivas_cov_smooth.c index b5bd6369c5c41bcd0bb7a7e70183c5aaa533cb8a..1860e6ac70cad5a82a3a76290368f46b027d6c41 100644 --- a/lib_com/ivas_cov_smooth.c +++ b/lib_com/ivas_cov_smooth.c @@ -51,8 +51,6 @@ static void ivas_set_up_cov_smoothing( ivas_filterbank_t *pFb, const float max_update_rate, const int16_t min_pool_size, - const int16_t nchan_inp /* i : number of input channels */ - , const int32_t ivas_total_brate ) { int16_t j, k; @@ -90,28 +88,7 @@ static void ivas_set_up_cov_smoothing( } } } - else if ( nchan_inp <= FOA_CHANNELS ) - { - for ( j = 0; j < pFb->filterbank_num_bands; j++ ) - { - float update_factor; - update_factor = 0.0f; - - for ( k = 0; k < pFb->fb_bin_to_band.pFb_active_bins_per_band[j]; k++ ) - { - update_factor += pFb->fb_bin_to_band.pFb_bin_to_band[j][k]; - } - - hCovState->pSmoothing_factor[j] = update_factor / min_pool_size; - - if ( hCovState->pSmoothing_factor[j] > max_update_rate ) - { - hCovState->pSmoothing_factor[j] = max_update_rate; - } - } - } else - { for ( j = 0; j < pFb->filterbank_num_bands; j++ ) { float update_factor; @@ -131,7 +108,6 @@ static void ivas_set_up_cov_smoothing( hCovState->pSmoothing_factor[j] = max_update_rate; } } - } hCovState->prior_bank_idx = -1; return; @@ -178,7 +154,8 @@ ivas_error ivas_spar_covar_smooth_enc_open( } } - ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp, ivas_total_brate ); + + ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, ivas_total_brate ); *hCovState_out = hCovState; diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index e4bea78e7933298a895c5542ba684e20d0861301..a5964edd6642dd7af34e6c2ee63154f2a43bcf48 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -48,6 +48,30 @@ static uint16_t deindex_sph_idx_general( const int16_t idx_sph, const int16_t no_bits, float *theta_dec, float *phi_dec, uint16_t *p_id_phi, const MC_LS_SETUP mc_format ); + +/*------------------------------------------------------------------------- + * ivas_get_hodirac_flag() + * + * Return flag for HO-DirAC method at high bitrates + *------------------------------------------------------------------------*/ + +/*! r: HO-DirAC flag */ +int16_t ivas_get_hodirac_flag( + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ +) +{ + if ( sba_order > 1 && ivas_total_brate > IVAS_256k ) + { + return 1; + } + else + { + return 0; + } +} + + /*------------------------------------------------------------------------- * ivas_dirac_sba_config() * @@ -71,8 +95,10 @@ ivas_error ivas_dirac_config( int16_t spar_dirac_split_band; IVAS_FB_MIXER_HANDLE hFbMdft; SBA_MODE sba_mode; + int16_t *dirac_to_spar_md_bands; + error = IVAS_ERR_OK; if ( enc_dec == ENC ) @@ -128,7 +154,13 @@ ivas_error ivas_dirac_config( if ( sba_mode == SBA_MODE_SPAR ) { hConfig->nbands = IVAS_MAX_NUM_BANDS; + spar_dirac_split_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); + + if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) ) + { + spar_dirac_split_band = 0; + } } else { @@ -137,9 +169,7 @@ ivas_error ivas_dirac_config( } hConfig->enc_param_start_band = 0; hConfig->dec_param_estim = FALSE; -#ifdef FIX_391_SBA hConfig->dec_param_estim_old = hConfig->dec_param_estim; -#endif if ( ivas_format == SBA_FORMAT ) /* skip for MASA decoder */ { if ( ( error = ivas_dirac_sba_config( hQMetaData, nchan_transport, nSCE, nCPE, element_mode, ivas_total_brate, sba_order, sba_mode, hConfig->nbands - spar_dirac_split_band ) ) != IVAS_ERR_OK ) @@ -164,6 +194,15 @@ ivas_error ivas_dirac_config( { hConfig->enc_param_start_band = spar_dirac_split_band; } + + if ( ivas_get_hodirac_flag( ivas_total_brate, sba_order ) ) + { + hConfig->dec_param_estim = FALSE; + hConfig->enc_param_start_band = 0; + + set_c( (int8_t *) hQMetaData->twoDirBands, (int8_t) 1, hQMetaData->q_direction[0].cfg.nbands ); + hQMetaData->numTwoDirBands = (uint8_t) hQMetaData->q_direction[0].cfg.nbands; + } } else { @@ -176,13 +215,11 @@ ivas_error ivas_dirac_config( if ( sba_mode == SBA_MODE_SPAR ) { - ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), - dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); + ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft ); } else { - ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), - NULL, 0, 0, hFbMdft ); + ivas_dirac_config_bands( band_grouping, hConfig->nbands, (int16_t) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft ); } return error; @@ -314,10 +351,12 @@ ivas_error ivas_dirac_sba_config( int16_t i; int16_t nbands_wb; int16_t nbands_coded; + int16_t hodirac_flag; ivas_error error; error = IVAS_ERR_OK; hQMetaData->is_masa_ivas_format = 0; + hodirac_flag = ivas_get_hodirac_flag( sba_total_brate, sba_order ); if ( sba_mode == SBA_MODE_SPAR ) { @@ -354,12 +393,39 @@ ivas_error ivas_dirac_sba_config( else { hQMetaData->useLowerBandRes = 0; - nbands_coded = nbands - 1; /* always combine the last two bands */ + if ( hodirac_flag == 0 ) + { + nbands_coded = nbands - 1; /* always combine the last two bands */ + } } - if ( ( error = ivas_qmetadata_allocate_memory( hQMetaData, nbands_coded, 1, 0 ) ) != IVAS_ERR_OK ) { - return error; + int16_t no_dirs = 1; + if ( hodirac_flag ) + { + no_dirs = 2; + } + + if ( ( error = ivas_qmetadata_allocate_memory( hQMetaData, nbands_coded, no_dirs, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } +#if !defined( FIX_DTX_428 ) + { + int16_t dir, j; + for ( dir = 0; dir < hQMetaData->no_directions; dir++ ) + { + for ( j = 0; j < nbands_coded; j++ ) + { + for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + hQMetaData->q_direction[dir].band_data[j].energy_ratio_index[i] = 0; + hQMetaData->q_direction[dir].band_data[j].energy_ratio_index_mod[i] = 0; + } + } + } + } +#endif } if ( sba_total_brate <= IVAS_13k2 ) @@ -452,11 +518,17 @@ ivas_error ivas_dirac_sba_config( } if ( sba_total_brate >= IVAS_96k ) { - if ( ( error = ivas_qmetadata_allocate_memory( hQMetaData, 6, 1, 0 ) ) != IVAS_ERR_OK ) { - return error; + int16_t no_dirs = 1; + if ( hodirac_flag ) + { + no_dirs = 2; + } + if ( ( error = ivas_qmetadata_allocate_memory( hQMetaData, 6, no_dirs, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } } - nbands_wb = 4; } else @@ -484,7 +556,15 @@ ivas_error ivas_dirac_sba_config( for ( i = 0; i < hQMetaData->no_directions; i++ ) { hQMetaData->q_direction[i].cfg.search_effort = 1; - hQMetaData->q_direction[i].cfg.start_band = nbands_wb; + + if ( hodirac_flag ) + { + hQMetaData->q_direction[i].cfg.start_band = 0; + } + else + { + hQMetaData->q_direction[i].cfg.start_band = nbands_wb; + } } *element_mode = IVAS_CPE_MDCT; @@ -788,6 +868,223 @@ void deindex_spherical_component( } +/*---------------------------------------------------------------- + * calculate_hodirac_sector_parameters() + * + * + *-----------------------------------------------------------------*/ + +void calculate_hodirac_sector_parameters( + float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector (L+1)^2 x N_bins, real part */ + float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector, imaginary part */ + const int16_t N_bins, /* i : number of bins */ + const float beta, /* i : forgetting factor for average filtering */ + const int16_t *band_grouping, /* i : indices of band groups */ + const int16_t N_bands, /* i : number of bands (groups) */ + const int16_t enc_param_start_band, /* i : first band to process */ + float *azi, /* o : array of sector azimuth angles, flat */ + float *ele, /* o : array of sector elevation angles, flat */ + float *diff, /* o : array of sector diffuseness values, flat */ + float *ene /* o : array of sector energy values, flat */ +) +{ + int16_t i_sec, i_bin, i_band; + + float p_real, p_imag, normI, energy, tmp_diff; + + float sec_I_vec_x[NUM_ANA_SECTORS]; + float sec_I_vec_y[NUM_ANA_SECTORS]; + float sec_I_vec_z[NUM_ANA_SECTORS]; + + static int16_t firstrun_sector_params = 1; + + static float sec_I_vec_smth_x[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + static float sec_I_vec_smth_y[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + static float sec_I_vec_smth_z[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + + static float energy_smth[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + static float azi_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; + static float ele_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; + +#ifdef DEBUGGING + assert( N_bins <= DIRAC_NO_FB_BANDS_MAX ); +#endif + + for ( i_sec = 0; i_sec < NUM_ANA_SECTORS; i_sec++ ) + { + + float *p_sec_I_vec_x = &sec_I_vec_x[i_sec]; + float *p_sec_I_vec_y = &sec_I_vec_y[i_sec]; + float *p_sec_I_vec_z = &sec_I_vec_z[i_sec]; + + const float *p_c_weights = c_weights; + + float *p_ImagBuffer_0 = ImagBuffer[0]; + float *p_ImagBuffer_1 = ImagBuffer[1]; + float *p_ImagBuffer_2 = ImagBuffer[2]; + float *p_ImagBuffer_3 = ImagBuffer[3]; + float *p_ImagBuffer_4 = ImagBuffer[4]; + float *p_ImagBuffer_5 = ImagBuffer[5]; + float *p_ImagBuffer_6 = ImagBuffer[6]; + float *p_ImagBuffer_8 = ImagBuffer[8]; + + float *p_RealBuffer_0 = RealBuffer[0]; + float *p_RealBuffer_1 = RealBuffer[1]; + float *p_RealBuffer_2 = RealBuffer[2]; + float *p_RealBuffer_3 = RealBuffer[3]; + float *p_RealBuffer_4 = RealBuffer[4]; + float *p_RealBuffer_5 = RealBuffer[5]; + float *p_RealBuffer_6 = RealBuffer[6]; + float *p_RealBuffer_8 = RealBuffer[8]; + + for ( i_band = enc_param_start_band; i_band < N_bands; i_band++ ) + { + float *p_azi = &azi[i_sec * N_bands + i_band]; + float *p_ele = &ele[i_sec * N_bands + i_band]; + float *p_ene = &ene[i_sec * N_bands + i_band]; + + float *p_diff = &diff[i_sec * N_bands + i_band]; + float *p_azi_prev = &azi_prev[i_sec * N_bands + i_band]; + float *p_ele_prev = &ele_prev[i_sec * N_bands + i_band]; + + float *p_energy_smth = &energy_smth[i_sec][i_band]; + float *p_sec_I_vec_smth_x = &sec_I_vec_smth_x[i_sec][i_band]; + float *p_sec_I_vec_smth_y = &sec_I_vec_smth_y[i_sec][i_band]; + float *p_sec_I_vec_smth_z = &sec_I_vec_smth_z[i_sec][i_band]; + + *p_sec_I_vec_x = 0.f; + *p_sec_I_vec_y = 0.f; + *p_sec_I_vec_z = 0.f; + energy = 0.f; + + if ( i_sec == 0 ) + { + for ( i_bin = band_grouping[i_band]; i_bin < band_grouping[i_band + 1]; i_bin++ ) + { + float w = *( p_c_weights++ ); + float sec_w_imag, sec_x_imag, sec_y_imag, sec_z_imag; + float sec_w_real, sec_x_real, sec_y_real, sec_z_real; + + sec_w_imag = 1.772454f * *( p_ImagBuffer_0 ) + 1.772454f * *( p_ImagBuffer_1 ); + sec_x_imag = 1.772454f * *( p_ImagBuffer_3++ ) + 1.023326f * *( p_ImagBuffer_4++ ); + sec_y_imag = 0.590818f * *( p_ImagBuffer_0++ ) + 1.772454f * *( p_ImagBuffer_1++ ) - 0.590817f * *( p_ImagBuffer_6++ ) - 1.023326f * *( p_ImagBuffer_8++ ); + sec_z_imag = 1.772454f * *( p_ImagBuffer_2++ ) + 1.023326f * *( p_ImagBuffer_5++ ); + + sec_w_real = 1.772454f * *( p_RealBuffer_0 ) + 1.772454f * *( p_RealBuffer_1 ); + sec_x_real = 1.772454f * *( p_RealBuffer_3++ ) + 1.023326f * *( p_RealBuffer_4++ ); + sec_y_real = 0.590818f * *( p_RealBuffer_0++ ) + 1.772454f * *( p_RealBuffer_1++ ) - 0.590817f * *( p_RealBuffer_6++ ) - 1.023326f * *( p_RealBuffer_8++ ); + sec_z_real = 1.772454f * *( p_RealBuffer_2++ ) + 1.023326f * *( p_RealBuffer_5++ ); + + p_real = sec_w_real * w; + p_imag = sec_w_imag * w; + + *p_sec_I_vec_x += p_real * sec_x_real + p_imag * sec_x_imag; + *p_sec_I_vec_y += p_real * sec_y_real + p_imag * sec_y_imag; + *p_sec_I_vec_z += p_real * sec_z_real + p_imag * sec_z_imag; + + energy += 0.5f * ( p_real * p_real + p_imag * p_imag + sec_x_real * sec_x_real + sec_x_imag * sec_x_imag + + sec_y_real * sec_y_real + sec_y_imag * sec_y_imag + + sec_z_real * sec_z_real + sec_z_imag * sec_z_imag ); + } + } + else + { + for ( i_bin = band_grouping[i_band]; i_bin < band_grouping[i_band + 1]; i_bin++ ) + { + float w = *( p_c_weights++ ); + float sec_w_imag, sec_x_imag, sec_y_imag, sec_z_imag; + float sec_w_real, sec_x_real, sec_y_real, sec_z_real; + + sec_w_imag = 1.772454f * *(p_ImagBuffer_0) -1.772454f * *( p_ImagBuffer_1 ); + sec_x_imag = 1.772454f * *( p_ImagBuffer_3++ ) - 1.023326f * *( p_ImagBuffer_4++ ); + sec_y_imag = -0.590818f * *( p_ImagBuffer_0++ ) + 1.772454f * *( p_ImagBuffer_1++ ) + 0.590817f * *( p_ImagBuffer_6++ ) + 1.023326f * *( p_ImagBuffer_8++ ); + sec_z_imag = 1.772454f * *( p_ImagBuffer_2++ ) - 1.023326f * *( p_ImagBuffer_5++ ); + + sec_w_real = 1.772454f * *(p_RealBuffer_0) -1.772454f * *( p_RealBuffer_1 ); + sec_x_real = 1.772454f * *( p_RealBuffer_3++ ) - 1.023326f * *( p_RealBuffer_4++ ); + sec_y_real = -0.590818f * *( p_RealBuffer_0++ ) + 1.772454f * *( p_RealBuffer_1++ ) + 0.590817f * *( p_RealBuffer_6++ ) + 1.023326f * *( p_RealBuffer_8++ ); + sec_z_real = 1.772454f * *( p_RealBuffer_2++ ) - 1.023326f * *( p_RealBuffer_5++ ); + + p_real = sec_w_real * w; + p_imag = sec_w_imag * w; + + *p_sec_I_vec_x += p_real * sec_x_real + p_imag * sec_x_imag; + *p_sec_I_vec_y += p_real * sec_y_real + p_imag * sec_y_imag; + *p_sec_I_vec_z += p_real * sec_z_real + p_imag * sec_z_imag; + + energy += 0.5f * ( p_real * p_real + p_imag * p_imag + sec_x_real * sec_x_real + sec_x_imag * sec_x_imag + + sec_y_real * sec_y_real + sec_y_imag * sec_y_imag + + sec_z_real * sec_z_real + sec_z_imag * sec_z_imag ); + } + } + + if ( firstrun_sector_params ) + { + *p_sec_I_vec_smth_x = *p_sec_I_vec_x; + *p_sec_I_vec_smth_y = *p_sec_I_vec_y; + *p_sec_I_vec_smth_z = *p_sec_I_vec_z; + *p_energy_smth = energy; + } + else + { + float w = ( 1.0f - beta ); + *p_sec_I_vec_smth_x = w * *p_sec_I_vec_x + beta * *p_sec_I_vec_smth_x; + *p_sec_I_vec_smth_y = w * *p_sec_I_vec_y + beta * *p_sec_I_vec_smth_y; + *p_sec_I_vec_smth_z = w * *p_sec_I_vec_z + beta * *p_sec_I_vec_smth_z; + *p_energy_smth = w * energy + beta * *p_energy_smth; + } + + if ( energy < EPSILON ) + { + *p_azi = 0.f; + *p_ele = 0.f; + *p_ene = 0.f; + *p_diff = 1.f; + } + else + { + normI = sqrtf( *p_sec_I_vec_smth_x * *p_sec_I_vec_smth_x + + *p_sec_I_vec_smth_y * *p_sec_I_vec_smth_y + + *p_sec_I_vec_smth_z * *p_sec_I_vec_smth_z ); + *p_azi = atan2f( *p_sec_I_vec_smth_y, *p_sec_I_vec_smth_x ) * _180_OVER_PI; + *p_ele = asinf( *p_sec_I_vec_smth_z / ( normI + EPSILON ) ) * _180_OVER_PI; + *p_ene = *p_energy_smth; + *p_diff = 1.f - normI / ( *p_energy_smth + EPSILON ); + } + + tmp_diff = *p_diff; + + if ( tmp_diff < 0.0f ) + { + *p_diff = 0.f; + } + if ( tmp_diff > 0.5f ) + { + if ( firstrun_sector_params ) + { + *p_azi = 0.f; + *p_ele = 0.f; + } + else + { + *p_azi = 2.f * ( 1.f - tmp_diff ) * *p_azi + ( 2.f * tmp_diff - 1.f ) * *p_azi_prev; + *p_ele = 2.f * ( 1.f - tmp_diff ) * *p_ele + ( 2.f * tmp_diff - 1.f ) * *p_ele_prev; + } + } + else + { + *p_azi_prev = *p_azi; + *p_ele_prev = *p_ele; + } + } + } + + firstrun_sector_params = 0; + + return; +} + + /*-----------------------------------------------------------------------* * Local functions *-----------------------------------------------------------------------*/ @@ -799,7 +1096,7 @@ void deindex_spherical_component( * deindex the spherical index for more than 2 bits for the spherical grid *----------------------------------------------------------------------*/ -/* !r: decoded elevation index */ +/*! r: decoded elevation index */ static uint16_t deindex_sph_idx_general( const int16_t idx_sph, /* i : spherical index */ const int16_t no_bits, /* i : number of bits in the spherical grid*/ diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 9438ad44a1d309ca433de3e9a420f441e2245dad..ce5110920740c3238ef0642c0c26275ddbe6d798 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -87,6 +87,9 @@ typedef enum IVAS_ERR_ISM_INVALID_METADATA_VALUE, IVAS_ERR_INVALID_MASA_FORMAT_METADATA_FILE, IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED, +#ifdef VARIABLE_SPEED_DECODING + IVAS_ERR_VS_FRAME_NEEDED, +#endif #ifdef DEBUGGING IVAS_ERR_INVALID_FORCE_MODE, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION diff --git a/lib_com/ivas_fb_mixer.c b/lib_com/ivas_fb_mixer.c index 511f6ed558cba165c2ff8bf555c45039ad6448b1..3d0b6255c9395ad982f29f39228f60e098c2f90d 100644 --- a/lib_com/ivas_fb_mixer.c +++ b/lib_com/ivas_fb_mixer.c @@ -99,13 +99,15 @@ static int16_t ivas_get_num_bands( *---------------------------------------------------------------------*/ ivas_error ivas_fb_set_cfg( - IVAS_FB_CFG **pFb_cfg_out, /* o : FB config. handle */ - const int16_t ivas_format, /* i : IVAS format */ - const SBA_MODE sba_mode, /* i : SBA mode */ - const int16_t num_in_chans, /* i : number of FB input channels */ - const int16_t num_out_chans, /* i : number of FB output channels*/ - const int16_t active_w_mixing, /* i : active_w_mixing flag */ - const int32_t sampling_rate /* i : sampling rate */ + IVAS_FB_CFG **pFb_cfg_out, /* o : FB config. handle */ + const int16_t ivas_format, /* i : IVAS format */ + const SBA_MODE sba_mode, /* i : SBA mode */ + const int16_t num_in_chans, /* i : number of FB input channels */ + const int16_t num_out_chans, /* i : number of FB output channels */ + const int16_t active_w_mixing, /* i : active_w_mixing flag */ + const int32_t sampling_rate /* i : sampling rate */ + , + const int16_t nchan_fb_in /* i : number of dirAC analysis channels*/ ) { IVAS_FB_CFG *pFb_cfg; @@ -117,6 +119,7 @@ ivas_error ivas_fb_set_cfg( pFb_cfg->num_in_chans = num_in_chans; pFb_cfg->num_out_chans = num_out_chans; + pFb_cfg->nchan_fb_in = nchan_fb_in; pFb_cfg->pcm_offset = 0; /* note: in SPAR decoder, this parameter is overwritten later */ pFb_cfg->active_w_mixing = active_w_mixing; @@ -156,11 +159,7 @@ ivas_error ivas_fb_set_cfg( { pFb_cfg->fb_latency = NS2SA( sampling_rate, DELAY_FB_1_NS ); pFb_cfg->fade_len = NS2SA( sampling_rate, DELAY_FB_1_NS ); -#ifdef PARAMMC_SHORT_ENC_MDFT pFb_cfg->prior_input_length = NS2SA( sampling_rate, DELAY_DIRAC_ENC_CMP_NS ) + NS2SA( sampling_rate, PARAM_MC_SLOT_ENC_NS ); -#else - pFb_cfg->prior_input_length = NS2SA( sampling_rate, DELAY_DIRAC_ENC_CMP_NS ) + 3 * NS2SA( sampling_rate, PARAM_MC_SLOT_ENC_NS ); -#endif } *pFb_cfg_out = pFb_cfg; @@ -219,15 +218,11 @@ ivas_error ivas_FB_mixer_open( } else if ( fb_cfg->active_w_mixing ) { - num_chs_alloc = fb_cfg->num_in_chans; + num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); } else { -#ifdef SBA_TD_RESIDUAL num_chs_alloc = 1; /* only W channel processed for predicting YZX */ -#else - num_chs_alloc = fb_cfg->num_out_chans; -#endif } for ( i = 0; i < num_chs_alloc; i++ ) @@ -259,7 +254,7 @@ ivas_error ivas_FB_mixer_open( } else { - num_chs_alloc = fb_cfg->num_in_chans; + num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); } for ( i = 0; i < num_chs_alloc; i++ ) @@ -274,8 +269,7 @@ ivas_error ivas_FB_mixer_open( if ( ( fb_cfg->active_w_mixing != -1 ) && ( fb_cfg->num_out_chans > 0 ) ) { float *pTemp_mem; - - if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * fb_cfg->num_in_chans * IVAS_MAX_NUM_BANDS ) ) == NULL ) + if ( ( pTemp_mem = (float *) malloc( sizeof( float ) * fb_cfg->num_out_chans * max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ) * IVAS_MAX_NUM_BANDS ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FB mixer" ); } @@ -386,15 +380,11 @@ void ivas_FB_mixer_close( } else if ( fb_cfg->active_w_mixing ) { - num_chs_alloc = fb_cfg->num_in_chans; + num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); } else { -#ifdef SBA_TD_RESIDUAL num_chs_alloc = 1; /* only W channel processed for predicting YZX */ -#else - num_chs_alloc = fb_cfg->num_out_chans; -#endif } if ( hFbMixer != NULL ) @@ -419,8 +409,10 @@ void ivas_FB_mixer_close( } else { - num_chs_alloc = fb_cfg->num_in_chans; + num_chs_alloc = max( fb_cfg->num_in_chans, fb_cfg->nchan_fb_in ); } + + for ( i = 0; i < num_chs_alloc; i++ ) { free( hFbMixer->ppFilterbank_prior_input[i] ); @@ -498,7 +490,8 @@ void ivas_fb_mixer_pcm_ingest( float pcm_in[][L_FRAME48k], /* i : input audio channels */ float **ppOut_pcm, /* o : output audio channels */ const int16_t frame_len /* i : frame length */ -) + , + const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ) { int16_t i; int16_t num_chs_ingest; @@ -510,17 +503,13 @@ void ivas_fb_mixer_pcm_ingest( } else { -#ifdef SBA_TD_RESIDUAL num_chs_ingest = 1; /* forward Filterbank MDFT only on W */ -#else - num_chs_ingest = fb_cfg->num_out_chans; -#endif } for ( i = 0; i < fb_cfg->num_in_chans; i++ ) { mvr2r( &hFbMixer->ppFilterbank_prior_input[i][fb_cfg->prior_input_length - frame_len], ppOut_pcm[i], frame_len ); - mvr2r( pcm_in[i], &ppOut_pcm[i][frame_len], frame_len ); + mvr2r( pcm_in[HOA_md_ind[i]], &ppOut_pcm[i][frame_len], frame_len ); } for ( i = 0; i < num_chs_ingest; i++ ) @@ -539,14 +528,18 @@ void ivas_fb_mixer_pcm_ingest( *-----------------------------------------------------------------------------------------*/ void ivas_fb_mixer_update_prior_input( - IVAS_FB_MIXER_HANDLE hFbMixer, /* i/o: FB mixer handle */ - float *pcm_in[], /* i : input audio channels */ - const int16_t length /* i : length of time slot */ + IVAS_FB_MIXER_HANDLE hFbMixer, /* i/o: FB mixer handle */ + float *pcm_in[], /* i : input audio channels */ + const int16_t length /* i : length of time slot */ + , + const int16_t nchan_fb_in /* i : number of analysis channels */ ) { int16_t i; - for ( i = 0; i < hFbMixer->fb_cfg->num_in_chans; i++ ) + for ( i = 0; i < + nchan_fb_in; + i++ ) { mvr2r( &hFbMixer->ppFilterbank_prior_input[i][length], hFbMixer->ppFilterbank_prior_input[i], hFbMixer->fb_cfg->prior_input_length - length ); mvr2r( pcm_in[i], &hFbMixer->ppFilterbank_prior_input[i][hFbMixer->fb_cfg->prior_input_length - length], length ); @@ -569,6 +562,8 @@ void ivas_fb_mixer_get_windowed_fr( float *frame_f_imag[], /* o : imag freq domain values */ const int16_t length, /* i : number of new samples in time slot */ const int16_t mdft_len /* i : MDFT frame length */ + , + const int16_t nchan_fb_in /* i : number of analysis channels */ ) { int16_t ch_idx, j, offset, rev_offset; @@ -583,7 +578,9 @@ void ivas_fb_mixer_get_windowed_fr( rev_offset = (int16_t) ( 2 * mdft_len - hFbMixer->ana_window_offset ); set_zero( fr_in_block, offset ); - for ( ch_idx = 0; ch_idx < hFbMixer->fb_cfg->num_in_chans; ch_idx++ ) + for ( ch_idx = 0; ch_idx < + nchan_fb_in; + ch_idx++ ) { mvr2r( &hFbMixer->ppFilterbank_prior_input[ch_idx][offset + hFbMixer->fb_cfg->windowed_fr_offset], &fr_in_block[offset], n_old_samples - offset ); mvr2r( pcm_in[ch_idx], &fr_in_block[n_old_samples], n_new_samples ); @@ -708,6 +705,7 @@ void ivas_fb_mixer_process( { int16_t start_offset = pFb->fb_consts.pFilterbank_bins_start_offset[i]; int16_t num_bins = pFb->fb_consts.pFilterbank_bins_per_band[i]; + float mixer_const = hFbMixer->prior_mixer[ch][j][i]; pFilterbank_bin_to_band_re = pFb->fb_consts.ppFilterbank_FRs[0][i]; @@ -780,9 +778,6 @@ void ivas_fb_mixer_get_in_out_mapping( for ( i = 1; i < fb_cfg->num_out_chans; i++ ) { in_out_mixer_map[i][0] = 1; -#ifndef SBA_TD_RESIDUAL - in_out_mixer_map[i][order[i]] = 1; -#endif } } } diff --git a/lib_com/ivas_ism_com.c b/lib_com/ivas_ism_com.c index 38a34a15bdbe3e9a8ec053cd065508c7aaf6764a..a28fb77d20ed6fa9c379ac903dca440a83a46a23 100644 --- a/lib_com/ivas_ism_com.c +++ b/lib_com/ivas_ism_com.c @@ -88,15 +88,16 @@ static void bitbudget_to_brate( *-------------------------------------------------------------------*/ ivas_error ivas_ism_config( - const int32_t ism_total_brate, /* i : ISM total bitrate */ - const int16_t nchan_transport, /* i : number of transport channels */ - const int16_t nchan_ism, /* i : number of objects */ - ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ - const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ - const int16_t ism_imp[], /* i : ISM importance flags */ - int32_t element_brate[], /* o : element bitrate per object */ - int32_t total_brate[], /* o : total bitrate per object */ - int16_t nb_bits_metadata[] /* i/o: number of metadata bits */ + const int32_t ism_total_brate, /* i : ISM total bitrate */ + const int16_t nchan_transport, /* i : number of transport channels */ + const int16_t nchan_ism, /* i : number of objects */ + ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ + const int16_t ism_extended_metadata_flag, /* i : extended metadata flag */ + const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ + const int16_t ism_imp[], /* i : ISM importance flags */ + int32_t element_brate[], /* o : element bitrate per object */ + int32_t total_brate[], /* o : total bitrate per object */ + int16_t nb_bits_metadata[] /* i/o: number of metadata bits */ ) { int16_t ch; @@ -135,6 +136,11 @@ ivas_error ivas_ism_config( if ( ism_total_brate >= ISM_EXTENDED_METADATA_BRATE ) { nb_bits_metadata[0] += ISM_EXTENDED_METADATA_BITS; + + if ( ism_extended_metadata_flag ) + { + nb_bits_metadata[0] += ISM_METADATA_IS_NDP_BITS; + } } nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + nchan_ism; @@ -337,6 +343,8 @@ void ivas_ism_reset_metadata( hIsmMeta->yaw = 0.0f; hIsmMeta->pitch = 0.0f; hIsmMeta->radius = 1.0f; + hIsmMeta->ism_metadata_flag = 0; + hIsmMeta->non_diegetic_flag = 0; return; } @@ -352,7 +360,6 @@ void ivas_ism_reset_metadata_API( ISM_METADATA_HANDLE hIsmMeta /* i/o: ISM metadata handle */ ) { - hIsmMeta->ism_metadata_flag = 0; ivas_ism_reset_metadata( hIsmMeta ); return; @@ -454,9 +461,8 @@ float ism_dequant_meta( * ---------------------------------------------------------------*/ void ivas_param_ism_config( - PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ - , - const int16_t nchan_obj /* i : number of ISM channels */ + PARAM_ISM_CONFIG_HANDLE hParamIsm, /* i/o: IVAS Param ISM Config Structure */ + const int16_t nchan_obj /* i : number of ISM channels */ ) { int16_t i; diff --git a/lib_com/ivas_masa_com.c b/lib_com/ivas_masa_com.c index 02d9939dc49ef33e237293183fec208494287dd3..d2226937ff95cd4386a428d5345e217aa56d53ce 100644 --- a/lib_com/ivas_masa_com.c +++ b/lib_com/ivas_masa_com.c @@ -313,20 +313,31 @@ void masa_sample_rate_band_correction( MASA_CODEC_CONFIG *config, /* i/o: MASA codec config */ int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ - const int32_t sampling_rate /* i : Sampling rate */ - , +#ifdef FIX_HBR_MASAMETA + const uint8_t maxBand, /* i : max band */ + uint8_t is_encoder, /* i: signals if called at encoder */ +#else + const int32_t sampling_rate, /* i : Sampling rate */ +#endif MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ ) { uint8_t band, sf; +#ifdef FIX_HBR_MASAMETA + int16_t highBand; +#else int16_t maxBin, highBand, maxBand; +#endif uint8_t numBands48k; +#ifndef FIX_HBR_MASAMETA if ( sampling_rate == 48000 ) { return; } +#endif +#ifndef FIX_HBR_MASAMETA /* Find maximum band usable at this sample rate */ maxBin = (int16_t) ( CLDFB_NO_CHANNELS_MAX * sampling_rate / 48000 ); maxBand = 0; @@ -335,7 +346,7 @@ void masa_sample_rate_band_correction( maxBand++; } maxBand--; - +#endif numBands48k = config->numCodingBands; for ( band = 1; band < config->numCodingBands + 1; band++ ) @@ -346,6 +357,19 @@ void masa_sample_rate_band_correction( { config->numCodingBands = band; hQMetaData->numCodingBands = band; +#ifdef FIX_HBR_MASAMETA + if ( is_encoder ) + { + if ( hQMetaData->q_direction->cfg.nbands > band ) + { + hQMetaData->q_direction->cfg.nbands = band; + } + if ( hQMetaData->no_directions == 2 && hQMetaData->q_direction[1].cfg.nbands > band ) + { + hQMetaData->q_direction[1].cfg.nbands = band; + } + } +#endif band_mapping[band] = maxBand; break; } @@ -393,7 +417,11 @@ void masa_sample_rate_band_correction( /* in decoder, zero the EXT out MASA meta buffer */ for ( sf = 0; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) { +#ifdef FIX_HBR_MASAMETA + for ( band = hQMetaData->numCodingBands; band < MASA_FREQUENCY_BANDS; band++ ) +#else for ( band = config->numCodingBands; band < MASA_FREQUENCY_BANDS; band++ ) +#endif { hExtOutMeta->directionIndex[0][sf][band] = SPH_IDX_FRONT; hExtOutMeta->directToTotalRatio[0][sf][band] = 0u; @@ -412,12 +440,19 @@ void masa_sample_rate_band_correction( return; } + #ifdef HR_METADATA -/* !r: output index for direction */ +/*------------------------------------------------------------------------- + * index_theta_phi_16() + * + * + *------------------------------------------------------------------------*/ + +/*! r: output index for direction */ uint16_t index_theta_phi_16( - float *p_theta, /* i/o : input elevation to be indexed */ - float *p_phi, /* i/o : input azimuth to be indexed */ - SPHERICAL_GRID_DATA *gridData /* i : generated grid data */ + float *p_theta, /* i/o: input elevation to be indexed */ + float *p_phi, /* i/o: input azimuth to be indexed */ + const SPHERICAL_GRID_DATA *gridData /* i : generated grid data */ ) { float abs_theta; @@ -501,14 +536,21 @@ uint16_t index_theta_phi_16( } } - return idx_sph; } + +/*------------------------------------------------------------------------- + * quantize_phi_masa() + * + * + *------------------------------------------------------------------------*/ + +/*! r: output index */ int16_t quantize_theta( - float x, /* i : theta value to be quantized */ - int16_t no_cb, /* i : number of codewords */ - float *xhat /* o : quantized value */ + float x, /* i : theta value to be quantized */ + const int16_t no_cb, /* i : number of codewords */ + float *xhat /* o : quantized value */ ) { int16_t imin; @@ -540,12 +582,18 @@ int16_t quantize_theta( } -/* !r: index azimuth */ +/*------------------------------------------------------------------------- + * quantize_phi_masa() + * + * + *------------------------------------------------------------------------*/ + +/*! r: index azimuth */ int16_t quantize_phi_masa( - float phi, /* i : azimuth value */ - int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ - float *phi_hat, /* o : quantized azimuth */ - const int16_t n /* i : azimuth codebook size */ + float phi, /* i : azimuth value */ + const int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ + float *phi_hat, /* o : quantized azimuth */ + const int16_t n /* i : azimuth codebook size */ ) { int16_t id_phi; @@ -587,4 +635,159 @@ int16_t quantize_phi_masa( return id_phi; } + +/*------------------------------------------------------------------------- + * deindex_sph_idx() + * + * deindex the MASA metadata from the input metadata file + *------------------------------------------------------------------------*/ + +void deindex_sph_idx( + const uint16_t sphIndex, /* i : Spherical index */ + const SPHERICAL_GRID_DATA *gridData, /* i : Prepared spherical grid */ + float *theta, /* o : Elevation */ + float *phi /* o : Azimuth */ +) +{ + float ba_crt, del_crt, div_crt, a4_crt; + float estim; + int32_t base_low, base_up; + int16_t n_crt; + int16_t id_th; + int16_t sign_theta; + int16_t id_phi; + int16_t no_th = gridData->no_theta; + const int16_t *n = gridData->no_phi; + const float ba[3] = { + 2.137991118026424e+02f, + 1.244854404591542e+02f, + 1.228408647140870e+02f, + }; + const float del[3] = { 7.998262115303199e+05f, 1.300883976959332e+06f, 1.424072242426373e+06f }; + const float div[3] = { -0.237662341081474f, -0.100938185496887f, -0.092050209205032f }; + const float a4[3] = { -8.415300425381099f, -19.814106922515204f, -21.727272727270197f }; + const uint16_t limit_index1 = 64964, limit_index2 = 47870; + + if ( sphIndex >= limit_index1 ) + { + ba_crt = ba[2]; + div_crt = div[2]; + a4_crt = a4[2]; + del_crt = del[2]; + } + else if ( sphIndex >= limit_index2 ) + { + ba_crt = ba[1]; + div_crt = div[1]; + a4_crt = a4[1]; + del_crt = del[1]; + } + else + { + ba_crt = ba[0]; + div_crt = div[0]; + a4_crt = a4[0]; + del_crt = del[0]; + } + estim = ba_crt + div_crt * sqrtf( del_crt + a4_crt * sphIndex ); + + if ( estim > MASA_NO_CIRCLES ) + { + estim = MASA_NO_CIRCLES; + } + + assert( estim > 0 ); + id_th = (int16_t) roundf( estim ) - 1; + if ( id_th < 0 ) + { + id_th = 0; + } + + if ( id_th == 0 ) + { + base_low = 0; + base_up = n[0]; + } + else + { + estim = MASA_ANGLE_AT_EQUATOR * (float) ( id_th - 0.5f ); + base_low = n[0]; + if ( id_th >= 2 ) + { + if ( id_th == 2 ) + { + base_low += 2 * (int16_t) ceilf( MASA_NTOT2_FAC * ( sinf( estim ) - MASA_ASIN_OFFSET ) ); + } + else + { + base_low += 2 * (int16_t) roundf( MASA_NTOT2_FAC * ( sinf( estim ) - MASA_ASIN_OFFSET ) ); + } + } + base_up = base_low + 2 * n[id_th]; + } + + sign_theta = 1; + + n_crt = n[id_th]; + if ( sphIndex < base_low ) + { + id_th--; + n_crt = n[id_th]; + if ( id_th == 0 ) + { + base_low = 0; + base_up = n_crt; + } + else + { + base_up = base_low; + base_low -= 2 * n[id_th]; + } + assert( sphIndex >= base_low ); + } + else if ( sphIndex >= base_up ) + { + id_th++; + n_crt = n[id_th]; + base_low = base_up; + base_up += 2 * n_crt; + assert( sphIndex < base_up ); + } + + id_phi = (int16_t) ( sphIndex - base_low ); + if ( sphIndex - base_low >= n_crt ) + { + id_phi -= n_crt; + sign_theta = -1; + } + + if ( id_th == 0 ) + { + *theta = 0.f; + *phi = (float) sphIndex * 360 / (float) n_crt - 180; + } + else + { + if ( id_th == no_th - 1 ) + { + id_phi = 0; + *phi = -180; + *theta = 90 * (float) sign_theta; + } + else + { + *theta = id_th * MASA_ANGLE_AT_EQUATOR_DEG * (float) sign_theta; + if ( id_th % 2 == 0 ) + { + *phi = (float) id_phi * 360 / (float) n_crt - 180; + } + else + { + *phi = ( (float) id_phi + 0.5f ) * 360 / (float) n_crt - 180; + } + } + } + + return; +} #endif diff --git a/lib_com/ivas_mc_com.c b/lib_com/ivas_mc_com.c index 027b68768668a713263e85509179d2a48df6ff0a..0001f39704e1eaebe67b02524461d5a2284b832f 100644 --- a/lib_com/ivas_mc_com.c +++ b/lib_com/ivas_mc_com.c @@ -103,10 +103,14 @@ MC_MODE ivas_mc_mode_select( { mc_mode = MC_MODE_MCMASA; } - else if ( total_brate < IVAS_192k ) + else if ( total_brate < IVAS_160k ) { mc_mode = MC_MODE_PARAMMC; } + else if ( total_brate < IVAS_192k ) + { + mc_mode = MC_MODE_PARAMUPMIX; + } break; default: assert( 0 && "LS Setup not supported or defined for MC mode!\n" ); diff --git a/lib_com/ivas_mdft_imdft.c b/lib_com/ivas_mdft_imdft.c index a9f5bac5320fd73094f64617b505aa32253e7373..ad9d19a9107824ed92f8da3e6d5f965b34464bda 100644 --- a/lib_com/ivas_mdft_imdft.c +++ b/lib_com/ivas_mdft_imdft.c @@ -82,11 +82,9 @@ static void ivas_get_mdft_twid_factors( case IVAS_160_PT_LEN: *ppTwid = &ivas_mdft_coeff_cos_twid_160[0]; break; -#ifdef PARAMMC_SHORT_ENC_MDFT case IVAS_120_PT_LEN: *ppTwid = &ivas_mdft_coeff_cos_twid_120[0]; break; -#endif case IVAS_80_PT_LEN: *ppTwid = &ivas_mdft_coeff_cos_twid_80[0]; break; diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index e59f82dfea1123a76c532c921067deb973712c25..8e739a5c001f8abee15252eeb345ad3365f8fecd 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -251,20 +251,35 @@ ivas_error ivas_compute_core_buffers( /*! r: number of clipped samples */ uint32_t ivas_syn_output( - float synth[][L_FRAME48k], /* i/o: float synthesis signal */ +#ifdef JBM_TSM_ON_TCS + float *synth[], /* i/o: float synthesis signal */ +#else + float synth[][L_FRAME48k], /* i/o: float synthesis signal */ +#endif const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t n_channels, /* i : number of output channels */ int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_syn_output_f( + float *synth[], /* i/o: float synthesis signal */ + const int16_t output_frame, /* i : output frame length (one channel) */ + const int16_t n_channels, /* i : number of output channels */ + float *synth_out /* o : integer 16 bits synthesis signal */ + ); +#endif + void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); ivas_error ivas_init_encoder( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - Indice ind_list[][MAX_NUM_INDICES], /* i : indices list */ - Indice ind_list_metadata[][MAX_BITS_METADATA] /* i : indices list metadata */ + Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ +#ifndef IND_LIST_DYN + ,Indice ind_list[][MAX_NUM_INDICES] /* i : indices list */ + ,Indice ind_list_metadata[][MAX_BITS_METADATA] /* i : indices list metadata */ +#endif ); void destroy_core_enc( @@ -299,6 +314,11 @@ ivas_error ivas_dec( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ + #ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ + int16_t *data /* o : flushed PCM samples */ +#endif ); ivas_error create_sce_dec( @@ -637,6 +657,11 @@ ivas_error ivas_mc_enc_config( ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx /* i : LS config. index */ + #ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ + int16_t *data /* o : flushed samples (JBM) */ +#endif ); /*! r: MC format mode (MCT, McMASA, ParamMC) */ @@ -736,6 +761,104 @@ void dtx_read_padding_bits( const int16_t num_bits ); +#ifdef JBM_TSM_ON_TCS +/*----------------------------------------------------------------------------------* + * JBM prototypes + *----------------------------------------------------------------------------------*/ + +ivas_error ivas_jbm_dec_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float *data /* o : output synthesis signal */ +); + +ivas_error ivas_jbm_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const uint16_t nSamplesAsked, /* i : number of samples wanted */ + uint16_t *nSamplesRendered, /* o : number of samples rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ + int16_t *data /* o : output synthesis signal */ +); + +ivas_error ivas_jbm_dec_flush_renderer( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t tc_granularity_new, /* i : new renderer granularity */ + const RENDERER_TYPE renderer_type_old, /* i : old renderer type */ + const AUDIO_CONFIG intern_config_old, /* i : old internal config */ + const IVAS_OUTPUT_SETUP_HANDLE hIntSetupOld, /* i : old internal output setup */ + const MC_MODE mc_mode_old, /* i : old MC mode */ + const ISM_MODE ism_mode_old, /* i : old ISM mode */ + uint16_t *nSamplesRendered, /* o : number of samples flushed */ + int16_t *data /* o : rendered samples */ +); + +ivas_error ivas_jbm_dec_feed_tc_to_renderer( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t nSamplesForRendering, /* i: : number of TC samples available for rendering */ + int16_t *nSamplesResidual, /* o: : number of samples not fitting into the renderer grid and buffer for the next call*/ + float *data /* i/o: transport channels/output synthesis signal */ +); + +ivas_error ivas_jbm_dec_set_discard_samples( + Decoder_Struct *st_ivas /* i/o: main IVAS decoder structre */ +); + +void ivas_jbm_dec_get_adapted_linear_interpolator( + const int16_t default_interp_length, /* i : default length of the (full-frame) interpolator */ + const int16_t interp_length, /* i : length of the interpolator to be created */ + float *interpolator /* o : the interpolator */ +); + +void ivas_jbm_dec_get_adapted_subframes( + const int16_t nCldfbTs, /* i : number of time slots in the current frame */ + int16_t *subframe_nbslots, /* i/o: subframe grid */ + int16_t *nb_subframes /* i/o: number of subframes in the frame */ +); + +void ivas_jbm_dec_get_md_map( + const int16_t default_len, /* i : default frame length in metadata slots */ + const int16_t len, /* i : length of the modfied frames in metadata slots */ + const int16_t subframe_len, /* i : default length of a subframe */ + const int16_t offset, /* i : current read offset into the md buffer */ + const int16_t buf_len, /* i : length of the metadata buffer */ + int16_t *map /* o : metadata index map */ +); + +int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ); /* i : IVAS decoder handle */ + +TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( + Decoder_Struct *st_ivas /* i : IVAS decoder handle */ +); + +int16_t ivas_jbm_dec_get_render_granularity( /* o : render granularity */ + const RENDERER_TYPE rendererType, /* i : renderer type */ + const int32_t output_Fs /* i : sampling rate */ +); + +ivas_error ivas_jbm_dec_tc_buffer_open( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const TC_BUFFER_MODE tc_buffer_mode, /* i : buffer mode */ + const int16_t nchan_transport_jbm, /* i : number of real transport channels */ + const int16_t nchan_transport_internal, /* i : number of totally buffered channels */ + const int16_t nchan_full, /* i : nubmer of channels to fully store */ + const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ +); + +ivas_error ivas_jbm_dec_tc_buffer_reconfigure( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const TC_BUFFER_MODE tc_buffer_mode, /* i : new buffer mode */ + const int16_t nchan_transport_jbm, /* i : new number of real transport channels */ + const int16_t nchan_transport_internal, /* i : new number of totally buffered channels */ + const int16_t nchan_full, /* i : new number of channels to fully store */ + const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ +); + +void ivas_jbm_dec_tc_buffer_close( + DECODER_TC_BUFFER_HANDLE *phTcBuffer /* i/o: TC buffer handle */ +); +void ivas_jbm_dec_td_renderers_adapt_subframes( + Decoder_Struct *st_ivas +); +#endif /*----------------------------------------------------------------------------------* * ISM prototypes @@ -746,6 +869,7 @@ ivas_error ivas_ism_config( const int16_t nchan_transport, /* i : number of transport channels */ const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ + const int16_t ism_extended_metadata_flag, /* i : extended metadata flag */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ int32_t element_brate[], /* o : element bitrate per object */ @@ -786,7 +910,8 @@ ivas_error ivas_set_ism_metadata( const float elevation, /* i : elevation value */ const float radius_meta, /* i : radius */ const float yaw, /* i : yaw */ - const float pitch /* i : pitch */ + const float pitch, /* i : pitch */ + const int16_t non_diegetic_flag /* i : non-diegetic object flag */ ); ivas_error ivas_ism_metadata_enc_create( @@ -887,6 +1012,11 @@ ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ , const ISM_MODE last_ism_mode /* i/o: last ISM mode */ +#ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : number of samples flushed on renderer change */ + int16_t *data /* o : flushed PCM samples */ +#endif ); ivas_error ivas_param_ism_dec_open( @@ -903,6 +1033,26 @@ void ivas_param_ism_dec( float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_ism_dec_digest_tc( + Decoder_Struct *st_ivas +); + +void ivas_param_ism_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nCldfbSlots, /* i : number of CLFBS slots in the transport channels */ + float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ +); + +void ivas_param_ism_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +); +#endif + void ivas_param_ism_params_to_masa_param_mapping( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); @@ -1172,6 +1322,10 @@ void stereo_dft_dec( const int16_t cross_fade_start_offset, /* i : SPAR mixer delay compensation */ const int32_t output_Fs, /* i : Fs for delay calculation */ const int16_t nchan_transport /* i : number of transpor channels */ +#ifdef FIX_STEREO_474 + , + const int16_t num_md_sub_frames /* i: number of MD subframes */ +#endif ); void stereo_dft_res_ecu( @@ -1405,6 +1559,10 @@ int16_t read_BS_adapt_GR_sg( void stereo_dft_hybrid_ITD_flag( STEREO_DFT_CONFIG_DATA_HANDLE hConfig, /* o : DFT stereo configuration */ const int32_t input_Fs /* i : CPE element sampling rate */ +#ifdef HYBRID_ITD_MAX + , + const int16_t hybrid_itd_max /* i : flag for hybrid ITD for very large ITDs */ +#endif ); void stereo_dft_enc_compute_itd( @@ -2391,7 +2549,6 @@ void sns_shape_spectrum( const int16_t L_frame /* i : frame length */ ); -#ifdef SNS_MSVQ int16_t quantize_sns( float sns_in[CPE_CHANNELS][NB_DIV][M], float snsQ_out[CPE_CHANNELS][NB_DIV][M], @@ -2406,7 +2563,6 @@ void dequantize_sns( float snsQ_out[CPE_CHANNELS][NB_DIV][M], Decoder_State **sts ); -#endif void sns_avq_cod( const float *sns, /* i : Input sns vectors */ @@ -2415,18 +2571,14 @@ void sns_avq_cod( float *snsmid_q, /* o : Quantized mid-LFS vectors */ int16_t *index, /* o : Quantization indices */ const int16_t core, /* i : core */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif const int16_t low_brate_mode /* i : flag low bit operating mode */ ); void sns_avq_cod_stereo( const float *snsl, /* i : Input sns vector (left channel) */ const float *snsr, /* i : Input sns vector (right channel) */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif float *snsl_q, /* o : Quantized sns vector (left channel) */ float *snsr_q, /* o : Quantized sns vector (right channel) */ int16_t *indexl, /* o : Quantization indices (left channel) */ @@ -2435,23 +2587,15 @@ void sns_avq_cod_stereo( void sns_avq_dec( int16_t *index, /* i : Quantization indices */ -#ifdef SNS_MSVQ float SNS_Q[NB_DIV][M], /* o : Quantized SNS vectors */ -#else - float *SNS_Q, /* o : Quantized SNS vectors */ -#endif -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif const int16_t numlpc /* i : Number of sets of lpc */ ); void sns_avq_dec_stereo( int16_t *indexl, /* i : Quantization indices (left channel) */ int16_t *indexr, /* i : Quantization indices (right channe) */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif float *SNS_Ql, /* o : Quantized SNS vectors (left channel) */ float *SNS_Qr /* o : Quantized SNS vectors (right channe) */ ); @@ -2655,7 +2799,11 @@ float sumAbs( void mvc2c( const uint8_t x[], /* i : input vector */ uint8_t y[], /* o : output vector */ +#ifdef FIX_XXX_JBM_FIFO_BUFFER + const int32_t n +#else const int16_t n /* i : vector size */ +#endif ); /*! r: the dot product x'*A*A'*x */ @@ -2946,51 +3094,45 @@ void mdct_read_IGF_bits( ivas_error ivas_qmetadata_enc_encode( BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ IVAS_QMETADATA *hQMetaData /* i/o: q_metadata handle */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); #ifdef HR_METADATA - ivas_error ivas_qmetadata_enc_encode_hr_384_512( - BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ - IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ - int16_t bits_sph_idx, - int16_t bits_sp_coh -); -int16_t ivas_qmetadata_dec_decode_hr_384_512( - IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: hQMetaData handle */ - uint16_t *bitstream, /* i : bitstream */ - int16_t *index, /* i/o: bitstream position */ - SPHERICAL_GRID_DATA *sph_grid16, /* i: spherical grid for deindexing */ - int16_t bits_sph_idx, - int16_t bits_sp_coh + BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ + IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ + const int16_t bits_sph_idx, + const int16_t bits_sp_coh ); void deindex_sph_idx( - const uint16_t sphIndex, /* i : Spherical index */ - const SPHERICAL_GRID_DATA *gridData, /* i : Prepared spherical grid */ - float *theta, /* o : Elevation */ - float *phi /* o : Azimuth */ + const uint16_t sphIndex, /* i : Spherical index */ + const SPHERICAL_GRID_DATA *gridData, /* i : Prepared spherical grid */ + float *theta, /* o : Elevation */ + float *phi /* o : Azimuth */ ); - +/*! r: output index for direction */ uint16_t index_theta_phi_16( - float * p_theta, /* i/o : input elevation to be indexed */ - float * p_phi, /* i/o : input azimuth to be indexed */ - SPHERICAL_GRID_DATA *gridData /* i : generated grid data */ + float * p_theta, /* i/o: input elevation to be indexed */ + float * p_phi, /* i/o: input azimuth to be indexed */ + const SPHERICAL_GRID_DATA *gridData /* i : generated grid data */ ); - int16_t quantize_theta( - float x, /* i : theta value to be quantized */ - int16_t no_cb, /* i : number of codewords */ - float *xhat /* o : quantized value */ +/*! r: output index */ +int16_t quantize_theta( + float x, /* i : theta value to be quantized */ + const int16_t no_cb, /* i : number of codewords */ + float *xhat /* o : quantized value */ ); -/* !r: index azimuth */ - int16_t quantize_phi_masa( - float phi, /* i : azimuth value */ - int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ - float *phi_hat, /* o : quantized azimuth */ - const int16_t n /* i : azimuth codebook size */ +/*! r: index azimuth */ +int16_t quantize_phi_masa( + float phi, /* i : azimuth value */ + const int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ + float *phi_hat, /* o : quantized azimuth */ + const int16_t n /* i : azimuth codebook size */ ); #endif @@ -3018,9 +3160,25 @@ int16_t ivas_qmetadata_dec_decode( IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: q_metadata handle */ uint16_t *bitstream, /* i : bitstream */ int16_t *index /* i/o: bitstream position */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); - +#ifdef HR_METADATA +/*! r: number of bits read */ +int16_t ivas_qmetadata_dec_decode_hr_384_512( + IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: hQMetaData handle */ + uint16_t *bitstream, /* i : bitstream */ + int16_t *index, /* i/o: bitstream position */ + const SPHERICAL_GRID_DATA *sph_grid16, /* i: spherical grid for deindexing */ + const int16_t bits_sph_idx, + const int16_t bits_sp_coh +#ifdef FIX_HBR_MASAMETA + , + uint8_t ncoding_bands_config +#endif +); +#endif /*! r: number of bits read */ int16_t ivas_qmetadata_dec_sid_decode( @@ -3039,6 +3197,7 @@ void ivas_qmetadata_to_dirac( MASA_DECODER_HANDLE hMasa, /* i : MASA decoder structure */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const SBA_MODE sba_mode, /* i : SBA mode */ + const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); @@ -3060,11 +3219,13 @@ void ivas_qmetadata_close( void restore_metadata_buffer( BSTR_ENC_HANDLE hMetaData, const int16_t next_ind_start, +#ifndef IND_LIST_DYN const int16_t last_ind_start, +#endif const int16_t bit_pos_start ); -/* !r: codeword index */ +/*! r: codeword index */ int16_t masa_sq( const float in, /* i : input value */ const float *threshold, /* i : partition */ @@ -3098,11 +3259,11 @@ void quantize_direction_frame( float elevation_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES] #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding*/ #endif ); -/* !r: quantized spherical index */ +/*! r: quantized spherical index */ uint16_t quantize_direction( const float theta, /* i : input elevation value */ float phi, /* i : input azimuth value */ @@ -3122,7 +3283,7 @@ int16_t quantize_direction2D( const MC_LS_SETUP mc_format /* i : channel format if in MC-mode */ ); -/* !r :companded azimuth value */ +/*! r :companded azimuth value */ float companding_azimuth( const float azi, /* i : input azimuth value */ const MC_LS_SETUP mc_format, /* i : input channel format */ @@ -3130,14 +3291,14 @@ float companding_azimuth( const int16_t direction /* i : direction of companding (direct or inverse)*/ ); -/* !r: index azimuth */ +/*! r: index azimuth */ int16_t quantize_phi_chan_lbr( const float phi, /* i : azimuth value */ float *phi_hat, /* o : quantized azimuth */ const int16_t n /* i : azimuth codebook size */ ); -/* !r: index azimuth */ +/*! r: index azimuth */ int16_t quantize_phi_chan_compand( float phi, /* i : azimuth value */ float *phi_hat, /* o : quantized azimuth */ @@ -3161,7 +3322,7 @@ void small_requantize_direction_frame( int16_t *diff /* i/o: number of bits to be reduced */ ); -/*!r : index azimuth */ +/*! r: index azimuth */ int16_t quantize_phi( float phi, /* i : azimuth value */ const int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ @@ -3238,7 +3399,10 @@ void ivas_dirac_param_est_enc( float **pp_fr_real, float **pp_fr_imag, const int16_t input_frame, - const SBA_MODE sba_mode + const SBA_MODE sba_mode + , + const int16_t hodirac_flag, + const int16_t nchan_fb_in ); @@ -3270,6 +3434,16 @@ ivas_error ivas_sba_dec_reconfigure( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); +#ifdef JBM_TSM_ON_TCS +ivas_error ivas_sba_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const int16_t nCldfbSlots, /* i : number of CLDFB slots */ + const int16_t nSamplesForRendering, /* i : number of samples provided */ + float *data[] /* i : transport channel samples */ + ); +#endif + void ivas_init_dec_get_num_cldfb_instances( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ int16_t *numCldfbAnalyses, /* o : number of CLDFB analysis instances */ @@ -3304,12 +3478,22 @@ int16_t ivas_sba_get_nchan( /*! r: number of ambisonics metadata channels */ int16_t ivas_sba_get_nchan_metadata( const int16_t sba_order /* i : Ambisonic (SBA) order */ + , + const int32_t ivas_total_brate +); + +void ivas_sba_get_spar_hoa_ch_ind( + const int16_t num_md_chs, /* i : number of MD channels */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ); /*! r: flag indicating to code SPAR HOA MD for all bands */ -int16_t ivas_sba_get_spar_hoa_md_flag( +void ivas_sba_get_spar_hoa_md_flag( const int16_t sba_order, /* i : Ambisonic (SBA) order */ - const int32_t ivas_total_brate /* i : IVAS total bitrate */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + int16_t *spar_hoa_md_flag, + int16_t *spar_hoa_dirac2spar_md_flag ); void ivas_sba_zero_vert_comp( @@ -3342,6 +3526,12 @@ void ivas_sba_dirac_stereo_config( STEREO_DFT_CONFIG_DATA_HANDLE hConfig /* o : DFT stereo configuration */ ); +/*! r: HO-DirAC flag */ +int16_t ivas_get_hodirac_flag( + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ +); + int16_t ivas_get_sba_dirac_stereo_flag( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); @@ -3351,6 +3541,10 @@ void ivas_sba_dirac_stereo_smooth_parameters( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ const int16_t cross_fade_start_offset, /* i : SPAR mixer delay compensation */ const int32_t output_Fs /* i : Fs for delay calculation */ +#ifdef FIX_STEREO_474 + , + const int16_t num_md_sub_frames /* i : number of subframes in mixing matrix */ +#endif ); void ivas_sba2mc_cldfb( @@ -3359,6 +3553,9 @@ void ivas_sba2mc_cldfb( float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: cldfb imag part */ const int16_t nb_channels_out, /* i : nb of output channels */ const int16_t nb_bands, /* i : nb of CLDFB bands to process */ +#ifdef JBM_TSM_ON_TCS + const int16_t nb_timeslots, /* i : number of time slots to process */ +#endif const float *hoa_dec_mtx /* i : HOA decoding mtx */ ); @@ -3422,6 +3619,11 @@ ivas_error ivas_dirac_dec_open( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); +ivas_error ivas_dirac_allocate_parameters( + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + const int16_t params_flag /* i : set of parameters flag */ +); + ivas_error ivas_dirac_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const DIRAC_CONFIG_FLAG flag_configopen /* i/ : Flag determining if we open or reconfigure the DirAC decoder */ @@ -3431,6 +3633,11 @@ void ivas_dirac_dec_close( DIRAC_DEC_HANDLE *hDirAC /* i/o: decoder DirAC handle */ ); +void ivas_dirac_deallocate_parameters( + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + const int16_t params_flag /* i : set of parameters flag */ +); + void ivas_dirac_dec_read_BS( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ Decoder_State *st, /* i/o: decoder Core state structure */ @@ -3438,19 +3645,60 @@ void ivas_dirac_dec_read_BS( IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: q metadata */ int16_t *nb_bits, /* o : number of bits read */ const SBA_MODE sba_mode, /* i : SBA mode */ + const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ); +#ifdef JBM_TSM_ON_TCS +void generate_masking_noise_lb_dirac( + HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ + float *tdBuffer, /* i/o: time-domain signal, if NULL no LB-CNA */ + const int16_t nCldfbTs, /* i : number of CLDFB slots that will be rendered */ + const int16_t cna_flag /* i : CNA flag for LB and HB */ +); + +void ivas_dirac_dec_set_md_map( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + int16_t nCldfbTs ); + +void ivas_dirac_dec( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ + const int16_t nchan_transport /* i : number of transport channels */ +); +#endif + +#ifdef JBM_TSM_ON_TCS +void ivas_dirac_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +); +#endif + +#ifndef JBM_TSM_ON_TCS void ivas_dirac_dec( +#else +void ivas_dirac_dec_render_sf( +#endif Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ +#else + float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif const int16_t nchan_transport, /* i : number of transport channels */ float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX], - float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX], + float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] +#ifndef JBM_TSM_ON_TCS + , const int16_t i_sf +#endif ); -#ifdef FIX_417_TD_DECORR_BRATE_SW ivas_error ivas_td_decorr_reconfig_dec( const IVAS_FORMAT ivas_format, /* i : IVAS format */ const int32_t ivas_total_brate, /* i : total IVAS bitrate */ @@ -3465,12 +3713,6 @@ float configure_reqularization_factor( const IVAS_FORMAT ivas_format, /* i : IVAS format */ const int32_t ivas_total_brate /* i : total IVAS bitrate */ ); -#else -ivas_error ivas_dirac_dec_init_binaural_data( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ -); -#endif void computeDiffuseness_mdft( float **buffer_intensity[DIRAC_NUM_DIMS], @@ -3546,17 +3788,20 @@ void ivas_dirac_dec_decorr_close( HANDLE_DIRAC_DECORR_STATE *ph_dirac_decorr_state ); - ivas_error ivas_dirac_dec_output_synthesis_open( DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const RENDERER_TYPE renderer_type, /* i : renderer type */ const int16_t nchan_transport, /* i : number of transport channels */ const int32_t output_Fs /* i : output sampling rate */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_dirac_dec_output_synthesis_init( DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const int16_t nchan_out_woLFE /* i : number of output audio channels without LFE */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_dirac_dec_output_synthesis_close( @@ -3566,11 +3811,25 @@ void ivas_dirac_dec_output_synthesis_close( void ivas_dirac_dec_output_synthesis_process_slot( const float *reference_power, /* i : Estimated power */ const float *onset, /* i : onset filter */ +#ifdef JBM_TSM_ON_TCS + const int16_t *azimuth, + const int16_t *elevation, + const float *diffuseness, +#endif DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t sh_rot_max_order, +#endif const float *p_Rmat, /* i : rotation matrix */ const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ - const int16_t nchan_transport /* i : number of transport channels */ + const int16_t nchan_transport /* i : number of transport channels */ +#if defined( JBM_TSM_ON_TCS ) + , + const int16_t index_slot +#endif + , + const int16_t hodirac_flag ); void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( @@ -3578,13 +3837,25 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const int16_t nchan_transport, /* i : number of transport channels */ +#ifdef JBM_TSM_ON_TCS + const int16_t nbslots, /* i : number of slots to process */ +#endif const float *onset_filter + , +#ifdef JBM_TSM_ON_TCS + const int16_t md_idx, +#endif + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( - float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ - float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ - DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ + float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ + float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ + DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t nbslots, /* i : number of slots to process */ + const int16_t diff_md_idx, /* i : md slot idx of diffuseness to use */ +#endif float *reference_power_smooth, float qualityBasedSmFactor ); @@ -3623,9 +3894,16 @@ void ivas_dirac_dec_compute_directional_responses( DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ const MASA_DECODER_HANDLE hMasa, /* i : MASA decoder structure */ +#ifdef JBM_TSM_ON_TCS + const int16_t *azimuth, + const int16_t *elevation, + const int16_t md_idx, +#endif const float *surCohRatio, - const int16_t shd_rot_max_order, /* i : split-order rotation method */ - const float *p_Rmat /* i : rotation matrix */ + const int16_t shd_rot_max_order, /* i : split-order rotation method */ + const float *p_Rmat /* i : rotation matrix */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_dirac_dec_get_frequency_axis( @@ -3633,6 +3911,61 @@ void ivas_dirac_dec_get_frequency_axis( const int32_t output_Fs, /* i : sampling frequency */ const int16_t num_freq_bands ); /* i : number of frequency bands */ +void calculate_hodirac_sector_parameters( + float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector (L+1)^2 x N_bins, real part */ + float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector, imaginary part */ + const int16_t N_bins, /* i : number of bins */ + const float beta, /* i : forgetting factor for average filtering */ + const int16_t *band_grouping, /* i : indices of band groups */ + const int16_t N_bands, /* i : number of bands (groups) */ + const int16_t enc_param_start_band, /* i : first band to process */ + float *azi, /* o : array of sector azimuth angles, flat */ + float *ele, /* o : array of sector elevation angles, flat */ + float *diff, /* o : array of sector diffuseness values, flat */ + float *ene /* o : array of sector energy values, flat */ +); + +void ivas_mc_paramupmix_enc( + Encoder_Struct *st_ivas, /* i/o: IVAS Encoder handle */ + BSTR_ENC_HANDLE hMetaData, /* i/o: IVAS Metadata bitstream handle */ + float data_f[][L_FRAME48k], /* i/o: input: CICP6, CICP12, CICP14, CICP16 or CICP19 MC data */ + const int16_t input_frame /* i : input frame length */ +); + +ivas_error ivas_mc_paramupmix_enc_open( + Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ +); + +void ivas_mc_paramupmix_enc_close( + MC_PARAMUPMIX_ENC_HANDLE *hMCParamUpmix, /* i/o: MC Param-Upmix encoder handle */ + const int32_t sampling_rate +); + +void ivas_mc_paramupmix_dec( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +); + +int16_t ivas_mc_paramupmix_getNumTransportChannels( + void +); + +ivas_error ivas_mc_paramupmix_dec_open( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +); + +void ivas_mc_paramupmix_dec_close( + MC_PARAMUPMIX_DEC_HANDLE *hMCParamUpmix_out /* i/o: Parametric MC decoder handle */ +); + +void ivas_mc_paramupmix_dec_read_BS( + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + Decoder_State *st, /* i/o: decoder state structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, /* i/o: decoder MC Param-Upmix handle */ + int16_t *nb_bits /* o : number of bits written */ +); + void ivas_param_mc_metadata_open( const MC_LS_SETUP mc_ls_setup, /* i : MC ls setup */ const int16_t lfe_index, /* i : channel index of LFE */ @@ -3700,9 +4033,29 @@ void ivas_param_mc_dec_read_BS( int16_t *nb_bits /* o : number of bits written */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_param_mc_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint8_t nCldfbSlots, /* i : number of CLFBS slots in the transport channels */ + float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ +); + +void ivas_param_mc_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +); +#endif + void ivas_param_mc_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +#ifdef JBM_TSM_ON_TCS + float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ +#else + float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif ); void ivas_param_mc_default_icc_map( @@ -3811,7 +4164,7 @@ int16_t computeMixingMatricesResidual( float *mixing_matrix /* o : resulting residual mixing matrix */ ); -/* !r: error or success */ +/*! r: error or success */ int16_t svd( float InputMatrix[][MAX_OUTPUT_CHANNELS], /* i : matrix to be decomposed (M) */ float singularVectors_Left[][MAX_OUTPUT_CHANNELS], /* o : left singular vectors (U) */ @@ -3833,6 +4186,12 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open( const float *proto_matrix /* i : the prototype (upmix) matrix (only used if mode == 1) */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_dirac_dec_output_synthesis_get_interpolator( + DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params, /* i/o: handle for the covariance synthesis parameters */ + const uint16_t interp_length ); +#endif + void ivas_dirac_dec_output_synthesis_cov_init( DIRAC_OUTPUT_SYNTHESIS_COV_STATE *h_dirac_output_synthesis_state, /* i/o: pointer to the state of the covariance synthesis */ const int16_t nchan_in, /* i : number of input (tranport) channels */ @@ -3847,27 +4206,45 @@ void ivas_dirac_dec_output_synthesis_cov_close( ); void ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot( - float RealBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (real part) */ - float ImagBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (imaginary part */ - float cx[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : accumulated input covariance (real part) */ - float cx_imag[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : accumulated input covariance (imaginary part) */ - PARAM_MC_DEC_HANDLE hParamMC, /* i : handle to Parametric MC state */ - const int16_t nchan_in, /* i : number of input channels */ - const int16_t idx_slot /* i : index of the slot to be added to the input covariance */ -); - +#ifdef JBM_TSM_ON_TCS + float *RealBuffer, /* i : input channel filter bank samples (real part) */ + float *ImagBuffer, /* i : input channel filter bank samples (imaginary part */ +#else + float RealBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (real part) */ + float ImagBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (imaginary part */ +#endif + float cx[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : accumulated input covariance (real part) */ + float cx_imag[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : accumulated input covariance (imaginary part) */ + PARAM_MC_DEC_HANDLE hParamMC, /* i : handle to Parametric MC state */ + const int16_t nchan_in /* i : number of input channels */ +#ifndef JBM_TSM_ON_TCS + , + const int16_t idx_slot /* i : index of the slot to be added to the input covariance */ +#endif +); + void ivas_dirac_dec_output_synthesis_cov_param_mc_synthesise_slot( - float Cldfb_RealBuffer_in[][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (real part) */ - float Cldfb_ImagBuffer_in[][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (imaginary part) */ - float Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (real part) */ - float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (imaginary part) */ - float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : parameter band wise mixing matrices (direct part) */ - float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* i : parameter band wise mixing matrices (residual part) */ - const uint16_t slot_idx_sfr, /* i : time slot index for the current slot within the current subframe */ - const uint16_t slot_idx_tot, /* i : time slot index for the current slot within the frame */ - const int16_t nX, /* i : number of input channels */ - const int16_t nY, /* i : number of output channels */ - PARAM_MC_DEC_HANDLE hMetadataPMC /* i : handle to the Parametric MC decoder state */ +#ifdef JBM_TSM_ON_TCS + float *Cldfb_RealBuffer_in, /* i : input channel filter bank samples (real part) */ + float *Cldfb_ImagBuffer_in, /* i : input channel filter bank samples (imaginary part) */ +#else + float Cldfb_RealBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : CLDFB samples of the transport channels (real part) */ + float Cldfb_ImagBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : CLDFB samples of the transport channels (imaginary part) */ +#endif + float Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (real part) */ + float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (imaginary part) */ +#ifdef JBM_TSM_ON_TCS + float *mixing_matrix[], /* i : parameter band wise mixing matrices (direct part) */ + float *mixing_matrix_res[], /* i : parameter band wise mixing matrices (residual part) */ +#else + float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : parameter band wise mixing matrices (direct part) */ + float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* i : parameter band wise mixing matrices (residual part) */ +#endif + const uint16_t slot_idx_sfr, /* i : time slot index for the current slot within the current subframe */ + const uint16_t slot_idx_tot, /* i : time slot index for the current slot within the frame */ + const int16_t nX, /* i : number of input channels */ + const int16_t nY, /* i : number of output channels */ + PARAM_MC_DEC_HANDLE hParamMC /* i : handle to the Parametric MC decoder state */ ); int16_t computeMixingMatricesISM( @@ -3951,7 +4328,11 @@ void ivas_sba_upmixer_renderer( ); ivas_error ivas_sba_linear_renderer( +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ +#else float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif const int16_t output_frame, /* i : output frame length per channel */ const int16_t nchan_in, /* i : number of input ambisonics channels */ const AUDIO_CONFIG output_config, /* i : output audio configuration */ @@ -3967,6 +4348,14 @@ void ivas_sba_mix_matrix_determiner( const int16_t output_frame /* i : output frame length */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_sba_prototype_renderer_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ + float inRe[][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ + float inIm[][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX] /* i : Input audio in CLDFB domain, imag */ +); +#endif + /* AGC */ /*! r: AGC enable flag */ int16_t ivas_agc_enc_get_flag( @@ -4045,7 +4434,7 @@ int16_t ivas_get_bw_idx_from_sample_rate( const int32_t sampling_rate /* i : sampling rate */ ); -/* !r: config. table index */ +/*! r: config. table index */ int16_t ivas_get_spar_table_idx( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t sba_order, /* i : IVAS SBA order */ @@ -4117,12 +4506,57 @@ void ivas_spar_get_cldfb_gains( const DECODER_CONFIG_HANDLE hDecoderConfig ); -/* !r: 1 if prediction residual channel */ +/*! r: 1 if prediction residual channel */ int16_t ivas_is_res_channel( const int16_t ch, /* i : ch index in WYZX ordering */ const int16_t nchan_transport /* i : number of transport channels (1-4) */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_spar_dec_agc_pca( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float output[][L_FRAME48k], /* i/o: input/output audio channels */ + const int16_t output_frame /* i : output frame length */ +); + +void ivas_spar_dec_set_render_map( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + int16_t nCldfbTs +); + +void ivas_spar_dec_set_render_params( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t n_cldfb_slots /* i : number of cldfb slots in this frame */ +); + +void ivas_spar_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const int16_t nCldfbSlots, /* i : number of CLDFB slots */ + const int16_t nSamplesForRendering /* i : number of samples provided */ +); + +ivas_error ivas_sba_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nCldfbSlots, /* i : number of CLDFB slots */ + const int16_t nSamplesForRendering /* i : number of samples provided */ +); + +void ivas_sba_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +); + +void ivas_spar_dec_upmixer_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float *output[], /* o : output audio channels */ + const int16_t nchan_internal /* i : number of internal channels */ +); +#endif + void ivas_spar_dec_upmixer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: input/output audio channels */ @@ -4214,6 +4648,10 @@ void ivas_get_spar_md_from_dirac( const int16_t active_w_vlbr ); +int16_t ivas_get_spar_dec_md_num_subframes( + const int16_t sba_order, /* i : Ambisonic (SBA) order */ + const int32_t ivas_total_brate ); + ivas_error ivas_spar_md_dec_open( ivas_spar_md_dec_state_t **hMdDec_out, /* i/o: SPAR MD decoder handle */ const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ @@ -4266,11 +4704,15 @@ void ivas_spar_update_md_hist( void ivas_spar_smooth_md_dtx( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_bands_out /* i : number of output bands */ + , + const int16_t num_md_sub_frames /* i : number of metadata subframes */ ); void ivas_spar_setup_md_smoothing( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_bands_out /* i : number of output bands */ + , + const int16_t num_md_sub_frames /* i : number of metadata subframes */ ); void ivas_spar_dec_gen_umx_mat( @@ -4278,6 +4720,8 @@ void ivas_spar_dec_gen_umx_mat( const int16_t nchan_transport, /* i : number of transport channels */ const int16_t num_bands_out, /* i : number of output bands */ const int16_t bfi /* i : bad frame indicator */ + , + const int16_t num_md_sub_frames ); /* Covariance module */ @@ -4307,6 +4751,8 @@ void ivas_enc_cov_handler_process( const int16_t nchan_inp, const int16_t dtx_vad, const int16_t transient_det[2] + , + const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ); ivas_error ivas_spar_covar_smooth_enc_open( @@ -4372,11 +4818,21 @@ void ivas_td_decorr_dec_close( void ivas_td_decorr_process( ivas_td_decorr_state_t *hTdDecorr, /* i/o: SPAR Covar. decoder handle */ +#ifdef JBM_TSM_ON_TCS + float *pcm_in[], /* i : input audio channels */ +#else float pcm_in[][L_FRAME48k], /* i : input audio channels */ +#endif float **ppOut_pcm, /* o : output audio channels */ const int16_t output_frame /* i : output frame length */ ); +void ivas_td_decorr_APD_iir_filter( + ivas_td_decorr_APD_filt_state_t *filter_state, + float *pIn_out, + const int16_t num_APD_sections, + const int16_t length +); #define IVAS_CMULT_FLOAT( in1_re, in1_im, in2_re, in2_im, out1_re, out1_im ) \ out1_re = ( in1_re * in2_re ) - ( in1_im * in2_im ); MAC(1); MULT(1); \ @@ -4668,6 +5124,8 @@ void masa_compensate_two_dir_energy_ratio_index( const int16_t ratio_index_2, /* i : Input ratio for direction 2 */ int16_t *ratio_index_mod1, /* o : Output modified ratio for direction 1 */ int16_t *ratio_index_mod2 /* o : Output modified ratio for direction 2 */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_set_qmetadata_maxbit_req( @@ -4675,17 +5133,27 @@ void ivas_set_qmetadata_maxbit_req( const IVAS_FORMAT ivas_format /* i : IVAS format */ ); +/*! r: Bits to be used for quantizing distribution ratio of direct-to-total ratios */ +int16_t ivas_get_df_ratio_bits_hodirac( + const int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ +); + /*! r: Bits to be used for quantizing distribution ratio of direct-to-total ratios */ int16_t ivas_get_df_ratio_bits( - int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ + const int16_t index_diff /* i : Index of quantized diffuse-to-total ratio */ ); void masa_sample_rate_band_correction( MASA_CODEC_CONFIG *config, /* i/o: MASA codec config */ int16_t *band_mapping, /* i/o: Band mapping used and modified */ IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: QMetadata structure for modification */ - const int32_t sampling_rate /* i : sampling rate */ - , MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ +#ifdef FIX_HBR_MASAMETA + const uint8_t maxBand, /* i : max band */ + uint8_t is_encoder, /* i: signals if called at encoder */ +#else + const int32_t sampling_rate, /* i : sampling rate */ +#endif + MASA_DECODER_EXT_OUT_META_HANDLE hExtOutMeta /* i/o: MASA decoder metadata ext out buffer */ ); void invdct4_transform( @@ -4707,22 +5175,15 @@ void ivas_masa_prerender( const int16_t output_frame /* i : output frame length per channel */ ); -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS +#ifdef JBM_TSM_ON_TCS +#endif + void ivas_spar_param_to_masa_param_mapping( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ const int16_t subframe /* i : Subframe to map */ ); -#else -void ivas_spar_param_to_masa_param_mapping( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ - const int16_t firstSubframe, /* i : First subframe to map */ - const int16_t nSubframes /* i : Number of subframes to map */ -); -#endif /*---------------------------------------------------------------------------------* @@ -4740,12 +5201,28 @@ void ivas_binRenderer_close( #ifdef DEBUGGING void ivas_binaural_cldfb( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ +#else float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif ); + +#ifdef JBM_TSM_ON_TCS +void ivas_binaural_cldfb_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t n_samples_to_render, + float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ +); +#endif + #endif void ivas_binRenderer( BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: fastconv binaural renderer handle */ HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i/o: head track handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, /* i: : number of time slots to process */ +#endif float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ @@ -4755,7 +5232,12 @@ void ivas_binRenderer( void ivas_binaural_add_LFE( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t output_frame, /* i : length of input frame */ +#ifdef JBM_TSM_ON_TCS + float *input_f[], /* i : transport channels */ + float *output_f[] /* o : synthesized core-coder transport channels/DirAC output */ +#else float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif ); @@ -4769,10 +5251,22 @@ ivas_error ivas_ism_renderer_open( void ivas_ism_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: core-coder transport channels/object output */ +#else float output_f[][L_FRAME48k], /* i/o: core-coder transport channels/object output */ +#endif const int16_t output_frame /* i : output frame length per channel */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_ism_render_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float *output_f[], /* i/o: core-coder transport channels/object output */ + const int16_t n_samples_to_render /* i : output frame length per channel */ +); +#endif + void ivas_ism_get_stereo_gains( const float azimuth, /* i : object azimuth */ const float elevation, /* i : object elevation */ @@ -4782,14 +5276,23 @@ void ivas_ism_get_stereo_gains( void ivas_mc2sba( IVAS_OUTPUT_SETUP hIntSetup, /* i : Format of decoder output */ - float buffer_td[][L_FRAME48k], /* i/o: MC signals (on input) and the HOA3 (on output) */ +#ifdef JBM_TSM_ON_TCS + float *in_buffer_td[], /* i : MC signals (on input) and the HOA3 (on output) */ + float *buffer_td[], /* o : MC signals (on input) and the HOA3 (on output) */ +#else + float buffer_td[][L_FRAME48k], /* i/o: MC signals (on input) and the HOA3 (on output) */ +#endif const int16_t output_frame, /* i : output frame length per channel */ const int16_t sba_order, /* i : SBA order */ const float gain_lfe /* i : gain for LFE, 0=ignore LFE */ ); void ivas_ism2sba( - float buffer_td[][L_FRAME48k], /* i/o: TD signal buffers */ +#ifdef JBM_TSM_ON_TCS + float *buffer_td[], /* i/o: TD signal buffers */ +#else + float buffer_td[][L_FRAME48k], /* i/o: TD signal buffers */ +#endif ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ const ISM_METADATA_HANDLE hIsmMetaData[], /* i : object metadata */ const int16_t nchan_ism, /* i : number of objects */ @@ -4797,7 +5300,17 @@ void ivas_ism2sba( const int16_t sba_order /* i : SBA order */ ); - +#ifdef JBM_TSM_ON_TCS +void ivas_ism2sba_sf( + float *buffer_in[], /* i : TC buffer */ + float *buffer_out[], /* o : TD signal buffers */ + ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ + const int16_t num_objects, /* i : number of objects */ + const int16_t n_samples_to_render, /* i : output frame length per channel */ + const int16_t offset, /* i : offset for the interpolatr */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ +); +#endif /*----------------------------------------------------------------------------------* * Amplitude Panning VBAP prototypes *----------------------------------------------------------------------------------*/ @@ -4845,10 +5358,17 @@ void ivas_ls_setup_conversion_close( LSSETUP_CONVERSION_HANDLE *hLsSetUpConversion /* i/o: LS converter handle */ ); + void ivas_ls_setup_conversion( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ + const int16_t input_chans, /* i : number of input channels to the renderer */ const int16_t output_frame, /* i : frame length */ - float output[][L_FRAME48k] /* i/o: LS input/output synthesis signal */ +#ifdef JBM_TSM_ON_TCS + float *input[], /* i : LS input/output synthesis signal */ + float *output[] /* i/o: LS input/output synthesis signal */ +#else + float output[][L_FRAME48k] /* i/o: LS input/output synthesis signal */ +#endif ); void ivas_ls_setup_conversion_process_mdct( @@ -4863,6 +5383,9 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( void ivas_lssetupconversion_process_param_mc( Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ +#ifdef JBM_TSM_ON_TCS + int16_t num_timeslots, /* i : number of time slots to process */ +#endif float Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ float Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ int16_t channel_active[MAX_CICP_CHANNELS] /* i : bitmap indicating which output channels are active */ @@ -4982,6 +5505,8 @@ void computeReferencePower_enc( const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands, /* i : Number of frequency bands */ const SBA_MODE sba_mode /* i : SBA mode */ + , + const int16_t nchan_ana /* i : number of analysis channels */ ); ivas_error ivas_mono_dmx_renderer_open( @@ -5089,10 +5614,21 @@ ivas_error ivas_td_binaural_open( ivas_error ivas_td_binaural_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: SCE channels / Binaural synthesis */ +#else + float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ +#endif const int16_t output_frame /* i : output frame length */ ); +#ifdef JBM_TSM_ON_TCS +void ObjRenderIVASSubframe( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float *output[], /* i/o: SCE channels / Binaural synthesis */ + const int16_t output_frame /* i : output frame length */ +); +#endif /*----------------------------------------------------------------------------------* * Filter-bank (FB) Mixer @@ -5106,6 +5642,8 @@ ivas_error ivas_fb_set_cfg( const int16_t num_out_chans, /* i : number of FB output channels */ const int16_t active_w_mixing, /* i : active_w_mixing flag */ const int32_t sampling_Fs /* i : sampling rate */ + , + const int16_t nachan_dirac_ana /* i : number of DirAR analysis channels */ ); ivas_error ivas_FB_mixer_open( @@ -5126,6 +5664,8 @@ void ivas_fb_mixer_pcm_ingest( float pcm_in[][L_FRAME48k], /* i : input audio channels */ float **ppOut_pcm, /* o : output audio channels */ const int16_t frame_length /* i : frame length */ + , + const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ); void ivas_dirac_enc_spar_delay_synchro( @@ -5138,6 +5678,8 @@ void ivas_fb_mixer_update_prior_input( IVAS_FB_MIXER_HANDLE hFbMixer, /* i/o: FB mixer handle */ float *pcm_in[], /* i : input audio channels */ const int16_t length /* i : length of time slot */ + , + const int16_t nchan_fb_in /* i : number of analysis channels */ ); void ivas_fb_mixer_get_windowed_fr( @@ -5147,6 +5689,8 @@ void ivas_fb_mixer_get_windowed_fr( float *frame_f_imag[], /* o : imag freq domain values */ const int16_t length, /* i : number of new samples in time slot */ const int16_t mdft_len /* i : MDFT frame length */ + , + const int16_t nchan_fb_in /* i : number of analysis channels */ ); void ivas_fb_mixer_process( @@ -5165,7 +5709,7 @@ void ivas_fb_mixer_get_in_out_mapping( int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i/o: mixing mapping */ ); -/* !r: number of spectral bands */ +/*! r: number of spectral bands */ int16_t ivas_get_num_bands_from_bw_idx( const int16_t bwidth /* i : audio bandwidth */ ); diff --git a/lib_com/ivas_qmetadata_com.c b/lib_com/ivas_qmetadata_com.c index 0f2491bad3545e1dcfe9a785d208aa1f702f3eb1..26dbb10df141b59d6a2eb4bcb186a72d1488bcb1 100644 --- a/lib_com/ivas_qmetadata_com.c +++ b/lib_com/ivas_qmetadata_com.c @@ -263,7 +263,7 @@ void ivas_qmetadata_close( * scalar quantization using partition *------------------------------------------------------------------------*/ -/* r: codeword index */ +/*! r: codeword index */ int16_t masa_sq( const float in, /* i : input value */ const float *threshold, /* i : partition */ @@ -508,24 +508,31 @@ void masa_compensate_two_dir_energy_ratio_index( const int16_t ratio_index_2, /* i : Input ratio for direction 2 */ int16_t *ratio_index_mod1, /* o : Output modified ratio for direction 1 */ int16_t *ratio_index_mod2 /* o : Output modified ratio for direction 2 */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { - float ratio1, ratio2, ratioSum; + float ratio1, ratio2; + float ratioSum; ratio1 = 1.0f - diffuseness_reconstructions[ratio_index_1]; ratio2 = 1.0f - diffuseness_reconstructions[ratio_index_2]; - ratioSum = ratio1 + ratio2; - if ( ratio1 >= ratio2 ) + if ( !hodirac_flag ) { - ratio2 = ratio2 / ratio1 * ratioSum; - ratio1 = ratioSum; - } - else - { - ratio1 = ratio1 / ratio2 * ratioSum; - ratio2 = ratioSum; + ratioSum = ratio1 + ratio2; + if ( ratio1 >= ratio2 ) + { + ratio2 = ratio2 / ratio1 * ratioSum; + ratio1 = ratioSum; + } + else + { + ratio1 = ratio1 / ratio2 * ratioSum; + ratio2 = ratioSum; + } } + *ratio_index_mod1 = masa_sq( 1.0f - ratio1, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); *ratio_index_mod2 = masa_sq( 1.0f - ratio2, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); @@ -610,6 +617,35 @@ void ivas_qmetadata_direction_vector_to_azimuth_elevation( } +/*------------------------------------------------------------------------- + * ivas_get_df_ratio_bits_hodirac() + * + * + *------------------------------------------------------------------------*/ + +/*! r: bits to be used for quantizing ratio of ratios */ +int16_t ivas_get_df_ratio_bits_hodirac( + const int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ +) +{ + int16_t dfRatio_bits; + + if ( index_diff >= DIFF_DFRATIO_1BIT_LIMIT_IDX ) + { + dfRatio_bits = 1; + } + else if ( index_diff >= DIFF_DFRATIO_2BIT_LIMIT_IDX_HODIRAC ) + { + dfRatio_bits = 2; + } + else + { + dfRatio_bits = 3; + } + + return dfRatio_bits; +} + /*--------------------------------------------------------------- * ivas_get_df_ratio_bits() * @@ -620,7 +656,7 @@ void ivas_qmetadata_direction_vector_to_azimuth_elevation( /*! r: bits to be used for quantizing ratio of ratios */ int16_t ivas_get_df_ratio_bits( - int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ + const int16_t index_diff /* i : index of quantized diffuse-to-total ratio */ ) { int16_t dfRatio_bits; diff --git a/lib_com/ivas_qspherical_com.c b/lib_com/ivas_qspherical_com.c index 039dea53eb97d18f2537058c841560ae1a90719a..874f66d05910606c7197034c36e8aef9491c628b 100644 --- a/lib_com/ivas_qspherical_com.c +++ b/lib_com/ivas_qspherical_com.c @@ -71,7 +71,7 @@ uint16_t ivas_qmetadata_reorder_generic( * Returns the original value of the array "folded" by ReorderGeneric *------------------------------------------------------------------------*/ -/* !r: "Unfolded" value, positive or negative depending on the value of the input */ +/*! r: "Unfolded" value, positive or negative depending on the value of the input */ int16_t ivas_qmetadata_dereorder_generic( const uint16_t uns_value /* i : unsigned value result of ReorderGeneric */ ) @@ -234,7 +234,7 @@ void small_reduction_direction( * Input phi expected to be an angle in degree between 0 and 360. *-----------------------------------------------------------------------*/ -/* !r: index azimuth */ +/*! r: index azimuth */ int16_t quantize_phi( float phi, /* i : azimuth value */ const int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ @@ -401,7 +401,7 @@ float companding_azimuth( * Input phi expected to be an angle in degree between 0 and 360. *-----------------------------------------------------------------------*/ -/* !r: index azimuth */ +/*! r: index azimuth */ int16_t quantize_phi_chan_lbr( const float phi, /* i : azimuth value */ float *phi_hat, /* o : quantized azimuth */ @@ -445,7 +445,7 @@ int16_t quantize_phi_chan_lbr( * Input phi expected to be an angle in degree between 0 and 360. *-----------------------------------------------------------------------*/ -/* !r: index azimuth */ +/*! r: index azimuth */ int16_t quantize_phi_chan_compand( float phi, /* i : azimuth value */ float *phi_hat, /* o : quantized azimuth */ diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index d9fc25c089d2b099b02d38565858ea7368a9ae0f..b083210e0796f78a2bac3fe4722ec20250858637 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -877,7 +877,7 @@ const int16_t DirAC_block_grouping_5ms_MDFT[MAX_PARAM_SPATIAL_SUBFRAMES + 1] = 0, 1, 2, 3, 4 }; - +const float c_weights[DIRAC_NO_FB_BANDS_MAX] = { 9.962447e-02f, 9.627997e-01f, 9.926667e-01f, 9.981028e-01f, 9.996648e-01f, 1.000000e+00f, 9.997692e-01f, 9.992002e-01f, 9.983890e-01f, 9.973818e-01f, 9.962037e-01f, 9.948692e-01f, 9.933876e-01f, 9.917654e-01f, 9.900073e-01f, 9.881169e-01f, 9.860975e-01f, 9.839516e-01f, 9.816818e-01f, 9.792906e-01f, 9.767801e-01f, 9.741527e-01f, 9.714106e-01f, 9.685560e-01f, 9.655913e-01f, 9.625187e-01f, 9.593406e-01f, 9.560594e-01f, 9.526774e-01f, 9.491970e-01f, 9.456208e-01f, 9.419512e-01f, 9.381908e-01f, 9.343420e-01f, 9.304075e-01f, 9.263898e-01f, 9.222915e-01f, 9.181152e-01f, 9.138636e-01f, 9.095392e-01f, 9.051447e-01f, 9.006827e-01f, 8.961559e-01f, 8.915668e-01f, 8.869181e-01f, 8.822123e-01f, 8.774521e-01f, 8.726400e-01f, 8.677785e-01f, 8.628702e-01f, 8.579176e-01f, 8.529231e-01f, 8.478893e-01f, 8.428184e-01f, 8.377130e-01f, 8.325753e-01f, 8.274077e-01f, 8.222124e-01f, 8.169917e-01f, 8.117478e-01f, 8.064829e-01f, 8.011990e-01f, 7.958982e-01f, 7.905827e-01f, 7.852543e-01f, 7.799150e-01f, 7.745667e-01f, 7.692112e-01f, 7.638505e-01f, 7.584861e-01f, 7.531199e-01f, 7.477535e-01f, 7.423885e-01f, 7.370265e-01f, 7.316691e-01f, 7.263176e-01f, 7.209736e-01f, 7.156384e-01f, 7.103134e-01f, 7.049999e-01f, 6.996990e-01f, 6.944121e-01f, 6.891403e-01f, 6.838847e-01f, 6.786464e-01f, 6.734265e-01f, 6.682258e-01f, 6.630455e-01f, 6.578863e-01f, 6.527492e-01f, 6.476350e-01f, 6.425445e-01f, 6.374784e-01f, 6.324376e-01f, 6.274226e-01f, 6.224341e-01f, 6.174729e-01f, 6.125393e-01f, 6.076341e-01f, 6.027577e-01f, 5.979106e-01f, 5.930932e-01f, 5.883061e-01f, 5.835497e-01f, 5.788242e-01f, 5.741301e-01f, 5.694676e-01f, 5.648372e-01f, 5.602390e-01f, 5.556734e-01f, 5.511404e-01f, 5.466405e-01f, 5.421737e-01f, 5.377402e-01f, 5.333402e-01f, 5.289738e-01f, 5.246411e-01f, 5.203422e-01f, 5.160771e-01f, 5.118460e-01f, 5.076489e-01f, 5.034858e-01f, 4.993567e-01f, 4.952616e-01f, 4.912005e-01f, 4.871734e-01f, 4.831802e-01f, 4.792209e-01f, 4.752955e-01f, 4.714037e-01f, 4.675457e-01f, 4.637212e-01f, 4.599302e-01f, 4.561725e-01f, 4.524481e-01f, 4.487567e-01f, 4.450983e-01f, 4.414728e-01f, 4.378799e-01f, 4.343195e-01f, 4.307915e-01f, 4.272956e-01f, 4.238318e-01f, 4.203997e-01f, 4.169993e-01f, 4.136303e-01f, 4.102926e-01f, 4.069859e-01f, 4.037101e-01f, 4.004649e-01f, 3.972501e-01f, 3.940655e-01f, 3.909109e-01f, 3.877861e-01f, 3.846909e-01f, 3.816250e-01f, 3.785882e-01f, 3.755803e-01f, 3.726010e-01f, 3.696501e-01f, 3.667275e-01f, 3.638328e-01f, 3.609658e-01f, 3.581263e-01f, 3.553141e-01f, 3.525289e-01f, 3.497705e-01f, 3.470387e-01f, 3.443331e-01f, 3.416537e-01f, 3.390001e-01f, 3.363720e-01f, 3.337694e-01f, 3.311919e-01f, 3.286393e-01f, 3.261114e-01f, 3.236079e-01f, 3.211286e-01f, 3.186733e-01f, 3.162418e-01f, 3.138337e-01f, 3.114490e-01f, 3.090872e-01f, 3.067484e-01f, 3.044321e-01f, 3.021382e-01f, 2.998664e-01f, 2.976166e-01f, 2.953885e-01f, 2.931819e-01f, 2.909966e-01f, 2.888323e-01f, 2.866889e-01f, 2.845661e-01f, 2.824637e-01f, 2.803816e-01f, 2.783194e-01f, 2.762770e-01f, 2.742543e-01f, 2.722509e-01f, 2.702667e-01f, 2.683014e-01f, 2.663550e-01f, 2.644271e-01f, 2.625177e-01f, 2.606264e-01f, 2.587531e-01f, 2.568977e-01f, 2.550599e-01f, 2.532395e-01f, 2.514364e-01f, 2.496503e-01f, 2.478811e-01f, 2.461287e-01f, 2.443928e-01f, 2.426732e-01f, 2.409698e-01f, 2.392824e-01f, 2.376109e-01f, 2.359550e-01f, 2.343146e-01f, 2.326895e-01f, 2.310797e-01f, 2.294848e-01f, 2.279047e-01f, 2.263394e-01f, 2.247886e-01f, 2.232521e-01f, 2.217299e-01f, 2.202217e-01f, 2.187274e-01f, 2.172469e-01f, 2.157800e-01f, 2.143266e-01f, 2.128865e-01f, 2.114596e-01f, 2.100457e-01f, 2.086447e-01f, 2.072564e-01f, 2.058808e-01f }; /*----------------------------------------------------------------------* * SPAR ROM tables @@ -887,13 +887,20 @@ const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] = { /* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each core-coder channel so minimum core-coder bitrate per channel can be min core-coder bitrates as per the table - AGC_BITS_PER_CH */ - /* preferred tuning (3.2/4.9kbps) with/out TDD */ { 13200, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, +#ifdef FIX_487_LOWRATE_SBA_TUNING_FIX + { { 10000, 8150, 13150 } }, +#else { { 10000, 8300, 13150 } }, +#endif { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 }, { 16400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0, +#ifdef FIX_487_LOWRATE_SBA_TUNING_FIX + { { 13200, 11350, 16350 } }, +#else { { 13200, 11500, 16350 } }, +#endif { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 }, { 24400, 0, SBA_FOA_ORDER, FB, 24000, 1, WYXZ, 1, 0,{ { 16400, 14850, 24350 } }, { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 }, @@ -942,10 +949,10 @@ const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] = { 512000, 0, SBA_FOA_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 128000, 128000, 128000 }, {118450, 118450, 128000 } }, // not yet optimized { { 31, 1, 1, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 }, - { 512000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 97700, 93300, 128000 } }, // not yet optimized + { 512000, 0, SBA_HOA2_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 124000, 124000, 128000 },{ 124000, 124000, 128000 },{ 125200, 118450, 128000 },{ 76300, 73000, 128000 } }, // not yet optimized { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 }, - { 512000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 128000, 128000, 128000 },{ 128000, 128000, 128000 },{ 127200, 122550, 128000 },{ 76300, 73550, 128000 } }, // not yet optimized + { 512000, 0, SBA_HOA3_ORDER, FB, 24000, 4, WYXZ, 0, 0,{ { 118000, 118000, 128000 },{ 118000, 118000, 128000 },{ 117200, 109250, 128000 },{ 72300, 69000, 128000 } }, // not yet optimized { { 31, 11, 11, 1 },{ 1, 1, 1, 1 },{ 1, 1, 1, 1 } }, 1, 2, 0 }, }; @@ -1463,11 +1470,13 @@ const int16_t dtx_pr_real_q_levels[3][3] = { { 9,9,9 },{ 9,7,9 },{ 9,5,7 } }; const int16_t pr_pr_idx_pairs[3][3][2] = { { { 0, 0 },{ 0, 0 },{ 0, 0 } },{ { 0, 0 },{ 0, 0 },{ 0, 0 } },{ { 0, 0 },{ 1, 3 },{ 0, 0 } } }; const int16_t pr_pd_idx_pairs[3][3][2] = { { { 1, 1 },{ 2, 2 },{ 3, 3 } },{ { 1, 1 },{ 3, 2 },{ 2, 0 } },{ { 2, 1 },{ 0, 0 },{ 0, 0 } } }; -const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH] = { /* WYZX --> WYXZ... */ - { 0, 1, 3, 2, 4, 5, 6, 7} +const int16_t remix_order_set[1][DIRAC_MAX_ANA_CHANS] = { /* WYZX --> WYXZ... */ + { 0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10 } }; -const int16_t keep_planar[IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS] = { 1, 1, 1, 1 }; -const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 15}; +const int16_t keep_planar[IVAS_SPAR_MAX_CH - IVAS_SPAR_MAX_DMX_CHS] = { 1, 1, 1, 1, 1, 1 }; +const int16_t HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15}; +const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 8, 9, 10, 10, 10, 10}; +const int16_t HOA_keep_ind_spar512[IVAS_SPAR_MAX_CH] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; /*----------------------------------------------------------------------* @@ -4018,7 +4027,6 @@ const float ivas_cos_twiddle_160[IVAS_160_PT_LEN >> 1] = 0.0760120586092433f, 0.0564205163668375f, 0.0368072229413588f, 0.0171797396307788f }; -#ifdef PARAMMC_SHORT_ENC_MDFT const float ivas_mdft_coeff_cos_twid_120[IVAS_120_PT_LEN + 1] = { 1.0000000000f, 0.9999143276f, 0.9996573250f, 0.9992290362f, 0.9986295348f, 0.9978589232f, 0.9969173337f, @@ -4040,7 +4048,6 @@ const float ivas_mdft_coeff_cos_twid_120[IVAS_120_PT_LEN + 1] = 0.1045284633f, 0.0915016187f, 0.0784590957f, 0.0654031292f, 0.0523359562f, 0.0392598158f, 0.0261769483f, 0.0130895956f, 0.0000000000f }; -#endif const float ivas_sin_twiddle_80[IVAS_80_PT_LEN >> 1] = { @@ -5592,11 +5599,9 @@ const int16_t ivas_num_active_bands[FB - WB + 1] = IVAS_16K_12BANDS_ACTIVE_BANDS, IVAS_FB_BANDS_12, IVAS_FB_BANDS_12 }; -#ifdef SNS_MSVQ const int16_t ivas_sns_cdbks_tcx20_levels[SNS_MSVQ_NSTAGES_TCX20] = { 128, 64, 32, 32 }; const int16_t ivas_sns_cdbks_tcx20_bits[SNS_MSVQ_NSTAGES_TCX20] = { 7, 6, 5, 5 }; -#ifdef FIX_445_SNS_BUGFIXES /* pre-rounded codebook vectors for singed Q4.12 represantation */ const float ivas_sns_cdbk_tcx20_stage1[ 128 * 16 ] = { -1.8305664f, -2.0878906f, -0.9638672f, 2.8059082f, 2.668213f, 1.1638184f, 1.390625f, 1.217041f, 1.3850098f, 0.44555664f, -0.47045898f, -0.5307617f, -0.810791f, -1.1647949f, -1.4560547f, -1.7612305f, @@ -6169,611 +6174,7 @@ const float ivas_sns_cdbks_side_tcx10_stage2[ 8 * 16 ] = { }; const float *const ivas_sns_cdbks_side_tcx10[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx10_stage1, ivas_sns_cdbks_side_tcx10_stage2 }; -#else -/* codebooks trained for no adaptive tilt */ -const float ivas_sns_cdbk_tcx20_stage1[ 128 * 16 ] = { - -3.24881770f, -1.99497051f, -0.04725080f, 1.02318508f, 1.51589220f, 1.44649178f, 1.27858728f, 1.15137095f, 0.98029724f, 0.69167126f, 0.33414576f, 0.11759238f, -0.27510520f, -0.63610342f, -1.05394049f, -1.28304590f, - -3.24340413f, -4.15075396f, -2.86242117f, -1.11561919f, 1.12899983f, 1.98341478f, 0.56638511f, -0.05841474f, -0.14875192f, 0.31098029f, 1.87121037f, 0.91347082f, 1.02548459f, 1.98227488f, 1.30278860f, 0.49435585f, - 1.23065598f, 0.87793778f, 0.28294330f, 0.02972172f, 0.42574775f, 0.83386805f, 0.95758438f, 1.21299710f, 1.15042593f, 1.00234403f, 0.60083169f, -0.06520030f, -1.53941239f, -2.26801783f, -2.42116011f, -2.31126766f, - 0.06088614f, 0.02623315f, -0.61781539f, -1.23181247f, -1.40815590f, -1.42831471f, -1.44033232f, -1.33353337f, -0.99555917f, -0.36554180f, 0.55314618f, 1.56114474f, 2.01339157f, 1.99106535f, 1.51097476f, 1.10422329f, - -0.46337128f, -1.76230281f, -2.14514561f, -1.74284853f, -0.74943182f, 0.04642704f, 0.99955801f, 1.04344919f, 1.33994604f, 1.17515394f, 1.38810800f, 1.59087304f, 0.68196542f, -0.13955087f, -0.49622391f, -0.76660607f, - -2.07291483f, -1.16133507f, -1.23972694f, -1.55319745f, -1.53709378f, -0.89687815f, -0.30493476f, 0.53566030f, 0.90463531f, 1.12789938f, 1.18233130f, 1.05231063f, 0.85029894f, 0.96079862f, 1.14041844f, 1.01172838f, - 2.12762247f, 0.85938708f, 0.01404337f, -0.21119526f, -0.23292897f, -0.20800178f, 0.17965021f, 0.51517794f, 0.58450068f, 0.57289696f, 0.08413189f, -0.34604446f, -0.63957268f, -0.82541169f, -1.16686648f, -1.30738935f, - 1.40474083f, 0.32307263f, 0.16419111f, 0.38346550f, 0.50108274f, 0.37590359f, 0.08846238f, -0.23008300f, -0.45942672f, -0.45977478f, -0.43670746f, -0.36727746f, -0.35363526f, -0.33341415f, -0.31539698f, -0.28520292f, - -1.63093109f, 0.32670603f, 1.08393314f, 0.58998372f, 0.53843053f, 0.88612683f, 0.92734321f, 0.85881168f, 0.60801083f, 0.37502839f, -0.29325438f, -0.61636624f, -0.51913318f, -0.70035895f, -0.99754553f, -1.43678500f, - -1.93833343f, -0.69005518f, -0.75170110f, -1.07591216f, -1.13136476f, -0.91057037f, -0.96360579f, -0.81544927f, -0.72636191f, -0.36468519f, 0.13935276f, 1.01589488f, 1.62003238f, 2.00743696f, 2.33078654f, 2.25453582f, - 0.79346182f, 0.75880356f, 0.99941121f, 1.41339988f, 1.42679902f, 1.10135650f, 0.67724856f, 0.16701926f, -0.44226147f, -0.83565024f, -0.96240506f, -0.97710726f, -1.05267194f, -1.07354671f, -1.04194230f, -0.95191489f, - 1.32136151f, -0.10247792f, -0.44723017f, -0.36075427f, -0.71183851f, -0.78401615f, 0.03854040f, 0.61579422f, 0.72990899f, 0.74660263f, 0.27260947f, -0.45511245f, -0.57501743f, -0.20707029f, -0.10728071f, 0.02598055f, - -2.38997175f, -0.94335853f, 0.22486968f, 0.68758389f, 0.77400708f, 0.48551812f, 0.16770824f, 0.18451833f, 0.33722182f, 0.44300618f, 0.45730356f, 0.25903292f, 0.07348018f, -0.18351294f, -0.34985810f, -0.22754861f, - -0.04011386f, -2.74627791f, -2.64617639f, -2.12344376f, -1.04417531f, -1.19773434f, -1.09890378f, -1.14847926f, -1.25163399f, -1.37182360f, -0.92453053f, 0.26852562f, 2.49004087f, 5.03865317f, 3.18845554f, 4.60761675f, - 1.14142799f, 2.34150710f, 1.12597821f, 0.18025034f, -0.06854703f, 0.11882225f, -0.04029384f, -0.10117108f, -1.28130702f, -1.15721800f, 0.11730029f, 0.68335719f, -0.86449861f, -0.91274565f, -0.63726145f, -0.64560064f, - 0.13591417f, 1.45701293f, 0.18328994f, -1.33736241f, -1.63073739f, -1.11748160f, 0.33426081f, 1.38341076f, 1.23963779f, 1.15857921f, -0.19884512f, -0.46649971f, -0.23043753f, -0.16721531f, -0.08938742f, -0.65413930f, - -3.20422583f, -2.18732518f, -1.06476764f, -0.35148934f, 0.10909386f, 0.39065642f, 0.55826648f, 0.44049157f, 0.21409388f, 0.73508456f, 0.80931151f, 0.46688874f, 0.41272044f, 0.76516296f, 1.00398863f, 0.90204888f, - -2.87971458f, -4.23728027f, -0.84454748f, -0.07411834f, 0.21882417f, -1.73386520f, 0.44502397f, -0.29845675f, 0.51877264f, 1.16767994f, -0.80604089f, 1.51749444f, 2.06387385f, 2.42941495f, 1.48054035f, 1.03239888f, - 0.41502416f, 1.92937242f, 2.34493885f, 2.24663449f, 1.97723622f, 1.21219002f, 0.63995779f, 0.11201995f, -0.55860561f, -1.24739776f, -1.54711086f, -1.65155024f, -1.60927011f, -1.56104438f, -1.42473910f, -1.27765585f, - 0.97567115f, -1.33363678f, -2.33351304f, -2.63770798f, -2.22869213f, -1.57504148f, -1.07402035f, -0.47932319f, 0.18065985f, 0.66105619f, 1.18623833f, 1.66207325f, 1.92650802f, 1.89672632f, 1.54070829f, 1.63229361f, - -1.83309029f, -1.12088085f, -0.69053368f, -0.04697322f, 0.16614312f, 0.20653379f, 0.18628141f, 0.29156151f, 0.23415032f, 0.18998435f, 0.46020416f, 0.73218863f, 0.60617333f, 0.33402310f, 0.20549266f, 0.07874144f, - 1.16879643f, -0.94945093f, -1.28153207f, -1.43119528f, -1.63599975f, -1.48906283f, -0.72189452f, 0.19212127f, 0.62604095f, 0.71399312f, 0.84540884f, 0.67919451f, 0.73724815f, 0.94849167f, 0.74181449f, 0.85602585f, - 3.95026110f, 1.56392643f, -0.09370037f, -1.55546296f, -0.28400433f, 2.65160213f, 1.72026891f, -1.03325487f, -2.07533128f, -1.61929448f, -0.37408941f, -0.62936182f, -0.97909452f, -0.16160269f, -0.16361090f, -0.91725088f, - 0.53671249f, -1.03786958f, -1.08801981f, -0.37356699f, -0.22489401f, 0.02309705f, 0.14784551f, 0.19793732f, 0.12472343f, 0.09506024f, 0.05869315f, 0.14383214f, 0.10038818f, 0.25076267f, 0.40789510f, 0.63740306f, - -1.95841389f, 0.03478956f, 1.04981544f, 1.45141888f, 1.01368780f, 1.76553008f, 0.97518033f, 0.87744500f, 1.11998177f, 1.49531245f, 0.43867723f, -1.39588091f, -2.49552623f, -2.06407734f, -1.18465117f, -1.12328885f, - -1.17302983f, 0.17875585f, 0.89193716f, 1.29461477f, 1.14616923f, 0.04577007f, -0.87252250f, -0.55960184f, -0.58720665f, -0.52949712f, -0.37526793f, 0.00605696f, -0.15490600f, 0.06404177f, 0.40280720f, 0.22187871f, - 0.64131376f, 1.75231910f, 2.22508888f, 1.98484418f, 0.78172753f, -0.67005650f, -0.79535378f, 0.16537851f, 0.46442966f, -0.37889506f, -1.24009244f, -0.92537177f, -0.87140953f, -1.04472250f, -1.06971265f, -1.01948730f, - 0.34969434f, 1.41127416f, 0.95134631f, -0.49521902f, -1.13459218f, -1.02414143f, -0.54470763f, 0.04902381f, -0.01765934f, -0.09518271f, -0.07199094f, -0.00398826f, 0.14565429f, 0.17470642f, 0.18302401f, 0.12275814f, - -0.44981302f, -0.20165042f, -0.00073479f, 0.26315901f, 0.44473473f, 0.36317865f, 0.17484972f, 0.03171990f, 0.07343634f, 0.04543774f, -0.09709362f, -0.05624873f, -0.00866747f, -0.02410679f, -0.21651202f, -0.34168925f, - -1.24451525f, -1.23251652f, -1.59614073f, -2.03789978f, -1.96213854f, -1.71444999f, -1.60613134f, -1.51978903f, -1.00014591f, 0.04117804f, 1.34166006f, 2.42925461f, 2.88303472f, 2.83027230f, 2.48737677f, 1.90095093f, - 1.96467234f, 1.49818482f, 0.23737321f, -0.11314831f, -0.14050512f, -0.25201114f, -0.17389748f, -0.07042668f, -0.18426976f, -0.34937744f, -0.42674607f, -0.50442879f, -0.58679768f, -0.52836378f, -0.35445903f, -0.01579900f, - -0.99933612f, 1.11819495f, 1.29449512f, -0.02576221f, -0.61170357f, 0.30864176f, 0.87998806f, 0.96699269f, 0.98082342f, 1.27485776f, 0.52941745f, -1.29529727f, -1.88922976f, -1.36858904f, -0.37094568f, -0.79254774f, - -2.00039877f, -0.30176543f, 0.62981832f, 1.66518235f, 1.71899440f, 1.30408052f, 0.82774193f, 1.00586191f, 0.86017140f, 0.54233910f, -0.13420070f, -0.66585251f, -0.96492148f, -1.18998336f, -1.56871158f, -1.72835605f, - -2.69937742f, -3.72437438f, -3.23623013f, -0.25624354f, 1.96357307f, 2.46814215f, 3.53069303f, -1.06174110f, -1.09336853f, -0.07686535f, 1.29279961f, 1.80354460f, 1.27988399f, -0.42606045f, -0.44754574f, 0.68316996f, - -0.09822772f, 1.26120245f, 1.70052823f, 1.56502837f, 1.15694639f, 0.88838189f, 0.57465867f, 0.31853596f, 0.03466567f, -0.25958767f, -0.49911919f, -0.76007985f, -1.16055649f, -1.53569625f, -1.61195549f, -1.57472513f, - -1.14376495f, -1.43799067f, -1.45325578f, -1.52444742f, -1.38528757f, -1.09797958f, -0.89118095f, -0.62608417f, -0.00250085f, 0.94458366f, 1.51363028f, 1.81223868f, 1.83008829f, 1.56737959f, 1.18148735f, 0.71308420f, - -0.16148812f, -2.04769833f, -2.09471486f, -1.43005703f, -0.50205979f, -0.54822778f, 1.68195446f, 4.00061129f, 1.03275735f, 0.41847912f, 0.66770340f, -0.11822564f, -0.63042447f, -0.32785779f, -0.23825248f, 0.29750055f, - -3.59916102f, -3.16769339f, -2.44843270f, -2.08077491f, -1.31387103f, -0.17348440f, 0.36398119f, 1.21172207f, 1.38864588f, 1.46347831f, 1.46684451f, 1.84157730f, 1.58044756f, 1.35394187f, 1.27155115f, 0.84122764f, - 1.12168796f, 1.77011301f, 0.80501182f, -0.65059510f, -0.86885740f, -0.21223750f, 0.66413611f, 0.77827963f, 0.37800197f, -0.26796888f, -0.97801860f, -0.64966444f, -0.50047252f, -0.44549810f, -0.47750530f, -0.46641261f, - 1.69417025f, 0.14170351f, -0.30309571f, -0.50074499f, -0.60597114f, -0.65756500f, -0.62775844f, -0.41013834f, -0.07761611f, 0.16510349f, 0.25158511f, 0.34758291f, 0.28289899f, 0.29273919f, 0.09829950f, -0.09119332f, - -0.86153928f, 1.09981825f, 0.79441249f, 0.41436072f, 0.25807562f, -0.33355863f, -0.51983659f, -0.25841284f, 0.00191053f, 0.13240503f, 0.19942573f, 0.24363814f, 0.08478089f, -0.15773770f, -0.37897853f, -0.71876393f, - -3.54840520f, -3.31670990f, -2.41138986f, -1.93012869f, -1.20864357f, -0.47291818f, -0.18678664f, 0.02177990f, 0.31458995f, 0.70059621f, 1.23845973f, 1.82707181f, 2.12918865f, 2.27071260f, 2.36659938f, 2.20598371f, - -1.13771731f, 0.39368618f, 0.69608234f, 1.45165188f, 1.41884327f, 1.47720631f, 0.71071536f, 0.51669579f, 0.07379070f, -0.91725636f, -1.46431524f, -2.01818354f, -0.45034354f, -0.20458063f, -0.61685389f, 0.07057863f, - 1.94180196f, -0.43938181f, -1.45235723f, -1.62714803f, -0.56602083f, 0.17861664f, -0.11574800f, -0.55042921f, -0.26385634f, 0.14973980f, 0.40358646f, 0.57744006f, 0.91363053f, 0.71399177f, -0.04044356f, 0.17657766f, - -2.29623160f, 0.37017475f, -0.14625619f, 1.40510672f, -0.18688173f, 0.98162341f, -0.08351923f, 0.30727120f, 0.21088276f, 0.00882905f, 0.20930156f, 0.07859582f, 0.11868622f, 0.19357924f, -0.59940040f, -0.57176126f, - 0.32770546f, -2.17703619f, -2.14694909f, -1.21327174f, -0.09787592f, -0.38390569f, -0.54684876f, -0.76275935f, -1.00614562f, -1.06555455f, -0.70232123f, -0.12667989f, 0.23719344f, 0.82854727f, 3.01646153f, 5.81943998f, - 1.74451794f, 2.61728252f, 2.50084081f, 2.14806463f, 1.03256213f, -0.14230845f, -0.89600957f, -1.26996454f, -1.47590648f, -1.42717085f, -1.20779572f, -0.98498624f, -0.82778555f, -0.73610012f, -0.59428320f, -0.48095729f, - -1.63200590f, 0.23028801f, -0.00907184f, -0.79978843f, -1.00748376f, -0.12526203f, 0.79168097f, 0.90826744f, 0.57548955f, 0.65151547f, 0.37307684f, -0.12047965f, -0.13538324f, 0.00756611f, 0.31705141f, -0.02546129f, - -2.96255244f, -1.89398578f, -1.11705055f, -0.49587679f, -0.64879460f, 0.52145289f, -0.11691144f, 1.02365070f, 0.12124424f, 1.06613244f, 2.03450026f, 1.32855094f, 0.54450823f, -0.09583278f, -0.09304639f, 0.78401059f, - -2.74846388f, -3.29381816f, -1.69589747f, 0.09992536f, 1.19730664f, -0.16362356f, -0.15703004f, 0.55042720f, 0.31568131f, 0.18156842f, 0.68590339f, 1.08986889f, 1.58662197f, 1.58930878f, 0.65286724f, 0.10935410f, - 2.40977200f, 1.75366309f, 0.74979137f, 0.75357579f, 0.58888421f, 0.34045829f, 0.41658500f, 0.41731179f, 0.35825939f, 0.03048901f, -0.69808452f, -1.34206657f, -1.51950247f, -1.45414323f, -1.40318331f, -1.40180996f, - -0.45462369f, -0.79464966f, -0.73449499f, -0.64030961f, -0.59804980f, -0.52688087f, -0.50966580f, -0.32241860f, -0.22751147f, -0.05981052f, 0.18569777f, 0.50293633f, 0.68570837f, 0.93799600f, 1.18364242f, 1.37243415f, - 0.71230959f, -0.15258830f, -0.30639043f, -0.10789426f, 0.13596677f, 0.06139692f, -0.05906250f, -0.09243858f, 0.16058801f, 0.19962984f, -0.02914953f, -0.05986174f, -0.00798730f, -0.03679071f, -0.19035654f, -0.22737122f, - 0.20985119f, 0.67531452f, -0.76482923f, -1.95548615f, -2.01335569f, -1.31859418f, -0.44117933f, 0.43598020f, 0.63898416f, 0.59260283f, 0.59660664f, 0.64364003f, 0.57962656f, 0.72198795f, 0.77431143f, 0.62453906f, - 3.37266827f, 1.16546541f, 0.15487771f, 0.57979973f, 1.63054771f, 1.04524609f, -0.13961184f, -0.53246008f, -0.51061506f, -0.83238697f, -1.04232388f, -0.96061103f, -0.90339873f, -0.99671658f, -1.06027762f, -0.97020325f, - -2.45339028f, 0.22870307f, 0.50079654f, 0.82545821f, -0.45080889f, -0.16537387f, -0.25306064f, -0.33349906f, 0.26143456f, 0.09313222f, 0.86160665f, 0.75164534f, -1.22179547f, -0.18801375f, 1.02457992f, 0.51858541f, - -1.46171297f, 0.63898461f, 2.15634917f, 1.94818588f, 2.12627540f, 1.70759626f, 1.43815259f, 0.82410049f, 0.20479176f, -0.43378728f, -0.89783731f, -1.30555797f, -1.66597981f, -1.80440934f, -1.79291067f, -1.68224086f, - -0.10170911f, 1.63842605f, 2.05629785f, 1.72760611f, 0.13751598f, -1.26847816f, -1.58069540f, -1.04510855f, -0.88231099f, -0.68616151f, -0.59891556f, -0.49054331f, -0.18451655f, 0.19151542f, 0.64619056f, 0.44088718f, - -0.86655238f, 0.59030963f, 1.14256838f, 1.66795450f, 1.50058628f, 1.34944192f, 0.08257813f, 0.24901720f, -0.18852178f, -0.03650931f, -0.27994508f, -1.06110568f, -2.06900429f, -1.73358377f, -0.24057835f, -0.10665549f, - 1.50872779f, 1.31070374f, 0.39357214f, -0.46407462f, -0.92397447f, -1.13436545f, -1.23237146f, -1.13209159f, -1.03095318f, -0.62563255f, -0.17705075f, 0.30244717f, 0.51989500f, 0.80258928f, 0.87034201f, 1.01223693f, - -0.30437289f, -0.88801487f, -0.86107707f, -0.28285107f, 0.28699382f, 0.45911485f, 0.48852566f, 0.45550239f, 0.58082722f, 0.55866427f, 0.31299044f, 0.14102370f, 0.07480087f, -0.08720185f, -0.35323153f, -0.58169395f, - -2.81842263f, -2.50111842f, -2.46829445f, -2.46942172f, -2.16241013f, -1.43881623f, -1.42903221f, -0.83291045f, 0.08734224f, 1.62875243f, 2.38321450f, 2.57841755f, 2.43444406f, 2.45552669f, 2.52427006f, 2.02845861f, - 3.37066045f, 1.49218725f, 0.55470586f, 0.13748306f, -0.13402053f, -0.39589325f, -0.44410867f, -0.48568748f, -0.51085663f, -0.42397560f, -0.53871831f, -0.60800303f, -0.57632384f, -0.50071998f, -0.46558245f, -0.47114696f, - -0.62183100f, 1.32484675f, 1.39280525f, 0.63916764f, 0.07573329f, 0.57096453f, 0.11014546f, -0.13955579f, -0.60839590f, -0.77966466f, -1.07179154f, -1.77671234f, -0.71411508f, 0.13441149f, 0.72184010f, 0.74215154f, - -2.90081845f, -3.29359883f, -1.89249569f, 2.35796037f, 2.47210792f, 0.89083303f, 1.25230145f, 1.03281210f, 1.34506489f, 0.48347288f, -0.08158884f, 0.21388757f, 0.05047384f, -0.37546417f, -0.70672331f, -0.84822525f, - -0.68878586f, -3.17765901f, -2.72677654f, -0.83696096f, 1.93901658f, 2.45806994f, 0.77003930f, 0.58220309f, 0.28500621f, -0.15305225f, 0.53711675f, 0.20321993f, 0.20435459f, 0.27124049f, 0.02126411f, 0.31170327f, - 1.03813940f, 1.60082720f, 1.24608760f, 0.78739775f, 0.96747591f, 1.10068123f, 1.15134869f, 0.74915981f, 0.42167811f, 0.15553718f, -0.33259317f, -0.97385519f, -1.61082594f, -2.05590168f, -2.15737100f, -2.08778582f, - -0.64496025f, 0.35212582f, -0.04908282f, -1.05504457f, -1.19731005f, -0.73315350f, -0.66929749f, -0.60130627f, -0.33236585f, 0.23014025f, 0.69893111f, 1.09565077f, 1.08466375f, 0.94366305f, 0.65639554f, 0.22095053f, - 0.48358349f, -0.37847120f, -1.02753771f, -0.73518795f, -0.11326269f, 0.53003780f, 0.88038488f, 0.88882395f, 0.97329253f, 0.69212641f, 0.87373175f, 0.80871682f, -0.03656343f, -0.94980974f, -1.26081773f, -1.62904720f, - -2.23244251f, -1.79490434f, -1.96001543f, -2.27380061f, -2.07255037f, -1.46415033f, -1.04393033f, 0.20282312f, 1.57244767f, 1.97591827f, 1.77648956f, 1.75160994f, 1.62357252f, 1.47414518f, 1.35930993f, 1.10547779f, - 0.79628045f, 0.95200921f, 0.49234542f, 0.09199320f, -0.05724590f, -0.07118046f, -0.04634766f, -0.00096416f, -0.17970825f, -0.09563800f, -0.01779017f, 0.13120319f, -0.03610489f, -0.35895498f, -0.62415601f, -0.97574095f, - 1.23786391f, -0.05332070f, 0.12142715f, 0.41317442f, 0.15674045f, -0.23609842f, -0.45604039f, -0.60612644f, -0.72063869f, -0.65773356f, -0.45446098f, -0.19856125f, -0.01567566f, 0.31093945f, 0.48567017f, 0.67284050f, - -0.38959317f, 0.48417975f, 0.67846195f, 0.96883427f, 0.97152360f, 0.77479838f, 0.58711345f, 0.71066957f, 0.54730033f, 0.30078955f, -0.00792413f, -0.23889729f, -0.71320215f, -1.17067509f, -1.60334166f, -1.90003738f, - -0.58748774f, -1.47663922f, -1.69196885f, -1.58982061f, -1.20534794f, -0.84425696f, -0.58959522f, -0.30927859f, 0.05320947f, 0.43265601f, 0.78002809f, 1.13478063f, 1.29240277f, 1.39914925f, 1.52607187f, 1.67609674f, - 0.21900175f, 0.90198746f, 1.47152638f, 1.60585024f, 1.28627552f, 0.62955762f, -0.10179136f, -0.53979665f, -0.95849172f, -1.05549774f, -0.93249423f, -0.63224235f, -0.54606380f, -0.47048197f, -0.44721628f, -0.43012290f, - 1.16598857f, -0.44883323f, -0.35990019f, 0.55867022f, 0.76350144f, 0.40336553f, -0.17899520f, -0.32789312f, 0.39266043f, 1.31706823f, 0.14239671f, -1.37351682f, -1.43994906f, -0.44961849f, 0.22694761f, -0.39189263f, - -2.38540927f, -1.62852954f, -0.88269400f, -0.07377225f, 0.58356450f, 0.88990527f, 0.91596948f, 0.64591793f, 0.36616944f, 0.38677852f, 0.46220080f, 0.31194777f, 0.22940934f, 0.16539664f, 0.07914516f, -0.06599966f, - 0.72463355f, -0.52958069f, -1.48068920f, -1.78301927f, -1.84235585f, -1.64970240f, -1.53867955f, -1.38956832f, -1.22397576f, -0.84685537f, -0.05213558f, 1.07240247f, 1.81984926f, 2.69693629f, 2.99963897f, 3.02310102f, - 1.19409909f, 2.68519772f, 1.98964488f, 0.67968388f, -0.01774621f, -0.15701839f, -0.09104235f, 0.24620030f, -0.83163859f, -1.22467182f, -1.23467957f, -1.15083406f, -0.63344301f, -0.72619249f, -0.46989224f, -0.25766714f, - -0.36982280f, 1.17012486f, 0.65527007f, -0.63203416f, -0.41714099f, 0.81639854f, 0.54164978f, 0.77650051f, 0.59880614f, 0.82660687f, -1.04749065f, -0.62911908f, -0.34368981f, -0.45351210f, -0.51314098f, -0.97940604f, - -2.68285677f, -0.85691687f, -0.20235026f, -0.01759520f, -0.00179021f, 0.11451343f, 0.27056934f, 0.20577824f, -0.23029364f, 0.11388472f, -0.05166620f, 0.07283122f, 0.56553984f, 0.81068091f, 1.04931803f, 0.84035365f, - -1.52932955f, -1.34785922f, -0.57071683f, -0.20686289f, 0.08155976f, -0.47381873f, -0.77622457f, -0.57310159f, -0.22137986f, 0.13834100f, 0.49481460f, 0.80177416f, 0.88568748f, 1.02957744f, 1.20356068f, 1.06397834f, - 0.85311314f, 1.33739225f, 1.91363915f, 1.93231248f, 2.08304754f, 1.71778606f, 0.86773094f, 0.43475180f, 0.03661492f, -0.61728713f, -1.15699401f, -1.66982248f, -1.98244609f, -2.00151078f, -1.93416224f, -1.81416574f, - 1.60126279f, -0.81833805f, -1.38880039f, -1.40634796f, -1.32149763f, -1.28036492f, -1.07256373f, -0.72500244f, -0.46550137f, -0.10403512f, 0.28677127f, 0.67644278f, 1.00944110f, 1.34460513f, 1.63359356f, 2.03033498f, - -1.12256198f, -1.95155583f, -1.32316561f, -0.63266570f, -0.15627220f, 0.07123786f, 0.13550620f, 0.25890778f, 0.47783453f, 0.57057758f, 0.68332609f, 0.73453078f, 0.66233264f, 0.62861164f, 0.56744294f, 0.39591321f, - 0.06875844f, -0.77557401f, -1.05293353f, -1.03197877f, -0.85111938f, -0.61756528f, -0.16943921f, 0.22208891f, 0.49771452f, 0.66450860f, 0.73241467f, 0.72611275f, 0.63156506f, 0.52604468f, 0.30774149f, 0.12166125f, - 3.80400584f, 1.75988157f, 0.24665703f, -1.24851564f, -1.25633571f, 0.32422259f, 2.13094918f, 0.70439664f, -1.53713254f, -1.71622823f, -1.08819715f, -0.50716458f, -0.74087437f, -0.99402032f, -0.10491345f, 0.22326928f, - -0.65058475f, -0.32678303f, -0.20547132f, -0.11041511f, -0.11848885f, -0.20790889f, -0.31102714f, -0.27474061f, -0.20625644f, -0.08260245f, 0.09887987f, 0.33251986f, 0.41319745f, 0.49892877f, 0.56061378f, 0.59013885f, - -2.39642240f, -0.73872271f, 0.49057636f, 1.16325658f, 0.79747808f, 1.34021740f, 0.82073194f, 1.17831994f, 1.25881141f, 0.84489551f, -0.77511278f, -1.30893620f, -1.25529283f, -0.65601516f, -0.34679935f, -0.41698601f, - -0.54371008f, 0.45990001f, 0.73230478f, 1.41706822f, 1.07142705f, 0.82233755f, -0.15928811f, -0.34139895f, -0.08643862f, -0.24274513f, -0.48172279f, -0.46452865f, -0.44837803f, -0.43356299f, -0.59008965f, -0.71117480f, - -0.36854343f, 1.40608712f, 2.13291678f, 1.80061219f, 1.15989238f, -0.32896337f, -0.86683083f, -0.45937605f, -0.17796119f, -0.40226921f, -0.30363529f, -1.08494615f, -0.97269428f, -0.91102639f, -0.31526836f, -0.30799363f, - 0.16771127f, 1.28284008f, 0.25724837f, -1.11750032f, -1.04368583f, 0.13121741f, 0.10609539f, 0.02437401f, -0.56098948f, -0.38744327f, 0.07855531f, 0.20548373f, 0.06560664f, 0.24342662f, 0.39885137f, 0.14820870f, - 0.20792769f, -0.15663987f, -0.04445993f, 0.27319064f, 0.51281629f, 0.57962552f, 0.54535177f, 0.41567183f, 0.41718141f, 0.20916435f, -0.10574785f, -0.26957618f, -0.44861183f, -0.55143961f, -0.71969549f, -0.86475851f, - -2.53854175f, -2.10301056f, -1.97482174f, -2.12277877f, -1.80824545f, -1.32660134f, -1.25816793f, -0.90711327f, -0.59056817f, -0.05426883f, 0.60446374f, 1.61001048f, 2.40601840f, 3.00689095f, 3.60110855f, 3.45562566f, - 1.07778822f, 2.19172459f, 1.44013405f, 0.27222350f, 0.03173527f, -0.04691321f, 0.06376916f, 0.63907484f, -0.17949007f, 0.10010871f, -0.52495472f, -0.90729516f, -0.89428983f, -1.02410889f, -1.09546364f, -1.14404292f, - 0.76276530f, 1.59524592f, 1.47474021f, 0.18145014f, 0.13550913f, 0.88510912f, 1.03412929f, 1.01111065f, 0.77539585f, 0.20329499f, -1.35508663f, -1.83340559f, -1.40465488f, -1.14514789f, -1.16420913f, -1.15624650f, - -2.56605999f, -0.69575164f, 0.80693890f, 1.72778867f, 2.34339014f, 2.09042055f, 1.74382199f, 1.18476481f, 0.71416221f, 0.16808900f, -0.19808303f, -0.77842890f, -1.40866559f, -1.73499872f, -1.76586854f, -1.63151971f, - -0.32618212f, -2.76955063f, -2.78043449f, 0.51956703f, 4.34383806f, 1.88716237f, 4.47289205f, -0.68129863f, -1.52511041f, -1.32636741f, 0.65997777f, -0.52682311f, -0.69581956f, -0.43799624f, -0.50098243f, -0.31287245f, - 1.11744895f, 0.76474262f, 0.68913317f, 0.77356058f, 0.73021025f, 0.55480731f, 0.41334472f, 0.23384124f, 0.00040865f, -0.18384701f, -0.30336471f, -0.46628578f, -0.73968976f, -1.02792872f, -1.19473003f, -1.36165137f, - -1.09856438f, -2.65937422f, -2.23447552f, -2.36127808f, -1.92601400f, -1.29606162f, -0.86847602f, -0.41112389f, 0.27059515f, 0.62653494f, 1.25539083f, 2.16718498f, 2.40401093f, 1.97246907f, 1.87623832f, 2.28294385f, - -2.23812017f, -3.37112518f, -3.06489410f, -2.44639779f, -1.77205118f, -0.96847500f, 3.20788062f, 2.74986128f, 2.48376367f, 3.58855607f, 1.46558359f, 0.58208141f, 0.58647621f, -0.03336968f, -0.01161197f, -0.75815742f, - -3.34068874f, -3.31330139f, -3.27624195f, -3.18776773f, -2.60176738f, -1.35466356f, -0.47112724f, 0.80847853f, 1.80958348f, 2.21285031f, 2.26554713f, 2.76880679f, 2.60017886f, 2.04062204f, 1.67575322f, 1.36373732f, - 0.04677635f, 1.13691098f, 1.30914680f, 0.25672818f, 0.15799852f, 0.60568291f, 0.31771628f, 0.07597951f, -0.26589647f, -0.54972118f, -0.86844552f, -0.61094603f, -0.47072310f, -0.40511943f, -0.38309528f, -0.35299238f, - 0.22528620f, 0.31743905f, 0.31483553f, 0.17720192f, 0.16231355f, -0.06831057f, -0.29693139f, -0.45560458f, -0.21127731f, -0.08624191f, -0.20781580f, -0.12232125f, 0.08133224f, 0.09984234f, 0.03187445f, 0.03837752f, - 0.45404525f, 1.31244734f, 1.09193858f, 0.46595512f, 0.31516414f, -0.08250116f, -0.64154502f, -0.86897307f, -0.92275973f, -0.84086567f, -0.63886704f, -0.14652849f, 0.08165072f, 0.18249933f, 0.18288233f, 0.05545734f, - -2.78701578f, -2.31409561f, -1.68556203f, -1.40144529f, -0.74842449f, -0.07375189f, -0.20211385f, 0.09260002f, 0.29898930f, 0.66465229f, 0.75558861f, 0.96729187f, 1.14177838f, 1.55174084f, 1.99705535f, 1.74271247f, - -0.10464683f, -0.94242352f, -0.57955843f, 1.29762166f, 1.68516688f, 1.09852539f, 0.72099378f, 0.51323036f, -0.24285175f, -0.55888513f, -0.50577021f, -0.46366004f, -0.55836815f, -0.58550721f, -0.50078205f, -0.27308479f, - 3.45286440f, 0.59611628f, -0.69351346f, -1.14674518f, -1.07854543f, -0.89938730f, -0.76263547f, -0.52068670f, -0.36216337f, -0.17157688f, -0.01447939f, 0.15778389f, 0.27944020f, 0.35739675f, 0.34083744f, 0.46529411f, - -1.28927442f, 0.10726691f, 0.86158650f, 0.06273348f, -0.04085696f, 1.13928101f, 0.37886132f, 0.13576595f, -0.53530704f, -0.37566277f, -0.10613359f, -0.03059598f, -0.04857175f, -0.00612681f, 0.00516239f, -0.25812835f, - 2.89076531f, -0.04664344f, -1.93237643f, -2.19996964f, -1.86412035f, -1.18315371f, -1.10120931f, -1.31680378f, -1.30399765f, -1.28669610f, -0.94489947f, -0.60614659f, 1.58599312f, 0.95842154f, 2.94815038f, 5.40268579f, - 3.83455417f, 3.13869337f, 1.72510455f, 1.17236146f, 0.33356711f, 0.11348813f, -0.29704182f, -1.13829975f, -1.48383443f, -1.43388842f, -1.35163818f, -1.16938088f, -1.02627819f, -0.92590386f, -0.82058768f, -0.67091549f, - -0.93172509f, 0.85237993f, 1.34276319f, 0.25174685f, -0.79705618f, -0.63895111f, 0.21118680f, 0.97143052f, 0.70458966f, -0.18635616f, -0.52911893f, -1.85150883f, -0.43982599f, 0.04075634f, 0.50586277f, 0.49382650f, - -3.79516923f, -3.31533743f, -1.55672619f, 0.02918112f, 0.69887327f, 0.58481500f, 1.07030510f, 1.26562384f, 1.20349632f, 1.07269840f, 0.89773042f, 0.88137053f, 0.60964812f, 0.28884498f, 0.12262285f, -0.05797732f, - -0.08660073f, -3.36745835f, -3.82012977f, -2.75147711f, -0.36352096f, 0.85747874f, 1.11140604f, 0.65593665f, 0.35792228f, 0.54619342f, 0.99489751f, 1.28924616f, 0.96663509f, 1.40602119f, 1.12645860f, 1.07699149f, - 1.92634136f, 2.07569243f, 1.90024169f, 1.55333140f, 1.00662166f, 0.59662392f, 0.41735113f, 0.03712017f, -0.30033462f, -0.70147399f, -1.26150322f, -1.36946469f, -1.49306813f, -1.53593901f, -1.47859712f, -1.37294294f, - 0.41088895f, -0.68758389f, -0.85837881f, -0.86844724f, -0.85475992f, -0.88373397f, -0.82636157f, -0.54233624f, -0.33497780f, -0.06884329f, 0.24209832f, 0.60199869f, 0.83678079f, 1.05727685f, 1.27867768f, 1.49770152f, - -0.45442780f, -0.39381771f, -0.35575987f, -0.28279611f, -0.03460671f, 0.02188475f, -0.06207990f, -0.02068513f, 0.24104453f, 0.35743869f, 0.26392307f, 0.33209979f, 0.34550175f, 0.24362296f, 0.00439669f, -0.20573886f, - -1.38047831f, 0.78167658f, 0.42055729f, -0.93786054f, -1.72548724f, -1.52410071f, -0.47028251f, 0.81491117f, 0.82382622f, 0.46806997f, 0.95867097f, 0.52433344f, -0.02522016f, 0.39885676f, 0.61128096f, 0.26124617f, - 1.92925285f, 1.70790963f, 1.15526536f, 0.66461298f, 0.67490541f, 0.23892474f, -0.12861693f, -0.33635752f, -0.52286346f, -0.56868795f, -0.86695874f, -0.88842939f, -0.86631615f, -0.80495760f, -0.73812023f, -0.64956301f, - -0.46329214f, 0.55823622f, 0.34966614f, -0.14855330f, -0.35757896f, -0.52459469f, -0.85251369f, -0.95064429f, -0.99468342f, -0.76192580f, -0.41419015f, 0.12436151f, 0.64925405f, 1.13684199f, 1.33630964f, 1.31330685f, - 0.86356450f, 0.34381018f, -0.02085849f, 1.83539444f, 2.32518759f, 1.67398143f, 1.25867313f, 1.20615444f, 0.52697956f, -0.09144588f, -0.76159106f, -1.51187022f, -1.92351238f, -1.95050372f, -1.91438733f, -1.85957587f, - 1.24350337f, 2.40332737f, 1.88241131f, 1.35749721f, -0.42200494f, -1.44428015f, -1.39178301f, -0.93577948f, -0.61036359f, -0.51298915f, -0.79745508f, 0.00259692f, 0.20231677f, -0.31281818f, -0.31072767f, -0.35345154f, - -1.27391584f, 0.23665237f, 1.44085187f, 2.06602253f, 1.71605896f, 0.13376293f, -0.37509412f, 0.40922525f, 0.84118074f, 0.94717998f, -0.77859633f, -1.07717911f, -1.15385313f, -1.14774662f, -0.82654451f, -1.15800495f, - 1.30848084f, 0.08937934f, -0.37852967f, -0.65194579f, -0.75067573f, -0.79649158f, -0.77379985f, -0.60797455f, -0.51295495f, -0.32714998f, -0.08812522f, 0.24492207f, 0.48331843f, 0.72894883f, 0.89967800f, 1.13292004f, - -1.59837663f, -0.80221740f, -0.23176726f, 0.53351299f, 0.66646844f, 0.70631763f, 0.72180374f, 0.68847102f, 0.63073539f, 0.46683184f, 0.29870291f, 0.24285644f, -0.04345483f, -0.36903735f, -0.77735195f, -1.13349493f, - -3.27008180f, -3.34427840f, -3.19628867f, -2.98677397f, -2.40944350f, -1.63513906f, -1.40569428f, -0.88190894f, -0.25273952f, 0.84351501f, 1.96278949f, 2.92570176f, 3.17223429f, 3.47899460f, 3.70716828f, 3.29194486f, - 2.58466208f, 2.01534437f, 1.28252767f, 0.44865967f, -0.33100837f, -0.81011259f, -1.06701187f, -1.12743988f, -1.21505758f, -0.99337144f, -0.66853937f, -0.46093443f, -0.22132067f, 0.00996599f, 0.24481197f, 0.30882455f, - -0.62864502f, 1.04984327f, 1.56877053f, 0.77975000f, 0.01037804f, 0.92352492f, 1.12297462f, 0.76284403f, -0.16106015f, -0.21398417f, -0.62673537f, -1.68917053f, -1.60748063f, -0.79116243f, -0.06290217f, -0.43694470f -}; -const float ivas_sns_cdbk_tcx20_stage2[ 64 * 16 ] = { - -0.14487037f, 0.32346300f, 0.29798679f, -0.52393127f, -0.25671033f, 0.85717754f, -0.09030235f, -0.41110330f, -0.32938564f, -0.36580017f, -0.13142117f, -0.06404494f, 0.10671000f, 0.18731030f, 0.26606878f, 0.27885301f, - 0.52707061f, 0.35016312f, 0.54090507f, 0.82023896f, 0.46675870f, -0.60012182f, -0.76783382f, -0.39198749f, -0.17916696f, -0.17307722f, -0.10507731f, -0.09327542f, -0.12176361f, -0.12715624f, -0.11980175f, -0.02587481f, - -0.71420988f, -0.65927011f, -0.35007906f, -0.01478187f, 0.15375095f, 0.11149616f, 0.08819131f, 0.11537168f, 0.18041243f, 0.28846009f, 0.61920238f, 0.78709602f, 0.49945852f, -0.03863360f, -0.42339912f, -0.64306599f, - -0.81717379f, 0.06122156f, 0.05823003f, 0.10166328f, 0.27940347f, 0.24198679f, 0.13036228f, 0.07594383f, 0.21865219f, 0.19571948f, 0.11860502f, 0.04836758f, -0.03211315f, -0.14926357f, -0.23274285f, -0.29886216f, - -0.68529960f, -0.60305257f, -0.55080408f, -0.31252031f, 0.02732556f, 0.58303818f, 0.67638004f, 0.45008305f, 0.44400610f, 0.24064307f, 0.01598330f, -0.02342002f, -0.05864021f, -0.08903495f, -0.06326312f, -0.05142446f, - 0.89939472f, 0.31232066f, -0.27153630f, -0.52911639f, -0.58173141f, -0.63610440f, -0.61689761f, -0.43424024f, -0.23705022f, -0.00031150f, 0.15363335f, 0.19705513f, 0.25413198f, 0.35648787f, 0.53897823f, 0.59498626f, - 0.29798691f, 0.08114488f, 0.25286730f, -0.14155021f, -0.55163298f, -0.91534601f, -0.57551866f, 0.56064647f, 0.80731933f, -0.19474923f, -0.20126966f, 0.06517040f, 0.06866947f, 0.09059095f, 0.13444783f, 0.22122305f, - -0.19554741f, -1.08027678f, -0.01182563f, 0.56474090f, 0.41996725f, 0.08237738f, 0.08022205f, 0.10168343f, 0.06794579f, -0.08037661f, -0.20594204f, -0.13493371f, -0.05614077f, 0.03317273f, 0.14216415f, 0.27276933f, - -0.23050462f, -0.75246507f, -0.69868854f, -0.48346371f, -0.40917848f, -0.36594095f, -0.07600729f, 0.12198463f, 0.35806061f, 0.42664099f, 0.36253664f, 0.28721164f, 0.28501428f, 0.31580309f, 0.39290382f, 0.46609294f, - -0.67820482f, -0.00872112f, 0.40025028f, 0.70327670f, 0.42493234f, -0.57698003f, -0.97061329f, -0.62910745f, -0.24969320f, -0.09521511f, 0.04433478f, 0.16549806f, 0.17050527f, 0.26401941f, 0.52200672f, 0.51371134f, - 1.15515222f, -0.29885937f, -0.45759359f, -0.16519237f, -0.04117621f, -0.07252194f, -0.02430911f, -0.04766781f, -0.02328497f, -0.05048145f, -0.05153410f, -0.06528098f, -0.04522347f, -0.01163017f, 0.03517569f, 0.16442759f, - 1.26308471f, 0.47631737f, 0.20702857f, 0.04885555f, 0.01820924f, -0.04929548f, -0.00848071f, -0.02414509f, -0.04549576f, -0.16589601f, -0.22069993f, -0.30533811f, -0.30611208f, -0.31300078f, -0.32636395f, -0.24866742f, - -0.64451248f, -0.26649107f, 0.11640199f, 0.09050698f, -0.25875099f, -0.58989672f, -0.18201608f, 0.56293201f, 0.69520096f, 0.55973258f, 0.03137457f, -0.53909145f, -0.42689946f, 0.14106379f, 0.40632407f, 0.30412130f, - 0.15140746f, 0.14125954f, -0.08456824f, -0.13219101f, 0.06042009f, 0.33575532f, 0.35779441f, 0.19239547f, -0.11511443f, -0.41291307f, -0.06796502f, 0.62883409f, 0.54647417f, -0.03056743f, -0.64102233f, -0.92999908f, - -0.20214866f, 0.33358969f, 0.69126333f, 0.34454972f, 0.05105591f, 0.16949466f, 0.15791728f, -0.06633089f, -0.02155995f, 0.20242418f, 0.31712646f, 0.04823767f, -0.30694375f, -0.55917643f, -0.61612875f, -0.54337052f, - 0.11822897f, -0.04039421f, 0.70914148f, 0.55687588f, 0.06691609f, -0.01671241f, 0.38831368f, 0.48498674f, 0.23982281f, -0.11333950f, -0.44950589f, -0.59143612f, -0.55439378f, -0.42178388f, -0.28206333f, -0.09465644f, - -0.14336086f, 0.05638831f, -0.01441642f, -0.42382782f, -0.38698654f, 0.24817171f, 0.77752198f, 0.25906019f, -0.48986881f, -0.97798705f, -0.62796677f, 0.10790457f, 0.39301453f, 0.49075265f, 0.45648021f, 0.27511976f, - 0.57860103f, -0.01948333f, -0.01550826f, 0.52219942f, 0.68939814f, 0.35139876f, -0.01666617f, -0.21673535f, -0.47658403f, -0.68042929f, -0.65034996f, -0.34910948f, -0.19976833f, -0.03318456f, 0.13815711f, 0.37806438f, - 0.37246276f, -0.08878862f, -0.58662283f, -0.58539914f, -0.25552364f, 0.03268078f, 0.23525090f, 0.52779846f, 0.89804404f, 0.85582758f, 0.41881201f, -0.00512611f, -0.24135956f, -0.44973199f, -0.57601809f, -0.55230687f, - -0.32189259f, -0.20721675f, -0.09742343f, -0.05501794f, -0.02597120f, -0.10341441f, -0.07152803f, 0.00321003f, 0.14348106f, 0.13459909f, 0.13417173f, 0.08360042f, 0.09862647f, 0.09372765f, 0.07551569f, 0.11553216f, - 0.23782332f, 0.49257946f, 0.16314649f, -0.21082378f, -0.15908458f, 0.19948076f, 0.80829724f, 0.74048420f, 0.31470714f, -0.11736674f, -0.41702302f, -0.38958905f, -0.30642209f, -0.41287171f, -0.48993898f, -0.45339847f, - -0.64636094f, -0.04385833f, 0.14399510f, -0.43842603f, -0.73607781f, -0.26594508f, 0.62882301f, 0.35001150f, 0.28828962f, 0.02070640f, 0.04274640f, 0.10066767f, 0.01277906f, 0.02855391f, 0.23224313f, 0.28185233f, - 0.47046627f, 0.94887935f, 0.24713839f, -0.23737461f, -0.23876072f, -0.07439994f, -0.09495447f, -0.13384673f, -0.10919962f, 0.11561096f, 0.34750397f, 0.22863541f, -0.07880257f, -0.39830725f, -0.49574485f, -0.49684374f, - -0.40909559f, -0.18655327f, 0.13106838f, 0.38799987f, 0.49861722f, 0.83281701f, 0.69114756f, 0.20069371f, -0.12792677f, -0.35587040f, -0.42614275f, -0.34440943f, -0.28876141f, -0.27425834f, -0.22103645f, -0.10828931f, - -1.18999475f, -0.19958884f, -0.14983643f, 0.01470880f, -0.02795637f, -0.14641321f, -0.31784893f, -0.46245588f, -0.18208072f, 0.19701783f, 0.59261157f, 0.51921614f, 0.35016513f, 0.38054069f, 0.38692917f, 0.23498570f, - 0.09958109f, -0.26177154f, -0.09010091f, 0.31898761f, 0.75461690f, 0.12276914f, -0.81281416f, -0.78184322f, -0.24358470f, 0.82758568f, 0.36579631f, -0.14176577f, -0.08975069f, -0.12652615f, 0.12350150f, -0.06468093f, - 0.08899403f, -0.19355344f, -0.19424186f, -0.07670148f, -0.01129831f, -0.12185644f, -0.22497393f, -0.43014230f, -0.38336267f, -0.26093033f, -0.06975312f, 0.14762185f, 0.34014822f, 0.41134546f, 0.45027987f, 0.52842445f, - 0.21499436f, 0.50168679f, 0.45504898f, 0.25411634f, -0.47901658f, -0.45717782f, -0.14093183f, 0.17265389f, 0.11115764f, -0.41915721f, -0.31922857f, 0.22345448f, 0.48226916f, 0.07143490f, -0.26830399f, -0.40300051f, - 0.12687524f, 0.05171471f, -0.07690770f, 0.26252085f, 0.27712144f, 0.23952572f, 0.03309903f, 0.01500629f, 0.06484326f, 0.06571283f, -0.16817282f, -0.63246792f, -0.98935090f, -0.44804742f, 0.39837118f, 0.78015619f, - -0.27518648f, -0.48420415f, -0.24141667f, 0.57134912f, 0.65714603f, 0.42293616f, -0.10408493f, -0.38791089f, -0.61076554f, -0.57292363f, -0.09457207f, 0.54285737f, 0.61562883f, 0.23132651f, -0.13569709f, -0.13448269f, - -0.44830103f, 0.90540056f, 0.00072142f, -0.39226111f, -0.46186317f, -0.43645456f, -0.37826714f, -0.24360826f, -0.04123674f, 0.14260549f, 0.22801709f, 0.22668095f, 0.21516528f, 0.17002730f, 0.24853909f, 0.26483493f, - 0.82582984f, -0.18396730f, -0.69977925f, -0.51672827f, 0.33935958f, 1.15275754f, 0.74107352f, 0.01951258f, -0.25558033f, -0.43304939f, -0.34099848f, -0.20947442f, -0.14398117f, -0.10182217f, -0.18238069f, -0.01077166f, - -0.05956926f, -0.06776164f, 0.03443600f, -0.24779379f, -0.39446507f, 0.19355305f, 0.85153169f, -0.02976018f, -0.70253585f, 0.23290277f, 0.42513902f, -0.02301892f, -0.00892405f, -0.00056059f, -0.02586520f, -0.17730813f, - -0.10475355f, -0.12240226f, 0.23596905f, 0.84034179f, 1.10352903f, -0.04380181f, -0.55005573f, -0.07517667f, 0.38548284f, 0.23177362f, -0.44010180f, -0.37858708f, -0.16160512f, -0.18482124f, -0.37409253f, -0.36169852f, - -0.66969186f, 0.05371874f, -0.03936352f, -0.29928720f, -0.41624260f, -0.41299981f, -0.08577629f, 0.31675281f, 0.52331795f, 0.62411866f, 0.60734652f, 0.31853824f, 0.22382100f, -0.00426635f, -0.24809569f, -0.49189053f, - 0.42558925f, -0.08740923f, -0.12413315f, 0.07160194f, 0.21621681f, 0.18737853f, 0.20692231f, 0.06594840f, 0.06316038f, -0.01455973f, -0.09736051f, -0.19278266f, -0.20576965f, -0.20479396f, -0.19511934f, -0.11488934f, - 0.36293062f, -0.57831316f, -0.52476107f, -0.18291608f, 0.05956296f, 0.17827873f, 0.56052629f, 0.90619512f, 0.33375509f, -0.31016948f, -0.35518802f, -0.18057272f, -0.07051228f, -0.11858827f, -0.10671145f, 0.02648366f, - -0.47233802f, -0.10696118f, -0.17385597f, -0.31283671f, -0.54242892f, -0.48720345f, -0.41705631f, -0.17742297f, 0.04283104f, -0.05195671f, -0.10468624f, -0.03852503f, 0.06812391f, 0.59475499f, 1.17499043f, 1.00457125f, - 0.33658160f, 0.35011487f, 0.45187233f, -0.02492518f, -0.55350758f, -0.59303580f, -0.31109052f, 0.13779098f, 0.55888251f, 0.84708841f, 0.47270673f, -0.43127783f, -0.54032183f, -0.34904867f, -0.17752966f, -0.17430036f, - 0.44845114f, -0.49717161f, -0.47780018f, 0.51116217f, 0.25239415f, -0.46774617f, -0.37660723f, -0.11699702f, 0.09542037f, -0.01250943f, 0.20050057f, 0.40176439f, 0.32380431f, 0.15297561f, -0.14232876f, -0.29531216f, - 0.58997624f, 0.33423174f, -0.49272429f, -0.77991590f, -0.63691990f, -0.16375248f, 0.20892044f, 0.18843065f, 0.17599488f, 0.14061586f, 0.15322675f, 0.18367503f, 0.13457790f, 0.01264192f, -0.03498125f, -0.01399761f, - 0.11883889f, -0.17653462f, -0.07102121f, -0.16170325f, -0.31396815f, -0.45007863f, -0.66549732f, -0.56194237f, -0.04368741f, 0.74826150f, 1.05944395f, 0.45896665f, 0.13555009f, 0.05510292f, 0.02009383f, -0.15182464f, - 0.07240272f, -0.58533213f, -0.60637060f, -0.30890106f, -0.02128210f, 0.09681284f, 0.16938452f, 0.09862013f, 0.19046479f, 0.19100352f, 0.26416808f, 0.26993362f, 0.23648423f, 0.09763257f, -0.04637479f, -0.11864633f, - 1.00841842f, 0.48487093f, -0.06341281f, -0.08270476f, 0.05744570f, 0.01750478f, -0.34725114f, -0.56805040f, -0.46574885f, -0.30005483f, -0.09520550f, 0.06924440f, 0.18895007f, 0.12019539f, -0.01497133f, -0.00923003f, - -0.11951983f, -0.09981565f, -0.02725746f, -0.30082482f, 0.20230754f, 0.13666509f, -0.43246623f, 0.35244293f, 0.18119722f, 1.02992782f, -0.88125774f, 0.02331986f, 0.31122766f, -0.27229286f, 0.03194423f, -0.13559793f, - 0.30038871f, 0.08947897f, -0.39317595f, -0.46247446f, -0.42411556f, -0.42404287f, -0.31600225f, -0.23970776f, -0.22563637f, -0.14999339f, 0.24040805f, 0.88216954f, 0.90562440f, 0.49896646f, -0.00532430f, -0.27656328f, - -1.03852817f, -0.43685628f, 0.97570249f, 0.40073542f, -0.16567993f, -0.21536660f, 0.12504130f, 0.05185039f, 0.10097880f, 0.11493671f, 0.11604106f, 0.09278894f, 0.06924125f, -0.04393053f, -0.08352009f, -0.06343456f, - 0.63612744f, 0.65518210f, 0.45922163f, 0.32046049f, 0.42927283f, 0.43905062f, 0.21015594f, -0.14220340f, -0.37678678f, -0.46507109f, -0.45569496f, -0.37686899f, -0.32849396f, -0.33044372f, -0.35635326f, -0.31755504f, - 0.41636915f, 0.62005731f, 0.06636205f, -0.59228655f, 0.33311937f, 0.75787668f, 0.00941011f, -0.45161756f, -0.65103077f, -1.10958672f, -1.02188609f, -0.67703448f, 0.33622739f, 1.61684726f, 0.14432118f, 0.20285196f, - -0.54161629f, 0.29651460f, 0.48390239f, 0.54479388f, 0.45539891f, 0.27213590f, -0.06343843f, -0.24873747f, -0.31972562f, -0.38332671f, -0.30589718f, -0.21560606f, -0.11351916f, -0.04853252f, 0.04142231f, 0.14623145f, - -0.21538006f, -0.50670918f, -0.02385513f, 0.35315677f, 0.10824776f, 0.03860134f, 0.48712274f, 0.49283326f, 0.39503514f, 0.30292369f, 0.35920722f, 0.11075640f, -0.28306221f, -0.52442456f, -0.56662428f, -0.52782887f, - 0.24246654f, 0.15496835f, 0.07742345f, -0.00816546f, -0.02214009f, -0.12207666f, -0.09321134f, -0.14020839f, -0.02096415f, 0.02403039f, -0.00227972f, -0.07257466f, -0.06385085f, -0.03120190f, -0.01017645f, 0.08796095f, - 0.55718201f, 0.39817200f, 0.01585643f, -0.42726280f, -0.49946467f, -0.23926890f, 0.12647764f, 0.16539668f, -0.09322228f, -0.28903514f, -0.36248464f, -0.37621498f, -0.21830881f, 0.12546719f, 0.47757747f, 0.63913280f, - 0.07202509f, -0.30917825f, 0.26796130f, 0.18122649f, -0.74238320f, -0.65070972f, 0.20487278f, -0.03910861f, -0.13788223f, -0.13927704f, 0.30951126f, 0.22564689f, 0.18217460f, 0.23128586f, 0.20552209f, 0.13831273f, - 0.81154454f, 0.16848402f, -0.17973760f, -0.10712113f, -0.08562767f, -0.33154566f, -0.24733460f, -0.19259111f, 0.09705231f, 0.36926093f, 0.39058223f, 0.34681425f, 0.16685070f, -0.13716590f, -0.45775544f, -0.61170978f, - -1.33280729f, -0.16122649f, -0.09275794f, 0.58345947f, 0.61239977f, 0.50766167f, 0.06032890f, 0.13414746f, 0.18885722f, 0.13865434f, 0.23772269f, -0.25267260f, -0.54709895f, -0.31230173f, 0.07737009f, 0.15826345f, - -1.08561454f, -0.71787872f, -0.33522393f, 0.09636394f, 0.26521236f, 0.37639836f, 0.31311513f, 0.09537412f, -0.07885832f, -0.23990515f, -0.16502660f, 0.10895014f, 0.26463981f, 0.29732376f, 0.35578048f, 0.44934924f, - -0.29274363f, 0.08361693f, 0.01766194f, -0.22807328f, -0.16950675f, 0.28608384f, 0.00299181f, 0.07025513f, -0.20633117f, 0.48438844f, 0.91263549f, 0.04231580f, -0.66916627f, -0.44689801f, 0.06041835f, 0.05235140f, - 0.18067823f, -0.43833102f, -0.91255750f, -0.38799121f, 0.28155095f, 0.40506215f, 0.07352559f, -0.10582149f, -0.13688260f, -0.20626464f, -0.13280234f, -0.02533342f, 0.03247104f, 0.20876704f, 0.46466759f, 0.69926172f, - 0.51511088f, 0.81421556f, 0.82445640f, 0.01131859f, -0.32041051f, -0.39839079f, -0.43152495f, -0.42594915f, -0.41684800f, -0.38010709f, -0.25091606f, -0.15334343f, -0.03594408f, 0.06862608f, 0.21814936f, 0.36155722f, - -0.74835512f, -0.03907167f, -0.02730968f, 0.01017743f, 0.06598847f, 0.36210429f, 0.29611340f, 0.34006521f, 0.09628113f, -0.15142368f, -0.62878543f, -0.79996695f, -0.45331571f, 0.20593004f, 0.80186308f, 0.66970511f, - -0.25432502f, 0.38418428f, 0.43145928f, 0.30498956f, 0.19189249f, -0.25021553f, -0.53882666f, -0.61584834f, -0.43654724f, -0.03402395f, 0.45760398f, 0.60327277f, 0.53610474f, 0.16098234f, -0.30297334f, -0.63772932f, - -0.42321919f, 0.85086362f, 0.60159420f, 0.08633772f, -0.28445894f, -0.22512885f, 0.23909004f, 0.20046697f, 0.01484137f, -0.11652413f, -0.12017169f, -0.26922922f, -0.26311675f, -0.18921524f, -0.06712212f, -0.03500777f, - 0.58209071f, -0.26533411f, -0.20240535f, 0.27577532f, 0.65478295f, 0.66491349f, 0.41026256f, 0.22123940f, 0.15813271f, 0.07048989f, -0.03133192f, -0.19389440f, -0.34519672f, -0.53017394f, -0.73238212f, -0.73696843f -}; -const float ivas_sns_cdbk_tcx20_stage3[ 32 * 16 ] = { - -0.08443224f, -0.18703635f, -0.02297765f, 0.35108322f, -0.47365404f, 0.60080101f, -0.14560352f, 0.01413276f, 0.01222370f, 0.01369841f, 0.05509108f, 0.03233707f, 0.01187713f, -0.08225931f, -0.08910713f, -0.00617424f, - -0.45134081f, -0.18205893f, -0.21886586f, -0.27082278f, -0.18872267f, -0.08438255f, 0.11808124f, 0.11472340f, 0.08049694f, 0.05868671f, 0.08856118f, 0.10686811f, 0.14792971f, 0.16522330f, 0.21823435f, 0.29738868f, - -0.11328915f, 0.10130429f, -0.14943437f, 0.15645630f, 0.63935450f, 0.37821704f, -0.21310801f, -0.24867988f, -0.01659672f, 0.03328198f, -0.08180066f, -0.05657044f, 0.10906149f, 0.03196869f, -0.22137928f, -0.34878580f, - 0.05458665f, -0.05919364f, -0.13460386f, 0.10683925f, 0.02486665f, -0.03996090f, -0.07800776f, -0.00646458f, -0.21155480f, -0.27387617f, 0.02240932f, 0.70908553f, -0.66258796f, -0.11916859f, 0.46104817f, 0.20658280f, - -0.18236160f, -0.42556974f, -0.01518583f, 0.40249814f, 0.16028064f, -0.31751965f, -0.32775039f, -0.07115151f, 0.14131570f, 0.25092515f, 0.30150209f, 0.11921413f, 0.03049898f, 0.00963513f, -0.00838672f, -0.06794450f, - 0.43233298f, 0.11411029f, -0.14415844f, -0.34176452f, -0.41588457f, -0.29962161f, 0.10637969f, 0.23407196f, 0.10305969f, -0.00062410f, 0.02900924f, 0.03866877f, 0.08640844f, 0.05154612f, 0.00161694f, 0.00484903f, - -0.21512794f, 0.25425865f, 0.27105566f, -0.05213586f, -0.05906940f, -0.26548344f, -0.44413633f, 0.03920286f, 0.46845996f, 0.41236263f, -0.31903770f, -0.32961136f, 0.22647316f, 0.19335126f, -0.03700087f, -0.14356117f, - 0.21924285f, -0.02083234f, -0.21264229f, -0.32008443f, 0.85787441f, -0.31109029f, -0.11710511f, 0.15258065f, -0.05422604f, 0.04703640f, 0.03138786f, 0.00284139f, -0.14128648f, -0.12246651f, -0.12553053f, 0.11430042f, - -0.06983219f, 0.15566395f, 0.00257636f, -0.43107600f, -0.19146497f, 0.19866667f, 0.23130140f, -0.15042179f, -0.31509935f, -0.19492938f, 0.13173040f, 0.34976123f, 0.35522809f, 0.15128504f, -0.03897684f, -0.18441264f, - 0.03835343f, -0.41781092f, -0.09130119f, 0.23649600f, 0.31864720f, 0.31965077f, 0.31997092f, 0.09379415f, -0.07805132f, -0.17350540f, -0.16066354f, -0.15534991f, -0.10595695f, -0.07769963f, -0.06267573f, -0.00389790f, - -0.06072967f, -0.08529762f, -0.25895528f, -0.11410745f, -0.03994694f, 0.00520744f, 0.13029546f, 0.20924505f, 0.20033325f, 0.00128218f, -0.48912530f, -0.29001748f, 0.59798769f, 0.57708579f, -0.00334114f, -0.37991599f, - 0.67709987f, 0.24479940f, 0.09839041f, 0.09240624f, 0.04874621f, -0.07903978f, -0.10677716f, -0.20070119f, -0.12618873f, -0.06680438f, -0.05551493f, -0.11559282f, -0.11011740f, -0.12021879f, -0.12904082f, -0.05144612f, - -0.24390844f, -0.02971498f, 0.26491058f, 0.32477805f, 0.15268137f, -0.03230336f, -0.09305650f, -0.07114758f, -0.26964124f, -0.44939594f, -0.31245133f, 0.05828219f, 0.30712838f, 0.31280972f, 0.10713241f, -0.02610336f, - 0.19735739f, -0.09060264f, 0.00825537f, -0.36599055f, 0.05585799f, 0.37908316f, -0.38413173f, 0.35027949f, 0.34555851f, -0.34241207f, -0.18091006f, 0.16295794f, 0.08399265f, -0.12258257f, -0.08886776f, -0.00784505f, - 0.18552089f, -0.05448505f, -0.06090343f, 0.28995307f, -0.00222442f, -0.38233148f, -0.18031475f, 0.21268787f, 0.02073848f, -0.18932508f, -0.18523794f, -0.18812600f, -0.12671694f, 0.01228197f, 0.22055935f, 0.42792350f, - 0.12799222f, 0.22968936f, 0.03802711f, -0.14099927f, -0.08635323f, 0.16987494f, 0.35348472f, 0.04505467f, -0.26388915f, -0.34916901f, -0.22942166f, -0.17684250f, -0.08724829f, -0.00054213f, 0.12610262f, 0.24423959f, - -0.08038187f, -0.16879152f, -0.00176772f, 0.35376535f, -0.37011098f, -0.36320739f, 0.66636341f, -0.06773157f, -0.07814045f, -0.04765960f, -0.03365673f, 0.02181851f, 0.03254002f, 0.03483427f, 0.02717800f, 0.07494827f, - -0.34868864f, 0.17040333f, 0.25260784f, 0.10076787f, 0.06839398f, -0.02800665f, -0.06848675f, -0.16826923f, -0.07268923f, 0.01087754f, 0.05460110f, 0.00431011f, 0.03885215f, 0.00975901f, -0.01527130f, -0.00916121f, - 0.18571700f, 0.08336153f, 0.02979922f, -0.39409904f, -0.12098272f, 0.43026379f, -0.26722488f, -0.41282119f, 0.02970150f, 0.49897713f, 0.10843837f, -0.24094187f, -0.08115504f, 0.00006204f, 0.10433840f, 0.04656578f, - 0.00538329f, -0.07750994f, -0.10910098f, 0.04048538f, 0.03334399f, 0.28342260f, 0.14581840f, -0.24746813f, -0.34416074f, 0.06151045f, 0.68745611f, 0.19063398f, -0.23771814f, -0.28316033f, -0.12688702f, -0.02204889f, - -0.60521242f, -0.06124017f, 0.11564466f, 0.07475615f, 0.11824730f, 0.14189819f, 0.27204580f, 0.27978428f, 0.25196977f, 0.13866750f, 0.00205101f, -0.10150602f, -0.11644945f, -0.18929950f, -0.17648802f, -0.14486907f, - 0.06856566f, -0.13844197f, -0.26691240f, -0.18845012f, -0.05126065f, 0.00304429f, 0.11414309f, 0.06950182f, 0.19286717f, 0.29037166f, 0.27053650f, 0.17652627f, 0.09171994f, -0.09001258f, -0.24528745f, -0.29691120f, - -0.13004111f, 0.35130055f, 0.29363124f, -0.18853208f, -0.39468716f, -0.19791109f, -0.04383464f, 0.00894901f, 0.12616722f, 0.23070746f, 0.26441755f, 0.01948829f, -0.23089364f, -0.30363455f, -0.02382649f, 0.21869951f, - 0.11164215f, 0.03116967f, -0.06353187f, 0.16924336f, -0.01461062f, -0.19152070f, 0.03686445f, 0.20477538f, -0.03967336f, -0.32744743f, -0.17088429f, 0.63829176f, 0.35280729f, -0.43549735f, -0.27277762f, -0.02885087f, - -0.30725406f, 0.74701729f, -0.39274145f, 0.04302180f, 0.07483049f, -0.03413902f, 0.09344659f, 0.09169015f, 0.04345559f, -0.04477331f, -0.00176985f, -0.03585142f, -0.03405962f, -0.07575575f, -0.09739054f, -0.06972689f, - 0.28265268f, -0.39222951f, -0.42695953f, -0.10897533f, 0.07424889f, 0.08797478f, 0.00908971f, -0.13637855f, -0.12075776f, -0.04977985f, 0.06395383f, 0.09442120f, 0.15174794f, 0.13939497f, 0.13041070f, 0.20118587f, - -0.06637296f, 0.10778732f, -0.07433513f, -0.03524749f, -0.17212396f, -0.11995773f, 0.04291853f, -0.06480863f, -0.07793575f, 0.16559639f, 0.16476497f, -0.45667097f, -0.18714125f, 0.71725922f, 0.42534599f, -0.36907862f, - 0.15419735f, 0.13519411f, 0.37767798f, 0.23431801f, -0.02281061f, -0.05079690f, 0.14170781f, 0.09854410f, 0.01337290f, -0.01979078f, -0.01296254f, -0.03126860f, -0.07566643f, -0.16863998f, -0.32784959f, -0.44522679f, - -0.24074183f, 0.08320241f, 0.21818929f, 0.23760260f, 0.19352113f, 0.17458723f, -0.14563963f, -0.24861723f, -0.22656746f, -0.05362363f, 0.00368164f, -0.25389215f, -0.34172497f, -0.16702059f, 0.23332537f, 0.53371777f, - 0.03933551f, -0.61436501f, 0.74997308f, -0.14605678f, -0.06355008f, -0.07845237f, 0.03677743f, -0.01381658f, 0.03542562f, 0.01940321f, 0.04277388f, 0.01439240f, 0.05417023f, -0.03165523f, -0.04388511f, -0.00047013f, - 0.19660049f, -0.03582845f, -0.21224511f, -0.09633821f, 0.02140122f, 0.06690902f, 0.14753796f, 0.23491232f, 0.40075372f, 0.33318442f, -0.21453422f, -0.44835823f, -0.31995723f, -0.14770359f, -0.02720588f, 0.10087175f, - 0.22313452f, 0.23174662f, 0.13588360f, -0.01979092f, -0.17483898f, -0.36387601f, -0.35104947f, -0.34545228f, -0.17072761f, 0.01654692f, 0.12560464f, 0.14070090f, 0.18025650f, 0.13082045f, 0.10588357f, 0.13515746f -}; -const float ivas_sns_cdbk_tcx20_stage4[ 32 * 16 ] = { - -0.01178932f, -0.08216325f, 0.00009975f, 0.07861932f, 0.10639093f, 0.10607783f, -0.11972309f, 0.01910820f, -0.05635505f, 0.02765448f, -0.08840101f, -0.09623400f, 0.34917350f, -0.19835894f, -0.46938213f, 0.43528268f, - -0.08636054f, 0.13923351f, -0.15932705f, -0.10849641f, -0.02303533f, -0.23968519f, -0.02192257f, 0.50128910f, 0.27139459f, -0.07262939f, -0.06622134f, -0.01073419f, -0.04308095f, -0.05629457f, -0.03175020f, 0.00762044f, - 0.24815560f, 0.14657944f, 0.07172491f, 0.02302382f, 0.01991109f, -0.10204469f, -0.24960876f, -0.07085594f, 0.12223419f, 0.06999865f, 0.10986748f, 0.13492392f, 0.05865008f, -0.10366906f, -0.23987720f, -0.23901358f, - -0.15438243f, -0.04559005f, 0.16760111f, 0.26289859f, 0.24002732f, 0.06333052f, -0.04293731f, 0.16191749f, 0.12993586f, -0.15916904f, -0.24049436f, -0.13688115f, -0.13764233f, -0.11140102f, -0.01899323f, 0.02178000f, - -0.09362153f, -0.06475772f, -0.01949932f, -0.04249530f, -0.05109865f, 0.07410551f, -0.01006480f, 0.04753318f, -0.02781557f, 0.07745214f, 0.06146913f, -0.16546467f, -0.41512457f, 0.10097607f, 0.66727071f, -0.13886467f, - -0.07368760f, 0.36035427f, 0.21605884f, -0.01438276f, -0.11360433f, -0.05644934f, 0.03063785f, -0.05006328f, -0.07521149f, -0.13595728f, -0.01277458f, 0.04492285f, 0.01200858f, -0.04176021f, -0.04570247f, -0.04438907f, - 0.09516185f, -0.01929782f, 0.00494854f, -0.09763747f, -0.07344490f, 0.12994610f, 0.48094184f, -0.48192847f, -0.05573409f, 0.26426544f, -0.27655157f, -0.08642901f, 0.08435032f, 0.13304512f, -0.05782422f, -0.04381160f, - -0.09313450f, 0.05540574f, 0.01201341f, -0.06726039f, -0.10451812f, 0.02669040f, -0.05484815f, 0.07449424f, -0.34344135f, 0.56109258f, -0.27428709f, -0.09301413f, 0.41965904f, -0.13902794f, 0.18473846f, -0.16456202f, - 0.08693855f, 0.01453042f, -0.11107078f, 0.06241724f, 0.10204906f, -0.07064796f, -0.13846291f, 0.08293345f, -0.10757619f, -0.22863306f, 0.03213009f, 0.19644778f, 0.16452805f, 0.34110370f, 0.09006750f, -0.51675482f, - -0.18423905f, 0.01384230f, 0.26714303f, -0.40934167f, 0.39275996f, -0.01237613f, -0.25919307f, -0.08619564f, -0.04046283f, -0.01126873f, -0.01664395f, 0.01744563f, 0.10282249f, 0.09607820f, 0.04998616f, 0.07964328f, - -0.02274322f, 0.17908332f, -0.02788687f, 0.00807798f, -0.14435131f, -0.02676761f, 0.10369709f, -0.23851723f, 0.57714821f, -0.24897036f, -0.18048434f, 0.02001729f, -0.12740088f, -0.09982727f, 0.00840552f, 0.22051971f, - 0.13771932f, -0.17471600f, 0.18563016f, 0.18284665f, 0.11307352f, 0.20075992f, -0.03584593f, -0.25044388f, -0.20529947f, -0.11730357f, 0.05388263f, 0.08544750f, 0.04416102f, -0.02585125f, -0.09278592f, -0.10127474f, - 0.08834726f, 0.11313223f, -0.16483942f, -0.28318232f, -0.23943962f, -0.10440104f, -0.03978272f, -0.07375089f, -0.00562577f, 0.02329676f, 0.14600550f, 0.17681015f, 0.14410817f, 0.09264978f, 0.05695417f, 0.06971767f, - 0.14265864f, -0.42999794f, -0.17884255f, -0.08097949f, -0.04680661f, -0.04620171f, 0.02411542f, 0.04266824f, 0.15894248f, 0.24773695f, 0.15192868f, -0.01414995f, -0.13102813f, -0.07567236f, 0.04332535f, 0.19230306f, - -0.21142675f, -0.18455704f, -0.13706857f, -0.09760966f, -0.00844340f, 0.14865602f, 0.20607338f, 0.12012844f, -0.00914924f, -0.14368559f, -0.00265126f, 0.10043210f, 0.09154737f, 0.03443178f, 0.02422327f, 0.06909914f, - 0.18450361f, 0.00435351f, 0.27864126f, 0.17704943f, -0.20479796f, -0.29862599f, -0.17089168f, -0.09881143f, 0.04783000f, 0.14260548f, -0.02349078f, -0.20487241f, -0.13745683f, 0.05546335f, 0.10019847f, 0.14830206f, - 0.10317471f, -0.16998911f, 0.09734737f, 0.06796242f, -0.01161580f, -0.18371589f, -0.08936939f, 0.07107444f, -0.09565406f, -0.23557438f, 0.42834066f, 0.31175412f, -0.11511657f, -0.28572113f, -0.06889545f, 0.17599802f, - 0.11312034f, 0.08666296f, 0.02086535f, 0.12656018f, -0.12520471f, 0.04702581f, 0.39113807f, 0.09775371f, -0.00094471f, 0.08191930f, 0.07626151f, -0.13554986f, -0.29383511f, -0.25857022f, -0.15738811f, -0.06981449f, - 0.07590872f, 0.10290609f, -0.14618577f, 0.13491216f, 0.33869686f, -0.04072549f, -0.30046897f, -0.07243681f, 0.07180300f, 0.23060158f, 0.21642544f, -0.13575731f, -0.31781641f, -0.19431392f, -0.02233810f, 0.05878895f, - -0.11105764f, -0.05437616f, -0.00379085f, 0.08951467f, 0.39169243f, -0.38233560f, 0.34492699f, -0.09947370f, -0.08648526f, -0.03340088f, -0.02593483f, 0.11572014f, 0.01899877f, -0.03965890f, -0.06421047f, -0.06012863f, - -0.01630162f, 0.17784241f, -0.29989778f, 0.10469439f, 0.14861228f, -0.00722859f, -0.10711587f, -0.18435390f, -0.22539717f, -0.21441284f, 0.00336383f, 0.04362196f, 0.03914130f, 0.10650815f, 0.16959322f, 0.26133027f, - -0.45700261f, 0.07282251f, 0.00944859f, 0.03968330f, -0.02457975f, 0.11148291f, -0.02109853f, -0.18417192f, 0.02503845f, 0.10733751f, 0.21565042f, 0.09727523f, 0.00466877f, -0.01572810f, -0.00245341f, 0.02162664f, - 0.01471341f, -0.09796256f, 0.37685840f, -0.27373841f, -0.22809280f, 0.20207443f, 0.12508033f, 0.16172866f, 0.15442152f, -0.03971152f, -0.03731565f, 0.04320052f, -0.02493079f, -0.08894232f, -0.13155708f, -0.15582618f, - -0.04063466f, 0.14873431f, 0.10076527f, -0.09442471f, 0.02133939f, -0.04747602f, 0.02176493f, 0.52606315f, -0.60183613f, -0.05056878f, 0.18858100f, -0.00936749f, -0.17007143f, -0.00822640f, 0.01473704f, 0.00062041f, - -0.01851982f, 0.07661957f, -0.30452796f, 0.64817852f, -0.21819667f, -0.15094971f, -0.02014064f, 0.04976562f, 0.03988913f, 0.00229505f, -0.01596447f, -0.00497683f, 0.01888521f, 0.00912230f, -0.04741494f, -0.06406442f, - -0.18646693f, -0.25658854f, 0.20567339f, 0.06671960f, -0.24836724f, -0.23737029f, 0.03275858f, 0.09293590f, 0.06861982f, 0.01487215f, 0.10808605f, 0.17546010f, 0.16832370f, 0.12557457f, -0.00949461f, -0.12073619f, - -0.08559046f, -0.16350668f, -0.28729498f, 0.01179878f, 0.06195939f, 0.06121501f, -0.29667937f, -0.19145944f, 0.41150010f, 0.18707789f, -0.21406932f, 0.19248440f, 0.16889573f, 0.10825101f, 0.07412737f, -0.03870938f, - 0.00652202f, -0.15316918f, 0.25343593f, -0.09299964f, -0.22861167f, 0.06865193f, 0.02064443f, -0.10488496f, -0.18017250f, -0.21898191f, -0.08742146f, 0.02608617f, 0.05046582f, 0.08687786f, 0.21515984f, 0.33839723f, - 0.12533507f, 0.27191291f, 0.06056226f, -0.10872799f, 0.01799135f, 0.17589055f, -0.05514906f, -0.01148984f, 0.01373578f, -0.08944541f, -0.35717808f, -0.38014180f, 0.05531840f, 0.30742910f, 0.08016039f, -0.10620357f, - -0.01190022f, -0.24441497f, -0.07461266f, 0.02317252f, 0.05704737f, 0.16442883f, 0.06955004f, 0.05748732f, 0.05251523f, 0.22879327f, 0.21860705f, -0.37376474f, 0.03987437f, 0.33071525f, -0.23228300f, -0.30521565f, - -0.00581916f, 0.24592784f, -0.27266538f, -0.28914327f, 0.09129356f, 0.42079957f, 0.05815983f, 0.01136363f, 0.03980200f, -0.04215296f, 0.01465284f, 0.03859289f, -0.13354970f, -0.16935580f, -0.05814064f, 0.05023468f, - 0.44241891f, -0.06885632f, -0.14130761f, -0.04771012f, -0.00863562f, 0.00586591f, 0.12381405f, 0.08059256f, -0.06764947f, -0.22513354f, -0.10536820f, 0.02669478f, 0.01147300f, -0.01584685f, -0.02845628f, 0.01810479f -}; - -const float *const ivas_sns_cdbks_tcx20[SNS_MSVQ_NSTAGES_TCX20] = { ivas_sns_cdbk_tcx20_stage1, ivas_sns_cdbk_tcx20_stage2, ivas_sns_cdbk_tcx20_stage3, ivas_sns_cdbk_tcx20_stage4 }; - -const float ivas_sns_means_tcx20[M] = { - 0.9155f , 1.2408f , 1.0050f , 0.5846f, - 0.2472f , 0.1902f , 0.0984f , 0.1039f, - -0.0139f , -0.0856f , -0.4157f , -0.6148f, - -0.7026f , -0.7216f , -0.8052f , -1.0262f -}; - -const int16_t ivas_sns_cdbks_tcx10_levels[SNS_MSVQ_NSTAGES_TCX10] = { 128, 32, 8 }; -const int16_t ivas_sns_cdbks_tcx10_bits[SNS_MSVQ_NSTAGES_TCX10] = { 7, 5, 3 }; - -const float ivas_sns_cdbk_tcx10_stage1[ 128 * 16 ] = { - 0.06343891f, -0.00651786f, -0.56994713f, -0.98772396f, -1.35099293f, -1.24848646f, -1.20301995f, -0.81089507f, -0.06563095f, 1.11147581f, 1.73933309f, 1.65859611f, 1.26237806f, 0.68028141f, 0.12449909f, -0.39678907f, - -1.34007175f, -1.50272189f, -2.07958791f, -2.38322761f, -2.22156614f, -1.96435669f, -1.68760863f, -1.23664935f, -0.28772180f, 0.87765579f, 1.83822720f, 1.95281398f, 2.33671266f, 2.76119687f, 2.75790597f, 2.17899850f, - -0.51450332f, 0.69692757f, 1.90898730f, 1.89179379f, 1.41350404f, 0.03604267f, 0.02251128f, -1.04270018f, -0.97981089f, -0.36225564f, 0.14171617f, -0.32050715f, -0.56272675f, -0.38710633f, -0.74842203f, -1.19345103f, - 0.61027733f, -0.25705654f, -0.30960961f, 0.11651829f, 0.08424358f, -0.04474594f, -0.21961636f, -0.26522327f, -0.31681379f, -0.23903185f, -0.07879718f, 0.00383111f, 0.09522293f, 0.15157026f, 0.24747985f, 0.42175137f, - 0.06215930f, 0.74417332f, -0.05737044f, -0.84302341f, -0.79474372f, -0.48758880f, 0.00597663f, 0.39113473f, 0.94133689f, 1.03804127f, 0.53832521f, -0.22235026f, -0.44306288f, -0.22065599f, -0.22880587f, -0.42354568f, - -1.79298887f, -1.27561542f, -0.40453013f, 0.23597108f, 1.02842032f, 1.26211371f, 0.67302878f, 0.34945977f, 0.47749022f, 0.37809966f, 0.32913783f, 0.24544337f, -0.10938763f, -0.26555659f, -0.53889493f, -0.59219154f, - 1.13009762f, 0.63132036f, 0.20308733f, 0.12539517f, -0.05215684f, -0.59255734f, -0.72324525f, -0.47416068f, -0.34730473f, -0.17547668f, -0.01869868f, -0.01336213f, -0.03177292f, -0.01470495f, 0.12726970f, 0.22627027f, - 0.77990892f, 0.11720033f, -0.36217078f, -0.11533103f, -0.09211988f, -0.10379850f, 0.04466728f, 0.23851356f, 0.32838480f, 0.57072608f, 0.78005115f, 0.64032724f, 0.04609407f, -0.53665387f, -1.07338898f, -1.26240993f, - 0.71007500f, 1.67092184f, 0.87004285f, -0.47652190f, -0.41457815f, 1.09228787f, 1.43629613f, 1.29941339f, 0.74914490f, -0.87973861f, -1.00898687f, -0.76690679f, -0.87310138f, -0.89762148f, -1.11083002f, -1.39989674f, - 0.93106313f, -0.58060200f, -1.42018765f, -1.93078113f, -1.40332079f, -1.01406592f, -0.68270775f, -0.12421160f, -0.12818640f, 0.46306788f, 0.74384671f, 1.78170251f, 1.49298768f, 0.36128067f, 0.32905160f, 1.18106291f, - -0.34612942f, -0.05241863f, 0.63278953f, 1.64696186f, 1.83789559f, 1.82381570f, 1.71656555f, 1.45437140f, 1.06980287f, 0.39137818f, -0.16457688f, -0.79497784f, -1.78896933f, -2.38820658f, -2.55386733f, -2.48443600f, - -1.86975241f, -1.08195483f, -0.57202727f, -0.39808906f, -0.40936508f, 0.09703771f, 0.81017115f, 0.38629167f, 0.19481800f, 0.19706778f, -0.03872708f, -0.18683058f, 0.37148725f, 0.91055817f, 0.85929760f, 0.73001606f, - 0.13134993f, -0.43834896f, -0.42233235f, -0.34270675f, -0.42348478f, -0.62064185f, -0.67185252f, -0.57602218f, -0.46183286f, -0.05757593f, 0.38429775f, 0.63679540f, 0.59933007f, 0.44800121f, 0.69922041f, 1.11580320f, - -3.26282616f, -2.43458949f, -1.60312382f, -1.18490625f, -0.63841390f, -0.06739227f, 0.57790279f, 1.01010243f, 0.95682720f, 0.75035821f, 0.76084039f, 0.55166704f, 0.83933875f, 1.36392702f, 1.32925064f, 1.05103737f, - 2.94202112f, 3.01169534f, 2.23272878f, 2.33910012f, 1.97620433f, 1.92572769f, -0.00413067f, -1.30712114f, -1.48714461f, -1.62849896f, -1.56921600f, -1.60110814f, -1.73339679f, -1.81275951f, -1.69381023f, -1.59029306f, - -2.29630904f, -1.61967905f, -0.50968315f, 0.70826746f, 1.31943393f, 1.58078613f, 1.31857322f, 0.52237224f, 0.09330352f, 0.13994471f, 0.02623813f, -0.21467602f, -0.33140340f, -0.32793129f, -0.24016399f, -0.16907333f, - 1.17007844f, 1.46542856f, 1.12327460f, 0.78468376f, 0.28858044f, -0.24345469f, -0.36619581f, -0.30604001f, -0.24486928f, -0.39076408f, -0.42628982f, -0.47126418f, -0.48974406f, -0.58899141f, -0.61209496f, -0.69233731f, - 1.07869290f, -1.09624499f, -1.92296142f, -2.03260639f, -0.72727691f, 0.59938120f, 1.09296276f, -0.23244761f, -0.74213456f, -0.00394467f, 0.65433789f, 0.15922442f, 0.10516506f, 0.08483738f, 1.10833114f, 1.87468404f, - -0.45930662f, 0.49568081f, 0.92195224f, 1.70200988f, 1.24720421f, 1.19845895f, 0.75959352f, 0.23323360f, -0.27099240f, -1.38259199f, -2.25979609f, -0.92875900f, -0.06647214f, -0.58552485f, -0.33254823f, -0.27214292f, - -0.34979667f, 0.75395625f, 0.28769469f, -0.85592098f, -0.65167816f, 0.61099639f, 0.60402617f, 0.14561560f, -0.35073645f, -0.56010271f, -0.46661447f, -0.33527423f, -0.00166125f, 0.46634881f, 0.62977271f, 0.07337395f, - -0.41325825f, -0.71696540f, -0.72218212f, -0.64886200f, -0.33204525f, -0.13777071f, -0.05902665f, 0.08826462f, 0.09668422f, 0.34870144f, 0.76742933f, 1.02820877f, 0.66254418f, 0.26837143f, -0.04920095f, -0.18089312f, - -3.00863529f, -3.40420466f, -1.94263495f, -0.42577604f, 1.34874808f, 1.22039392f, -0.16945247f, -0.55999693f, 0.06330206f, 1.23795253f, 0.30477631f, 0.53425336f, 1.62154688f, 1.44462099f, 0.96061888f, 0.77448714f, - 1.81574209f, 1.72942805f, 0.78817895f, 0.12550764f, -0.50423190f, -0.81032090f, -0.83940826f, -0.95575724f, -0.70482913f, -0.32127670f, -0.08073867f, -0.13170408f, -0.16649118f, -0.08610719f, -0.03381103f, 0.17581953f, - -0.84693001f, -0.20800644f, 0.25371425f, 0.56604831f, 0.68467374f, 0.74501557f, 0.69436428f, 0.53975035f, 0.44393852f, 0.30580817f, 0.06566139f, -0.27742827f, -0.57148395f, -0.67328070f, -0.81658998f, -0.90525565f, - -0.44018762f, 0.22712975f, 1.11402502f, 1.98499541f, 1.52065113f, 0.79057891f, 0.55313940f, 0.32776632f, 0.39113088f, 0.10707747f, -0.20138118f, -0.67412788f, -1.34113027f, -1.39661518f, -1.43118002f, -1.53187281f, - -0.71632657f, -0.79492959f, -1.11328698f, -1.41494496f, -1.48929785f, -1.40383584f, -1.26657215f, -1.11367689f, -0.76426307f, 0.01056535f, 0.85354567f, 1.27473730f, 1.64108006f, 2.08311127f, 2.27822947f, 1.93586484f, - 2.05008554f, 2.18328135f, 1.98567996f, 2.35703511f, 2.27653310f, 2.41056123f, 1.36801069f, 0.12761937f, -0.59913124f, -1.45799255f, -1.89092221f, -1.99613693f, -2.20251841f, -2.33272106f, -2.21702011f, -2.06236397f, - -0.88997509f, -0.45675689f, 0.38059457f, 0.51582524f, 0.11775375f, -0.01509768f, -0.18542670f, -0.33776632f, -0.39018689f, -0.33129536f, -0.13149667f, 0.00113524f, 0.03060501f, 0.32190251f, 0.62848970f, 0.74169479f, - 1.19033790f, 0.59193623f, -0.18758267f, -0.71960274f, -0.81756997f, -0.65024529f, -0.64463404f, -0.82612299f, -0.84513928f, -0.45206413f, -0.04059069f, 0.00434486f, 0.50165507f, 1.00958611f, 0.97568033f, 0.91001135f, - -2.25864394f, -2.18529992f, -1.67272884f, -1.18053068f, -0.96703519f, -0.83661833f, -0.59641534f, -0.08623307f, 0.57868270f, 1.39398557f, 2.00205076f, 1.91429603f, 1.37348845f, 1.02732012f, 0.88340938f, 0.61027091f, - 1.13384373f, 2.01444926f, 1.64076134f, 0.39967630f, 0.11211256f, 0.60599786f, 0.41069653f, -0.08528479f, -0.18299306f, -0.80418851f, -1.03743576f, -1.04941914f, -0.88831874f, -0.76292972f, -0.67716107f, -0.82980704f, - -1.17168042f, -0.44794963f, 0.01219570f, -0.09679638f, 0.01681223f, 0.42983884f, 0.69873962f, 1.14025903f, 1.28455301f, 0.60046712f, -0.18327995f, -0.56883208f, -0.60793720f, -0.38487681f, -0.31833900f, -0.40317432f, - 0.85846316f, 0.89573242f, -0.03759975f, -0.56845446f, -0.63431292f, -0.69230128f, -0.59890012f, -0.27699442f, -0.10781577f, 0.38926803f, 0.44176667f, 0.74409936f, 0.51508281f, -0.44324047f, -0.56579214f, 0.08099815f, - -3.15663729f, -3.79941004f, -3.31993311f, -2.54887019f, -1.08297819f, 1.57490155f, 2.29511481f, 2.21386433f, 2.04448334f, 1.39028095f, 1.22351492f, 1.20294900f, 1.33557966f, 1.22044095f, 0.22504752f, -0.81835038f, - 2.10765319f, 2.66375515f, 1.73697111f, 0.50664812f, -0.22472176f, -0.63409486f, -0.65405139f, -0.71248479f, -0.73053296f, -0.87990271f, -0.82710167f, -0.73244187f, -0.64629112f, -0.47294253f, -0.23431056f, -0.26615160f, - -0.03257826f, 0.53214066f, -0.00109639f, -0.42211164f, -0.51464982f, -0.59747387f, -0.63145473f, -0.49761105f, -0.36163571f, 0.00923799f, 0.32394200f, 0.34648466f, 0.32420111f, 0.44177392f, 0.52684150f, 0.55398991f, - 0.38342101f, 0.05503415f, -0.69210895f, -1.40291256f, -1.20627913f, -0.22810180f, 0.91689677f, 1.67212414f, 1.26349034f, 0.48698570f, 0.10567292f, 0.13423949f, -0.02515828f, -0.41152165f, -0.51320898f, -0.53857267f, - -2.82653388f, -3.73292024f, -3.01554952f, 0.33800837f, 1.63071077f, 3.70049918f, 1.52548217f, -0.51327972f, -0.09119392f, 0.92240352f, 2.33190356f, 1.84268123f, -0.37179294f, -0.94969237f, -1.13179438f, 0.34106773f, - 1.56686851f, 0.88339322f, 0.31264631f, -0.04528796f, -0.42838354f, -0.20342114f, 0.40102389f, 0.54537791f, 0.35383369f, -0.18334298f, -0.75234358f, -0.76217615f, -0.36188398f, -0.46147282f, -0.54662536f, -0.31820590f, - 1.24862641f, 0.57117898f, 0.32856394f, 0.39564440f, 0.31824468f, 0.20893064f, 0.02628416f, -0.15359328f, -0.37616872f, -0.26748355f, -0.12954661f, -0.12215355f, -0.31835718f, -0.55834118f, -0.61233860f, -0.55948996f, - -0.59446013f, 0.48100057f, 1.20941553f, 0.41887505f, 0.63264306f, 1.37297652f, 1.40760513f, 0.91551762f, 0.67322895f, -0.90761879f, -1.23123057f, -0.97622159f, -0.96118737f, -0.53857839f, -0.69473239f, -1.20723297f, - -0.59728936f, -1.63533369f, -2.00769344f, -1.93041740f, -1.52949359f, -0.77428525f, -0.21146300f, 0.18478098f, 0.44962772f, 0.95017605f, 1.24326918f, 1.36658626f, 1.25105966f, 1.00442735f, 1.03660313f, 1.19944572f, - 0.32910504f, 1.16199966f, 2.05499236f, 2.56854877f, 2.45081012f, 1.66017811f, 1.01838813f, 0.51773322f, -0.06505376f, -1.14261830f, -1.77930778f, -1.94467446f, -1.83142606f, -1.76577923f, -1.67433287f, -1.55856482f, - -2.64386625f, -1.44973884f, -0.70503582f, -0.39387129f, -0.07345342f, 0.04530383f, 0.12054861f, 0.18110856f, 0.21747675f, 0.44785123f, 0.60100453f, 0.60149054f, 0.48165166f, 0.67654040f, 0.91879547f, 0.97419414f, - 0.52841759f, -0.23803980f, -0.77847320f, -1.06415798f, -1.29095335f, -0.94613842f, 0.01856631f, 0.57516289f, 0.58685158f, 0.24351075f, -0.23807950f, -0.16772309f, 0.27674343f, 0.40698887f, 0.73162063f, 1.35570347f, - -2.57939825f, -1.65066455f, -0.80960514f, -0.40285025f, -0.02550543f, 0.48071345f, 0.90391140f, 1.61193038f, 1.46090124f, 0.72305123f, 0.34664153f, 0.08297581f, -0.07460306f, 0.06306698f, -0.00946438f, -0.12110157f, - 1.93616583f, 2.87229439f, 2.28910932f, 1.18636717f, 0.28185288f, 0.08337698f, 0.52019726f, -0.70876138f, -1.13139506f, -1.42927692f, -1.07719650f, -0.84569529f, -1.10761102f, -1.14612879f, -0.78606400f, -0.93723475f, - -0.83260061f, -1.02726632f, -0.72610655f, 0.18186308f, 0.34897446f, 0.12845730f, 0.04139028f, 0.52688618f, 0.69166145f, 0.76853602f, 0.83316573f, 0.74702270f, 0.29499833f, -0.33104569f, -0.74851736f, -0.89741947f, - 2.77837874f, 1.31099865f, 0.62870774f, 0.35471489f, 0.05642577f, -0.02869061f, 0.19231930f, 0.50340721f, 0.36258783f, -0.06924684f, -0.52796695f, -0.75396481f, -0.89969036f, -1.23296254f, -1.40215690f, -1.27286039f, - -2.03034497f, -1.73876167f, -1.42952672f, -1.24259095f, -0.92252541f, -0.61137126f, -0.50926746f, -0.37515247f, -0.01804868f, 0.44616051f, 0.86247078f, 1.09558380f, 1.34244283f, 1.77606518f, 1.80302809f, 1.55183866f, - -0.13073542f, 0.74480506f, 1.75612393f, 1.94677409f, 1.45854395f, 0.14973385f, 0.41257896f, 0.78276795f, 0.53033406f, -0.97322979f, -1.31039960f, -1.18457724f, -1.39195239f, -0.74765434f, -0.89874803f, -1.14436551f, - -0.34864040f, 0.37594126f, 1.12760599f, 0.69668388f, 0.42042319f, 0.18779444f, -0.10969643f, -0.21695083f, -0.15889803f, -0.31866683f, -0.31049579f, -0.24646351f, -0.37724204f, -0.33366480f, -0.20076896f, -0.18696143f, - -0.21183487f, 0.60232151f, 0.88716970f, 0.69703105f, 0.10878166f, -0.60737034f, -0.81172315f, -0.92047926f, -0.64811892f, -0.24324457f, 0.15840527f, 0.21438269f, 0.31129327f, 0.53391758f, 0.13740501f, -0.20793704f, - -4.29885487f, -4.07150539f, -2.63799263f, -0.36599561f, 1.44131158f, 1.45858072f, -0.19422385f, -1.06386090f, -0.33862479f, 1.91691551f, 0.64172657f, 0.73115700f, 2.00475202f, 1.65789788f, 1.59229150f, 1.52642575f, - 2.70538594f, 1.21062684f, 0.58857880f, 0.37060452f, 0.32021415f, 0.15108056f, -0.18531087f, -0.47434646f, -0.64590620f, -0.70151444f, -0.68058335f, -0.63299041f, -0.53628956f, -0.62363375f, -0.52279857f, -0.34311771f, - -1.21504940f, -0.39554896f, 0.66755826f, 1.39859234f, 1.07486796f, 1.12290637f, 1.04295204f, 1.14165077f, 1.23441664f, 0.53720217f, -1.08842200f, -1.71470800f, -1.43192570f, -1.01274229f, -0.48508172f, -0.87666906f, - 0.79744189f, 0.76166108f, 0.24454768f, -0.10831092f, 0.07052421f, 0.61249105f, 1.01239329f, 0.92265182f, 0.79053239f, 0.48135056f, 0.14383439f, -0.46575922f, -0.96925167f, -1.31622221f, -1.46252773f, -1.51535724f, - 0.81612871f, -1.33697557f, -1.87521893f, -0.34596308f, 1.89973642f, 0.17905631f, -0.58156390f, -1.21825474f, -1.35128034f, -0.86896364f, -0.55987250f, -0.57592082f, -0.20226923f, 0.35191711f, 1.77194975f, 3.89749413f, - 1.63600586f, 1.88172004f, 2.47282363f, 2.31646225f, 1.68082996f, 0.43732883f, 0.54619537f, 0.53604274f, -0.42499034f, -1.38097531f, -1.67316581f, -1.66333999f, -1.66730967f, -1.61301407f, -1.62366867f, -1.46094527f, - -1.13086259f, -0.59286092f, -0.77851750f, -1.03233519f, -1.00728739f, -0.89574050f, -0.77142682f, -0.49554543f, -0.07881573f, 0.54315382f, 0.97530238f, 1.12272839f, 0.97460042f, 0.97504778f, 1.10466703f, 1.08789246f, - 2.01814493f, 0.44413768f, -0.35041288f, -0.98686383f, -1.26200527f, -1.52732432f, -1.48571248f, -1.19925108f, -0.92116223f, -0.35166881f, 0.13444272f, 0.18334560f, 0.92894956f, 1.08294765f, 1.35106569f, 1.94136698f, - -1.70233870f, -1.07878027f, -0.41699769f, -0.44160483f, -0.44460656f, -0.07853597f, -0.00754784f, 0.33653711f, 1.01426686f, 1.48915964f, 0.89682530f, 0.27439080f, 0.11875833f, 0.11843921f, 0.03694301f, -0.11490828f, - 2.92061289f, 2.48313078f, 1.67219449f, 1.01289511f, 0.89753859f, 0.94593326f, 0.70215728f, 0.23868842f, -0.29061326f, -1.00973596f, -1.40595256f, -1.63034802f, -1.68974684f, -1.71427450f, -1.62221007f, -1.51026992f, - -0.53491548f, -0.78055602f, -0.76775254f, 0.10333314f, 0.89464100f, 1.39260245f, 1.42278905f, 1.08133696f, 0.66191720f, 0.26667076f, 0.06990779f, -0.05792125f, -0.54825802f, -0.97098851f, -1.11014442f, -1.12266153f, - 0.08434699f, -0.45396949f, -0.94011771f, -1.20989965f, -1.27570370f, -1.00735662f, -0.43812010f, 0.32116477f, 0.90682311f, 1.07490930f, 1.04265682f, 0.83531254f, 0.64508330f, 0.31821119f, 0.09966431f, -0.00300507f, - -3.45239663f, -3.47846075f, -3.31323927f, -2.90259299f, -2.36355887f, -1.50192157f, -0.92288952f, -0.22530010f, 0.43258717f, 1.44935400f, 2.42148671f, 2.40769873f, 2.68306011f, 3.17878912f, 2.96783805f, 2.61954501f, - 0.48284645f, 1.41799541f, 1.97243102f, 1.59009976f, 1.22294070f, 0.43320660f, -0.04294311f, -0.31344005f, -0.66525145f, -1.13038241f, -1.07639821f, -0.88736938f, -0.84264379f, -0.79497080f, -0.64026957f, -0.72585115f, - -0.53516472f, -0.76920408f, -0.88526173f, -0.38845075f, -0.11227754f, 0.13805981f, 0.30967527f, 0.39937585f, 0.29135651f, 0.31552367f, 0.32154879f, 0.11114380f, 0.10183365f, 0.23587895f, 0.26513073f, 0.20083182f, - -0.82074713f, 0.00036242f, 0.05382877f, -0.93967714f, -1.34393534f, -0.63769734f, 0.72309703f, 0.71909478f, 0.67996995f, 0.71025231f, 0.03684615f, -0.42385779f, 0.20909277f, 0.74865506f, 0.36478854f, -0.08007303f, - -3.48156475f, -2.62401860f, -1.04625145f, 0.48561624f, 1.08462887f, 1.17430353f, 0.89095108f, 0.61098007f, 0.50455996f, 0.68603781f, 0.79217569f, 0.58623668f, 0.26474313f, 0.08681209f, -0.00104191f, -0.01416800f, - 0.84688039f, 0.96543736f, 0.75181222f, 0.42822852f, 0.24904957f, 0.14177234f, -0.40028407f, -0.85658294f, -0.99971434f, -0.98122097f, -0.75656716f, -0.49934498f, -0.24276416f, 0.09868884f, 0.51868958f, 0.73591908f, - -0.06813618f, -0.46119843f, -0.30096714f, 0.02701580f, 0.39106072f, 0.62007470f, 0.37968778f, 0.26617731f, 0.19689970f, 0.13864013f, 0.13523990f, 0.07059597f, -0.06298216f, -0.21734863f, -0.46878891f, -0.64597009f, - 0.51769554f, 1.42736951f, 1.88530137f, 0.81872770f, 0.32102451f, 1.12825115f, 1.21494458f, 1.01472394f, 0.70810844f, -0.50467729f, -1.98880367f, -2.08711611f, -1.72264586f, -0.93580475f, -0.50571272f, -1.29138527f, - 0.60536537f, -0.70354528f, -1.21617652f, -1.24262631f, -1.19828977f, -1.12565262f, -1.02203112f, -0.75894521f, -0.36826442f, 0.22795933f, 0.70544758f, 0.89015550f, 1.16228260f, 1.29703247f, 1.33542695f, 1.41186140f, - 1.04571798f, 1.61006483f, 1.19302962f, 0.57809989f, 0.71546259f, 1.30149630f, 1.62036473f, 1.44726990f, 1.32882491f, 0.70680094f, -0.39181833f, -1.57019972f, -2.33882246f, -2.53038720f, -2.43836110f, -2.27754281f, - -1.70543716f, -1.02771491f, -0.55943640f, -0.54366014f, 0.38503076f, 1.17876631f, 0.37193454f, -0.12189347f, 0.01303672f, -0.31900986f, -0.63608524f, -0.16956145f, 0.42659413f, 0.80300802f, 1.20767125f, 0.69675704f, - 1.23368326f, -0.17372473f, -0.75359852f, -0.99565343f, -0.84904797f, -0.66289765f, -0.45993622f, -0.17721316f, 0.04972474f, 0.35539595f, 0.55580381f, 0.47907626f, 0.35782172f, 0.37623101f, 0.34327632f, 0.32105845f, - -2.18352213f, -1.61901373f, -1.19957932f, -1.19527760f, -1.04950866f, -0.80750101f, -0.01092868f, 0.85242547f, 1.12490981f, 0.83609667f, 0.69994996f, 0.68985497f, 0.89390672f, 1.14712210f, 1.06776086f, 0.75330468f, - 2.33432113f, 2.91068592f, 2.96537876f, 2.14989074f, 1.35332201f, -0.15166191f, -0.61009155f, -1.11607408f, -1.38841709f, -1.32795548f, -1.18652766f, -1.19841345f, -1.27066378f, -1.28720326f, -1.20653804f, -0.97005218f, - -1.23488338f, -0.82668707f, -0.18190692f, 0.80577567f, 1.40765006f, 1.57572199f, 0.77649472f, 0.06817818f, -0.35316133f, -0.31163295f, -0.22814807f, -0.08516639f, -0.14974413f, -0.40747307f, -0.44196718f, -0.41305033f, - 1.49614141f, 2.17073361f, 1.21828130f, 0.24082715f, -0.04653730f, -0.02674890f, 0.07730547f, -0.75552212f, -0.53247648f, 0.68923075f, 0.51413502f, -1.15304142f, -1.36047405f, -1.08476009f, -0.71333064f, -0.73376398f, - -0.89704242f, -1.73833976f, -1.54624918f, -0.75197415f, -0.28436966f, -0.17513881f, -0.18327761f, -0.08090335f, 0.17526730f, 0.62711579f, 0.87938919f, 0.73687059f, 0.73766468f, 0.77613800f, 0.76077200f, 0.96407748f, - -0.74442989f, 0.06393849f, 0.79593747f, 2.27945407f, 2.65112193f, 2.16937280f, 1.04534068f, 0.40390110f, -0.66651353f, -1.35166042f, -1.46612345f, -0.64581600f, -0.65681647f, -1.60629861f, -1.31557834f, -0.95583049f, - 1.36402643f, 1.80223774f, 0.69837068f, -0.49496040f, -0.78242114f, -0.27168915f, 0.02445085f, -0.20866271f, -0.30035706f, -0.41170635f, -0.35841577f, -0.34242299f, -0.28692410f, -0.02094657f, -0.05934480f, -0.35123483f, - -1.08520561f, -0.84120058f, -0.40604501f, -0.30838475f, -0.39817946f, -0.45244145f, -0.46460261f, -0.31407296f, -0.03689281f, 0.38084328f, 0.75874597f, 0.64589942f, 0.68713572f, 0.85059140f, 0.70295555f, 0.28085506f, - -3.41901495f, -4.05624120f, -2.77833774f, -0.25403214f, 1.87889428f, 1.49402114f, -0.04104013f, -0.12322346f, 0.66403332f, 2.05218773f, 0.76725378f, 0.75987949f, 1.64445951f, 1.18046450f, 0.23904189f, -0.00834539f, - 2.34563559f, 1.85433514f, 0.92188091f, 0.00938003f, -0.66632165f, -1.24128642f, -1.45925477f, -1.45794931f, -1.45009658f, -1.08637380f, -0.53948104f, -0.13215543f, 0.79501605f, 0.54741060f, 0.55538134f, 1.00387907f, - 0.18830608f, 0.82743615f, 0.71353361f, 0.08375013f, 0.72945362f, 1.56781385f, 0.82203061f, -0.15761113f, -1.14514559f, -0.94404839f, -0.45524505f, -0.03539938f, -0.38522988f, -0.55123197f, -0.43254198f, -0.82587158f, - 0.28717168f, 1.26620628f, 1.79284485f, 0.74811924f, 0.75340319f, 0.55244948f, 0.46108770f, 0.62189892f, 0.63524206f, -0.36020964f, -0.49840190f, -0.49783437f, -1.24630499f, -1.48121128f, -1.52882801f, -1.50563245f, - 0.77651863f, -0.09801613f, -0.65368548f, -1.42314584f, -1.95826046f, -2.20248886f, -1.97940063f, -1.63600078f, -1.05805019f, -0.03308653f, 1.18890487f, 1.59425997f, 1.56951997f, 1.72023665f, 1.99206238f, 2.20063258f, - 1.86036810f, 1.95524352f, 1.65802754f, 0.51762484f, 0.32278641f, 1.41534130f, 1.58480385f, 1.00644422f, -0.43304110f, -1.52615221f, -1.54409319f, -1.50951389f, -1.44095494f, -1.33336688f, -1.41459830f, -1.11891940f, - -0.48994782f, -0.25738925f, -0.03744629f, -0.08936731f, -0.21819055f, -0.21749988f, -0.57009207f, -0.68163031f, -0.77904329f, -0.92638722f, -0.49253451f, -0.11015934f, 0.49328977f, 1.25069491f, 1.61419932f, 1.51150480f, - 2.17925129f, 0.65744215f, -0.14102877f, -0.68226531f, -0.86240255f, -0.96233313f, -0.77240075f, -0.60150667f, -0.43620670f, -0.12974041f, 0.06940761f, 0.29313968f, 0.32005914f, 0.04484663f, 0.20342365f, 0.82031433f, - -2.73276927f, -1.95293295f, -1.25302447f, -1.26607638f, -1.03464322f, -0.41097672f, 0.11299908f, 0.61306244f, 1.35234054f, 1.98785456f, 1.65758988f, 0.94482039f, 0.67093436f, 0.60201696f, 0.38959545f, 0.31920903f, - 1.99599002f, 1.78113188f, 1.60094449f, 1.49585133f, 1.05949606f, 0.38027999f, -0.00956917f, -0.37696778f, -0.58734884f, -0.88374264f, -1.14734587f, -1.24114441f, -1.17843206f, -1.09199503f, -0.92371805f, -0.87342960f, - -1.37903570f, -0.79248227f, 0.13536234f, 0.47656459f, 0.43589978f, 0.88461367f, 1.02738581f, 0.55354663f, 0.25049941f, -0.28501314f, -0.80941419f, -0.81019030f, -0.45648923f, 0.11389766f, 0.39621982f, 0.25863532f, - 2.10361489f, 0.37593562f, -0.16944555f, -0.32212923f, -0.22241176f, -0.24351656f, -0.27375398f, 0.02762124f, 0.11073362f, 0.23273069f, 0.27063497f, 0.08607178f, -0.19792432f, -0.48410706f, -0.59195084f, -0.70210352f, - -3.28081022f, -2.84286219f, -2.41405615f, -2.18965898f, -1.85813828f, -1.04835079f, -0.44771380f, 0.59206456f, 1.50301948f, 2.07448941f, 2.16550955f, 1.89856464f, 1.75678779f, 1.60095964f, 1.36941840f, 1.12077632f, - 1.20650745f, 1.87107653f, 1.86883453f, 1.42456949f, 0.48789223f, -0.72412798f, -1.11112426f, -1.49029508f, -1.30798779f, -1.39394685f, -1.21186297f, -0.51923241f, 0.01995250f, 0.34176002f, 0.40195072f, 0.13603383f, - 1.27785134f, 0.88553037f, 0.16900733f, -0.27809430f, -1.01525323f, -1.49395836f, -1.43232130f, -1.19784251f, -0.74210861f, -0.08619940f, 0.47709237f, 0.55331864f, 0.84110624f, 0.88279667f, 0.58250791f, 0.57656718f, - 0.33221429f, 1.11386403f, 0.75316099f, -0.54031614f, -1.07863165f, -0.21932249f, 1.22065947f, 1.15034668f, 1.03141160f, -0.31201434f, -1.38480174f, -0.81360834f, -0.27523041f, 0.24071536f, -0.19254386f, -1.02590322f, - -1.49213877f, -2.62687029f, -1.76800978f, 0.37484393f, 2.24342021f, 1.70797214f, 0.00785579f, -0.16576749f, 0.40170467f, 1.53774796f, 0.29192482f, 0.32972463f, 0.96040034f, 0.07052406f, -0.75744205f, -1.11588939f, - 1.68310221f, 0.62723214f, -0.21848789f, -0.50907306f, -0.77679516f, -0.86027718f, -0.37120564f, 0.20445818f, 0.27312526f, -0.13982446f, -0.56141448f, -0.66669228f, 0.06397763f, 0.19621457f, 0.32877219f, 0.72688794f, - 0.71839263f, 0.21641507f, 0.34358239f, 1.05799089f, 1.05814284f, 0.52787967f, 0.14046002f, 0.11966559f, 0.07361240f, -0.17447064f, -0.37909417f, -0.61722985f, -0.71730019f, -0.79744166f, -0.77133987f, -0.79926472f, - -0.02890014f, 0.92802997f, 1.03744813f, 0.32870919f, 0.07886022f, 0.63362031f, 0.46497182f, 0.14157700f, -0.03057580f, -0.54785692f, -1.11970728f, -1.36023434f, -0.91731394f, 0.07493639f, 0.47210281f, -0.15566707f, - -0.69638941f, -0.91666102f, -1.56178072f, -1.95501706f, -1.82786692f, -1.74880889f, -1.34684465f, 0.11048340f, 1.37545972f, 1.36714659f, 1.44286472f, 1.29857548f, 1.10826459f, 1.56371080f, 1.18624590f, 0.60061806f, - -0.68066861f, 0.38195183f, 1.51822296f, 2.21510524f, 2.33189221f, 1.97513513f, 1.15635207f, 1.51498823f, 1.49065161f, -0.27868821f, -1.78208773f, -2.20070549f, -2.26038069f, -2.05737950f, -1.59696081f, -1.72742716f, - -2.17324712f, -1.42748120f, -0.47105336f, 0.06399853f, -0.10139724f, -0.33208523f, -0.36226578f, -0.45684329f, -0.45421750f, -0.02950979f, 0.57908509f, 0.82823657f, 0.84044612f, 0.96336259f, 1.18058199f, 1.35238916f, - 0.30637595f, -0.07750454f, -0.01603143f, -0.03845729f, -0.46768884f, -0.33028351f, 0.33893858f, 0.66006523f, 0.64603598f, 0.25681503f, -0.24604284f, -0.37133227f, -0.20588021f, -0.28072164f, -0.22555667f, 0.05126849f, - -1.81904207f, -1.97008939f, -1.38138723f, -0.56721565f, 0.08439254f, 0.50012417f, 0.41461731f, 0.70946239f, 0.65844196f, 0.50418711f, 0.67016347f, 0.85608609f, 0.63818532f, 0.38340644f, 0.22816114f, 0.09050718f, - 3.82551321f, 3.02994002f, 1.79732057f, 1.05862951f, 0.33021546f, 0.01969982f, -0.57482284f, -1.10367492f, -1.21202781f, -1.06293594f, -0.97966329f, -1.01767532f, -1.10340104f, -1.13918652f, -1.02503523f, -0.84289579f, - -2.06530906f, -1.02138773f, 0.19121847f, 0.64135688f, 0.47353945f, 0.29125589f, 0.17346435f, 0.09846354f, 0.14173379f, 0.44108119f, 0.42909595f, 0.13671490f, -0.09429711f, 0.06651142f, 0.02429001f, 0.07226851f, - 1.63249192f, 0.94436017f, 0.65530634f, 0.76476367f, 1.10302458f, 1.20701875f, 0.88073298f, 0.43640158f, -0.07220279f, -0.39214092f, -0.60759685f, -0.87296187f, -1.13810886f, -1.40490240f, -1.54422408f, -1.59196182f, - -2.96354446f, -2.66922503f, -2.35080143f, -1.84250497f, -1.24255764f, -0.53451683f, -0.22318900f, 0.15923121f, 0.44185767f, 0.90571587f, 1.20883041f, 1.21786822f, 1.54160670f, 2.22751201f, 2.21090650f, 1.91281110f, - -0.09062710f, 0.80687377f, 1.69510603f, 2.38364009f, 2.08626387f, 1.00304738f, 0.66997543f, 0.04541459f, -0.35848319f, -0.80600051f, -1.65487629f, -2.04562701f, -2.03869244f, -1.11898388f, 0.04427361f, -0.62130392f, - -0.99015493f, -0.47096904f, 0.39660329f, 1.29486538f, 1.58962509f, 0.33608325f, -0.41798602f, -0.54749259f, -0.00991716f, -0.02240745f, -0.93933104f, -0.69735917f, -0.17095973f, 0.19272004f, 0.29655039f, 0.16013060f, - -0.50032252f, -0.00936927f, 0.13895740f, 0.11955067f, -0.00882381f, -0.31634261f, -0.30280409f, -0.10222302f, -0.04951847f, 0.13870349f, 0.43344396f, 0.56559398f, 0.24092822f, -0.05903140f, -0.12616386f, -0.16257807f, - -4.66891396f, -4.62476618f, -2.72504562f, -0.11626174f, 1.38983931f, 1.37676145f, 0.15183709f, -0.07491020f, 0.54070200f, 1.84266982f, 0.65624201f, 0.70100510f, 1.81013255f, 1.75739872f, 0.97189375f, 1.01141647f, - 3.82513926f, 1.74864093f, 0.71663856f, -0.06702053f, -0.46144066f, -0.68679697f, -0.83513366f, -0.69088271f, -0.63484378f, -0.48492965f, -0.30596681f, -0.27767202f, -0.29901877f, -0.55135905f, -0.55561568f, -0.43973879f, - -1.83506374f, -1.72166910f, -0.66010462f, 1.71984506f, 2.40983158f, 1.81667012f, 1.44944523f, 1.31000271f, 0.86661928f, 0.58345030f, -0.05866711f, -0.37487717f, -0.74598532f, -1.38021702f, -1.58454113f, -1.79473786f, - 0.16939787f, 1.05222199f, 0.60925979f, -0.08245082f, -0.05127361f, -0.01958411f, -0.04649851f, 0.11008216f, 0.21213694f, -0.02520358f, -0.00574917f, -0.04591061f, -0.24174211f, -0.38605009f, -0.52417208f, -0.72446423f, - -0.07063893f, -1.74970518f, -1.79098807f, -1.50819293f, -1.06029380f, -1.44474701f, -1.24662095f, -1.20341521f, -1.18506899f, -0.88327503f, -0.47818767f, 0.53478172f, 1.99588317f, 2.01785324f, 2.86156101f, 5.21105441f, - 1.18577996f, 1.82923029f, 2.00218590f, 1.75897045f, 1.55666666f, 1.15213194f, 1.02264996f, 0.58845201f, 0.39345304f, -0.25590088f, -1.11168611f, -1.75581078f, -2.05745836f, -2.20440070f, -2.14031291f, -1.96395016f, - -0.49703383f, -0.62650520f, -0.98853522f, -1.16849765f, -1.02786508f, -0.51447634f, -0.02538523f, 0.08704333f, 0.03359763f, 0.17774887f, 0.30484412f, 0.32520735f, 0.62948522f, 1.14552041f, 1.22336987f, 0.92148234f, - -0.07188198f, 0.18500810f, -0.22096354f, -0.56851679f, -0.98832362f, -1.20304996f, -1.11943691f, -1.09383807f, -0.85446062f, -0.29360582f, 0.44439822f, 0.64306330f, 1.09971537f, 1.50142342f, 1.36382024f, 1.17664847f, - -1.21730935f, -1.48884440f, -1.78500620f, -1.57607634f, -0.82775565f, -0.09612994f, 0.49933981f, 1.06136160f, 1.31463011f, 1.46090638f, 1.14896512f, 0.64320117f, 0.39111587f, 0.36061229f, 0.18325675f, -0.07226660f, - 2.30575156f, 2.37005513f, 1.37776397f, 0.78509487f, 0.18022242f, -0.13093354f, 0.22126477f, -0.11444642f, -0.35716968f, -0.59492665f, -0.35765935f, -0.44655201f, -1.03213345f, -1.27074059f, -1.44000075f, -1.49558947f, - -1.00874079f, -1.64011865f, -1.86084729f, -1.06805908f, 0.07222945f, 1.36179475f, 1.87160360f, 1.76248472f, 1.52374330f, 1.04119855f, 0.73448166f, 0.13768018f, -0.49711929f, -0.73696841f, -0.89885406f, -0.79450886f -}; -const float ivas_sns_cdbk_tcx10_stage2[ 32 * 16 ] = { - 0.30627323f, 0.48836579f, -0.02716944f, -0.47680077f, -0.52992614f, -0.25467720f, -0.13298242f, -0.14929291f, -0.14808149f, 0.08665801f, 0.28830653f, 0.27526330f, 0.09942358f, -0.01755061f, 0.03315580f, 0.15903469f, - 0.40931263f, -0.04412117f, -0.08826419f, 0.38716891f, 0.51515595f, 0.42227845f, 0.34963425f, 0.26800736f, 0.03770000f, -0.19967080f, -0.31044249f, -0.32623294f, -0.38445978f, -0.38085950f, -0.38590829f, -0.26929836f, - -0.16037262f, -0.37557223f, -0.41481262f, -0.12384627f, 0.25702942f, 0.29593484f, 0.04534352f, -0.04349856f, -0.11439445f, -0.20184919f, 0.03250628f, 0.58473249f, 1.07468564f, 0.31789485f, -0.43837532f, -0.73540590f, - -0.72021067f, 0.08601834f, 0.36444345f, 0.07734969f, -0.03855524f, -0.02016363f, 0.22787880f, 0.23660595f, -0.06162934f, -0.60111840f, -0.53416841f, -0.01411490f, 0.31545914f, 0.35328934f, 0.27371155f, 0.05520477f, - 0.17033204f, -0.13395098f, -0.17486207f, -0.16431307f, -0.15028250f, -0.16217158f, 0.20788205f, 0.78892741f, 0.82887028f, 0.27828798f, -0.09961411f, -0.26525390f, -0.29531330f, -0.31862369f, -0.30357092f, -0.20634333f, - 0.66971623f, 0.62862982f, 0.51073654f, 0.36780819f, 0.09494981f, -0.26895298f, -0.43607248f, -0.52929484f, -0.50226353f, -0.28888748f, -0.08077826f, 0.07870787f, -0.04066089f, -0.15014043f, -0.07631337f, 0.02281584f, - -0.14637266f, -0.46934298f, -0.43556714f, -0.11250329f, 0.02177593f, -0.06273200f, -0.10608254f, -0.23883852f, -0.34273025f, -0.21064510f, 0.01000878f, 0.26290329f, 0.36940740f, 0.45606583f, 0.50057089f, 0.50408231f, - -0.63822919f, -0.37848043f, -0.12025765f, 0.46869706f, 0.60287599f, 0.40487467f, 0.32284423f, 0.21760285f, 0.02923608f, 0.00961581f, 0.09146575f, 0.01422525f, -0.19921025f, -0.27268562f, -0.30705403f, -0.24552069f, - 1.00438179f, 0.03452909f, -0.36528888f, -0.16282387f, -0.17507552f, -0.16366972f, 0.01988929f, 0.04208138f, -0.09195065f, -0.12550201f, -0.13827904f, -0.15519976f, -0.13718296f, -0.04187317f, 0.11795197f, 0.33801187f, - -0.29872646f, -0.05673935f, 0.22627715f, 0.35384240f, 0.40583411f, 0.05342130f, -0.33165017f, -0.58372192f, -0.59880799f, -0.13860904f, 0.35292935f, 0.42680564f, 0.12541820f, -0.05244271f, 0.02304693f, 0.09312233f, - -0.62056798f, -0.65569894f, -0.39193684f, -0.23470135f, -0.10487732f, -0.02415277f, 0.10485475f, 0.27475842f, 0.33639795f, 0.28659695f, 0.29816270f, 0.35486347f, 0.22178257f, 0.06294332f, 0.00371302f, 0.08786182f, - -0.24167361f, 0.39335919f, 0.45401345f, -0.01359878f, -0.02799250f, 0.03219280f, -0.03498926f, 0.13917253f, 0.56998817f, 0.30076805f, -0.02861530f, -0.08301223f, -0.23268793f, -0.25582563f, -0.40349390f, -0.56760551f, - -0.25453749f, 0.20141031f, 0.13622118f, 0.02192458f, 0.01884274f, 0.35426017f, 0.30533029f, -0.04383371f, -0.03213904f, 0.48723585f, 0.26916690f, -0.57914714f, -0.86274497f, -0.46431975f, 0.21456299f, 0.22776732f, - 0.10091242f, -0.00486621f, 0.15438553f, 0.58933636f, 0.58327809f, 0.15020643f, -0.13942120f, -0.30560120f, -0.39802935f, -0.42014770f, -0.43506227f, -0.49122908f, -0.24162334f, 0.07789107f, 0.33589368f, 0.44407700f, - -0.86901291f, -0.12649490f, 0.37769660f, 0.32335451f, -0.09778731f, -0.30169760f, -0.11330902f, 0.06975956f, 0.10852794f, 0.10187023f, 0.01908335f, -0.02063501f, -0.02583787f, 0.01976747f, 0.15814638f, 0.37656868f, - 0.04263499f, 0.02090495f, 0.31860242f, 0.23302977f, -0.33090591f, -0.80333458f, -0.73651770f, -0.34102413f, 0.01204330f, 0.27818705f, 0.45925162f, 0.49138398f, 0.30213637f, 0.14165342f, -0.01743260f, -0.07061291f, - -0.33546750f, 0.07559517f, -0.29917689f, -0.73625773f, -0.65250278f, -0.17791468f, 0.36283358f, 0.41870726f, 0.25167625f, 0.10475438f, 0.03036614f, -0.11264997f, 0.02694511f, 0.35023967f, 0.42385566f, 0.26899640f, - 0.35439950f, 0.67540976f, 0.38662754f, 0.00957348f, -0.04081569f, 0.08980026f, 0.24456400f, 0.16454453f, -0.17326799f, -0.44054817f, -0.46528410f, -0.40046956f, -0.28220380f, -0.18741583f, -0.03688613f, 0.10197206f, - 0.42543134f, 0.16124378f, -0.11664388f, -0.16052109f, -0.14380996f, -0.20548992f, -0.07681681f, -0.05550879f, -0.19682147f, -0.44926335f, -0.31008693f, 0.10843293f, 0.56978845f, 0.55547148f, 0.11319503f, -0.21860065f, - -0.29805544f, -0.51653600f, -0.50993841f, -0.23042275f, 0.24667415f, 0.49673729f, 0.44572321f, 0.45012593f, 0.15926189f, -0.25316153f, -0.34302757f, -0.25146569f, -0.04585493f, 0.07882198f, 0.19017230f, 0.38094576f, - 0.32844224f, 0.41193928f, 0.40958218f, 0.23076367f, -0.27298459f, -0.73724149f, -0.33139249f, 0.20850941f, 0.29246785f, 0.02387269f, -0.22298162f, -0.22401730f, -0.10602946f, -0.10948655f, -0.04914188f, 0.14769834f, - -0.17579666f, 0.35780877f, 0.71235588f, 0.55448086f, 0.37958752f, 0.25325181f, 0.00067976f, -0.17449727f, -0.19933258f, -0.18272217f, -0.13825657f, -0.13482936f, -0.26973501f, -0.36527057f, -0.38046021f, -0.23726392f, - 0.18763378f, -0.33806505f, -0.40345471f, -0.16420458f, -0.35258917f, -0.57440801f, -0.40444473f, 0.03937379f, 0.28301143f, 0.24202773f, 0.11450746f, -0.01201630f, 0.15584175f, 0.29186178f, 0.39454798f, 0.54037647f, - 0.22483690f, -0.44980090f, -0.04869487f, 0.59069175f, 0.53952189f, -0.08294351f, -0.50222392f, -0.24118691f, 0.23316504f, 0.15935219f, -0.04441873f, 0.04368785f, -0.01936622f, -0.19829407f, -0.17269697f, -0.03162974f, - 0.86145933f, 0.21872440f, 0.03989593f, 0.02383014f, -0.09253274f, -0.16857595f, -0.11671737f, 0.08021353f, 0.06125647f, 0.12344152f, 0.23383136f, 0.23023986f, 0.00554465f, -0.33666994f, -0.57850362f, -0.58543742f, - 0.51765053f, 0.14453794f, -0.21849231f, -0.46766148f, 0.28518641f, 0.98554209f, 0.04290847f, -0.60417524f, -0.40619174f, 0.07096948f, -0.07934046f, -0.11108689f, 0.01736604f, 0.02182622f, -0.13816306f, -0.06087569f, - 0.48940455f, -0.48846716f, -0.76449136f, -0.43167975f, -0.08214146f, 0.11409731f, 0.23323066f, 0.14717357f, 0.03539665f, 0.18939153f, 0.30742449f, 0.25985980f, 0.09542412f, -0.02333196f, -0.07732568f, -0.00396539f, - -0.11187535f, 0.22479868f, 0.00043228f, -0.32181417f, -0.15096473f, 0.43016822f, 0.70121781f, 0.35219596f, -0.12050155f, -0.23287073f, 0.15265180f, 0.19690580f, -0.06424055f, -0.21596133f, -0.38579166f, -0.45435087f, - -0.22289529f, -0.33733328f, 0.06840735f, 0.09280703f, 0.04636627f, 0.21910935f, -0.03558133f, 0.03650325f, 0.61258277f, 0.50575298f, -0.41287364f, -0.69151766f, -0.55346043f, 0.16231747f, 0.54407303f, -0.03425754f, - -0.01396139f, 0.41256481f, 0.28386076f, -0.13079544f, -0.35049882f, -0.37139357f, -0.26190236f, -0.28543916f, -0.36404168f, -0.41216213f, -0.30446824f, -0.16554805f, 0.07635435f, 0.40718475f, 0.72148357f, 0.75876291f, - -0.78143464f, 0.05520810f, 0.09851993f, -0.35088396f, -0.29183273f, 0.13535467f, 0.10630173f, -0.35151176f, -0.27502696f, 0.15923208f, 0.34325564f, 0.26263384f, 0.39924614f, 0.42088604f, 0.20935571f, -0.13930422f, - -0.20363163f, -0.21557857f, -0.16300691f, -0.04183005f, -0.11100316f, -0.05771045f, 0.03898740f, 0.01316220f, 0.17362802f, 0.74914331f, 0.94477958f, 0.44778038f, -0.09421183f, -0.32736334f, -0.50631884f, -0.64682642f -}; -const float ivas_sns_cdbk_tcx10_stage3[ 8 * 16 ] = { - 0.15213764f, -0.12778955f, 0.09362990f, -0.08343056f, -0.25379718f, 0.12518895f, 0.29943288f, -0.09857322f, -0.34816031f, -0.24349585f, -0.11266650f, -0.05996015f, 0.03254247f, 0.15532134f, 0.23410563f, 0.23551447f, - -0.16242282f, -0.11097776f, -0.31747514f, -0.25628076f, 0.13836003f, 0.29861681f, 0.10506779f, 0.11734717f, 0.26608658f, 0.05454060f, -0.14603348f, -0.19239843f, 0.04173306f, 0.20966631f, 0.07432020f, -0.12015035f, - -0.05086737f, 0.14763099f, -0.10027459f, -0.32093478f, -0.17515530f, -0.18641303f, -0.27141947f, -0.07787662f, 0.00378069f, -0.04285463f, 0.10140687f, 0.34974771f, 0.30832793f, 0.10107726f, 0.07691200f, 0.13691240f, - -0.19149570f, -0.03034820f, 0.22501633f, 0.07949802f, -0.27147765f, -0.19613243f, 0.27922429f, 0.35035416f, 0.10414276f, 0.00614821f, 0.06550601f, 0.11675054f, 0.03695278f, -0.13039057f, -0.22716902f, -0.21657951f, - 0.26536712f, -0.20814302f, -0.25065997f, 0.11971631f, 0.27275427f, 0.17786545f, -0.00254739f, -0.12770659f, -0.22797897f, 0.00768447f, 0.21340357f, 0.19482691f, 0.04586545f, -0.11847485f, -0.17809566f, -0.18387694f, - 0.25667429f, 0.24654641f, 0.10151031f, -0.02938848f, -0.14360442f, -0.13987667f, -0.20754252f, -0.19670735f, 0.17496815f, 0.41594389f, 0.13093074f, -0.20541061f, -0.16236246f, 0.04068170f, -0.03728146f, -0.24508149f, - -0.08722397f, 0.02295918f, 0.00051204f, 0.07408103f, 0.14389321f, 0.06786859f, 0.00359252f, 0.11717038f, 0.08740562f, 0.00119184f, -0.07592203f, -0.11362449f, -0.31422561f, -0.38910675f, -0.02291088f, 0.48433932f, - -0.18216919f, 0.06012195f, 0.24774113f, 0.41673922f, 0.28902704f, -0.14711768f, -0.20580810f, -0.08400793f, -0.06024452f, -0.19915854f, -0.17662518f, -0.08993148f, 0.01116638f, 0.13122555f, 0.08011919f, -0.09107791f -}; - -const float *const ivas_sns_cdbks_tcx10[SNS_MSVQ_NSTAGES_TCX10] = { ivas_sns_cdbk_tcx10_stage1, ivas_sns_cdbk_tcx10_stage2, ivas_sns_cdbk_tcx10_stage3}; - -const float ivas_sns_means_tcx10[M] = { - 0.9510f , 1.1892f , 0.8969f , 0.3467f, - 0.1347f , 0.1074f , 0.0504f , -0.0790f, - -0.1305f , -0.3713f , -0.5611f , -0.5757f, - -0.4801f , -0.4108f , -0.4564f , -0.6112f -}; - -const int16_t ivas_sns_cdbks_side_tcx20_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 32 }; -const int16_t ivas_sns_cdbks_side_tcx20_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 5 }; -const int16_t ivas_sns_cdbks_side_tcx10_levels[SNS_MSVQ_NSTAGES_SIDE] = { 32, 8 }; -const int16_t ivas_sns_cdbks_side_tcx10_bits[SNS_MSVQ_NSTAGES_SIDE] = { 5, 3 }; - -const float ivas_sns_means_side_tcx20[M] = { - -0.0181f , 0.0044f , 0.0133f , 0.0096f, - 0.0073f , 0.0038f , 0.0058f , 0.0015f, - -0.0046f , -0.0096f , -0.0099f , -0.0173f, - -0.0075f , 0.0049f , 0.0023f , 0.0141f -}; - -const float ivas_sns_cdbks_side_tcx20_stage1[ 32 * 16 ] = { - -0.09561560f, -0.07036320f, 0.02878750f, 0.03511974f, 0.17132389f, -0.03138941f, -0.33178799f, -0.21216198f, -0.04445341f, 0.02221417f, 0.02283919f, 0.03233147f, 0.08941267f, 0.12190493f, 0.12476806f, 0.13706984f, - 0.00109929f, 0.08875231f, 0.22238215f, 0.21457590f, 0.10015343f, 0.04638508f, 0.03393346f, -0.00874452f, -0.04376851f, -0.07742100f, -0.07534945f, -0.10337673f, -0.10407952f, -0.11112585f, -0.09133646f, -0.09207950f, - -0.24818594f, 0.26921203f, 0.44107852f, 0.17248048f, 0.64417785f, 0.17680036f, 0.13990282f, -0.00956079f, 0.26766161f, -0.03617849f, -0.51006953f, -0.14559280f, 0.04585566f, -0.32296828f, -0.43440915f, -0.45020472f, - -0.02603883f, -0.10893371f, -0.10500311f, -0.11573136f, -0.10145701f, 0.08950274f, 0.26393655f, 0.16421642f, 0.06653788f, 0.02055681f, 0.03165200f, -0.00660730f, -0.02920382f, -0.04413712f, -0.04586630f, -0.05342379f, - 0.42792206f, 0.05873236f, -0.03519993f, -0.02404930f, -0.02129021f, -0.02228539f, -0.05794333f, -0.05329147f, -0.02713142f, -0.02536622f, -0.01781476f, -0.04129741f, -0.03786846f, -0.04699464f, -0.04049980f, -0.03562223f, - 0.02055988f, 0.02639971f, 0.00689886f, 0.00418128f, -0.01634280f, 0.00921734f, 0.00364626f, -0.03176210f, -0.04382792f, -0.01247039f, 0.02183370f, -0.00002241f, -0.00402301f, -0.00566646f, 0.00978385f, 0.01159419f, - 0.19157117f, 0.21950742f, 0.18377101f, -0.02875442f, -0.28243126f, -0.54171973f, -0.31264637f, -0.03676636f, 0.00528891f, -0.04001921f, 0.08505054f, 0.06946939f, 0.13428842f, 0.15810925f, 0.11903950f, 0.07624180f, - -0.30190937f, -0.29575446f, -0.26060885f, -0.18754051f, -0.14798754f, -0.10966049f, -0.13245975f, -0.11017279f, -0.08153340f, -0.06447313f, 0.04034392f, 0.17641778f, 0.25731939f, 0.31027339f, 0.40673221f, 0.50101364f, - -0.47842978f, -0.03818905f, 0.07056377f, 0.03300345f, 0.02730699f, 0.05007915f, 0.02893237f, 0.02226785f, 0.04222222f, 0.04128904f, 0.03830734f, 0.01743857f, 0.03607951f, 0.02582752f, 0.04198512f, 0.04131589f, - -0.02242885f, 0.01802990f, -0.00361209f, 0.02714255f, 0.04843318f, 0.04306928f, 0.02675985f, 0.07964815f, 0.10019006f, 0.05262710f, 0.00113825f, -0.04747375f, -0.04988074f, -0.05204562f, -0.09989329f, -0.12170389f, - 0.28967652f, 0.36512749f, 0.38343313f, 0.37459919f, 0.29419461f, 0.21272806f, 0.14963422f, 0.11987446f, -0.00354946f, -0.11817788f, -0.21991893f, -0.37389500f, -0.43897693f, -0.47312318f, -0.36222971f, -0.19939667f, - -0.29847367f, -0.28024953f, -0.23616334f, -0.19456539f, -0.16497910f, -0.12215408f, -0.05213406f, 0.03088777f, 0.11427925f, 0.17777695f, 0.21315635f, 0.18382103f, 0.20758797f, 0.19478448f, 0.14014366f, 0.08628162f, - -0.01005369f, -0.03186180f, -0.07995901f, -0.10893772f, -0.11257191f, -0.10933952f, -0.06260446f, 0.01592879f, 0.06618622f, 0.08792663f, 0.09779631f, 0.06871009f, 0.06158038f, 0.04699408f, 0.04045205f, 0.02975352f, - -0.12591171f, -0.31330699f, -0.09207505f, 0.04353844f, 0.05691547f, 0.02830292f, 0.05190188f, 0.05663181f, 0.05579546f, 0.05136184f, 0.06373287f, 0.03243363f, 0.03631576f, 0.02886726f, 0.02108611f, 0.00441022f, - 0.51424359f, 0.44825357f, 0.27826391f, 0.14692419f, 0.04486213f, 0.01374316f, -0.05577450f, -0.06790050f, -0.10394906f, -0.14111342f, -0.16141165f, -0.18795338f, -0.17689540f, -0.18030471f, -0.19451666f, -0.17647134f, - 0.01250082f, -0.03513855f, -0.10558904f, -0.13589106f, -0.16642959f, -0.12403555f, -0.11639493f, -0.13504470f, -0.12448111f, -0.08902796f, 0.02742439f, 0.14597597f, 0.22586358f, 0.24372767f, 0.18517594f, 0.19136417f, - 0.00690369f, -0.06536790f, -0.04560492f, 0.17183296f, 0.06108150f, -0.14297504f, -0.10743566f, 0.00028842f, -0.00000737f, 0.01948888f, 0.04144583f, 0.01034213f, 0.01186359f, 0.01904016f, 0.01513936f, 0.00396440f, - -0.02696488f, -0.05930555f, -0.05635944f, 0.04417762f, 0.20483421f, 0.24818872f, 0.08337011f, -0.03555721f, -0.04496794f, -0.05268211f, -0.05177582f, -0.06105043f, -0.04493356f, -0.04903822f, -0.04844764f, -0.04948792f, - 0.09934599f, 0.20097988f, 0.02959104f, 0.10059414f, 0.36489123f, 0.42345991f, 0.31306867f, 0.19189664f, 0.02025838f, -0.16920767f, -0.19221388f, -0.36590851f, -0.24124038f, -0.21069901f, -0.24782116f, -0.31699542f, - -0.38302159f, -0.20867958f, -0.06199247f, 0.00929974f, -0.08763027f, 0.01230753f, 0.12845035f, 0.27194101f, 0.35480151f, 0.36726532f, 0.20142240f, -0.03957218f, -0.10891503f, -0.16235951f, -0.15207841f, -0.14123875f, - 0.29448433f, 0.27467021f, 0.21093907f, 0.02636253f, -0.10971996f, -0.06520899f, -0.09114815f, -0.19988466f, -0.25173695f, -0.21777001f, -0.19036007f, -0.10825290f, 0.00468462f, 0.07695453f, 0.14592570f, 0.20006079f, - -0.09613522f, -0.07305197f, 0.23140183f, -0.01276782f, -0.05046178f, -0.03690868f, 0.01854782f, -0.00516658f, -0.01794740f, 0.01127293f, 0.02845775f, 0.00246563f, -0.00285605f, -0.00274282f, 0.00447526f, 0.00141708f, - 0.09853152f, 0.23398475f, 0.15560679f, 0.01939291f, -0.05095939f, -0.10951335f, -0.08366621f, -0.03852663f, -0.00171258f, -0.01619636f, -0.02703945f, -0.04625883f, -0.03573599f, -0.03656223f, -0.03486191f, -0.02648302f, - -0.05407938f, -0.18042914f, -0.31075117f, -0.36223570f, -0.35545274f, -0.26114190f, -0.21540173f, -0.18652814f, -0.10764184f, -0.04326102f, 0.10627938f, 0.32432791f, 0.40043785f, 0.56193174f, 0.40395999f, 0.27998606f, - -0.22375901f, -0.11453094f, -0.06437672f, 0.02966050f, -0.06882505f, -0.02229970f, 0.00519106f, 0.04139490f, -0.21099529f, -0.00965469f, 0.01906172f, 0.06535794f, 0.27085374f, 0.36298568f, 0.13009871f, -0.21016295f, - 0.18023915f, 0.15936182f, 0.13064987f, 0.09848966f, 0.08230524f, 0.11068418f, 0.11168088f, 0.11505046f, 0.13567778f, 0.12259236f, 0.03115883f, -0.14115321f, -0.20420262f, -0.27855554f, -0.34034745f, -0.31363132f, - -0.12817652f, 0.06412346f, 0.23407500f, 0.37946648f, 0.31127015f, 0.27044470f, 0.18591463f, 0.13643852f, 0.07403884f, -0.00928348f, -0.10609226f, -0.26765738f, -0.35056732f, -0.38530570f, -0.26185421f, -0.14683496f, - -0.63004591f, -0.58451443f, -0.16857245f, -0.08058005f, -0.09034904f, 0.00601978f, 0.10036174f, 0.10417477f, 0.14447621f, 0.13945086f, 0.18409447f, 0.20139949f, 0.10118410f, 0.12033491f, 0.20454736f, 0.24801829f, - 0.09650912f, 0.15979369f, -0.02778062f, -0.21860304f, -0.09723043f, 0.03923136f, 0.06141602f, 0.00600025f, -0.03251321f, -0.01956117f, -0.01004770f, -0.01435564f, 0.01114831f, 0.01113413f, 0.01304939f, 0.02180959f, - -0.00555466f, -0.14717213f, -0.37968771f, -0.12250216f, 0.03497204f, 0.13708345f, 0.03564652f, 0.00785509f, 0.04438533f, 0.06495152f, 0.07142555f, 0.05800545f, 0.06370878f, 0.05930816f, 0.05015268f, 0.02742217f, - 0.24931986f, 0.21084678f, 0.15421842f, 0.14679305f, 0.11899038f, 0.10112391f, 0.08120544f, 0.01848917f, -0.03021656f, -0.11872087f, -0.17582510f, -0.27756371f, -0.26300284f, -0.17730239f, -0.07164775f, 0.03329224f, - -0.17764482f, -0.15058551f, -0.12627503f, -0.06547272f, -0.05935809f, -0.01277874f, 0.01723090f, -0.00829920f, -0.02788840f, 0.01142219f, 0.05531784f, 0.04254613f, 0.04730144f, 0.07050022f, 0.15526930f, 0.22871460f -}; - -const float ivas_sns_cdbks_side_tcx20_stage2[ 32 * 16 ] = { - -0.01387178f, 0.00066194f, 0.01705500f, 0.00585076f, 0.05625865f, -0.08189174f, -0.29272907f, 0.00394582f, 0.14068978f, 0.03888049f, 0.01046905f, 0.03828706f, 0.04214951f, 0.02083198f, 0.00583650f, 0.00757601f, - -0.07101791f, -0.10250166f, 0.03818920f, 0.09162373f, 0.11895681f, 0.13465195f, 0.05088923f, -0.11144198f, -0.13846971f, -0.20720284f, -0.25737659f, -0.15071919f, 0.03249921f, 0.08124332f, 0.17587328f, 0.31480317f, - 0.07163217f, 0.02904662f, 0.01959293f, 0.00805967f, 0.02343380f, 0.02069451f, 0.03232257f, 0.02206815f, 0.03462995f, 0.01790113f, -0.03778174f, -0.14048245f, -0.21681559f, -0.11035045f, 0.05755451f, 0.16849432f, - -0.10816723f, -0.02739052f, -0.08241511f, -0.08220118f, -0.07911491f, 0.04976754f, 0.10255540f, 0.23875558f, 0.25687913f, 0.03165525f, -0.15819986f, -0.14652796f, -0.00803674f, -0.00055281f, -0.01439374f, 0.02738701f, - -0.02270156f, 0.02799492f, 0.14119353f, -0.06753253f, -0.07348415f, 0.16270911f, -0.00726861f, -0.06576199f, -0.02852827f, -0.01072544f, -0.02385080f, 0.01259492f, -0.00575096f, -0.00670975f, -0.01412345f, -0.01805497f, - -0.09730804f, -0.09207854f, -0.06155676f, -0.01193574f, 0.00669004f, 0.04165295f, 0.00840306f, -0.01763756f, -0.08511468f, -0.12564582f, -0.06302424f, 0.13694410f, 0.25188182f, 0.15335399f, 0.00198570f, -0.04661036f, - -0.20229607f, 0.27055253f, 0.05937269f, 0.00423687f, 0.02212468f, -0.00979552f, -0.02654450f, -0.02737173f, -0.03263414f, -0.01695365f, -0.02587673f, -0.00157241f, -0.00766337f, -0.00946241f, 0.00474761f, -0.00086382f, - 0.06446543f, -0.26714355f, 0.12269745f, 0.02565502f, -0.00628892f, 0.00430942f, 0.00862473f, -0.00170779f, 0.00617105f, -0.00718104f, -0.01871731f, 0.01193483f, 0.00860795f, 0.00997801f, 0.02026700f, 0.01832765f, - -0.00061741f, -0.03771131f, -0.03643531f, -0.01560727f, 0.00567664f, -0.00566226f, -0.00287572f, 0.03281006f, 0.04750282f, 0.01895354f, -0.01051254f, 0.01765380f, 0.01259038f, 0.00436097f, -0.01332776f, -0.01679868f, - 0.06930783f, 0.05302917f, 0.06102093f, 0.13367091f, 0.13415662f, 0.00542245f, -0.09926086f, -0.18333294f, -0.21849319f, -0.08349384f, 0.02026711f, 0.05881583f, 0.01345789f, 0.01158885f, 0.01962784f, 0.00421544f, - 0.00361302f, -0.05045316f, -0.00509374f, 0.19082766f, -0.18804365f, -0.05470887f, 0.00052718f, -0.02162397f, -0.00194290f, 0.00166374f, 0.00419055f, 0.02490528f, 0.02211515f, 0.02768455f, 0.02704636f, 0.01929285f, - 0.02476472f, -0.00405085f, -0.02659682f, -0.08596413f, -0.06315428f, -0.06855039f, -0.07500519f, -0.05011866f, -0.06108486f, -0.00618761f, 0.05634272f, 0.08835189f, 0.05894742f, 0.06729406f, 0.07762828f, 0.06738369f, - 0.13702164f, 0.08497052f, 0.07105828f, 0.04681336f, 0.02464482f, 0.00482884f, -0.01068152f, -0.00650854f, 0.01424842f, -0.00735400f, -0.04158832f, -0.02704081f, -0.04141575f, -0.06089035f, -0.09289456f, -0.09521199f, - -0.16780678f, 0.06667456f, 0.18201515f, 0.07399154f, -0.01999438f, 0.05535422f, 0.03900328f, -0.12016656f, -0.10793461f, 0.12328733f, 0.37944090f, 0.03265145f, -0.16138072f, -0.15224770f, -0.10548425f, -0.11740339f, - -0.01321210f, -0.01125461f, -0.03726540f, 0.00275729f, -0.04632781f, -0.24449670f, 0.09996640f, 0.11060024f, 0.00843480f, 0.01020953f, 0.01323100f, 0.03866782f, 0.01652133f, 0.01477176f, 0.01931947f, 0.01807687f, - 0.04427139f, 0.07762448f, -0.03500615f, -0.18353333f, 0.15726631f, 0.06121580f, -0.02944487f, -0.01882019f, -0.02386520f, 0.00077271f, -0.01038885f, 0.00869168f, -0.00564164f, -0.00937383f, -0.01500538f, -0.01876296f, - 0.13690793f, 0.01111401f, -0.03351651f, -0.01725554f, -0.07761571f, -0.12250939f, -0.07631311f, -0.01738486f, 0.14254332f, 0.21322328f, 0.14586930f, 0.03233900f, -0.08363281f, -0.12036013f, -0.07612890f, -0.05727984f, - 0.02949784f, -0.12225020f, -0.24763790f, 0.09504104f, 0.18885156f, 0.02619185f, 0.01292378f, 0.03000215f, 0.00909582f, -0.00936785f, -0.02571287f, 0.00889712f, -0.00234566f, -0.00169068f, 0.00871879f, -0.00021486f, - -0.03852054f, -0.03889437f, -0.08884280f, -0.06896184f, 0.02214326f, 0.10225505f, 0.12832898f, 0.08401269f, 0.06576567f, 0.08182152f, 0.07603111f, 0.04006712f, -0.04791395f, -0.09454805f, -0.10354215f, -0.11920167f, - 0.00938218f, 0.04681937f, 0.08173506f, 0.03766262f, 0.00645705f, -0.03830769f, -0.01180921f, 0.28211251f, 0.02788724f, -0.25197511f, -0.12812732f, 0.01575526f, 0.01158131f, -0.01435589f, -0.04416799f, -0.03064940f, - 0.06374854f, 0.12417689f, 0.09544838f, -0.13379816f, -0.26304159f, -0.06323982f, 0.03308697f, 0.06602140f, 0.04869582f, 0.02626429f, 0.00579212f, 0.01966626f, -0.00288156f, -0.00594553f, -0.00083407f, -0.01315989f, - -0.01689007f, -0.05224654f, -0.05732359f, 0.00797541f, -0.01178359f, -0.06878838f, -0.08592686f, -0.01631491f, -0.01215461f, 0.04690048f, 0.18175850f, 0.26923595f, 0.13470179f, -0.02451530f, -0.12744548f, -0.16718270f, - -0.02187075f, -0.05395855f, -0.02263713f, -0.00045869f, 0.07200871f, 0.08343703f, 0.05673476f, -0.01486174f, 0.02824052f, 0.09407959f, 0.06117651f, -0.48782246f, -0.01849447f, 0.15501071f, 0.05869060f, 0.01072538f, - 0.38479396f, -0.04937867f, -0.07935772f, -0.02506650f, -0.02316760f, -0.02067798f, 0.02695150f, -0.00054291f, -0.05256493f, -0.03399701f, -0.04629317f, -0.01085654f, -0.01817534f, -0.02213798f, -0.01605045f, -0.01347864f, - -0.23847427f, -0.06501920f, -0.01803515f, -0.00348509f, 0.04039109f, 0.01940591f, 0.01835329f, 0.03075053f, 0.03001602f, 0.02853897f, 0.01016726f, 0.03707260f, 0.02160199f, 0.03493100f, 0.03506401f, 0.01872098f, - 0.03862266f, 0.02890076f, 0.02592629f, 0.04317070f, 0.03495444f, -0.02192080f, -0.03469867f, -0.01962511f, -0.02362473f, -0.09521267f, -0.13881717f, -0.03271523f, 0.01372571f, 0.05875682f, 0.06459397f, 0.05796305f, - -0.01487374f, 0.01485744f, 0.01264233f, 0.04546350f, 0.00733058f, 0.08289797f, 0.17793293f, 0.03071348f, -0.11739129f, -0.07170388f, -0.04800450f, -0.00719781f, -0.01613242f, -0.02445791f, -0.03329781f, -0.03877884f, - 0.06919396f, -0.04913878f, -0.23414589f, -0.32278902f, -0.15262688f, -0.02830432f, 0.05881428f, 0.05602689f, 0.08630162f, 0.08206753f, 0.05235369f, 0.05459854f, 0.02224523f, 0.07894449f, 0.13055514f, 0.09590365f, - -0.13456165f, -0.02675728f, 0.10718846f, 0.16038985f, 0.13314470f, 0.04370885f, 0.00879630f, 0.02004215f, 0.04004457f, 0.01767300f, -0.03006764f, -0.02489721f, -0.06793547f, -0.08666415f, -0.07647774f, -0.08362676f, - -0.01963376f, -0.05985601f, -0.06123515f, 0.00802984f, 0.03197310f, 0.08198580f, -0.04518129f, -0.25550460f, -0.02763673f, 0.10534295f, 0.06276998f, 0.04687612f, 0.02909544f, 0.03184387f, 0.04253063f, 0.02859974f, - -0.05005194f, 0.08455623f, 0.27160784f, 0.05333258f, -0.06395559f, -0.12989814f, -0.07303311f, -0.05166257f, -0.03661287f, -0.00149673f, -0.00090933f, 0.02163393f, 0.00899793f, -0.00065646f, -0.01328460f, -0.01856715f, - 0.08465235f, 0.18910437f, -0.17964239f, -0.01596332f, -0.01786381f, -0.02173723f, 0.00655794f, -0.00747303f, -0.01909382f, -0.01073786f, -0.01461080f, 0.01419150f, 0.00349640f, -0.00567498f, -0.00358136f, -0.00162392f -}; - -const float *const ivas_sns_cdbks_side_tcx20[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx20_stage1, ivas_sns_cdbks_side_tcx20_stage2 }; - -const float ivas_sns_means_side_tcx10[M] = { - -0.0085f , 0.0070f , 0.0074f , 0.0045f, - -0.0038f , 0.0071f , 0.0040f , -0.0068f, - -0.0104f , -0.0095f , -0.0259f , -0.0163f, - 0.0127f , 0.0087f , 0.0036f , 0.0262f -}; - -const float ivas_sns_cdbks_side_tcx10_stage1[ 32 * 16 ] = { - -0.23085418f, -0.21005449f, -0.18570241f, -0.13606880f, -0.11948469f, -0.10308038f, -0.11104958f, -0.15882089f, -0.13896854f, -0.06621316f, 0.05217852f, 0.11795393f, 0.15762859f, 0.26837024f, 0.37542593f, 0.48873907f, - 0.13745600f, 0.20131847f, 0.22182278f, 0.29526068f, 0.24656821f, 0.13757111f, 0.07460669f, 0.03134436f, -0.06561883f, -0.17480962f, -0.24070771f, -0.31627147f, -0.28865063f, -0.14849001f, -0.03399112f, -0.07740884f, - -0.13299250f, -0.14002491f, -0.11936499f, -0.04179630f, -0.03438902f, 0.04431344f, 0.06951552f, 0.01403797f, 0.05531963f, -0.01394528f, -0.09745552f, 0.00448586f, 0.26823524f, 0.23321159f, 0.06675539f, -0.17590634f, - 0.06191756f, 0.11582434f, 0.13192343f, 0.09527126f, 0.08193836f, 0.01139745f, 0.03044540f, 0.11065563f, 0.07578016f, -0.02083963f, -0.07297648f, -0.08340844f, -0.07282079f, -0.12840160f, -0.18605485f, -0.15065167f, - -0.03483375f, -0.04038755f, -0.07410056f, -0.06961358f, -0.04495163f, -0.12359739f, -0.20954724f, -0.19583867f, -0.14529606f, 0.00841374f, 0.12968518f, 0.22831580f, 0.23147392f, 0.13653895f, 0.09511995f, 0.10861877f, - 0.06658553f, 0.21860187f, 0.09436141f, -0.09071645f, -0.07082980f, 0.04518200f, 0.04859027f, -0.03547180f, -0.06006165f, -0.02756024f, 0.00158143f, -0.01511772f, -0.04477551f, -0.04937419f, -0.04159366f, -0.03940128f, - 0.02864506f, -0.04039106f, -0.15284948f, -0.42538299f, -0.19236357f, 0.03104685f, 0.02253710f, 0.02311004f, 0.04867318f, 0.06745871f, 0.09338212f, 0.09710035f, 0.07856015f, 0.09301454f, 0.11632315f, 0.11113598f, - 0.14528623f, 0.29868967f, 0.46429789f, 0.54323288f, 0.40204138f, 0.26355278f, 0.17207026f, 0.09889195f, -0.00279626f, -0.16206412f, -0.29083020f, -0.40501466f, -0.54537297f, -0.46768767f, -0.27766915f, -0.23662804f, - -0.38143153f, -0.38286102f, -0.37711911f, -0.29609917f, -0.25719669f, -0.20628984f, -0.15545466f, -0.08387721f, -0.03028209f, 0.14307072f, 0.32718172f, 0.40216059f, 0.39369890f, 0.30234268f, 0.29650354f, 0.30565312f, - 0.35958422f, 0.51604595f, 0.41116626f, 0.13914238f, -0.03378266f, -0.13855653f, -0.18788816f, -0.17389274f, -0.14739128f, -0.16521614f, -0.14451729f, -0.13567903f, -0.09514774f, -0.07488226f, -0.06811874f, -0.06086662f, - -0.66004345f, -0.31718869f, -0.22177390f, -0.12449418f, -0.09939825f, 0.07331022f, 0.21408044f, 0.21558931f, 0.11208625f, 0.04257974f, -0.01807639f, 0.09442548f, 0.06053141f, 0.06888331f, 0.20357028f, 0.35591847f, - -0.16304924f, -0.12420037f, -0.04222860f, 0.05588216f, 0.18467874f, 0.32957705f, 0.39156897f, 0.27848510f, 0.13897139f, -0.02741662f, -0.14580317f, -0.19651482f, -0.22072919f, -0.18213237f, -0.12846721f, -0.14862176f, - -0.17887269f, -0.40659902f, -0.02516902f, 0.09601495f, 0.06138763f, 0.02130781f, 0.05102018f, 0.04939750f, 0.05199909f, 0.05639114f, 0.06766195f, 0.07106289f, 0.04938017f, 0.02276475f, 0.00986626f, 0.00238653f, - 0.35668951f, 0.22742896f, -0.06232152f, -0.18667516f, -0.28394315f, -0.31893226f, -0.28501785f, -0.19154472f, -0.14625471f, -0.07293625f, 0.05620192f, 0.15269426f, 0.20840665f, 0.19892856f, 0.16095072f, 0.18632539f, - -0.04935166f, -0.11272268f, 0.08233717f, 0.29988006f, 0.19331526f, 0.14054174f, 0.08680898f, -0.01410902f, -0.04313985f, -0.03494681f, -0.04540697f, -0.07243925f, -0.09250963f, -0.09472804f, -0.10148439f, -0.14204503f, - 0.18485137f, 0.25341568f, 0.21009944f, 0.20568550f, 0.20518381f, 0.27019582f, 0.21216885f, 0.00546777f, -0.00044021f, -0.10735443f, -0.20735090f, -0.14224940f, -0.09351389f, -0.09761419f, -0.36078632f, -0.53775866f, - -0.37281135f, -0.49261999f, -0.36727842f, -0.16577288f, -0.02238290f, 0.00199674f, -0.01679564f, 0.04714198f, 0.10589472f, 0.16394573f, 0.18921056f, 0.20782063f, 0.19861654f, 0.19447370f, 0.17625681f, 0.15230414f, - 0.06686853f, 0.05611921f, 0.03365910f, 0.02756852f, 0.08295478f, 0.06008045f, -0.03273553f, -0.04364718f, -0.01449926f, -0.16865975f, -0.29690154f, -0.15022460f, -0.01812698f, 0.04654261f, 0.11587511f, 0.23512676f, - 0.05629958f, -0.04922929f, -0.24893641f, -0.04282766f, 0.05664299f, 0.06157661f, 0.05406340f, 0.01868661f, -0.00352496f, -0.00155314f, 0.04576544f, 0.04384907f, 0.01829060f, 0.01451148f, 0.01064548f, -0.03425997f, - 0.00489548f, -0.00560306f, 0.00615573f, -0.00441324f, 0.02514502f, 0.02634783f, 0.01098806f, 0.01133668f, 0.06739798f, 0.14368795f, 0.11283267f, 0.01118776f, -0.08555990f, -0.10393666f, -0.11315265f, -0.10730981f, - -0.15112519f, -0.11783557f, -0.13754019f, -0.07632290f, -0.06121828f, -0.06360113f, -0.05018035f, -0.00549590f, 0.05908192f, 0.04630727f, 0.02538631f, -0.00811102f, -0.02567731f, 0.08327373f, 0.21071206f, 0.27234661f, - 0.56834545f, 0.15133540f, -0.01992277f, -0.04770211f, -0.05432411f, -0.02191499f, -0.02550971f, -0.03144176f, -0.02317891f, -0.02811835f, -0.04327235f, -0.06018613f, -0.07647819f, -0.07349573f, -0.08821391f, -0.12592196f, - -0.03137272f, -0.03974785f, -0.03770784f, -0.05600026f, -0.03191645f, -0.04815164f, -0.04304812f, 0.02455638f, 0.06207261f, 0.02331568f, -0.01876696f, -0.04473163f, -0.02498340f, 0.06425271f, 0.11960865f, 0.08262092f, - 0.45973777f, 0.45999547f, 0.38173824f, 0.22785755f, 0.16821465f, 0.17382620f, 0.20517627f, 0.04061839f, -0.12685907f, -0.26643193f, -0.37356030f, -0.36765140f, -0.32336919f, -0.29335060f, -0.29318189f, -0.07275984f, - -0.07969188f, -0.23669686f, -0.42690692f, -0.49932686f, -0.40006183f, -0.28450852f, -0.22942850f, -0.12475617f, -0.03421007f, 0.12993786f, 0.27530393f, 0.32731838f, 0.50859567f, 0.47553443f, 0.32383390f, 0.27506335f, - 0.34046042f, 0.28909102f, 0.17226731f, 0.06244214f, 0.10377957f, 0.13146006f, 0.03081777f, -0.02599206f, -0.11020633f, -0.20031818f, -0.27040991f, -0.19266314f, -0.09502591f, -0.17705982f, -0.16383079f, 0.10518781f, - -0.43345226f, 0.01054419f, 0.06653837f, 0.02899912f, 0.04789640f, 0.03995846f, 0.02631173f, 0.04744618f, 0.05142942f, 0.03249742f, 0.03044055f, 0.03518159f, 0.01592359f, 0.00998224f, -0.00417209f, -0.00552518f, - -0.35779590f, -0.24084024f, -0.08920896f, -0.01964746f, -0.04518980f, 0.07193759f, 0.22722040f, 0.28999718f, 0.39417664f, 0.30171530f, 0.12526317f, 0.00759665f, -0.11081727f, -0.17325866f, -0.19301481f, -0.18813416f, - -0.16184582f, -0.19051919f, -0.19758934f, -0.16274525f, -0.19869541f, -0.22576659f, -0.13506612f, 0.01672518f, 0.13044875f, 0.26035967f, 0.27598891f, 0.22195891f, 0.13262193f, 0.13096192f, 0.10021772f, 0.00294471f, - 0.07825952f, 0.06525092f, 0.17527642f, 0.02096373f, -0.24373383f, -0.29324959f, -0.11558339f, -0.03040273f, 0.01406029f, 0.04150557f, 0.06984124f, 0.07372710f, 0.06551062f, 0.06332513f, 0.02509070f, -0.00984142f, - 0.08701726f, 0.12843394f, 0.16700094f, 0.15034452f, 0.12947411f, -0.01656238f, -0.15483649f, -0.18970569f, -0.18557831f, -0.09352705f, -0.01998975f, -0.00988876f, 0.00753489f, 0.01530672f, 0.00965047f, -0.02467425f, - 0.26197082f, 0.21849905f, 0.21673972f, 0.16654799f, 0.18547759f, 0.16177425f, 0.16111117f, 0.20927596f, 0.18073438f, 0.03535012f, -0.14032550f, -0.22486416f, -0.33259461f, -0.40957544f, -0.38613800f, -0.30398287f -}; - -const float ivas_sns_cdbks_side_tcx10_stage2[ 8 * 16 ] = { - -0.13993218f, -0.02453874f, 0.12672628f, 0.02785695f, 0.06681568f, 0.12811808f, 0.07492973f, -0.01977524f, -0.05822869f, -0.07547464f, -0.06553072f, -0.05473233f, -0.04357434f, -0.00634272f, 0.03406826f, 0.02961442f, - -0.06711216f, -0.11444162f, -0.09789788f, -0.09123304f, -0.12190348f, -0.00995424f, 0.10989921f, 0.11555575f, 0.06002452f, 0.03801973f, 0.02047622f, 0.01721280f, 0.02414692f, 0.02829613f, 0.03827912f, 0.05063187f, - 0.05523005f, 0.03052467f, 0.03910551f, 0.05802321f, 0.02158461f, 0.03249705f, 0.04015871f, -0.00878163f, -0.05597684f, -0.02391125f, 0.03722223f, 0.06349026f, 0.02718346f, -0.07380323f, -0.12743287f, -0.11511406f, - 0.11202279f, 0.20074913f, 0.04546646f, -0.10844616f, -0.14193153f, -0.08529745f, -0.03252409f, 0.03394947f, 0.04414551f, 0.00658101f, -0.01249852f, -0.01845361f, -0.01335408f, -0.01042434f, -0.00769413f, -0.01229041f, - -0.04167890f, -0.07371348f, -0.14826543f, 0.02126701f, 0.16009313f, 0.11910639f, 0.05602141f, 0.08082496f, 0.12544839f, 0.05415940f, -0.03080142f, -0.04070302f, -0.06024186f, -0.07129750f, -0.07769974f, -0.07251926f, - -0.07457123f, -0.04115197f, -0.04049765f, -0.06857318f, -0.04225051f, -0.03861733f, -0.05120942f, -0.08876715f, -0.05537668f, 0.03678654f, 0.09038235f, 0.06681871f, 0.08915640f, 0.13108744f, 0.08129597f, 0.00548771f, - -0.05294641f, 0.03370244f, 0.16024587f, 0.17199155f, 0.02454307f, -0.13278320f, -0.13945295f, -0.04199699f, 0.00678627f, 0.02029543f, 0.00856028f, 0.00137417f, -0.01135502f, -0.03017687f, -0.02257884f, 0.00379131f, - 0.20898804f, -0.01113044f, -0.08488316f, -0.01088633f, 0.03304903f, -0.01306932f, -0.05782260f, -0.07100917f, -0.06682249f, -0.05645623f, -0.04781041f, -0.03500698f, -0.01196148f, 0.03266111f, 0.08176223f, 0.11039842f -}; - -const float *const ivas_sns_cdbks_side_tcx10[SNS_MSVQ_NSTAGES_SIDE] = { ivas_sns_cdbks_side_tcx10_stage1, ivas_sns_cdbks_side_tcx10_stage2 }; -#endif -#endif // SNS_MSVQ -#ifdef FIX_445_SNS_BUGFIXES const int16_t sns_1st_cdbk[2][2][8 * 32] = { { /* split 1 */ { /* TCX 20 */ @@ -6940,6 +6341,101 @@ const int16_t sns_1st_means_32k[2][16] = { 16510, 20660, 16025, 7224, 3921, 3868, 2623, 742, -1316, -6269, -8284, -7288, -6380, -8410, -13351, -20277, } }; -#endif + +ACPL_QUANT_TABLE alpha_quant_table[] = +{ + { /* Alfa Fine */ + 33, /* nquant */ + 16, /* offset */ + { -2.000000e+000f, -1.809375e+000f, -1.637500e+000f, -1.484375e+000f, -1.350000e+000f, -1.234375e+000f, -1.137500e+000f, -1.059375e+000f, -1.000000e+000f, -9.406250e-001f, + -8.625000e-001f, -7.656250e-001f, -6.500000e-001f, -5.156250e-001f, -3.625000e-001f, -1.906250e-001f, +0.000000e+000f, +1.906250e-001f, +3.625000e-001f, +5.156250e-001f, + +6.500000e-001f, +7.656250e-001f, +8.625000e-001f, +9.406250e-001f, +1.000000e+000f, +1.059375e+000f, +1.137500e+000f, +1.234375e+000f, +1.350000e+000f, +1.484375e+000f, + +1.637500e+000f, +1.809375e+000f, +2.000000e+000f } /* data */ + }, /* End Alfa Fine */ + { /* Alfa Coarse */ + 17, /* nquant */ + 8, /* offset */ + { -2.000000e+000f, -1.637500e+000f, -1.350000e+000f, -1.137500e+000f, -1.000000e+000f, -8.625000e-001f, -6.500000e-001f, -3.625000e-001f, +0.000000e+000f, +3.625000e-001f, + +6.500000e-001f, +8.625000e-001f, +1.000000e+000f, +1.137500e+000f, +1.350000e+000f, +1.637500e+000f, +2.000000e+000f } /* data */ + } /* End Alfa Coarse */ +}; + +ACPL_QUANT_TABLE beta_quant_table[2][9] = +{ + { + { /* Beta Fine #1 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +2.375000e-001f, +5.500000e-001f, +9.375000e-001f, +1.400000e+000f, +1.937500e+000f, +2.550000e+000f, +3.237500e+000f, +4.000000e+000f } /* data */ + }, /* End Beta Fine #1 */ + { /* Beta Fine #2 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +2.035449e-001f, +4.713672e-001f, +8.034668e-001f, +1.199844e+000f, +1.660498e+000f, +2.185430e+000f, +2.774639e+000f, +3.428125e+000f } /* data */ + }, /* End Beta Fine #2 */ + { /* Beta Fine #3 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +1.729297e-001f, +4.004688e-001f, +6.826172e-001f, +1.019375e+000f, +1.410742e+000f, +1.856719e+000f, +2.357305e+000f, +2.912500e+000f } /* data */ + }, /* End Beta Fine #3 */ + { /* Beta Fine #4 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +1.456543e-001f, +3.373047e-001f, +5.749512e-001f, +8.585938e-001f, +1.188232e+000f, +1.563867e+000f, +1.985498e+000f, +2.453125e+000f } /* data */ + }, /* End Beta Fine #4 */ + { /* Beta Fine #5 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +1.217188e-001f, +2.818750e-001f, +4.804688e-001f, +7.175000e-001f, +9.929688e-001f, +1.306875e+000f, +1.659219e+000f, +2.050000e+000f } /* data */ + }, /* End Beta Fine #5 */ + { /* Beta Fine #6 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +1.011230e-001f, +2.341797e-001f, +3.991699e-001f, +5.960938e-001f, +8.249512e-001f, +1.085742e+000f, +1.378467e+000f, +1.703125e+000f } /* data */ + }, /* End Beta Fine #6 */ + { /* Beta Fine #7 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +8.386719e-002f, +1.942188e-001f, +3.310547e-001f, +4.943750e-001f, +6.841797e-001f, +9.004688e-001f, +1.143242e+000f, +1.412500e+000f } /* data */ + }, /* End Beta Fine #7 */ + { /* Beta Fine #8 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +6.995117e-002f, +1.619922e-001f, +2.761230e-001f, +4.123438e-001f, +5.706543e-001f, +7.510547e-001f, +9.535449e-001f, +1.178125e+000f } /* data */ + }, /* End Beta Fine #8 */ + { /* Beta Fine #9 */ + 9, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +5.937500e-002f, +1.375000e-001f, +2.343750e-001f, +3.500000e-001f, +4.843750e-001f, +6.375000e-001f, +8.093750e-001f, +1.000000e+000f } /* data */ + } /* End Beta Fine #9 */ + }, + { + { /* Beta Coarse #1 */ + 5, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +5.500000e-001f, +1.400000e+000f, +2.550000e+000f, +4.000000e+000f } /* data */ + }, /* End Beta Coarse #1 */ + { /* Beta Coarse #2 */ + 5, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +4.004688e-001f, +1.019375e+000f, +1.856719e+000f, +2.912500e+000f } /* data */ + }, /* End Beta Coarse #2 */ + { /* Beta Coarse #3 */ + 5, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +2.818750e-001f, +7.175000e-001f, +1.306875e+000f, +2.050000e+000f } /* data */ + }, /* End Beta Coarse #3 */ + { /* Beta Coarse #4 */ + 5, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +1.942188e-001f, +4.943750e-001f, +9.004688e-001f, +1.412500e+000f } /* data */ + }, /* End Beta Coarse #4 */ + { /* Beta Coarse #5 */ + 5, /* nquant */ + 0, /* offset */ + { +0.000000e+000f, +1.375000e-001f, +3.500000e-001f, +6.375000e-001f, +1.000000e+000f } /* data */ + } /* End Beta Coarse #5 */ + } +}; /* clang-format on */ diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index ccfc3f9000282f65fcbc7ea088f4fecf00cfaafb..f43bacbf3bcb91500bfb8bd65b080fe760ab05d1 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -161,6 +161,13 @@ extern const int16_t DirAC_band_grouping_5[5 + 1]; extern const int16_t DirAC_block_grouping[MAX_PARAM_SPATIAL_SUBFRAMES + 1]; extern const int16_t DirAC_block_grouping_5ms_MDFT[MAX_PARAM_SPATIAL_SUBFRAMES + 1]; +extern const float c_weights[DIRAC_NO_FB_BANDS_MAX]; + +extern const float w_nm[NUM_ANA_SECTORS][9]; +extern const float x_nm[NUM_ANA_SECTORS][9]; +extern const float y_nm[NUM_ANA_SECTORS][9]; +extern const float z_nm[NUM_ANA_SECTORS][9]; + /*------------------------------------------------------------------------------------------* * SPAR ROM tables *------------------------------------------------------------------------------------------*/ @@ -172,9 +179,11 @@ extern const ivas_huff_models_t ivas_huff_pred_r_consts[TOTAL_PRED_QUANT_STRATS_ extern const ivas_huff_models_t ivas_huff_drct_r_consts[TOTAL_DRCT_QUANT_STRATS]; extern const ivas_huff_models_t ivas_huff_decd_r_consts[TOTAL_DECD_QUANT_STRATS]; extern const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN]; -extern const int16_t remix_order_set[1][IVAS_SPAR_MAX_CH]; +extern const int16_t remix_order_set[1][DIRAC_MAX_ANA_CHANS]; extern const int16_t keep_planar[IVAS_SPAR_MAX_CH - FOA_CHANNELS]; -extern const int16_t HOA_keep_ind[IVAS_SPAR_MAX_CH]; +extern const int16_t HOA_keep_ind[IVAS_SPAR_MAX_FB_IN_CHAN]; +extern const int16_t HOA_keep_ind_spar[IVAS_SPAR_MAX_CH]; +extern const int16_t HOA_keep_ind_spar512[IVAS_SPAR_MAX_CH]; extern const float dtx_pd_real_min_max[2]; extern const int16_t dtx_pd_real_q_levels[3][3]; @@ -365,9 +374,7 @@ extern const float ivas_cos_twiddle_80[IVAS_80_PT_LEN >> 1]; extern const float ivas_mdft_coeff_cos_twid_240[IVAS_240_PT_LEN + 1]; extern const float ivas_mdft_coeff_cos_twid_160[IVAS_160_PT_LEN + 1]; -#ifdef PARAMMC_SHORT_ENC_MDFT extern const float ivas_mdft_coeff_cos_twid_120[IVAS_120_PT_LEN + 1]; -#endif extern const float ivas_mdft_coeff_cos_twid_80[IVAS_80_PT_LEN + 1]; extern const float ivas_mdft_coeff_cos_twid_40[IVAS_40_PT_LEN + 1]; extern const float ivas_mdft_coeff_cos_twid_960[IVAS_960_PT_LEN + 1]; @@ -404,11 +411,9 @@ extern const float ivas_fb_resp_cheby_ramp_16del[IVAS_FB_1MS_16K_SAMP + 1]; extern const int16_t ivas_num_active_bands[FB - WB + 1]; -#ifdef SNS_MSVQ /*------------------------------------------------------------------------------------------* * SNS MSVQ codebooks and means *------------------------------------------------------------------------------------------*/ -#ifdef FIX_445_SNS_BUGFIXES extern const int16_t ivas_sns_cdbks_tcx20_levels[]; extern const int16_t ivas_sns_cdbks_tcx20_bits[]; @@ -425,37 +430,14 @@ extern const int16_t ivas_sns_cdbks_side_tcx10_bits[]; extern const float *const ivas_sns_cdbks_side_tcx20[]; extern const float *const ivas_sns_cdbks_side_tcx10[]; -#else -extern const int16_t ivas_sns_cdbks_tcx20_levels[]; -extern const int16_t ivas_sns_cdbks_tcx20_bits[]; - -extern const int16_t ivas_sns_cdbks_tcx10_levels[]; -extern const int16_t ivas_sns_cdbks_tcx10_bits[]; - -extern const float *const ivas_sns_cdbks_tcx20[]; -extern const float *const ivas_sns_cdbks_tcx10[]; -extern const float ivas_sns_means_tcx20[]; -extern const float ivas_sns_means_tcx10[]; +extern ACPL_QUANT_TABLE alpha_quant_table[]; +extern ACPL_QUANT_TABLE beta_quant_table[2][9]; -extern const int16_t ivas_sns_cdbks_side_tcx20_levels[]; -extern const int16_t ivas_sns_cdbks_side_tcx20_bits[]; -extern const int16_t ivas_sns_cdbks_side_tcx10_levels[]; -extern const int16_t ivas_sns_cdbks_side_tcx10_bits[]; - -extern const float *const ivas_sns_cdbks_side_tcx20[]; -extern const float ivas_sns_means_side_tcx20[]; -extern const float *const ivas_sns_cdbks_side_tcx10[]; -extern const float ivas_sns_means_side_tcx10[]; -#endif -#endif - -#ifdef FIX_445_SNS_BUGFIXES /* means and codebooks for the split VQ in the 2-stage SNS VQ */ extern const int16_t sns_1st_cdbk[2][2][8 * 32]; extern const int16_t sns_1st_means_16k[2][16]; extern const int16_t sns_1st_means_25k6[2][16]; extern const int16_t sns_1st_means_32k[2][16]; -#endif /* IVAS_ROM_COM_H */ #endif diff --git a/lib_com/ivas_sba_config.c b/lib_com/ivas_sba_config.c index d307e3e9acc765144cbeff170123ac5f2802ad64..e7a448315f43ef827f94e165106f77c728c140e6 100644 --- a/lib_com/ivas_sba_config.c +++ b/lib_com/ivas_sba_config.c @@ -222,7 +222,8 @@ int16_t ivas_sba_get_nchan( /*! r: number of ambisonics metadata channels */ int16_t ivas_sba_get_nchan_metadata( const int16_t sba_order /* i : Ambisonic (SBA) order */ -) + , + const int32_t ivas_total_brate ) { int16_t nb_channels; @@ -232,8 +233,17 @@ int16_t ivas_sba_get_nchan_metadata( } else { - /* FOA + planar HOA */ - nb_channels = FOA_CHANNELS + 2 * ( sba_order - 1 ); + if ( ivas_total_brate >= IVAS_512k ) + { + nb_channels = ( SBA_HOA2_ORDER + 1 ) * ( SBA_HOA2_ORDER + 1 ); + nb_channels += 2; + nb_channels = min( nb_channels, ( sba_order + 1 ) * ( sba_order + 1 ) ); + } + else + { + /* FOA + planar HOA */ + nb_channels = FOA_CHANNELS + 2 * ( sba_order - 1 ); + } } return ( nb_channels ); @@ -246,25 +256,58 @@ int16_t ivas_sba_get_nchan_metadata( *-------------------------------------------------------------------*/ /*! r: flag indicating to code SPAR HOA MD for all bands */ -int16_t ivas_sba_get_spar_hoa_md_flag( - const int16_t sba_order, /* i : Ambisonic (SBA) order */ - const int32_t ivas_total_brate /* i : IVAS total bitrate */ -) +void ivas_sba_get_spar_hoa_ch_ind( + const int16_t num_md_chs, /* i : number of MD channels */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ) { - int16_t spar_hoa_md_flag = 0; + int16_t ch; + const int16_t *hoa_ind; + if ( ivas_total_brate >= IVAS_512k ) + { + hoa_ind = HOA_keep_ind_spar512; + } + else + { + hoa_ind = HOA_keep_ind_spar; + } + for ( ch = 0; ch < num_md_chs; ch++ ) + { + HOA_md_ind[ch] = hoa_ind[ch]; + } + + return; +} + +void ivas_sba_get_spar_hoa_md_flag( + const int16_t sba_order, /* i : Ambisonic (SBA) order */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + int16_t *spar_hoa_md_flag, + int16_t *spar_hoa_dirac2spar_md_flag ) +{ if ( sba_order > 1 && ivas_total_brate >= IVAS_256k ) { - spar_hoa_md_flag = 1; + *spar_hoa_md_flag = 1; } else { - spar_hoa_md_flag = 0; + *spar_hoa_md_flag = 0; } - return spar_hoa_md_flag; + if ( sba_order > 1 && ivas_total_brate >= IVAS_512k ) + { + *spar_hoa_dirac2spar_md_flag = 0; + } + else + { + *spar_hoa_dirac2spar_md_flag = 1; + } + + return; } + /*-------------------------------------------------------------------* * ivas_sba_zero_vert_comp() * diff --git a/lib_com/ivas_sns_com.c b/lib_com/ivas_sns_com.c index b109ef87d6978833b560e3ab34f0005ba12fde7d..da7b37e8c55f2ecfecc5f0439968cf315b39772e 100644 --- a/lib_com/ivas_sns_com.c +++ b/lib_com/ivas_sns_com.c @@ -36,9 +36,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#ifdef FIX_445_SNS_BUGFIXES #include "ivas_rom_com.h" -#endif #include #include #ifdef DEBUGGING @@ -121,7 +119,6 @@ void sns_compute_scf( xs[FDNS_NPTS - 1] = 0.75f * x[FDNS_NPTS - 1] + 0.25f * x[FDNS_NPTS - 2]; /* Pre-emphasis */ -#ifdef FIX_445_SNS_BUGFIXES switch ( L_frame ) { case L_FRAME16k: @@ -137,33 +134,6 @@ void sns_compute_scf( tilt = 0.f; assert( !"illegal frame length in sns_compute_scf" ); } -#else - if ( L_frame == L_FRAME16k ) - { - tilt = 18.f; - } - else if ( L_frame == L_SPEC16k_EXT ) - { - tilt = 20.f; - } - else if ( L_frame == L_FRAME25_6k ) - { - tilt = 22.f; - } - else if ( L_frame == L_FRAME32k ) - { - tilt = 26.f; - } - else if ( L_frame == L_SPEC32k_EXT ) - { - tilt = 30.f; - } - else - { - tilt = 0.f; - assert( 0 && "illegal frame length in sns_compute_scf" ); - } -#endif for ( i = 0; i < FDNS_NPTS; i++ ) { diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 6688edc0415b0bcd0b037cf848e446e567a63584..fb0f2637653dc12f2f173922b39d4265fa441de1 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -368,7 +368,7 @@ void ivas_spar_config( * Get SPAR table index *-----------------------------------------------------------------------------------------*/ -/* !r: config. table index */ +/*! r: config. table index */ int16_t ivas_get_spar_table_idx( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t sba_order, /* i : Ambisonic (SBA) order */ @@ -1679,14 +1679,21 @@ void ivas_get_spar_md_from_dirac( float **ppMixer_mat[IVAS_MAX_FB_MIXER_OUT_CH]; float *pMixer_mat[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH]; float en_ratio_fac, diff_norm_order1, diff_norm_order2, diff_norm_order3; + int16_t ndm, foa_ch, hoa2_ch; float P_dir_fact[IVAS_SPAR_MAX_CH - 1]; const int16_t *remix_order; remix_order = remix_order_set[hSpar_md_cfg->remix_unmix_order]; - num_ch = ivas_sba_get_nchan_metadata( order ); - hoa2_ch = ivas_sba_get_nchan_metadata( SBA_HOA2_ORDER ); + num_ch = ivas_sba_get_nchan_metadata( order, + IVAS_256k /*dummy value as order is always 1 in this function*/ + ); + + hoa2_ch = ivas_sba_get_nchan_metadata( SBA_HOA2_ORDER, + IVAS_256k /*dummy value as order is always 1 in this function*/ + ); + foa_ch = FOA_CHANNELS; diff_norm_order1 = 3.0f; diff_norm_order2 = 5.0f; @@ -1756,6 +1763,7 @@ void ivas_get_spar_md_from_dirac( /*SPAR from DirAC*/ set_f( response_avg, 0.0f, MAX_OUTPUT_CHANNELS ); + if ( n_ts > 1 ) { ivas_dirac_dec_get_response( (int16_t) azi_dirac[band][i_ts], (int16_t) ele_dirac[band][i_ts], response_avg, order ); @@ -1830,64 +1838,69 @@ void ivas_get_spar_md_from_dirac( { response_avg[i] = response_avg[HOA_keep_ind[i]]; } + en_ratio_fac = ( 1.0f - diffuseness[band] ); - for ( i = 0; i < num_ch; i++ ) { - for ( j = 0; j < num_ch; j++ ) + for ( i = 0; i < num_ch; i++ ) { - if ( i == j ) + for ( j = 0; j < num_ch; j++ ) { - if ( i == 0 ) - { - cov_real_dirac[i][i][band] = 1.0f; - } - else + if ( i == j ) { - cov_real_dirac[i][j][band] = en_ratio_fac * response_avg[i] * response_avg[j]; - if ( hSpar_md_cfg->nchan_transport <= 2 ) + if ( i == 0 ) + { + cov_real_dirac[i][i][band] = 1.0f; + } + else { - cov_real_dirac[i][j][band] *= en_ratio_fac; - if ( ( i >= ndm ) && ( dtx_vad == 1 ) ) + cov_real_dirac[i][j][band] = en_ratio_fac * response_avg[i] * response_avg[j]; + + if ( hSpar_md_cfg->nchan_transport <= 2 ) { - cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) * P_dir_fact[i - ndm]; + + cov_real_dirac[i][j][band] *= en_ratio_fac; + if ( ( i >= ndm ) && ( dtx_vad == 1 ) ) + { + cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) * P_dir_fact[i - ndm]; + } + else + { + if ( i < foa_ch ) + { + cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) / diff_norm_order1; + } + else if ( i < hoa2_ch ) + { + cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) / diff_norm_order2; + } + else + { + cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) / diff_norm_order3; + } + } } else { if ( i < foa_ch ) { - cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) / diff_norm_order1; + cov_real_dirac[i][j][band] += ( 1.0f - en_ratio_fac ) / diff_norm_order1; } else if ( i < hoa2_ch ) { - cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) / diff_norm_order2; + cov_real_dirac[i][j][band] += ( 1.0f - en_ratio_fac ) / diff_norm_order2; } else { - cov_real_dirac[i][j][band] += ( 1.0f - ( en_ratio_fac * en_ratio_fac ) ) / diff_norm_order3; + cov_real_dirac[i][j][band] += ( 1.0f - en_ratio_fac ) / diff_norm_order3; } } } - else - { - if ( i < foa_ch ) - { - cov_real_dirac[i][j][band] += ( 1.0f - en_ratio_fac ) / diff_norm_order1; - } - else if ( i < hoa2_ch ) - { - cov_real_dirac[i][j][band] += ( 1.0f - en_ratio_fac ) / diff_norm_order2; - } - else - { - cov_real_dirac[i][j][band] += ( 1.0f - en_ratio_fac ) / diff_norm_order3; - } - } } - } - else - { - cov_real_dirac[i][j][band] = en_ratio_fac * response_avg[i] * response_avg[j]; + else + { + cov_real_dirac[i][j][band] = en_ratio_fac * response_avg[i] * response_avg[j]; + } } } } @@ -1901,7 +1914,7 @@ void ivas_get_spar_md_from_dirac( } } -#ifdef DEBUG_SPAR_WRITE_OUT_COV +#ifdef DEBUG_SBA_MD_DUMP { static FILE *fid = 0; int16_t k = 0; @@ -2154,13 +2167,8 @@ void ivas_spar_set_bitrate_config( max_bits += (int16_t) ( ivas_spar_br_table_consts[table_idx].core_brs[i][1] / FRAMES_PER_SEC ); } -#ifdef COMBINED_FORMAT_SIGNALING pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_EXTENDED - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - total_bits; pSpar_md_cfg->max_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_EXTENDED - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - max_bits; -#else - pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - total_bits; - pSpar_md_cfg->max_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - max_bits; -#endif md_coding_bits_header = SPAR_NUM_CODING_STRAT_BITS + pSpar_md_cfg->quant_strat_bits; diff --git a/lib_com/ivas_stat_com.h b/lib_com/ivas_stat_com.h index 305a18951a2338d8d8d282cc81a5a88e4089ea39..4c4a2299382ab75dd50eb93c05bab19e2daf6abb 100644 --- a/lib_com/ivas_stat_com.h +++ b/lib_com/ivas_stat_com.h @@ -43,21 +43,24 @@ /*----------------------------------------------------------------------------------* * Declaration of ISM common (encoder & decoder) structure *----------------------------------------------------------------------------------*/ + typedef struct { int16_t last_angle1_idx; /* last frame index of coded azimuth/yaw */ int16_t angle1_diff_cnt; /* FEC counter of consecutive differentially azimuth/yaw coded frames */ int16_t last_angle2_idx; /* last frame index of coded elevation/pitch */ int16_t angle2_diff_cnt; /* FEC counter of consecutive differentially elevation/pitch coded frames */ + } ISM_METADATA_ANGLE, *ISM_METADATA_ANGLE_HANDLE; + /* ISM metadata handle (storage for one frame of read ISM metadata) */ typedef struct { int16_t ism_metadata_flag; /* flag whether metadata are coded in particular frame of particular object */ int16_t last_ism_metadata_flag; /* last frame ism_metadata_flag */ - - float azimuth; /* azimuth value read from the input metadata file */ - float elevation; /* azimuth value read from the input metadata file */ + int16_t non_diegetic_flag; /* Non-diegetic (non-headtracked) object flag */ + float azimuth; /* azimuth value read from the input metadata file */ + float elevation; /* azimuth value read from the input metadata file */ float radius; float yaw; /* azimuth orientation value read from the input metadata file */ float pitch; /* elevation orientation value read from the input metadata file */ @@ -71,13 +74,10 @@ typedef struct float last_true_azimuth; /* MD smoothing in DTX- last true Q azimuth value */ float last_true_elevation; /* MD smoothing in DTX- last true Q elevation value */ -#ifdef FIX_387_ISM_MD_FEC int16_t ism_md_fec_cnt_enc; /* counter of continuous frames where MD are not transmitted */ int16_t ism_md_inc_diff_cnt; /* counter of continuous frames where MD are transmitted in inactive segments when MD significantly changes */ -#endif -#ifdef FIX_435_ISM_MERGE_BUG - float last_true_radius; /* last true Q radius value */ -#endif + float last_true_radius; /* last true Q radius value */ + } ISM_METADATA_FRAME, *ISM_METADATA_HANDLE; @@ -164,9 +164,7 @@ typedef struct ivas_param_ism_data_structure int16_t flag_noisy_speech; int16_t noisy_speech_buffer[PARAM_ISM_HYS_BUF_SIZE]; -#ifdef FIX_440_PARAM_ISM_DIR_NOISE int16_t flag_equal_energy; -#endif } PARAM_ISM_CONFIG_DATA, *PARAM_ISM_CONFIG_HANDLE; @@ -179,9 +177,7 @@ typedef struct ivas_dirac_config_data_struct { int16_t enc_param_start_band; int16_t dec_param_estim; -#ifdef FIX_391_SBA int16_t dec_param_estim_old; -#endif int16_t nbands; } DIRAC_CONFIG_DATA, *DIRAC_CONFIG_DATA_HANDLE; @@ -348,7 +344,7 @@ typedef struct ivas_agc_chan_data_t typedef struct ivas_agc_com_state_t { float *winFunc; - int16_t in_delay; + int16_t in_delay; /* TODO: JBM check if this needs to be adjusted in the dec */ uint16_t absEmin; uint16_t betaE; uint16_t maxAttExp; @@ -475,6 +471,9 @@ typedef struct int16_t nbands; int16_t nblocks; int16_t start_band; +#ifdef FIX_HBR_MASAMETA + uint8_t inactiveBands; +#endif int16_t search_effort; MC_LS_SETUP mc_ls_setup; @@ -705,6 +704,10 @@ typedef struct ivas_td_decorr_state_t int16_t num_apd_sections; int16_t ducking_flag; +#ifdef JBM_TSM_ON_TCS + int16_t offset; +#endif + } ivas_td_decorr_state_t; @@ -717,6 +720,7 @@ typedef struct ivas_fb_mixer_cfg_t int16_t fb_latency; int16_t num_in_chans; int16_t num_out_chans; + int16_t nchan_fb_in; int16_t pcm_offset; int16_t fade_len; /* this sets the stride length; no delay is introduced */ int16_t prior_input_length; diff --git a/lib_com/ivas_td_decorr.c b/lib_com/ivas_td_decorr.c index 0215bfcf56b5b682143cc448e5eaf76d81186556..9285e23a227a86f3e3b649f263901a8cfe3378f4 100644 --- a/lib_com/ivas_td_decorr.c +++ b/lib_com/ivas_td_decorr.c @@ -87,10 +87,8 @@ static const float ivas_three_pow_frac[IVAS_MAX_DECORR_APD_SECTIONS] = { }; -#ifdef FIX_417_TD_DECORR_BRATE_SW #define IVAS_TDET_DUCK_MULT_FAC_PARA_BIN ( 2.0f ) #define IVAS_TDET_DUCK_MULT_FAC_PARA_BIN_LOW_BR ( 3.0f ) -#endif /*------------------------------------------------------------------------------------------* * Local functions declaration @@ -101,7 +99,6 @@ static int16_t ivas_get_APD_filt_orders( const int16_t num_out_chans, const int3 static void ivas_td_decorr_init( ivas_td_decorr_state_t *hTdDecorr, const int16_t num_out_chans, const int16_t ducking_flag ); -#ifdef FIX_417_TD_DECORR_BRATE_SW /*------------------------------------------------------------------------- * ivas_td_decorr_reconfig_dec() * @@ -191,7 +188,6 @@ ivas_error ivas_td_decorr_reconfig_dec( return IVAS_ERR_OK; } -#endif /*------------------------------------------------------------------------- @@ -226,7 +222,9 @@ ivas_error ivas_td_decorr_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR COV decoder" ); } set_f( hTdDecorr_loc->look_ahead_buf, 0, (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ) ); - +#ifdef JBM_TSM_ON_TCS + hTdDecorr_loc->offset = (int16_t) ( output_Fs * IVAS_DECORR_PARM_LOOKAHEAD_TAU ); +#endif hTdDecorr_loc->num_apd_sections = ivas_get_APD_filt_orders( num_out_chans, output_Fs, hTdDecorr_loc->APD_filt_state[0].order ); for ( j = 0; j < num_out_chans; j++ ) @@ -403,8 +401,7 @@ static void ivas_td_decorr_init( * * APD IIR filter *-----------------------------------------------------------------------------------------*/ - -static void ivas_td_decorr_APD_iir_filter( +void ivas_td_decorr_APD_iir_filter( ivas_td_decorr_APD_filt_state_t *filter_state, float *pIn_out, const int16_t num_APD_sections, @@ -474,20 +471,32 @@ static void ivas_td_decorr_APD_sections( void ivas_td_decorr_process( ivas_td_decorr_state_t *hTdDecorr, /* i/o: SPAR Covar. decoder handle */ - float pcm_in[][L_FRAME48k], /* i : input audio channels */ - float **ppOut_pcm, /* o : output audio channels */ - const int16_t output_frame /* i : output frame length */ +#ifdef JBM_TSM_ON_TCS + float *pcm_in[], +#else + float pcm_in[][L_FRAME48k], /* i : input audio channels */ +#endif + float **ppOut_pcm, /* o : output audio channels */ + const int16_t output_frame /* i : output frame length */ ) { int16_t i, j; +#ifndef JBM_TSM_ON_TCS int16_t offset; +#endif float in_duck_gain[L_FRAME48k], out_duck_gain[L_FRAME48k]; +#ifndef JBM_TSM_ON_TCS offset = (int16_t) ( output_frame * FRAMES_PER_SEC * IVAS_DECORR_PARM_LOOKAHEAD_TAU ); +#endif /* Look-ahead delay */ mvr2r( pcm_in[0], ppOut_pcm[0], output_frame ); +#ifdef JBM_TSM_ON_TCS + delay_signal( ppOut_pcm[0], output_frame, hTdDecorr->look_ahead_buf, hTdDecorr->offset ); +#else delay_signal( ppOut_pcm[0], output_frame, hTdDecorr->look_ahead_buf, offset ); +#endif /* In ducking gains */ if ( hTdDecorr->ducking_flag ) diff --git a/lib_com/ivas_tools.c b/lib_com/ivas_tools.c index b75c08379121fbeab38909b5b787ca0fec8a31e2..ce4abafeb5d8cda10fa6ff720e89e7a1322c2e32 100644 --- a/lib_com/ivas_tools.c +++ b/lib_com/ivas_tools.c @@ -75,10 +75,18 @@ float sumAbs( void mvc2c( const uint8_t x[], /* i : input vector */ uint8_t y[], /* o : output vector */ - const int16_t n /* i : vector size */ +#ifdef FIX_XXX_JBM_FIFO_BUFFER + const int32_t n +#else + const int16_t n /* i : vector size */ +#endif ) { +#ifdef FIX_XXX_JBM_FIFO_BUFFER + int32_t i; +#else int16_t i; +#endif if ( n <= 0 ) { @@ -114,14 +122,22 @@ void mvc2c( /*! r: number of clipped samples */ uint32_t ivas_syn_output( - float synth[][L_FRAME48k], /* i/o: float synthesis signal */ +#ifdef JBM_TSM_ON_TCS + float *synth[], /* i/o: float synthesis signal */ +#else + float synth[][L_FRAME48k], /* i/o: float synthesis signal */ +#endif const int16_t output_frame, /* i : output frame length (one channel) */ const int16_t n_channels, /* i : number of output channels */ int16_t *synth_out /* o : integer 16 bits synthesis signal */ ) { int16_t i, n; +#ifdef JBM_TSM_ON_TCS + int16_t synth_loc[MAX_JBM_L_FRAME48k]; +#else int16_t synth_loc[L_FRAME48k]; +#endif uint32_t noClipping = 0; /*-----------------------------------------------------------------* @@ -147,6 +163,40 @@ uint32_t ivas_syn_output( return noClipping; } +#ifdef JBM_TSM_ON_TCS +/*-------------------------------------------------------------------* + * ivas_syn_output_f() + * + * Output ivas synthesis signal with compensation for saturation + * returns number of clipped samples + *-------------------------------------------------------------------*/ + +/*! r: number of clipped samples */ +void ivas_syn_output_f( + float *synth[], /* i/o: float synthesis signal */ + const int16_t output_frame, /* i : output frame length (one channel) */ + const int16_t n_channels, /* i : number of output channels */ + float *synth_out /* o : integer 16 bits synthesis signal */ +) +{ + int16_t i, n; + + /*-----------------------------------------------------------------* + * float to integer conversion with saturation control + *-----------------------------------------------------------------*/ + + for ( n = 0; n < n_channels; n++ ) + { + for ( i = 0; i < output_frame; i++ ) + { + synth_out[i * n_channels + n] = synth[n][i]; + } + } + + return; +} +#endif + /*-------------------------------------------------------------------* * mvr2r_inc() * diff --git a/lib_com/options.h b/lib_com/options.h index ac2e1fe9db7bb17a3282a8ca62fd0b54dd9f5ad6..1fe68fdd8544b9d075e683f306552e07a8f3843b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -112,7 +112,7 @@ /*#define TDREND_HRTF_TABLE_METHODS*/ /* Enable HRTF lookup from tables, for testing & evaluation. Supply file in table format to use. Note that a suitable HR filter lookup method should be written if the filters sample point grids are not in the formats. */ /*#define TDREND_STANDALONE*/ /* Used when renderer is built in standalone form, without IVAS encoding/decoding (see scripts/object_renderer_standalone). This is just here to ensure this is cleaned out by prepare_instrumentation.sh */ -/*#define DEBUG_SBA*/ /* debug DIRAC/SPAR in-out */ +/*#define DEBUG_SBA*/ /* debug DIRAC/SPAR in-out */ #ifdef DEBUG_SBA /*#define DEBUG_LBR_SBA*/ /* debug low bitrate SBA (SPAR+DirAC) */ /*#define DEBUG_SBA_AUDIO_DUMP*/ /* SBA intermediate audio wav file dumping */ @@ -125,7 +125,8 @@ #endif /*#define SPAR_HOA_DBG*/ /* SPAR HOA debug statements */ /*#define DEBUG_BINAURAL_FILTER_DESIGN*/ /* debugging of Crend binaural filter design */ -#define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ +//#define DEBUG_AGC_ENCODER_CMD_OPTION /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ +#define DEBUG_JBM_CMD_OPTION /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */ #endif /* #################### End DEBUGGING switches ############################ */ @@ -133,63 +134,37 @@ /* ################# Start DEVELOPMENT switches ######################## */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ +#define IND_LIST_DYN /* VA: Issue 18: Dynamic allocation of ind_list[] and ind_list_metadata[] based on # of transport channels */ + +#ifndef IND_LIST_DYN #define BITSTREAM_INDICES_MEMORY /* Don't count memory for bitstream Indice at the encoder - it is a temporary solution for development only */ +#endif #define DISABLE_ADAP_RES_COD_TMP /* temporary fix for IVAS-403, disables adaptive residual coding */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -#define FIX_ISM_DTX_CNG_BWIDTH_ALT /* VA: issue 396 - alternative fix for bw changes on CNG frames in ISM DTX for objects that use the decoder-side noise estimation */ - -#define FIX_398_MASA_DIRECTION_ALIGNMENT /* Nokia: Issue 398: in 2dir MASA, dynamically adjust directions to be consistent */ -#define REND_DEBUGGING_REVISION /* VA: encapsulate rendering debugging options with DEBUGGING */ -#define FIX_419_ISM_MD_FIX /* VA: Issue 419: fix the upper value limitation for parameter angle1_diff_cnt */ -#define FIX_I414_OOA_CNA /* VA: Issue 414: Fixing out-of-array write operation in stereo CNA */ - - -#define SNS_MSVQ /* FhG: contribution 33 - MSVQ for SNS parameters at stereo mid bitrates */ - -#define FIX_379_GAININTP /* Eri: Adds a gain interpolation for directional/distance gain to handle abrupt changes in metadata (Non BE) */ -#define FIX_387_ISM_MD_FEC /* VA: Issue 387: fix MD discontinuity in ISM FEC */ - -#define FIX_418_SID_BITRATE /* Eri: Issue 418: Using the correct bitrate for unified stereo SID */ -#define PARAMMC_SHORT_ENC_MDFT /* FhG: Issue 410: complexity optimization for parametric Multichannel modes */ -#define FIX_421_TD_INT_TUNE /* Eri: Issue 421: Increase use of interpolation in TD renderer filter transition */ -#define FIX_419_ISM_BRATE_SW_DTX /* VA: issue 419: fix ISM Bitrate Switching with dtx */ -#define FIX_422 /* FhG: Issue 422: re-introduce fix for noisy speech buffer in ParamISM */ - -#define ERI_MSVQ_CLEANUP /* Eri: Contribution #31 BE modularization of msvq encoder side DCT21&DCT24 within msvq_enc() */ - - -#define FIX_416_ISM_BR_SWITCHING /* FhG: add missing CLDFB reconfig to ISM BR switching */ -#define FIX_SP2A /* VA: Issue 412: Adjust threshold for the S_p2a feature in the tonal detector */ -#define FIX_413_SBA_DTX /* Dlb: Fix for issue 413, SBA DTX CNG in 2TC mode*/ -#define FIX_417_TD_DECORR_BRATE_SW /* VA: Issue 417: fix incorrect use of TD decorrelator in bitrate switching */ -#define FIX_368_SBA_MODE /* Dlb: Fix for issue 368 */ -#define FIX_427_MAXIMUM_S_INDEX /* VA: issue 427: fix return index of function maximum_s() */ -#define FIX_431_PARAMMC_PLC_INTERPOLATOR /* FhG: Issue 431: fix missing interpolator reset for ParamMC PCL */ -#define FIX_391_SBA /* Dlb: Fix for issue 391 for SBA */ - -#define FIX_425_MASA_BRSW_RENDERER /* Nokia: Issue 425: renderer not reconfigure in MASA bitrate switching */ - -#define EUALER2QUAT_FIX /* Dlb :fix for issue 430 issue in euler2quat, sign of quat y is inverted */ -#define HR_METADATA /* Nok: encode directional MASA metadata with more bits at 384k and 512k */ -#define SBA_TD_RESIDUAL /* Dlb : Issue 426: SBA encoder complexity optimization */ - -#define FIX_357_DTX_32K /* Eri: issue 357 - Forced LP-CNG at 32k */ -#define FIX_435_ISM_MERGE_BUG /* Eri: Merge bug fix for ISM NULL metadata and tcx_only cases */ -#define FIX_355_REFACTOR_PARAMBIN_TO_5MS /* Nokia: Fixes issue 355 by refactoring parametric binauralizer code to 5 ms mode */ -#define FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING /* Eri: Fix incorrect use of stack variable used for channel aware config file */ -#define COMBINED_FORMAT_SIGNALING /* VA: Introduce a signaling bit for combined format coding */ -#define FIX_386_CORECODER_RECONFIG_2 /* VA: Issue 386: Resolve remaining ToDo comments in CoreCoder reconfig. */ -#define FIX_440_PARAM_ISM_DIR_NOISE /* FhG: Issue 440: Fix directional background noise becoming diffuse in ParamISM */ +/*#define FIX_XXX_JBM_FIFO_BUFFER */ /* FhG: prevent wraparound of a length identifier in cause of large frames and many channels*/ +#define HR_METADATA /* Nok: Contribution #45: encode directional MASA metadata with more bits at 384k and 512k */ +#define FIX_439_OTR_PARAMS /* Philips: Issue 439: orientation tracking parameter aspects. */ +#define FIX_463_TD_RENDERER_DIRECTIVITY_RESET /* Eri: Remove unintentional reset of directivity pattern */ +#define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ +#define FIX_443_FD_CNG_INIT /* FhG: correct bitrate value for FD-CNG init */ +#define VARIABLE_SPEED_DECODING /* FhG: variable speed decoding employing the JBM functioniality */ +#define JBM_TSM_ON_TCS /* FhG: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ +#define FIX_DTX_428 /* FhG: fix for issue 428, crash with DTX and bitrate switching */ +#define FIX_STEREO_474 /* FhG fix for issue 574, crash with SBA to stereo output at 512 kbps */ +#define FIX_MDCT_ST_PLC_FADEOUT_DELAY +#define FIX_DIRAC_LS_SYNTHESIS_CONFIG_479 /* FhG: fix for issue 479, broken LS output with DirAC at high BRs */ +#define HYBRID_ITD_MAX /* FhG: Improvement for DFT-stereo for cases with large ITDs */ +#define FIX_487_LOWRATE_SBA_TUNING_FIX /* Dlb: TUning fix for low bitrate cases to match theoretical longest SPAR MD bitstream */ +#define FIX_490_MASA_2TC_LBR_DTX /* Nokia: Fixes issue 490 by correcting condition. */ + +#define FIX_HBR_MASAMETA /* Nokia: Fixes to HBR MASA metadata at 384 and 512 kbps. Addresses issues 438 and 477 as well. */ +#define FIX_482_DUMMYDEC_INIT /* Nokia: fix issue #428: missing inits for dummyDec in IVAS_rend */ #define FIX_395_CNG_BW /* Eri: Issue 395 - CNG bandwidth issue for unified stereo */ -#define FIX_445_SNS_BUGFIXES /* FhG: bug fix for spectral tilt in SNS computation + necessary update of codebooks and converison to fixedpoint-compatible tables */ - -#define FIX_447_PARAMBIN_MASA_REGU_FAC /* Nokia: Issue 447: Fix issue by adjusting regularization factor minimum value. */ -#define FIX_441_SBA_PARAMBIN_GAINS /* Nokia: Fix issue 441 by changing gains in SBA path of parametric binauralizer */ - /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ + #endif diff --git a/lib_com/prot.h b/lib_com/prot.h index 69bcaa6647e5993a78d229b349a279ab79e90b4d..e6f371c468148a17d0d23a7be80ee575ed20a52a 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -177,7 +177,11 @@ float sum2_f( void set_c( int8_t y[], /* i/o: Vector to set */ const int8_t a, /* i : Value to set the vector to */ - const int16_t N /* i : Lenght of the vector */ +#ifdef JBM_TSM_ON_TCS + const int32_t N /* i : Length of the vector */ +#else + const int16_t N /* i : Length of the vector */ +#endif ); void set_s( @@ -515,6 +519,54 @@ void push_next_bits( #endif ); +#ifdef IND_LIST_DYN +int16_t get_ivas_max_num_indices( /* o : maximum number of indices */ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const int32_t ivas_total_brate /* i : IVAS total bitrate */ +); + +int16_t get_core_max_num_indices( /* o : maximum number of indices */ + const int16_t core, /* i : core */ + const int32_t total_brate /* i : total bitrate */ +); + +int16_t get_BWE_max_num_indices( /* o : maximum number of indices */ + const int32_t extl_brate /* i : extensiona layer bitrate */ +); + +int16_t get_ivas_max_num_indices_metadata( /* o : maximum number of indices for metadata */ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const int32_t ivas_total_brate /* i : IVAS total bitrate */ +); + +ivas_error ind_list_realloc( + BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ + int16_t max_num_indices /* i : new maximum number of allowed indices in the list */ +); + +ivas_error check_ind_list_limits( + BSTR_ENC_HANDLE hBstr /* i/o: encoder bitstream handle */ +); + +ivas_error move_indices( + INDICE_HANDLE old_ind_list, /* i/o: old location of indices */ + INDICE_HANDLE new_ind_list, /* i/o: new location of indices */ + const int16_t nb_indices /* i : number of moved indices */ +); + +int16_t find_indice( /* o : index of the indice in the list, -1 if not found */ + BSTR_ENC_HANDLE hBstr, /* i : encoder bitstream handle */ + int16_t id, /* i : ID of the indice */ + uint16_t *value, /* o : value of the quantized indice */ + int16_t *nb_bits /* o : number of bits used to quantize the indice */ +); + +uint16_t delete_indice( /* o : number of deleted indices */ + BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ + int16_t id /* i : ID of the indice */ +); +#endif + /*! r: value of the indice */ #ifdef DEBUG_BS_READ_WRITE #define get_next_indice( ... ) get_next_indice_( __VA_ARGS__, __LINE__, __func__ ) @@ -613,12 +665,14 @@ Decoder_State **reset_elements( ); +#ifndef IND_LIST_DYN void indices_to_serial_generic( const Indice *ind_list, /* i : indices list */ const Word16 num_indices, /* i : number of indices to write */ UWord8 *pFrame, /* o : byte array with bit packet and byte aligned coded speech data */ Word16 *pFrame_size /* o : size of the binary encoded access unit [bits] */ ); +#endif void convertSerialToBytestream( const uint16_t *const serial, /* i : input serial bitstream with values 0 and 1 */ @@ -2219,8 +2273,12 @@ void read_next_force( int32_t *force_profile_cnt /* i/o: counter of frames for force switching profile file */ ); #endif + ivas_error init_encoder( - Encoder_State *st, /* i/o: state structure */ + Encoder_State *st, /* i/o: state structure */ +#ifdef IND_LIST_DYN + Encoder_Struct *st_ivas, /* i/o: encoder state structure */ +#endif const int16_t idchan, /* i : channel ID */ const int16_t var_SID_rate_flag, /* i : flag for variable SID update rate */ const int16_t interval_SID, /* i : interval for SID update */ @@ -4497,10 +4555,8 @@ ivas_error acelp_core_dec( const int16_t flag_sec_CNA, /* i : CNA flag for secondary channel */ const int16_t nchan_out, /* i : number of output channels */ STEREO_CNG_DEC_HANDLE hStereoCng /* i : stereo CNG handle */ -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT , const int16_t read_sid_info /* i : read SID info flag */ -#endif ); void bass_psfilter_init( @@ -8113,7 +8169,6 @@ void extend_dctN_input( const int16_t n_cols, /* i: number of columns == truncation length */ DCTTYPE dcttype ); /* i: matrix type */ -#ifdef ERI_MSVQ_CLEANUP int16_t msvq_stage1_dct_search( /* o : (p_max , best candidate sofar ) */ const float *u, /* i : target */ const int16_t N, /* i : target length and IDCT synthesis length */ @@ -8147,7 +8202,6 @@ int16_t msvq_stage1_dct_recalc_candidates_fdcng_wb( const int16_t maxC_st1, /* i : number of candidates in stage1 */ float *dist_ptr /* i/o: updated MSE vector for stage1 */ ); -#endif void PulseResynchronization( const float *src_exc, /* i : Input excitation buffer */ @@ -8614,6 +8668,17 @@ void generate_masking_noise_mdct( HANDLE_FD_CNG_COM hFdCngCom /* i/o: FD_CNG structure containing all buffers and variables */ ); +#ifdef JBM_TSM_ON_TCS +void SynthesisSTFT_dirac( + float *fftBuffer, /* i : FFT bins */ + float *timeDomainOutput, + float *olapBuffer, + const float *olapWin, + const int16_t samples_out, + HANDLE_FD_CNG_COM hFdCngCom /* i/o: FD_CNG structure containing all buffers and variables */ +); +#endif + void generate_masking_noise_dirac( HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ HANDLE_CLDFB_FILTER_BANK h_cldfb, /* i : filterbank state */ diff --git a/lib_com/rom_com.c b/lib_com/rom_com.c index 25a5d6ee9e2bc576521784a27abdc242d86344dd..e4b8ec9db90d6e036d74a6910cc82c7aa7347412 100644 --- a/lib_com/rom_com.c +++ b/lib_com/rom_com.c @@ -22285,77 +22285,6 @@ const Word16 InvDiffTable[32] = /* Q20 */ 0x290F, 0x27A4, 0x264C, 0x2506, 0x23CF, 0x22A7, 0x218E, 0x2081 }; -#ifndef FIX_445_SNS_BUGFIXES -const float sns_vq_cdk1[8*32] = { - -2.0529254143208289e+00f, -2.0105187772519200e+00f, -1.9181418840663027e+00f, -2.0529955931580051e+00f, -1.7965682581646625e+00f, -1.2350476819733338e+00f, -7.4106681145668685e-01f, -1.3500749433562539e-01f, - +6.8395648103934958e-01f, -5.6618076612019363e-01f, -1.1629656439143417e+00f, -1.6994296999691509e+00f, -1.7665333688662666e+00f, -1.4601240490692278e+00f, -1.0934184548732562e+00f, -5.8974136946769384e-01f, - -2.7268374190678193e+00f, -2.1818157040224055e+00f, -6.0427109270377999e-01f, +3.1651466770121833e-01f, +9.3430762386407940e-01f, +1.0478771837003078e+00f, +9.9559582196380947e-01f, +1.1082403839542609e+00f, - +2.4379206786519574e+00f, +1.9640422580297323e+00f, +9.2771600149270417e-01f, +9.4135273318020941e-03f, -6.4013168732630366e-01f, -1.0138049129223088e+00f, -1.0924849368417169e+00f, -9.1129148479978594e-01f, - +8.1762121316616565e-01f, -1.9433974959365836e-02f, -4.0054937117179751e-01f, -3.9231079150228149e-01f, -2.9970406532808125e-01f, -6.2996056616087495e-02f, +3.7544100964377108e-01f, +6.3685372354777436e-01f, - +1.4734834246724329e+00f, +2.3539621556904251e+00f, +9.7194661426112050e-01f, -5.4110096556162990e-01f, -9.8129311847374545e-01f, -6.1342289097457547e-01f, +3.7249272152905366e-01f, +8.1252213656497096e-01f, - -1.2496145961286331e+00f, -3.2376394756447752e-01f, +5.1439178441534027e-02f, +1.0005059991983459e-01f, +2.3749822119608346e-01f, +4.0542724931792579e-01f, +5.1033138353497232e-01f, +5.5694404671095077e-01f, - +7.7965743766052975e-01f, +2.1917885215778097e+00f, +1.7164750043876311e+00f, +5.7945306635665195e-01f, -1.0190291924038120e-01f, -4.0418854005812310e-01f, -4.7849155803986132e-01f, -3.4725769238259874e-01f, - +6.8865034807898129e-01f, +5.7566331510263680e-01f, -7.7725260497355977e-03f, -5.3794851427474544e-01f, -7.6313855691212973e-01f, -7.8413803908382473e-01f, -7.0161107722315574e-01f, -4.8903452069978415e-01f, - +1.6928828230225725e+00f, +9.3495589460148931e-01f, +3.5426821621575499e-01f, +3.9507891687964890e-02f, -7.9631988607824541e-02f, -1.6624589421972935e-01f, -1.6180598135213178e-01f, -1.2860376999895359e-01f, - -1.6962541680165768e+00f, +4.3456061122651995e-01f, +1.0710566866483171e+00f, +1.3249974344239270e+00f, +1.0825630027900910e+00f, +9.0621333090389167e-01f, +6.5428541538000140e-01f, +6.7283424156333382e-01f, - +4.5763916137396308e+00f, +4.0870427709381518e+00f, +2.6750799962096261e+00f, +1.4487891616901025e+00f, +2.4432209950451603e-01f, -5.4383244175422862e-01f, -9.4142251186129933e-01f, -1.0862058366913647e+00f, - +1.1883989487611160e+00f, +1.1685324900978113e+00f, +9.3045980943772877e-01f, +8.3738457417173884e-01f, +6.3496480700237246e-01f, +4.6405143429051326e-01f, +3.1705534227338888e-01f, +2.0799507760170197e-01f, - +2.8980578835865609e+00f, +3.0880495072396617e+00f, +1.8680019598806248e+00f, +7.0446466488259230e-01f, +1.0107302845552169e-01f, -2.8986489567349910e-01f, -4.1462748482286188e-01f, -3.6206036514823836e-01f, - -1.7524799389036466e-01f, +1.1936698995397648e+00f, +1.6088971749375909e+00f, +1.7111901074418125e+00f, +1.4837525009734551e+00f, +5.2536808756057463e-01f, -3.1226889149907566e-01f, -3.5746958704581933e-01f, - +9.0352696786286879e-01f, +2.4731406386331605e+00f, +2.9079925242729416e+00f, +2.7918041274045429e+00f, +2.2373843929092465e+00f, +8.5208847870338755e-01f, -7.6200320575426320e-02f, -2.5316053664429367e-01f, - -1.1865763437968528e+00f, -7.4234595628060440e-01f, -6.0141100860138463e-01f, -8.5065089175547848e-01f, -8.8329724313055402e-01f, -6.5351381126344021e-01f, -5.0230651881879618e-01f, -2.3359707426927168e-01f, - +2.7673589888377261e+00f, +6.6328569264593351e-01f, -4.1472488624881343e-01f, -9.3187436659797018e-01f, -1.0754140202622839e+00f, -1.0146723389090857e+00f, -8.7888946611264573e-01f, -6.0836606213569688e-01f, - -1.8124429341308173e+00f, -9.7828066142280434e-01f, +6.5968430845517978e-01f, +2.1854499449267628e+00f, +2.2517483941731826e+00f, +2.3821501109065295e+00f, +1.9235238012956650e+00f, +1.5065083288921912e+00f, - +4.9050283992558246e+00f, +2.4264119698434983e+00f, +8.3367299614637902e-01f, -4.3119484392510427e-02f, -5.8100382033177300e-01f, -7.7353747986816990e-01f, -8.7895223350767071e-01f, -8.6819816920933113e-01f, - +6.5228388674538984e-01f, +1.1174683594915380e-01f, +1.2383281142011383e-01f, +6.0151217547540869e-01f, +9.5444246174773772e-01f, +1.2805750123888453e+00f, +9.2140926443564275e-01f, +5.7786881373204924e-01f, - +1.9490989723028713e+00f, +2.8004262751807882e+00f, +1.9081816065970161e+00f, +3.7248785750983177e-01f, +1.3095620385608037e-01f, +7.9016424306166244e-01f, +1.1640502521465221e+00f, +1.0066783002173452e+00f, - -1.0171864644867654e-01f, +1.7954757784640871e+00f, +1.8915637038163424e+00f, +1.0909542570620605e+00f, +6.1888445783828194e-01f, +7.6574083569028828e-01f, +8.9561325653114987e-01f, +8.0797624213033170e-01f, - +1.9350543800926379e+00f, +3.2339385307849722e+00f, +3.0806729276317419e+00f, +2.1684844197871249e+00f, +7.8035951982399498e-01f, -6.7854327548476567e-01f, -9.6732224945258960e-01f, -5.8068474286758409e-01f, - -1.5383985945543574e-01f, +7.1583722374971992e-01f, +5.8674384505519706e-01f, +3.7092544478085621e-01f, +1.0970155384441491e-01f, -2.3854313229153577e-02f, -5.3508967318497622e-02f, +3.3979575877473786e-02f, - +2.7095625819635165e+00f, +1.7832208238203791e+00f, +9.6783753432609421e-01f, +5.8919108500645523e-01f, +4.1191953120474317e-01f, +1.9592175852184501e-01f, -1.0134844291353281e-02f, -1.6725603195278577e-01f, - -2.6560188981865329e-01f, +1.4059113655935889e+00f, +1.9844196049902063e+00f, +2.4291429998935334e+00f, +2.2837873843112892e+00f, +1.8570922995202830e+00f, +1.2056879204230433e+00f, +8.4717915626409468e-01f, - +3.1939221203717074e+00f, +3.7963726820313615e+00f, +3.2748823221663406e+00f, +2.4724357608035472e+00f, +1.6860933687497499e+00f, +6.4628696101838046e-01f, -7.8170867286998971e-02f, -6.1406792037327973e-01f, - +1.6686627356973500e+00f, +2.4375118241337517e+00f, +2.2118134266295129e+00f, +1.4754862720822910e+00f, +1.0100987843177478e+00f, +4.8216927165041135e-01f, +5.0597779432044222e-02f, -7.2090396257990311e-02f, - +3.4953550651375287e+00f, +3.2379627985821369e+00f, +2.1155532232841976e+00f, +1.3293556793682053e+00f, +1.0159800928862721e+00f, +6.8710150035919371e-01f, +5.0950588745743997e-01f, +2.0092204555514792e-01f, - +1.6537233329850265e+00f, +1.8429927128987775e+00f, +1.5795688890212489e+00f, +1.5313117335176101e+00f, +1.4688051742099697e+00f, +1.3047757088193301e+00f, +9.3703047481911916e-01f, +6.6034404507297240e-01f, - +1.9642176175501569e+00f, +2.9388625018759811e+00f, +2.9051270203314714e+00f, +2.2145871562616142e+00f, +1.8151504726187455e+00f, +1.4766756664819134e+00f, +1.0710276243190799e+00f, +6.1861320930710639e-01f -}; - -const float sns_vq_cdk2[8*32] = { - -5.9829995937529679e-01f, -1.6330921039310822e+00f, -2.2069628561771211e+00f, -2.3101968732645872e+00f, -2.2987624447001700e+00f, -2.2585659584659474e+00f, -2.2426863949716420e+00f, -2.2717425510152180e+00f, - -1.4313340820994043e+00f, -1.7500847356351696e+00f, -1.7795938232358199e+00f, -1.7213803415353539e+00f, -1.6610776464291162e+00f, -1.6069804294990451e+00f, -1.5625217472935489e+00f, -1.5641247494491251e+00f, - -4.2712987825717169e-01f, -8.1657540705874065e-01f, -1.1438786300941690e+00f, -1.5047514473946468e+00f, -1.8039927073343207e+00f, -1.9709309014182719e+00f, -2.0721822202754367e+00f, -2.2015067008471854e+00f, - -8.8390021618372749e-01f, -9.1027146153915306e-01f, -8.4148501893353445e-01f, -7.0803242455046478e-01f, -4.0873435152568971e-01f, -5.8364530253510127e-02f, +1.5450950372912373e-01f, +2.3879767518520115e-01f, - +2.2959495262308716e-01f, -4.5380527270641730e-01f, -1.2610303555144773e+00f, -1.9593984147017431e+00f, -2.5055916891711632e+00f, -2.7888667896972388e+00f, -2.9113125863020777e+00f, -2.9748256948291001e+00f, - -1.1488842521346578e+00f, -1.3517692148186562e+00f, -1.3594824205078988e+00f, -1.2204819600745185e+00f, -9.1363085887906581e-01f, -6.8205390481915806e-01f, -5.8474638022763137e-01f, -6.3572794299637214e-01f, - -7.7093095554781843e-01f, -9.4474580908674310e-01f, -9.4836193194533303e-01f, -9.4516185118638463e-01f, -1.0483710354237581e+00f, -1.1355351751536940e+00f, -1.2428754319298756e+00f, -1.3831917119547590e+00f, - -9.3476137541952931e-01f, -7.0790164340965811e-01f, -3.3885900459516044e-01f, +8.2267549037198462e-02f, +4.8079994558165973e-01f, +8.0682939355530092e-01f, +1.0305358697421620e+00f, +1.0235050392855534e+00f, - +1.0095585388252226e+00f, -1.5967777106488176e-01f, -2.2123760679560007e+00f, -2.4162196770688293e+00f, -2.1066059048135193e+00f, -1.8818990363917070e+00f, -1.9958495939733885e+00f, -2.3481921543456847e+00f, - +9.2392277358713179e-02f, -1.8364442239470730e-01f, -5.9563356599054251e-01f, -1.0147004796192145e+00f, -1.3476180323301636e+00f, -1.5136187252106814e+00f, -1.5799100551406959e+00f, -1.7192022915180234e+00f, - -1.4222957040291027e-02f, -1.7371797028437352e-01f, -3.0805783645739226e-01f, -4.0484411256102021e-01f, -6.6432144720337050e-01f, -1.0344124279519349e+00f, -1.6814321622332238e+00f, -2.5032237993558693e+00f, - +6.8743182828212471e-02f, +3.3095426522069737e-01f, +5.0002819580392865e-01f, +5.6165737804402860e-01f, +5.0172311732338448e-01f, +3.6961533646464034e-01f, +8.5026798082935839e-02f, -3.9473330479310409e-01f, - +1.0356440140522545e+00f, +7.8065342952998484e-01f, +6.7193695552111687e-02f, -9.5261546302001587e-01f, -2.0142463788396388e+00f, -2.7767542927506610e+00f, -3.1928041080758338e+00f, -3.4042594311363201e+00f, - -6.6289350610256359e-01f, -6.3896764348680091e-01f, -5.1207254963552118e-01f, -3.6335660396488040e-01f, -2.8247932520862895e-01f, -3.1477486911353381e-01f, -4.4809778805307687e-01f, -6.9186118822875298e-01f, - +7.9969719144308171e-02f, +2.1588869900646174e-01f, +3.0323707912603959e-01f, +2.6884673422742911e-01f, +5.9642290590166340e-02f, -2.8613663980468629e-01f, -7.9406912376026706e-01f, -1.4470063450324298e+00f, - -2.0240948732059452e-01f, +2.3334712655850515e-01f, +5.7657451283939798e-01f, +7.9742677228839842e-01f, +9.3220814515190065e-01f, +1.0323450144255806e+00f, +1.0118085786908606e+00f, +7.9014188629614879e-01f, - -7.1530830084194669e-02f, -1.2396351139455990e+00f, -2.0842499795217195e+00f, -1.3035503744881123e+00f, -8.3471992091295932e-01f, -1.1295869482135590e+00f, -1.7132725973269993e+00f, -2.1802158117711343e+00f, - -1.7835942638423960e-01f, -7.1247931965515532e-01f, -1.5124017210947220e+00f, -1.9967695368388680e+00f, -1.8783401399959028e+00f, -1.4021324347049549e+00f, -1.0637376079630234e+00f, -1.1080152582418752e+00f, - +1.0480932547841233e+00f, +2.7493060468886921e-01f, -1.1919132498368252e+00f, -1.2523434724836580e+00f, -7.8936067946054767e-01f, -8.2091162445205956e-01f, -1.3128033132740213e+00f, -1.9655091841161074e+00f, - -3.3232308742031469e-01f, -2.2713591199678415e-01f, -1.4351679017954885e-01f, -1.9801985565791998e-02f, +1.0057467598256911e-01f, +2.2696827939185557e-01f, +3.0695375436198624e-01f, +2.2875897090753330e-01f, - +3.4676185796153502e-01f, -1.0768837168056489e-01f, -6.9753922421077807e-01f, -1.0937050061788010e+00f, -1.5428629138891437e+00f, -2.0449896355500123e+00f, -2.4848880613940572e+00f, -2.8583647439574880e+00f, - -1.2173513563721174e-02f, -3.2908222329502096e-01f, -7.4562386900667521e-01f, -1.0159346083066496e+00f, -9.9134754982937601e-01f, -8.0708475073517449e-01f, -5.9033001697337439e-01f, -5.3497643414524321e-01f, - -1.0362333131951586e-01f, -2.6988877087476748e-01f, -3.8890071054155473e-01f, -4.9037107401879965e-01f, -5.6504591412573135e-01f, -7.3336953439609320e-01f, -9.9258959592254403e-01f, -1.3661070412637724e+00f, - -7.9157092539986307e-01f, -3.3641122720876027e-01f, +2.9168895215304702e-01f, +1.0181013149521261e+00f, +1.5982627043961528e+00f, +1.9868228787387316e+00f, +2.1282934389276504e+00f, +1.9646952813708398e+00f, - +8.5453347281306224e-01f, +8.1178943134578940e-01f, -4.8818346255935796e-01f, -2.1067304958054955e+00f, -2.5063149014598722e+00f, -2.0640557329267200e+00f, -1.6543474135830516e+00f, -1.7651753795641250e+00f, - +6.2358146522917657e-01f, +5.4834889364422190e-01f, +1.7179524311839983e-01f, -3.5307730840525375e-01f, -7.7064726884538126e-01f, -1.0122724639555478e+00f, -1.1610381095678584e+00f, -1.4059777048358271e+00f, - +7.4374029892860283e-01f, +9.2218263151186131e-01f, +7.8921361199673412e-01f, +5.4697537641890215e-01f, +3.4695498575470718e-02f, -6.0728616781597766e-01f, -1.5817464846714542e+00f, -2.9492076413515940e+00f, - +1.0792513778563164e+00f, +1.4361817236342909e+00f, +1.4897259644477068e+00f, +1.4980968655148907e+00f, +1.3061906859741226e+00f, +9.2722643966101292e-01f, +4.6901200392574449e-01f, -8.4108696494310742e-02f, - +8.5358364275519205e-01f, +6.0645747733831856e-01f, +2.0465300574744516e-01f, -3.7181339249044437e-01f, -1.0727735914037746e+00f, -1.6784774674483536e+00f, -2.1020318554063260e+00f, -2.5024013237162377e+00f, - +1.2794365477031622e-01f, +1.2747703630869173e-01f, -4.1758739312140455e-02f, -2.4311752788462185e-01f, -3.1778646043737568e-01f, -2.8915217065224763e-01f, -2.9094454849599488e-01f, -4.4820832489443191e-01f, - +1.2951853228518271e+00f, +9.5620359941142952e-01f, +5.3144852217798388e-01f, +2.1179514725221937e-01f, -6.5987484250824083e-02f, -3.2087563737255587e-01f, -5.4468525409236357e-01f, -8.8065574221328113e-01f, - -1.0568174530545921e-02f, +8.7151888563731761e-01f, +1.5660992592896033e+00f, +1.9198797896705255e+00f, +2.0755726094083351e+00f, +2.1798356493630360e+00f, +2.0711596722334082e+00f, +1.7022476043512389e+00f -}; -#endif const float tcx_mdct_window_48[420] = { diff --git a/lib_com/rom_com.h b/lib_com/rom_com.h index 0d0f319e1df667cd86b34a47282db7ee282357ce..e6284ab417d0b2ef4a0704e8ef60dbdc45e968c2 100644 --- a/lib_com/rom_com.h +++ b/lib_com/rom_com.h @@ -1341,11 +1341,6 @@ extern const Word16 invTable[INV_TABLE_SIZE + 1]; extern const Word16 sqrtTable[SQRT_TABLE_SIZE + 1]; extern const Word16 invSqrtTable[SQRT_TABLE_SIZE + 1]; -#ifndef FIX_445_SNS_BUGFIXES -extern const float sns_vq_cdk1[8 * 32]; -extern const float sns_vq_cdk2[8 * 32]; - -#endif extern const float tcx_mdct_window_48[420]; extern const float tcx_mdct_window_half_48[180]; extern const float tcx_mdct_window_trans_48[60]; diff --git a/lib_com/tools.c b/lib_com/tools.c index 46803c8b1ed2f7539bcc20035350f884581734cb..ab688adbb9f77cfc81f361399a4bedd55486d7a7 100644 --- a/lib_com/tools.c +++ b/lib_com/tools.c @@ -210,7 +210,11 @@ float sum2_f( void set_c( int8_t y[], /* i/o: Vector to set */ const int8_t a, /* i : Value to set the vector to */ +#ifdef JBM_TSM_ON_TCS + const int32_t N /* i : Length of the vector */ +#else const int16_t N /* i : Length of the vector */ +#endif ) { int16_t i; @@ -387,7 +391,11 @@ uint32_t mvr2s( return 0; } +#ifdef JBM_TSM_ON_TCS + if ( (void *) y <= (const void *) x ) +#else if ( (void *) y < (const void *) x ) +#endif { for ( i = 0; i < n; i++ ) { @@ -553,9 +561,7 @@ int16_t maximum_s( { if ( vec[i] > tmp ) { -#ifdef FIX_427_MAXIMUM_S_INDEX ind = i; -#endif tmp = vec[i]; } } diff --git a/lib_debug/debug.c b/lib_debug/debug.c index 85e48e8bae0b71aaa6c4dfc4484b6ddbd53dd285..ce10231876d27e76b141333f2fa70423abb4430e 100644 --- a/lib_debug/debug.c +++ b/lib_debug/debug.c @@ -201,6 +201,7 @@ int16_t dbgwrite( return 0; } + /*-------------------------------------------------------------------* * dbgwrite_mat_repeat() * diff --git a/lib_debug/sba_debug.c b/lib_debug/sba_debug.c index 040cadf88774b68fad67286377ef5ad721c15ee5..73bb630b5fe54dee3600127f19cf5882c425bdbc 100644 --- a/lib_debug/sba_debug.c +++ b/lib_debug/sba_debug.c @@ -51,11 +51,11 @@ #define MAX_IN_FILE_LEN ( 1000 ) #define MAX_PLUG_IN_FILE_LEN ( MAX_IN_FILE_LEN ) #define MAX_DEBUG_TAG_LEN ( 50 ) -#define NUM_DEBUG_FILES ( 4 ) +#define NUM_DEBUG_FILES ( 5 ) #define MAX_TAG_LEN ( 200 ) WAVEFILEOUT *spar_foa_enc_wav[3]; -WAVEFILEOUT *spar_foa_dec_wav[4]; +WAVEFILEOUT *spar_foa_dec_wav[NUM_DEBUG_FILES]; float max_diff = 0; int32_t dbg_frm_num; int32_t dbg_band; @@ -202,6 +202,7 @@ void ivas_spar_dump_signal_wav( { for ( i = 0; i < no_channel; i++, k++ ) { +#if 0 if ( ppPcm ) { tmp_value = roundf( ppPcm[i][j] * PCM16_TO_FLT_FAC ); @@ -210,6 +211,16 @@ void ivas_spar_dump_signal_wav( { tmp_value = roundf( pcm_array[i][j] * PCM16_TO_FLT_FAC ); } +#else + if ( ppPcm ) + { + tmp_value = roundf( ppPcm[i][j] ); + } + else + { + tmp_value = roundf( pcm_array[i][j] ); + } +#endif if ( tmp_value > MAX16B_FLT ) { largest_value = (float) fabs( tmp_value ) > largest_value ? (float) fabs( tmp_value ) : largest_value; @@ -272,6 +283,12 @@ void ivas_close_sba_decoder_debug_files( CloseWav( spar_foa_dec_wav[3] ); } + if ( spar_foa_dec_wav[4] != NULL ) + { + UpdateWave( fs, n_ch, 16, spar_foa_dec_wav[4] ); + CloseWav( spar_foa_dec_wav[4] ); + } + return; } @@ -315,7 +332,7 @@ void ivas_open_sba_decoder_debug_files( const int16_t n_ch, const int16_t n_transport ) { - int8_t fb_wav_dump_path[4][MAX_PLUG_IN_FILE_LEN] = { "", "", "", "" }; + int8_t fb_wav_dump_path[NUM_DEBUG_FILES][MAX_PLUG_IN_FILE_LEN] = { "", "", "", "", "" }; cstrcat( (char *) fb_wav_dump_path[0], sizeof( fb_wav_dump_path[0] ), "dec_out.wav" ); spar_foa_dec_wav[0] = CreateWav( (const char *) fb_wav_dump_path[0], fs, n_ch, 32 /* const uint32_t writeWaveExt */ ); @@ -329,6 +346,9 @@ void ivas_open_sba_decoder_debug_files( cstrcat( (char *) fb_wav_dump_path[3], sizeof( fb_wav_dump_path[3] ), "cldfbSynthesis.wav" ); spar_foa_dec_wav[3] = CreateWav( (const char *) fb_wav_dump_path[3], fs, n_transport, 16 /* const uint32_t writeWaveExt */ ); + cstrcat( (char *) fb_wav_dump_path[4], sizeof( fb_wav_dump_path[4] ), "cldfbAnalysis.wav" ); + spar_foa_dec_wav[4] = CreateWav( (const char *) fb_wav_dump_path[4], fs, n_transport, 16 /* const uint32_t writeWaveExt */ ); + return; } diff --git a/lib_debug/sba_debug.h b/lib_debug/sba_debug.h index cd4fd58c11a22f39e99b8d73a6c6dd12ce7212d1..a314d1568cc2df74be82d26610a30b00e78b6866 100644 --- a/lib_debug/sba_debug.h +++ b/lib_debug/sba_debug.h @@ -41,9 +41,10 @@ #include "ivas_cnst.h" #include "tinywaveout_c.h" + #ifdef DEBUG_SBA_AUDIO_DUMP extern WAVEFILEOUT *spar_foa_enc_wav[3]; -extern WAVEFILEOUT *spar_foa_dec_wav[4]; +extern WAVEFILEOUT *spar_foa_dec_wav[5]; #endif #ifdef DEBUG_AGC diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index f7b7465028a3f9a29da82a35dd02fa27be3c8500..0c073cb9fd6bb09fb77333686caef14e5bc9b08d 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -75,10 +75,8 @@ ivas_error acelp_core_dec( const int16_t flag_sec_CNA, /* i : CNA flag for secondary channel */ const int16_t nchan_out, /* i : number of output channels */ STEREO_CNG_DEC_HANDLE hStereoCng /* i : stereo CNG handle */ -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT , const int16_t read_sid_info /* i : read SID info flag */ -#endif ) { float old_exc[L_EXC_DEC], *exc; /* excitation signal buffer */ @@ -514,11 +512,7 @@ ivas_error acelp_core_dec( } else { -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( st->core_brate == SID_2k40 && st->element_mode != IVAS_CPE_MDCT ) -#else - if ( st->core_brate == SID_2k40 && st->element_mode != IVAS_CPE_MDCT && st->read_sid_info ) -#endif { FdCng_decodeSID( st ); *sid_bw = 0; @@ -535,12 +529,7 @@ ivas_error acelp_core_dec( ApplyFdCng( syn, NULL, realBuffer, imagBuffer, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) ); } -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( !read_sid_info ) -#else - if ( !st->read_sid_info ) - // if (!st->read_sid_info && st->cng_ism_flag) /* read_sid_info can only be 0 in ParamISM mode */ -#endif { float noise_lvl_highest; diff --git a/lib_dec/er_dec_tcx.c b/lib_dec/er_dec_tcx.c index 1ce3bf2035f97aee410f014857fefa7da3b749d1..fb797f92c9da1216601ceaf646c687e71bd30cd9 100644 --- a/lib_dec/er_dec_tcx.c +++ b/lib_dec/er_dec_tcx.c @@ -551,20 +551,39 @@ void con_tcx( mvr2r( synth - M, buf, M ); mvr2r( buf, mem_syn, M ); - if ( A_cng != NULL ) { +#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY + float alpha_delayed; + + alpha_delayed = 1.0f; + if ( st->nbLostCmpt > MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE ) + { + alpha_delayed = Damping_fact( st->core_ext_mode, st->nbLostCmpt - MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE, st->last_good, st->stab_fac, &( st->lp_gainp ), ACELP_CORE ); + } + + if ( st->plcBackgroundNoiseUpdated && alpha_delayed != 1.0f ) +#else if ( st->plcBackgroundNoiseUpdated && alpha != 1.0f ) +#endif { float lsp_local[M], lsp_fade[M], alpha_inv; +#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY + alpha_inv = 1.0f - alpha_delayed; +#else alpha_inv = 1.0f - alpha; +#endif a2lsp_stab( A_local, lsp_local, lsp_local ); for ( i = 0; i < M; i++ ) { +#ifdef FIX_MDCT_ST_PLC_FADEOUT_DELAY + lsp_fade[i] = alpha_delayed * lsp_local[i] + alpha_inv * st->lspold_cng[i]; +#else lsp_fade[i] = alpha * lsp_local[i] + alpha_inv * st->lspold_cng[i]; +#endif } lsp2a_stab( lsp_fade, A_local, M ); diff --git a/lib_dec/evs_dec.c b/lib_dec/evs_dec.c index 8ea2d71159fd155c3219b3e6ed165ed887d736cb..fcc1a5ec521f74564435923ae098780dd65e02b4 100644 --- a/lib_dec/evs_dec.c +++ b/lib_dec/evs_dec.c @@ -261,11 +261,7 @@ ivas_error evs_dec( if ( st->core == ACELP_CORE ) { /* ACELP core decoder */ -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( ( error = acelp_core_dec( st, NULL, synth, NULL, bwe_exc_extended, voice_factors, old_syn_12k8_16k, sharpFlag, pitch_buf, &unbits, &sid_bw, NULL, NULL, NULL, 0, EVS_MONO, 0, 0, 1, NULL, 1 ) ) != IVAS_ERR_OK ) -#else - if ( ( error = acelp_core_dec( st, NULL, synth, NULL, bwe_exc_extended, voice_factors, old_syn_12k8_16k, sharpFlag, pitch_buf, &unbits, &sid_bw, NULL, NULL, NULL, 0, EVS_MONO, 0, 0, 1, NULL ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/fd_cng_dec.c b/lib_dec/fd_cng_dec.c index 38495a681acd2ffbcc3d2893fc42c45aab9b3a46..23fd63059c6057f72ac4fb2b9c73110f3cd7091e 100644 --- a/lib_dec/fd_cng_dec.c +++ b/lib_dec/fd_cng_dec.c @@ -158,13 +158,8 @@ void initFdCngDec( hFdCngDec->cna_ILD_LT = 0.0f; hFdCngDec->first_cna_noise_updated = 0; hFdCngDec->first_cna_noise_update_cnt = 0; -#ifdef FIX_I414_OOA_CNA hFdCngDec->cna_nbands = CNA_INIT_NBANDS; mvs2s( cna_init_bands, hFdCngDec->cna_band_limits, CNA_INIT_NBANDS + 1 ); -#else - hFdCngDec->cna_nbands = 6; - mvs2s( cna_init_bands, hFdCngDec->cna_band_limits, MAX_CNA_NBANDS + 1 ); -#endif hFdCngDec->cna_act_fact = 1.0f; hFdCngDec->cna_rescale_fact = 0.0f; hFdCngDec->cna_seed = 5687; @@ -1798,6 +1793,162 @@ void generate_stereo_masking_noise( return; } +#ifdef JBM_TSM_ON_TCS +/*------------------------------------------------------------------- + * generate_masking_noise_hf_cldfb() + * + * Generate additional comfort noise (kind of noise filling) + *-------------------------------------------------------------------*/ + +void generate_masking_noise_lb_dirac( + HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */ + float *tdBuffer, /* i/o: time-domain signal, if NULL no LB-CNA */ + const int16_t nCldfbTs, /* i : number of CLDFB slots that will be rendered */ + const int16_t cna_flag /* i : CNA flag for LB and HB */ +) +{ + int16_t i; + float *cngNoiseLevel = hFdCngCom->cngNoiseLevel; + float *fftBuffer = hFdCngCom->fftBuffer; + float *ptr_r; + float *ptr_i; + float *ptr_level; + int16_t *seed = &( hFdCngCom->seed ); + float scale; + int16_t n_samples_out, n_samples_start, n_samples_out_loop; + + push_wmops( "fd_cng_dirac" ); + + /* Init */ + scale = 0.f; + n_samples_out = hFdCngCom->frameSize / DEFAULT_JBM_CLDFB_TIMESLOTS * nCldfbTs; + n_samples_start = 0; + + + /*LB CLDFB - CNA from STFT*/ +#ifdef DEBUG_MODE_DIRAC + { + int16_t tmp_s; + tmp_s = (int16_t) ( 32768.f * 0.5f * hFdCngCom->likelihood_noisy_speech * cna_flag + 0.5f ); + dbgwrite( &tmp_s, sizeof( int16_t ), 1, hFdCngCom->frameSize / 16, "./res/ivas_dirac_likelihood_noisy.pcm" ); + } +#endif + if ( cna_flag ) + { + /* skip noise generating if level is very low, to avoid problems with possibly running into denormals */ + if ( hFdCngCom->likelihood_noisy_speech > DELTA_MASKING_NOISE ) + { + /* Compute additional CN level */ + for ( i = 0; i < 15; i++ ) + { + if ( ( hFdCngCom->CngBandwidth == scaleTable_cn_dirac[i].bwmode ) && + ( hFdCngCom->CngBitrate >= scaleTable_cn_dirac[i].bitrateFrom ) && + ( hFdCngCom->CngBitrate < scaleTable_cn_dirac[i].bitrateTo ) ) + { + break; + } + } + + scale = (float) pow( 10.f, -scaleTable_cn_dirac[i].scale / 10.f ) - 1.f; + scale *= hFdCngCom->likelihood_noisy_speech; + } + } + + /* LB CLDFB - CNA from STFT: CNA applied only in channel 0*/ + if ( cna_flag && tdBuffer != NULL ) + { + while ( n_samples_out > 0 ) + { + n_samples_out_loop = min( hFdCngCom->frameSize, n_samples_out ); + if ( scale != 0 ) + { + /*Generate LF comfort noise only at first slot, for the whole frame*/ + ptr_level = cngNoiseLevel; + + /* Generate Gaussian random noise in real and imaginary parts of the FFT bins + Amplitudes are adjusted to the estimated noise level cngNoiseLevel in each bin */ + if ( hFdCngCom->startBand == 0 ) + { + rand_gauss( &fftBuffer[0], seed ); + ptr_r = fftBuffer + 2; + fftBuffer[0] *= (float) sqrt( scale * *ptr_level ); /* DC component in FFT */ + ptr_level++; + } + else + { + fftBuffer[0] = 0.f; + set_f( fftBuffer + 2, 0.0f, 2 * ( hFdCngCom->startBand - 1 ) ); + ptr_r = fftBuffer + 2 * hFdCngCom->startBand; + } + ptr_i = ptr_r + 1; + + for ( ; ptr_level < cngNoiseLevel + hFdCngCom->stopFFTbin - hFdCngCom->startBand; ptr_level++ ) + { + /* Real part in FFT bins */ + rand_gauss( ptr_r, seed ); + ( *ptr_r ) *= (float) sqrt( ( scale * *ptr_level ) * 0.5f ); + ptr_r += 2; + /* Imaginary part in FFT bins */ + rand_gauss( ptr_i, seed ); + ( *ptr_i ) *= (float) sqrt( ( scale * *ptr_level ) * 0.5f ); + ptr_i += 2; + } + + /* Remaining FFT bins are set to zero */ + set_f( fftBuffer + 2 * hFdCngCom->stopFFTbin, 0.0f, hFdCngCom->fftlen - 2 * hFdCngCom->stopFFTbin ); + /* Nyquist frequency is discarded */ + fftBuffer[1] = 0.f; + + /* Perform STFT synthesis */ + SynthesisSTFT_dirac( fftBuffer, tdBuffer + n_samples_start, hFdCngCom->olapBufferSynth2, hFdCngCom->olapWinSyn, n_samples_out_loop, hFdCngCom ); + +#ifdef DEBUG_MODE_DIRAC + { + int16_t tmp[1000]; + + for ( i = 0; i < hFdCngCom->frameSize; i++ ) + { + tmp[i] = (int16_t) ( tdBuffer[i] + 0.5f ); + } + dbgwrite( tmp, sizeof( int16_t ), hFdCngCom->frameSize, 1, "./res/ivas_dirac_cna_fft.pcm" ); + } +#endif + } + + else + { + /* very low level case - update random seeds */ + generate_masking_noise_update_seed( hFdCngCom ); + + set_f( fftBuffer, 0.f, hFdCngCom->fftlen ); + + /* Perform STFT synthesis */ + SynthesisSTFT_dirac( fftBuffer, tdBuffer + n_samples_start, hFdCngCom->olapBufferSynth2, hFdCngCom->olapWinSyn, n_samples_out_loop, hFdCngCom ); + +#ifdef DEBUG_MODE_DIRAC + { + int16_t tmp[1000]; + + for ( i = 0; i < hFdCngCom->frameSize; i++ ) + { + tmp[i] = (int16_t) ( tdBuffer[i] + 0.5f ); + } + dbgwrite( tmp, sizeof( int16_t ), hFdCngCom->frameSize, 1, "./res/ivas_dirac_cna_fft.pcm" ); + } +#endif + } + n_samples_out -= hFdCngCom->frameSize; + n_samples_start += hFdCngCom->frameSize; + } + } + + pop_wmops(); + + return; +} + +#endif + /*------------------------------------------------------------------- * generate_masking_noise_hf_cldfb() @@ -1817,10 +1968,12 @@ void generate_masking_noise_dirac( ) { int16_t i; +#ifndef JBM_TSM_ON_TCS float *cngNoiseLevel = hFdCngCom->cngNoiseLevel; float *fftBuffer = hFdCngCom->fftBuffer; float *ptr_r; float *ptr_i; +#endif float *ptr_level; int16_t *seed = &( hFdCngCom->seed ); float scale; @@ -1867,12 +2020,12 @@ void generate_masking_noise_dirac( scale *= hFdCngCom->likelihood_noisy_speech; } } - /* LB CLDFB - CNA from STFT: CNA applied only in channel 0*/ if ( cna_flag && tdBuffer != NULL ) { if ( scale != 0 ) { +#ifndef JBM_TSM_ON_TCS /*Generate LF comfort noise only at first slot, for the whole frame*/ if ( slot_index == 0 ) { @@ -1927,12 +2080,13 @@ void generate_masking_noise_dirac( } #endif } - +#endif /* LF CLDFB*/ cldfbAnalysis_ts( &( tdBuffer[hFdCngCom->numCoreBands * slot_index] ), Cldfb_RealBuffer, Cldfb_ImagBuffer, hFdCngCom->numCoreBands, h_cldfb ); } else { +#ifndef JBM_TSM_ON_TCS if ( slot_index == 0 ) { /* very low level case - update random seeds */ @@ -1955,7 +2109,7 @@ void generate_masking_noise_dirac( } #endif } - +#endif /* LB ana CLDFB*/ cldfbAnalysis_ts( &( tdBuffer[hFdCngCom->numCoreBands * slot_index] ), Cldfb_RealBuffer, Cldfb_ImagBuffer, hFdCngCom->numCoreBands, h_cldfb ); } diff --git a/lib_dec/init_dec.c b/lib_dec/init_dec.c index 20bc7a0b845325f2517e94c9af43d36e0cf7a5c9..c9997f5782eade42665d738f97eaf86edda80139 100644 --- a/lib_dec/init_dec.c +++ b/lib_dec/init_dec.c @@ -702,7 +702,7 @@ ivas_error init_decoder( * FD-CNG decoder *-----------------------------------------------------------------*/ - if ( ( st->element_mode == IVAS_CPE_MDCT || idchan == 0 ) && mc_mode != MC_MODE_MCT ) + if ( ( st->element_mode == IVAS_CPE_MDCT || idchan == 0 ) && mc_mode != MC_MODE_MCT && mc_mode != MC_MODE_PARAMUPMIX ) { /* Create FD_CNG instance */ if ( ( error = createFdCngDec( &st->hFdCngDec ) ) != IVAS_ERR_OK ) @@ -732,9 +732,6 @@ ivas_error init_decoder( st->cna_dirac_flag = 0; st->cng_sba_flag = 0; st->cng_ism_flag = 0; -#ifndef FIX_ISM_DTX_CNG_BWIDTH_ALT - st->read_sid_info = 1; /* by default read the sid info from bitstream */ -#endif st->is_ism_format = 0; diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 63372cd5ba498174fdd9b69d1e841bbb3afbeaa2..d64e5d1cb57449d6cecb544fa8624d282ad5451e 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -59,7 +59,10 @@ static void ivas_binRenderer_filterModule( float out_Conv_CLDFB_imag[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : imag part of Binaural signals */ float CLDFB_real[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : real part of LS signals */ float CLDFB_imag[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : imag part of LS signals */ - BINAURAL_RENDERER_HANDLE hBinRenderer /* i/o: fastconv binaural renderer handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, /* i : number of time slots to process */ +#endif + BINAURAL_RENDERER_HANDLE hBinRenderer /* i/o: fastconv binaural renderer handle */ ) { int16_t bandIdx, k, chIdx, tapIdx; @@ -78,7 +81,11 @@ static void ivas_binRenderer_filterModule( filterTapsRightRealPtr = hBinRenderer->hBinRenConvModule->filterTapsRightReal[bandIdx][chIdx]; filterTapsRightImagPtr = hBinRenderer->hBinRenConvModule->filterTapsRightImag[bandIdx][chIdx]; +#ifdef JBM_TSM_ON_TCS + for ( k = 0; k < numTimeSlots; k++ ) +#else for ( k = 0; k < MAX_PARAM_SPATIAL_SUBFRAMES; k++ ) +#endif { float outRealLeft = 0.0f, outRealRight = 0.0f, outImagLeft = 0.0f, outImagRight = 0.0f; @@ -426,7 +433,6 @@ static ivas_error ivas_binaural_hrtf_open( * *-------------------------------------------------------------------------*/ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS static void ivas_binaural_obtain_DMX( const int16_t numTimeSlots, BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: fastconv binaural renderer handle */ @@ -434,15 +440,6 @@ static void ivas_binaural_obtain_DMX( float ImagBuffer[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Contains the LS signals */ float realDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float imagDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] ) -#else -static void ivas_binaural_obtain_DMX( - const int16_t numTimeSlots, - BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: fastconv binaural renderer handle */ - float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : Contains the LS signals */ - float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : Contains the LS signals */ - float realDMX[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float imagDMX[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] ) -#endif { int16_t chIdx, bandIdx, k; @@ -857,9 +854,14 @@ void ivas_binRenderer_close( *-------------------------------------------------------------------------*/ void ivas_binaural_add_LFE( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - int16_t output_frame, /* i : length of input frame */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + int16_t output_frame, /* i : length of input frame */ +#ifdef JBM_TSM_ON_TCS + float *input_f[], /* i : transport channels */ + float *output_f[] /* o : synthesized core-coder transport channels/DirAC output */ +#else float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif ) { int16_t render_lfe, idx_lfe; @@ -886,10 +888,17 @@ void ivas_binaural_add_LFE( } for ( idx_lfe = 0; idx_lfe < st_ivas->hIntSetup.num_lfe; idx_lfe++ ) { +#ifdef JBM_TSM_ON_TCS + v_multc( input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], gain, input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_frame ); + /* copy LFE to left and right channels */ + v_add( output_f[0], input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[0], output_frame ); + v_add( output_f[1], input_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[1], output_frame ); +#else v_multc( output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], gain, output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_frame ); /* copy LFE to left and right channels */ v_add( output_f[0], output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[0], output_frame ); v_add( output_f[1], output_f[st_ivas->hIntSetup.index_lfe[idx_lfe]], output_f[1], output_frame ); +#endif } } @@ -905,8 +914,12 @@ void ivas_binaural_add_LFE( *-------------------------------------------------------------------------*/ void ivas_binaural_cldfb( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ +#else float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif ) { float Cldfb_RealBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; @@ -949,8 +962,11 @@ void ivas_binaural_cldfb( } /* Implement binaural rendering */ +#ifdef JBM_TSM_ON_TCS + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hHeadTrackData, JBM_CLDFB_SLOTS_IN_SUBFRAME, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#else ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hHeadTrackData, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); - +#endif /* Implement CLDFB synthesis */ for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { @@ -971,6 +987,99 @@ void ivas_binaural_cldfb( return; } +#ifdef JBM_TSM_ON_TCS +/*-------------------------------------------------------------------------* + * ivas_binaural_cldfb() + * + * Perform CLDFB analysis, fastconv binaural rendering and CLDFB synthesis + *-------------------------------------------------------------------------*/ + +void ivas_binaural_cldfb_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t n_samples_to_render, + float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ +) +{ + float Cldfb_RealBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer[MAX_INTERN_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; + int16_t slot_idx, subframeIdx, index_slot, idx_in, idx_lfe, maxBand, ch; + int16_t slot_size, slots_to_render, first_sf, last_sf; + int16_t slot_index_start, slot_index_start_cldfb; + + /* Implement a 5 msec loops */ + maxBand = (int16_t) ( ( CLDFB_NO_CHANNELS_MAX * st_ivas->hDecoderConfig->output_Fs ) / 48000 ); + slot_size = st_ivas->hTcBuffer->nb_subframes; + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, n_samples_to_render / slot_size ); + first_sf = st_ivas->hTcBuffer->subframes_rendered; + last_sf = first_sf; + slot_index_start = st_ivas->hTcBuffer->slots_rendered; + slot_index_start_cldfb = 0; + st_ivas->hTcBuffer->slots_rendered += slots_to_render; + while ( slots_to_render > 0 ) + { + slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; + last_sf++; + } + for ( subframeIdx = first_sf; subframeIdx < last_sf; subframeIdx++ ) + { + for ( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[subframeIdx]; slot_idx++ ) + { + index_slot = slot_index_start + slot_idx; + + /* Implement CLDFB analysis */ + idx_in = 0; + idx_lfe = 0; + + for ( ch = 0; ch < ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ); ch++ ) + { + if ( ( st_ivas->hIntSetup.num_lfe > 0 ) && ( st_ivas->hIntSetup.index_lfe[idx_lfe] == ch ) ) + { + if ( idx_lfe < ( st_ivas->hIntSetup.num_lfe - 1 ) ) + { + idx_lfe++; + } + } + else + { + cldfbAnalysis_ts( &( st_ivas->hTcBuffer->tc[ch][maxBand * index_slot] ), + Cldfb_RealBuffer[idx_in][slot_idx], + Cldfb_ImagBuffer[idx_in][slot_idx], + maxBand, st_ivas->cldfbAnaDec[idx_in] ); + idx_in++; + } + } + } + + /* Implement binaural rendering */ +#ifdef JBM_TSM_ON_TCS + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hHeadTrackData, st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#else + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hHeadTrackData, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); +#endif + /* Implement CLDFB synthesis */ + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; + float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; + + for ( slot_idx = 0; slot_idx < st_ivas->hTcBuffer->subframe_nbslots[subframeIdx]; slot_idx++ ) + { + RealBuffer[slot_idx] = Cldfb_RealBuffer_Binaural[ch][slot_idx]; + ImagBuffer[slot_idx] = Cldfb_ImagBuffer_Binaural[ch][slot_idx]; + } + + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][slot_index_start_cldfb * maxBand] ), maxBand * st_ivas->hTcBuffer->subframe_nbslots[subframeIdx], st_ivas->cldfbSynDec[ch] ); + } + slot_index_start += st_ivas->hTcBuffer->subframe_nbslots[subframeIdx]; + slot_index_start_cldfb += st_ivas->hTcBuffer->subframe_nbslots[subframeIdx]; + } + st_ivas->hTcBuffer->subframes_rendered = last_sf; + return; +} +#endif #endif @@ -981,8 +1090,11 @@ void ivas_binaural_cldfb( *-------------------------------------------------------------------------*/ void ivas_binRenderer( - BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ - HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i/o: head track handle */ + BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ + HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i/o: head track handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, /* i : number of time slots to render*/ +#endif float Cldfb_RealBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float Cldfb_ImagBuffer_Binaural[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Binaural signals */ float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ @@ -990,7 +1102,9 @@ void ivas_binRenderer( ) { int16_t chIdx, k; +#ifndef JBM_TSM_ON_TCS int16_t numTimeSlots = MAX_PARAM_SPATIAL_SUBFRAMES; +#endif push_wmops( "fastconv_binaural_rendering" ); @@ -1014,42 +1128,55 @@ void ivas_binRenderer( if ( hHeadTrackData->shd_rot_max_order == -1 ) { QuatToRotMat( hHeadTrackData->Quaternions[hHeadTrackData->num_quaternions++], hHeadTrackData->Rmat ); +#ifdef JBM_TSM_ON_TCS + rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, 3 ); +#else rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, 3 ); +#endif } else if ( hHeadTrackData->shd_rot_max_order > 0 ) { +#ifdef JBM_TSM_ON_TCS + rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, numTimeSlots, hHeadTrackData->shd_rot_max_order ); +#else rotateFrame_shd_cldfb( RealBuffer, ImagBuffer, hHeadTrackData->Rmat, hBinRenderer->hInputSetup->nchan_out_woLFE, hHeadTrackData->shd_rot_max_order ); +#endif } } else { /* Rotation in SD (CICPx) */ +#ifdef JBM_TSM_ON_TCS + rotateFrame_sd_cldfb( hHeadTrackData, RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, numTimeSlots, hBinRenderer->conv_band ); +#else rotateFrame_sd_cldfb( hHeadTrackData, RealBuffer, ImagBuffer, hBinRenderer->hInputSetup, hBinRenderer->hEFAPdata, hBinRenderer->conv_band ); +#endif } } /* HOA decoding to CICP19 if needed*/ if ( hBinRenderer->hInputSetup->is_loudspeaker_setup == 0 && hBinRenderer->nInChannels != 16 ) { +#ifdef JBM_TSM_ON_TCS + ivas_sba2mc_cldfb( *( hBinRenderer->hInputSetup ), RealBuffer, ImagBuffer, hBinRenderer->nInChannels, hBinRenderer->conv_band, numTimeSlots, hBinRenderer->hoa_dec_mtx ); +#else ivas_sba2mc_cldfb( *( hBinRenderer->hInputSetup ), RealBuffer, ImagBuffer, hBinRenderer->nInChannels, hBinRenderer->conv_band, hBinRenderer->hoa_dec_mtx ); +#endif } +#ifdef JBM_TSM_ON_TCS + ivas_binRenderer_filterModule( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, RealBuffer, ImagBuffer, numTimeSlots, hBinRenderer ); +#else ivas_binRenderer_filterModule( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, RealBuffer, ImagBuffer, hBinRenderer ); +#endif /* Obtain the binaural dmx and compute the reverb */ if ( hBinRenderer->hReverb != NULL ) { -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS float reverbRe[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; float reverbIm[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; float inRe[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; float inIm[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; -#else - float reverbRe[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float reverbIm[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float inRe[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float inIm[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; -#endif ivas_binaural_obtain_DMX( numTimeSlots, hBinRenderer, RealBuffer, ImagBuffer, inRe, inIm ); for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ ) @@ -1061,10 +1188,10 @@ void ivas_binRenderer( } } -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS - ivas_binaural_reverb_processSubframe( hBinRenderer->hReverb, BINAURAL_CHANNELS, inRe, inIm, reverbRe, reverbIm ); +#ifdef JBM_TSM_ON_TCS + ivas_binaural_reverb_processSubframe( hBinRenderer->hReverb, BINAURAL_CHANNELS, numTimeSlots, inRe, inIm, reverbRe, reverbIm ); #else - ivas_binaural_reverb_processFrame( hBinRenderer->hReverb, BINAURAL_CHANNELS, inRe, inIm, reverbRe, reverbIm, 0u ); + ivas_binaural_reverb_processSubframe( hBinRenderer->hReverb, BINAURAL_CHANNELS, inRe, inIm, reverbRe, reverbIm ); #endif /* Add the conv module and reverb module output */ diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index 516e027f90db764e863ccec371bbb212e532b0c2..9d6211bf8f56e6508b593c3a41feb509c85a6465 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -90,9 +90,7 @@ ivas_error ivas_core_dec( int16_t use_cldfb_for_dft; float *p_output_mem; int16_t flag_sec_CNA; -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT int16_t read_sid_info; -#endif int16_t last_element_mode; int16_t nchan_out; float *save_hb_synth; @@ -108,9 +106,7 @@ ivas_error ivas_core_dec( use_cldfb_for_dft = 0; tdm_LRTD_flag = -1; -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT read_sid_info = 1; /* read SID by default */ -#endif if ( hSCE != NULL ) { @@ -122,7 +118,6 @@ ivas_error ivas_core_dec( hStereoTD = NULL; p_output_mem = NULL; nchan_out = 1; -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( st_ivas != NULL && st_ivas->ivas_format == ISM_FORMAT ) { if ( st_ivas->hISMDTX.sce_id_dtx != hSCE->sce_id ) @@ -130,7 +125,6 @@ ivas_error ivas_core_dec( read_sid_info = 0; } } -#endif } else { @@ -347,11 +341,7 @@ ivas_error ivas_core_dec( if ( st->core == ACELP_CORE ) { /* ACELP core decoder */ -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( ( error = acelp_core_dec( st, output[n], synth[n], save_hb_synth, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], sharpFlag[n], pitch_buf[n], &unbits[n], &sid_bw[n], hStereoTD, tdm_lspQ_PCh, tdm_lsfQ_PCh, use_cldfb_for_dft, last_element_mode, last_element_brate, flag_sec_CNA, nchan_out, hCPE == NULL ? NULL : hCPE->hStereoCng, read_sid_info ) ) != IVAS_ERR_OK ) -#else - if ( ( error = acelp_core_dec( st, output[n], synth[n], save_hb_synth, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], sharpFlag[n], pitch_buf[n], &unbits[n], &sid_bw[n], hStereoTD, tdm_lspQ_PCh, tdm_lsfQ_PCh, use_cldfb_for_dft, last_element_mode, last_element_brate, flag_sec_CNA, nchan_out, hCPE == NULL ? NULL : hCPE->hStereoCng ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c old mode 100644 new mode 100755 index 186d1c4c7daade77a393d4542142f78836852a11..3717501c831a671f3a92a58a7938a7ca54974846 --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -405,7 +405,12 @@ ivas_error ivas_cpe_dec( } else { - stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0, 0, 0, 0, 0, 0 ); + stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0, 0, 0, 0, 0, 0 +#ifdef FIX_STEREO_474 + , + MAX_PARAM_SPATIAL_SUBFRAMES +#endif + ); } /* synthesis iFFT */ diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 68ce3c75fe84401cf24d6317dcf014474c332d9e..7069e7d08f802323211d6f43aae28406273d84b3 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -64,7 +64,11 @@ ivas_error ivas_dec( int16_t nb_bits_metadata[MAX_SCE]; int32_t output_Fs, ivas_total_brate; AUDIO_CONFIG output_config; + float pan_left, pan_right; ivas_error error; +#ifdef JBM_TSM_ON_TCS + float *p_output[MAX_OUTPUT_CHANNELS]; +#endif error = IVAS_ERR_OK; @@ -80,7 +84,11 @@ ivas_error ivas_dec( if ( st_ivas->bfi == 0 ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_dec_setup( st_ivas, NULL, NULL ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_dec_setup( st_ivas ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -97,6 +105,13 @@ ivas_error ivas_dec( output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); +#ifdef JBM_TSM_ON_TCS + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output[n] = &output[n][0]; + } +#endif + /*----------------------------------------------------------------* * Decoding + Rendering *----------------------------------------------------------------*/ @@ -134,7 +149,11 @@ ivas_error ivas_dec( /* Rendering */ if ( st_ivas->renderer_type == RENDERER_MC ) { - ivas_ls_setup_conversion( st_ivas, output_frame, output ); +#ifdef JBM_TSM_ON_TCS + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); +#else + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, output ); +#endif } } else if ( st_ivas->ivas_format == ISM_FORMAT ) @@ -187,6 +206,13 @@ ivas_error ivas_dec( { ivas_mono_downmix_render_passive( st_ivas, output, output_frame ); } + else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; + v_multc( output[0], pan_right, output[1], output_frame ); + v_multc( output[0], pan_left, output[0], output_frame ); + } else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { ivas_param_ism_dec( st_ivas, output ); @@ -194,7 +220,11 @@ ivas_error ivas_dec( if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { /* Convert CICP19 -> Ambisonics */ +#ifdef JBM_TSM_ON_TCS + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else ivas_mc2sba( st_ivas->hIntSetup, output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif } } } @@ -205,45 +235,80 @@ ivas_error ivas_dec( { ivas_mono_downmix_render_passive( st_ivas, output, output_frame ); } + else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; + v_multc( output[0], pan_right, output[1], output_frame ); + v_multc( output[0], pan_left, output[0], output_frame ); + } else if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ +#ifdef JBM_TSM_ON_TCS + ivas_ism_render( st_ivas, p_output, output_frame ); +#else ivas_ism_render( st_ivas, output, output_frame ); +#endif } -#ifdef REND_DEBUGGING_REVISION #ifdef DEBUGGING else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) #else else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) -#endif -#else - else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) #endif { /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ +#ifdef JBM_TSM_ON_TCS + ivas_ism2sba( p_output, st_ivas->hIsmRendererData, st_ivas->hIsmMetaData, st_ivas->nchan_ism, output_frame, st_ivas->hIntSetup.ambisonics_order ); +#else ivas_ism2sba( output, st_ivas->hIsmRendererData, st_ivas->hIsmMetaData, st_ivas->nchan_ism, output_frame, st_ivas->hIntSetup.ambisonics_order ); +#endif } /* Binaural rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { +#ifdef JBM_TSM_ON_TCS + if ( ( ivas_td_binaural_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK ) +#else if ( ( ivas_td_binaural_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK ) +#endif { return error; } } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { - if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM, NULL, NULL, NULL, NULL, output, output_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, + AUDIO_CONFIG_7_1_4, + AUDIO_CONFIG_BINAURAL_ROOM, + NULL, + NULL, + NULL, + NULL, +#ifdef JBM_TSM_ON_TCS + p_output, +#else + output, +#endif + output_Fs ) ) != IVAS_ERR_OK ) { return error; } +#ifdef JBM_TSM_ON_TCS + ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); +#else ivas_binaural_add_LFE( st_ivas, output_frame, output ); +#endif } #ifdef DEBUGGING else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { +#ifdef JBM_TSM_ON_TCS + ivas_binaural_cldfb( st_ivas, p_output ); +#else ivas_binaural_cldfb( st_ivas, output ); +#endif } #endif } @@ -259,7 +324,9 @@ ivas_error ivas_dec( if ( st_ivas->ivas_format == SBA_FORMAT ) { - ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, 0 ); + ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, + ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ), + 0 ); } else { @@ -274,7 +341,10 @@ ivas_error ivas_dec( if ( st_ivas->hQMetaData != NULL ) { st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; - ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, st_ivas->hSpar->dirac_to_spar_md_bands ); + + ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, + ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ), + st_ivas->hSpar->dirac_to_spar_md_bands ); } if ( ( error = ivas_spar_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK ) @@ -325,6 +395,7 @@ ivas_error ivas_dec( /* Dump audio signal after core-decoding */ ivas_spar_dump_signal_wav( output_frame, NULL, output, st_ivas->nchan_transport, spar_foa_dec_wav[0], "core-decoding" ); #endif + /* TCs remapping */ nchan_remapped = st_ivas->nchan_transport; if ( st_ivas->sba_dirac_stereo_flag ) @@ -340,7 +411,8 @@ ivas_error ivas_dec( ivas_pca_dec( st_ivas->hSpar->hPCA, output_frame, st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, output ); } - ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi ); + ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, + ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate ) ); } ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, st_ivas->ivas_format == MC_FORMAT ); @@ -365,6 +437,12 @@ ivas_error ivas_dec( { ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame ); } +#ifdef JBM_TSM_ON_TCS + else if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->renderer_type != RENDERER_DISABLE ) + { + ivas_spar_dec_agc_pca( st_ivas, output, output_frame ); + } +#endif } if ( st_ivas->ivas_format == MASA_FORMAT ) @@ -373,7 +451,6 @@ ivas_error ivas_dec( } else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { -#ifdef FIX_441_SBA_PARAMBIN_GAINS float gain; if ( nchan_remapped == 1 ) @@ -384,9 +461,6 @@ ivas_error ivas_dec( { gain = 1.3657f; } -#else - float gain = 0.8414f; /* Todo: Temporary gain for roughly matching the loudness. To be tuned later together with other outputs. */ -#endif for ( n = 0; n < nchan_remapped; n++ ) { @@ -403,14 +477,22 @@ ivas_error ivas_dec( { if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_sba_linear_renderer( p_output, output_frame, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_sba_linear_renderer( output, output_frame, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) +#endif { return error; } } else if ( st_ivas->renderer_type == RENDERER_DIRAC ) { +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec( st_ivas, output, nchan_remapped ); +#else ivas_dirac_dec( st_ivas, output, nchan_remapped, NULL, NULL, -1 ); +#endif } } else if ( !st_ivas->sba_dirac_stereo_flag && nchan_out != 1 ) @@ -448,35 +530,164 @@ ivas_error ivas_dec( if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) { +#ifdef JBM_TSM_ON_TCS + ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#else ivas_mc2sba( st_ivas->hTransSetup, output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#endif } /* Rendering */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { - if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hHeadTrackData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, output, output_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, + st_ivas->intern_config, + st_ivas->hOutSetup.output_config, + st_ivas->hDecoderConfig, + st_ivas->hHeadTrackData, + &st_ivas->hIntSetup, + st_ivas->hEFAPdata, +#ifdef JBM_TSM_ON_TCS + p_output, +#else + output, +#endif + output_Fs ) ) != IVAS_ERR_OK ) { return error; } +#ifdef JBM_TSM_ON_TCS + ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); +#else ivas_binaural_add_LFE( st_ivas, output_frame, output ); +#endif } else if ( st_ivas->renderer_type == RENDERER_MC ) { - ivas_ls_setup_conversion( st_ivas, output_frame, output ); +#ifdef JBM_TSM_ON_TCS + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); +#else + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, output ); +#endif } else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { +#ifdef JBM_TSM_ON_TCS + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else ivas_mc2sba( st_ivas->hIntSetup, output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { +#ifdef JBM_TSM_ON_TCS + if ( ( ivas_td_binaural_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK ) + { + return error; + } + ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); +#else if ( ( ivas_td_binaural_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK ) { return error; } + ivas_binaural_add_LFE( st_ivas, output_frame, output ); +#endif + } + } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); + + ivas_mc_paramupmix_dec_read_BS( ivas_total_brate, st, st_ivas, st_ivas->hMCParamUpmix, &nb_bits_metadata[0] ); + + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + + mvr2r( output_lfe_ch, output[LFE_CHANNEL], output_frame ); + + ivas_mc_paramupmix_dec( st_ivas, output ); + /* HP filtering */ + for ( n = 0; n < st_ivas->nchan_transport; n++ ) + { + if ( n != LFE_CHANNEL ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + } + + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { +#ifdef JBM_TSM_ON_TCS + ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#else + ivas_mc2sba( st_ivas->hTransSetup, output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); +#endif + } + + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hHeadTrackData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, p_output, output_Fs ) ) != IVAS_ERR_OK ) +#else + if ( ( error = ivas_rend_crendProcess( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hHeadTrackData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, output, output_Fs ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } +#ifdef JBM_TSM_ON_TCS + ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); +#else + ivas_binaural_add_LFE( st_ivas, output_frame, output ); +#endif + } + else if ( st_ivas->renderer_type == RENDERER_MC ) + { + if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) || ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) + { +#ifdef JBM_TSM_ON_TCS + ivas_ls_setup_conversion( st_ivas, audioCfg2channels( AUDIO_CONFIG_5_1_2 ), output_frame, p_output, p_output ); +#else + ivas_ls_setup_conversion( st_ivas, audioCfg2channels( AUDIO_CONFIG_5_1_2 ), output_frame, output ); +#endif + } + else + { +#ifdef JBM_TSM_ON_TCS + ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, output_frame, p_output, p_output ); +#else + ivas_ls_setup_conversion( st_ivas, MC_PARAMUPMIX_MAX_INPUT_CHANS, output_frame, output ); +#endif + } + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { +#ifdef JBM_TSM_ON_TCS + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else + ivas_mc2sba( st_ivas->hIntSetup, output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { +#ifdef JBM_TSM_ON_TCS + if ( ( ivas_td_binaural_renderer( st_ivas, p_output, output_frame ) ) != IVAS_ERR_OK ) +#else + if ( ( ivas_td_binaural_renderer( st_ivas, output, output_frame ) ) != IVAS_ERR_OK ) +#endif + { + return error; + } +#ifdef JBM_TSM_ON_TCS + ivas_binaural_add_LFE( st_ivas, output_frame, p_output, p_output ); +#else ivas_binaural_add_LFE( st_ivas, output_frame, output ); +#endif } } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) @@ -508,11 +719,19 @@ ivas_error ivas_dec( /* Rendering */ if ( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) { - ivas_ls_setup_conversion( st_ivas, output_frame, output ); +#ifdef JBM_TSM_ON_TCS + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); +#else + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, output ); +#endif } else { +#ifdef JBM_TSM_ON_TCS + ivas_param_mc_dec( st_ivas, p_output ); +#else ivas_param_mc_dec( st_ivas, output ); +#endif } } else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) @@ -594,11 +813,19 @@ ivas_error ivas_dec( } else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ { +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport ); +#else ivas_dirac_dec( st_ivas, output, st_ivas->nchan_transport, NULL, NULL, -1 ); +#endif if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { +#ifdef JBM_TSM_ON_TCS + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#else ivas_mc2sba( st_ivas->hIntSetup, output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); +#endif } else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) { @@ -621,14 +848,21 @@ ivas_error ivas_dec( * - compensation for saturation * - float to integer conversion *----------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, output_frame, st_ivas->BER_detect ); +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, output_frame, nchan_out, data ); +#else ivas_limiter_dec( st_ivas->hLimiter, output, nchan_out, output_frame, st_ivas->BER_detect ); #ifdef DEBUGGING st_ivas->noClipping += #endif ivas_syn_output( output, output_frame, nchan_out, data ); - +#endif /*----------------------------------------------------------------* * Common updates *----------------------------------------------------------------*/ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index b02b1144c343b7cbc93d73632ac63bc1fd600e6e..d69d323c9bf9838afb36601f452b1c2efb965d04 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -51,7 +51,7 @@ * Local function prototypes *-----------------------------------------------------------------------*/ -static ivas_error ivas_dirac_alloc_mem( DIRAC_DEC_HANDLE hDirAC, const RENDERER_TYPE renderer_type, DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem ); +static ivas_error ivas_dirac_alloc_mem( DIRAC_DEC_HANDLE hDirAC, const RENDERER_TYPE renderer_type, DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem, const int16_t hodirac_flag ); static void ivas_dirac_free_mem( DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem ); @@ -65,7 +65,7 @@ static void protoSignalComputation1( float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRA static void protoSignalComputation2( float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float *proto_frame_f, float *proto_direct_buffer_f, float *reference_power, float *proto_power_smooth, const int16_t isloudspeaker, const int16_t slot_index, const int16_t num_freq_bands, MASA_STEREO_TYPE_DETECT *stereo_type_detect ); -static void protoSignalComputation4( float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float *proto_frame_f, float *proto_direct_buffer_f, float *reference_power, float *proto_power_smooth, const int16_t slot_index, const int16_t num_outputs_diff, const int16_t num_freq_bands, const float *mtx_hoa_decoder, const int16_t nchan_transport ); +static void protoSignalComputation4( float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], float *proto_frame_f, float *proto_direct_buffer_f, float *reference_power, float *proto_power_smooth, const int16_t slot_index, const int16_t num_outputs_diff, const int16_t num_freq_bands, const float *mtx_hoa_decoder, const int16_t nchan_transport, const int16_t *sba_map_tc_ind ); static void ivas_dirac_dec_compute_diffuse_proto( DIRAC_DEC_HANDLE hDirAC, const int16_t slot_idx ); @@ -103,6 +103,144 @@ ivas_error ivas_dirac_dec_open( } +/*------------------------------------------------------------------------- + * ivas_dirac_allocate_parameters() + * + * Allocate and initialize DirAC parameters + *-------------------------------------------------------------------------*/ + +ivas_error ivas_dirac_allocate_parameters( + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + const int16_t params_flag /* i : set of parameters flag */ +) +{ + int16_t i; + + if ( params_flag == 1 ) + { + if ( ( hDirAC->azimuth = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->elevation = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->diffuseness_vector = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->energy_ratio1 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->spreadCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->surroundingCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + { + if ( ( hDirAC->azimuth[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_s( hDirAC->azimuth[i], 0, hDirAC->num_freq_bands ); + + if ( ( hDirAC->elevation[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_s( hDirAC->elevation[i], 0, hDirAC->num_freq_bands ); + + if ( ( hDirAC->diffuseness_vector[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_f( hDirAC->diffuseness_vector[i], 1.0f, hDirAC->num_freq_bands ); + + if ( ( hDirAC->energy_ratio1[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_f( hDirAC->energy_ratio1[i], 0.0f, hDirAC->num_freq_bands ); + + if ( ( hDirAC->spreadCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_f( hDirAC->spreadCoherence[i], 0.0f, hDirAC->num_freq_bands ); + + if ( ( hDirAC->surroundingCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_f( hDirAC->surroundingCoherence[i], 0.0f, hDirAC->num_freq_bands ); + } + } + else if ( params_flag == 2 ) + { + if ( ( hDirAC->azimuth2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->elevation2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->energy_ratio2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + if ( ( hDirAC->spreadCoherence2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + { + if ( ( hDirAC->azimuth2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_s( hDirAC->azimuth2[i], 0, hDirAC->num_freq_bands ); + + if ( ( hDirAC->elevation2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_s( hDirAC->elevation2[i], 0, hDirAC->num_freq_bands ); + + if ( ( hDirAC->energy_ratio2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_f( hDirAC->energy_ratio2[i], 0.0f, hDirAC->num_freq_bands ); + + if ( ( hDirAC->spreadCoherence2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + } + set_f( hDirAC->spreadCoherence2[i], 0.0f, hDirAC->num_freq_bands ); + } + } + + return IVAS_ERR_OK; +} + + /*------------------------------------------------------------------------- * ivas_dirac_dec_config() * @@ -130,6 +268,7 @@ ivas_error ivas_dirac_dec_config( int32_t output_Fs, ivas_total_brate; ivas_error error; int16_t nchan_transport_orig; + int16_t hodirac_flag; DIRAC_CONFIG_FLAG flag_config; flag_config = ( flag_config_inp == DIRAC_RECONFIGURE_MODE ) ? DIRAC_RECONFIGURE : flag_config_inp; @@ -138,6 +277,8 @@ ivas_error ivas_dirac_dec_config( hDirAC = NULL; output_Fs = st_ivas->hDecoderConfig->output_Fs; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + hodirac_flag = ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ); + if ( flag_config == DIRAC_RECONFIGURE ) { @@ -159,7 +300,10 @@ ivas_error ivas_dirac_dec_config( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC Config\n" ) ); } nchan_transport_old = 0; - +#ifdef JBM_TSM_ON_TCS + hDirAC->hParamIsm = NULL; + hDirAC->hParamIsmRendering = NULL; +#endif st_ivas->hDirAC = hDirAC; } @@ -172,7 +316,8 @@ ivas_error ivas_dirac_dec_config( nchan_transport_orig = st_ivas->nchan_transport; if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && !( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { - st_ivas->nchan_transport = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); + st_ivas->nchan_transport = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); } nchan_transport = st_ivas->nchan_transport; @@ -250,18 +395,47 @@ ivas_error ivas_dirac_dec_config( if ( flag_config == DIRAC_OPEN ) { hDirAC->slot_size = (int16_t) ( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX ); +#ifdef JBM_TSM_ON_TCS + set_s( hDirAC->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( hDirAC->subframe_nbslots, JBM_CLDFB_SLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS ); + hDirAC->nb_subframes = DEFAULT_JBM_SUBFRAMES_5MS; + hDirAC->subframes_rendered = 0; + hDirAC->slots_rendered = 0; + hDirAC->num_slots = DEFAULT_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME; +#else hDirAC->subframe_nbslots = (int16_t) ( CLDFB_NO_COL_MAX * 5.f / 20.f + 0.5f ); hDirAC->nb_subframes = CLDFB_NO_COL_MAX / hDirAC->subframe_nbslots; assert( hDirAC->nb_subframes <= MAX_PARAM_SPATIAL_SUBFRAMES ); +#endif + } + + if ( st_ivas->ivas_format == SBA_FORMAT && flag_config == DIRAC_RECONFIGURE && ( ( ivas_total_brate > IVAS_256k && st_ivas->hDecoderConfig->last_ivas_total_brate <= IVAS_256k ) || ( ivas_total_brate <= IVAS_256k && st_ivas->hDecoderConfig->last_ivas_total_brate > IVAS_256k ) ) ) + { + if ( st_ivas->hDecoderConfig->ivas_total_brate > IVAS_256k && hDirAC->azimuth2 == NULL ) + { + if ( ( error = ivas_dirac_allocate_parameters( hDirAC, 2 ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->hDecoderConfig->ivas_total_brate <= IVAS_256k && hDirAC->azimuth2 != NULL ) + { + ivas_dirac_deallocate_parameters( hDirAC, 2 ); + } } /* band config needed only for SPAR with FOA output */ - if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA && st_ivas->sba_mode == SBA_MODE_SPAR ) + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_FOA && st_ivas->sba_mode == SBA_MODE_SPAR && !hodirac_flag ) { return IVAS_ERR_OK; } - if ( nchan_transport_orig > 2 && hDirAC->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC ) + + if ( nchan_transport_orig > 2 && hDirAC->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC +#ifdef FIX_DIRAC_LS_SYNTHESIS_CONFIG + && !ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) +#endif + ) { hDirAC->synthesisConf = DIRAC_SYNTHESIS_PSD_LS; hDirAC->panningConf = DIRAC_PANNING_VBAP; @@ -412,6 +586,15 @@ ivas_error ivas_dirac_dec_config( } set_s( hDirAC->proto_index_diff, 0, hDirAC->num_outputs_diff ); + hDirAC->sba_map_tc = sba_map_tc; + if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) + { + if ( st_ivas->sba_order > SBA_FOA_ORDER && ivas_total_brate >= IVAS_512k ) + { + hDirAC->sba_map_tc = sba_map_tc_512; + } + } + if ( nchan_transport == 1 ) { hDirAC->num_protos_ambi = 1; @@ -517,9 +700,9 @@ ivas_error ivas_dirac_dec_config( for ( k = 0; k < min( hDirAC->num_outputs_dir, hDirAC->num_protos_dir ); k++ ) { - if ( sba_map_tc[k] < hDirAC->num_outputs_dir ) + if ( hDirAC->sba_map_tc[k] < hDirAC->num_outputs_dir ) { - hDirAC->proto_index_dir[sba_map_tc[k]] = k; + hDirAC->proto_index_dir[hDirAC->sba_map_tc[k]] = k; } } } @@ -696,7 +879,8 @@ ivas_error ivas_dirac_dec_config( /* output synthesis */ if ( flag_config == DIRAC_OPEN ) { - if ( ( ivas_dirac_dec_output_synthesis_open( hDirAC, st_ivas->renderer_type, nchan_transport, output_Fs ) ) != IVAS_ERR_OK ) + if ( ( ivas_dirac_dec_output_synthesis_open( hDirAC, st_ivas->renderer_type, nchan_transport, output_Fs, + hodirac_flag ) ) != IVAS_ERR_OK ) { return error; } @@ -706,7 +890,8 @@ ivas_error ivas_dirac_dec_config( { ivas_dirac_dec_output_synthesis_close( hDirAC ); - if ( ( ivas_dirac_dec_output_synthesis_open( hDirAC, st_ivas->renderer_type, nchan_transport, output_Fs ) ) != IVAS_ERR_OK ) + if ( ( ivas_dirac_dec_output_synthesis_open( hDirAC, st_ivas->renderer_type, nchan_transport, output_Fs, + hodirac_flag ) ) != IVAS_ERR_OK ) { return error; } @@ -800,14 +985,16 @@ ivas_error ivas_dirac_dec_config( } /* output synthesis */ - ivas_dirac_dec_output_synthesis_init( hDirAC, nchan_out_woLFE ); + ivas_dirac_dec_output_synthesis_init( hDirAC, nchan_out_woLFE, + hodirac_flag ); /* Allocate stack memory */ if ( flag_config != DIRAC_OPEN ) { ivas_dirac_free_mem( &( hDirAC->stack_mem ) ); } - if ( ( error = ivas_dirac_alloc_mem( hDirAC, st_ivas->renderer_type, &( hDirAC->stack_mem ) ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_dirac_alloc_mem( hDirAC, st_ivas->renderer_type, &( hDirAC->stack_mem ), + hodirac_flag ) ) != IVAS_ERR_OK ) { return error; } @@ -820,17 +1007,35 @@ ivas_error ivas_dirac_dec_config( hDirAC->dirac_bs_md_write_idx = 0; hDirAC->dirac_read_idx = 0; hDirAC->spar_to_dirac_write_idx = 0; -#ifdef FIX_391_SBA hDirAC->hConfig->dec_param_estim_old = hDirAC->hConfig->dec_param_estim; -#endif if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { hDirAC->dirac_md_buffer_length = MAX_PARAM_SPATIAL_SUBFRAMES; +#ifdef JBM_TSM_ON_TCS + { + int16_t map_idx; + set_s( hDirAC->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); + for ( map_idx = 0; map_idx < DEFAULT_JBM_SUBFRAMES_5MS; map_idx++ ) + { + hDirAC->render_to_md_map[map_idx] = map_idx; + } + } +#endif } else if ( st_ivas->ivas_format == MASA_FORMAT ) { hDirAC->dirac_md_buffer_length = MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_MASA_PARAM_DEC_SFR; hDirAC->dirac_bs_md_write_idx = DELAY_MASA_PARAM_DEC_SFR; +#ifdef JBM_TSM_ON_TCS + { + int16_t map_idx; + set_s( hDirAC->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); + for ( map_idx = 0; map_idx < DEFAULT_JBM_SUBFRAMES_5MS; map_idx++ ) + { + hDirAC->render_to_md_map[map_idx] = map_idx; + } + } +#endif } else { @@ -853,124 +1058,28 @@ ivas_error ivas_dirac_dec_config( hDirAC->dirac_read_idx = 0; hDirAC->dirac_estimator_idx = 0; } - } - - if ( ( hDirAC->azimuth = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->elevation = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->diffuseness_vector = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->energy_ratio1 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->spreadCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->surroundingCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( ( hDirAC->azimuth[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_s( hDirAC->azimuth[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->elevation[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_s( hDirAC->elevation[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->diffuseness_vector[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_f( hDirAC->diffuseness_vector[i], 1.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->energy_ratio1[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_f( hDirAC->energy_ratio1[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->spreadCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_f( hDirAC->spreadCoherence[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->surroundingCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) +#ifdef JBM_TSM_ON_TCS { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + int16_t map_idx; + set_s( hDirAC->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); + for ( map_idx = 0; map_idx < DEFAULT_JBM_CLDFB_TIMESLOTS; map_idx++ ) + { + hDirAC->render_to_md_map[map_idx] = hDirAC->dirac_read_idx + map_idx * num_slots_in_subfr / JBM_CLDFB_SLOTS_IN_SUBFRAME; + } } - set_f( hDirAC->surroundingCoherence[i], 0.0f, hDirAC->num_freq_bands ); +#endif } - if ( st_ivas->ivas_format == MASA_FORMAT ) + if ( ( error = ivas_dirac_allocate_parameters( hDirAC, 1 ) ) != IVAS_ERR_OK ) { - if ( ( hDirAC->azimuth2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->elevation2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->energy_ratio2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->spreadCoherence2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } + return error; + } - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( st_ivas->ivas_format == MASA_FORMAT || ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->hDecoderConfig->ivas_total_brate > IVAS_256k ) ) + { + if ( ( error = ivas_dirac_allocate_parameters( hDirAC, 2 ) ) != IVAS_ERR_OK ) { - if ( ( hDirAC->azimuth2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_s( hDirAC->azimuth2[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->elevation2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_s( hDirAC->elevation2[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->energy_ratio2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_f( hDirAC->energy_ratio2[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->spreadCoherence2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_f( hDirAC->spreadCoherence2[i], 0.0f, hDirAC->num_freq_bands ); + return error; } } else @@ -986,7 +1095,6 @@ ivas_error ivas_dirac_dec_config( hDirAC->dithering_seed = DIRAC_DITH_SEED; st_ivas->hDirAC = hDirAC; } -#ifdef FIX_391_SBA else if ( hDirAC->hConfig->dec_param_estim_old != hDirAC->hConfig->dec_param_estim ) { int16_t num_slots_in_subfr; @@ -995,146 +1103,49 @@ ivas_error ivas_dirac_dec_config( { if ( ( hDirAC->hConfig->dec_param_estim_old != hDirAC->hConfig->dec_param_estim ) ) { - - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->azimuth[i] != NULL ) - { - free( hDirAC->azimuth[i] ); - hDirAC->azimuth[i] = NULL; - } - if ( hDirAC->elevation[i] != NULL ) - { - free( hDirAC->elevation[i] ); - hDirAC->elevation[i] = NULL; - } - if ( hDirAC->diffuseness_vector[i] != NULL ) - { - free( hDirAC->diffuseness_vector[i] ); - hDirAC->diffuseness_vector[i] = NULL; - } - if ( hDirAC->energy_ratio1[i] != NULL ) - { - free( hDirAC->energy_ratio1[i] ); - hDirAC->energy_ratio1[i] = NULL; - } - if ( hDirAC->spreadCoherence[i] != NULL ) - { - free( hDirAC->spreadCoherence[i] ); - hDirAC->spreadCoherence[i] = NULL; - } - if ( hDirAC->surroundingCoherence[i] != NULL ) - { - free( hDirAC->surroundingCoherence[i] ); - hDirAC->surroundingCoherence[i] = NULL; - } - } - if ( hDirAC->azimuth != NULL ) - { - free( hDirAC->azimuth ); - hDirAC->azimuth = NULL; - } - if ( hDirAC->elevation != NULL ) - { - free( hDirAC->elevation ); - hDirAC->elevation = NULL; - } - if ( hDirAC->diffuseness_vector != NULL ) - { - free( hDirAC->diffuseness_vector ); - hDirAC->diffuseness_vector = NULL; - } - if ( hDirAC->energy_ratio1 != NULL ) - { - free( hDirAC->energy_ratio1 ); - hDirAC->energy_ratio1 = NULL; - } - if ( hDirAC->spreadCoherence != NULL ) - { - free( hDirAC->spreadCoherence ); - hDirAC->spreadCoherence = NULL; - } - if ( hDirAC->surroundingCoherence != NULL ) - { - free( hDirAC->surroundingCoherence ); - hDirAC->surroundingCoherence = NULL; - } + ivas_dirac_deallocate_parameters( hDirAC, 1 ); } hDirAC->dirac_md_buffer_length = ( MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_DIRAC_PARAM_DEC_SFR ) * num_slots_in_subfr; hDirAC->dirac_bs_md_write_idx = DELAY_DIRAC_PARAM_DEC_SFR * num_slots_in_subfr; hDirAC->spar_to_dirac_write_idx = DELAY_DIRAC_PARAM_DEC_SFR * num_slots_in_subfr; hDirAC->dirac_read_idx = 0; hDirAC->dirac_estimator_idx = 0; - if ( ( hDirAC->azimuth = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->elevation = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->diffuseness_vector = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->energy_ratio1 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - - if ( ( hDirAC->spreadCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - if ( ( hDirAC->surroundingCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + if ( ( error = ivas_dirac_allocate_parameters( hDirAC, 1 ) ) != IVAS_ERR_OK ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + return error; } - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + } + } +#ifdef JBM_TSM_ON_TCS + /* allocate transport channels*/ + if ( flag_config == DIRAC_OPEN ) + { + if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) + { + if ( st_ivas->sba_mode == SBA_MODE_DIRAC ) { - if ( ( hDirAC->azimuth[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_s( hDirAC->azimuth[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->elevation[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_s( hDirAC->elevation[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->diffuseness_vector[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); - } - set_f( hDirAC->diffuseness_vector[i], 1.0f, hDirAC->num_freq_bands ); + int16_t nchan_to_allocate; - if ( ( hDirAC->energy_ratio1[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + nchan_to_allocate = nchan_transport; + if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + nchan_to_allocate++; /* we need a channel for the CNG in this case*/ } - set_f( hDirAC->energy_ratio1[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->spreadCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + nchan_to_allocate = 2 * BINAURAL_CHANNELS; } - set_f( hDirAC->spreadCoherence[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->surroundingCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, nchan_transport, nchan_to_allocate, nchan_to_allocate, hDirAC->slot_size ) ) != IVAS_ERR_OK ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); + return error; } - set_f( hDirAC->surroundingCoherence[i], 0.0f, hDirAC->num_freq_bands ); } } } -#endif + +#endif /* JBM_TMS_ON_TCS*/ + return error; } @@ -1236,150 +1247,185 @@ void ivas_dirac_dec_close( hDirAC->buffer_energy = NULL; } - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + ivas_dirac_deallocate_parameters( hDirAC, 1 ); + ivas_dirac_deallocate_parameters( hDirAC, 2 ); + + if ( hDirAC->masa_stereo_type_detect != NULL ) + { + free( hDirAC->masa_stereo_type_detect ); + hDirAC->masa_stereo_type_detect = NULL; + } + + ivas_dirac_free_mem( &( hDirAC->stack_mem ) ); + + free( *hDirAC_out ); + *hDirAC_out = NULL; + + return; +} + + +/*------------------------------------------------------------------------- + * ivas_dirac_deallocate_parameters() + * + * Deallocate DirAC parameters + *-------------------------------------------------------------------------*/ + +void ivas_dirac_deallocate_parameters( + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + const int16_t params_flag /* i : set of parameters flag */ +) +{ + int16_t i; + + if ( params_flag == 1 ) { - if ( hDirAC->azimuth[i] != NULL ) + if ( hDirAC->azimuth != NULL ) { - free( hDirAC->azimuth[i] ); - hDirAC->azimuth[i] = NULL; + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + { + if ( hDirAC->azimuth[i] != NULL ) + { + free( hDirAC->azimuth[i] ); + hDirAC->azimuth[i] = NULL; + } + } + + free( hDirAC->azimuth ); + hDirAC->azimuth = NULL; } - if ( hDirAC->elevation[i] != NULL ) + if ( hDirAC->elevation != NULL ) { - free( hDirAC->elevation[i] ); - hDirAC->elevation[i] = NULL; + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + { + if ( hDirAC->elevation[i] != NULL ) + { + free( hDirAC->elevation[i] ); + hDirAC->elevation[i] = NULL; + } + } + + free( hDirAC->elevation ); + hDirAC->elevation = NULL; } - if ( hDirAC->diffuseness_vector[i] != NULL ) + + if ( hDirAC->energy_ratio1 != NULL ) { - free( hDirAC->diffuseness_vector[i] ); - hDirAC->diffuseness_vector[i] = NULL; + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + { + if ( hDirAC->energy_ratio1[i] != NULL ) + { + free( hDirAC->energy_ratio1[i] ); + hDirAC->energy_ratio1[i] = NULL; + } + } + free( hDirAC->energy_ratio1 ); + hDirAC->energy_ratio1 = NULL; } - } - if ( hDirAC->azimuth != NULL ) - { - free( hDirAC->azimuth ); - hDirAC->azimuth = NULL; - } - if ( hDirAC->elevation != NULL ) - { - free( hDirAC->elevation ); - hDirAC->elevation = NULL; - } - if ( hDirAC->diffuseness_vector != NULL ) - { - free( hDirAC->diffuseness_vector ); - hDirAC->diffuseness_vector = NULL; - } - if ( hDirAC->azimuth2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->diffuseness_vector != NULL ) { - if ( hDirAC->azimuth2[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->azimuth2[i] ); - hDirAC->azimuth2[i] = NULL; + if ( hDirAC->diffuseness_vector[i] != NULL ) + { + free( hDirAC->diffuseness_vector[i] ); + hDirAC->diffuseness_vector[i] = NULL; + } } + + free( hDirAC->diffuseness_vector ); + hDirAC->diffuseness_vector = NULL; } - free( hDirAC->azimuth2 ); - hDirAC->azimuth2 = NULL; - } - if ( hDirAC->elevation2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->spreadCoherence != NULL ) { - if ( hDirAC->elevation2[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->elevation2[i] ); - hDirAC->elevation2[i] = NULL; + if ( hDirAC->spreadCoherence[i] != NULL ) + { + free( hDirAC->spreadCoherence[i] ); + hDirAC->spreadCoherence[i] = NULL; + } } + free( hDirAC->spreadCoherence ); + hDirAC->spreadCoherence = NULL; } - free( hDirAC->elevation2 ); - hDirAC->elevation2 = NULL; - } - if ( hDirAC->energy_ratio1 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->surroundingCoherence != NULL ) { - if ( hDirAC->energy_ratio1[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->energy_ratio1[i] ); - hDirAC->energy_ratio1[i] = NULL; + if ( hDirAC->surroundingCoherence[i] != NULL ) + { + free( hDirAC->surroundingCoherence[i] ); + hDirAC->surroundingCoherence[i] = NULL; + } } + free( hDirAC->surroundingCoherence ); + hDirAC->surroundingCoherence = NULL; } - free( hDirAC->energy_ratio1 ); - hDirAC->energy_ratio1 = NULL; } - - if ( hDirAC->energy_ratio2 != NULL ) + else if ( params_flag == 2 ) { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->azimuth2 != NULL ) { - if ( hDirAC->energy_ratio2[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->energy_ratio2[i] ); - hDirAC->energy_ratio2[i] = NULL; + if ( hDirAC->azimuth2[i] != NULL ) + { + free( hDirAC->azimuth2[i] ); + hDirAC->azimuth2[i] = NULL; + } } + free( hDirAC->azimuth2 ); + hDirAC->azimuth2 = NULL; } - free( hDirAC->energy_ratio2 ); - hDirAC->energy_ratio2 = NULL; - } - if ( hDirAC->spreadCoherence != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->elevation2 != NULL ) { - if ( hDirAC->spreadCoherence[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->spreadCoherence[i] ); - hDirAC->spreadCoherence[i] = NULL; + if ( hDirAC->elevation2[i] != NULL ) + { + free( hDirAC->elevation2[i] ); + hDirAC->elevation2[i] = NULL; + } } + free( hDirAC->elevation2 ); + hDirAC->elevation2 = NULL; } - free( hDirAC->spreadCoherence ); - hDirAC->spreadCoherence = NULL; - } - if ( hDirAC->spreadCoherence2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->energy_ratio2 != NULL ) { - if ( hDirAC->spreadCoherence2[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->spreadCoherence2[i] ); - hDirAC->spreadCoherence2[i] = NULL; + if ( hDirAC->energy_ratio2[i] != NULL ) + { + free( hDirAC->energy_ratio2[i] ); + hDirAC->energy_ratio2[i] = NULL; + } } + free( hDirAC->energy_ratio2 ); + hDirAC->energy_ratio2 = NULL; } - free( hDirAC->spreadCoherence2 ); - hDirAC->spreadCoherence2 = NULL; - } - if ( hDirAC->surroundingCoherence != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + if ( hDirAC->spreadCoherence2 != NULL ) { - if ( hDirAC->surroundingCoherence[i] != NULL ) + for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) { - free( hDirAC->surroundingCoherence[i] ); - hDirAC->surroundingCoherence[i] = NULL; + if ( hDirAC->spreadCoherence2[i] != NULL ) + { + free( hDirAC->spreadCoherence2[i] ); + hDirAC->spreadCoherence2[i] = NULL; + } } + free( hDirAC->spreadCoherence2 ); + hDirAC->spreadCoherence2 = NULL; } - free( hDirAC->surroundingCoherence ); - hDirAC->surroundingCoherence = NULL; - } - - if ( hDirAC->masa_stereo_type_detect != NULL ) - { - free( hDirAC->masa_stereo_type_detect ); - hDirAC->masa_stereo_type_detect = NULL; } - ivas_dirac_free_mem( &( hDirAC->stack_mem ) ); - - free( *hDirAC_out ); - *hDirAC_out = NULL; - return; } @@ -1393,9 +1439,12 @@ void ivas_dirac_dec_close( static ivas_error ivas_dirac_alloc_mem( DIRAC_DEC_HANDLE hDirAC, const RENDERER_TYPE renderer_type, - DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem ) + DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem, + const int16_t hodirac_flag ) { int16_t num_freq_bands, num_freq_bands_diff, size; + int16_t size_ho; + int16_t size_pf; int16_t num_outputs_dir, num_outputs_diff; int16_t num_protos_dir; @@ -1408,6 +1457,16 @@ static ivas_error ivas_dirac_alloc_mem( num_outputs_diff = hDirAC->num_outputs_diff; size = num_freq_bands * num_outputs_dir; + if ( hodirac_flag ) + { + size_ho = size * DIRAC_HO_NUMSECTORS; + size_pf = num_freq_bands * DIRAC_HO_NUMSECTORS; + } + else + { + size_ho = size; + size_pf = num_freq_bands; + } /* PSD related buffers */ hDirAC_mem->cy_auto_dir_smooth = NULL; @@ -1454,7 +1513,7 @@ static ivas_error ivas_dirac_alloc_mem( hDirAC->h_output_synthesis_psd_state.direct_responses_square = hDirAC_mem->direct_responses_square; /* Target and smoothed nrg factors/gains */ - if ( ( hDirAC_mem->cy_cross_dir_smooth = (float *) malloc( sizeof( float ) * size ) ) == NULL ) + if ( ( hDirAC_mem->cy_cross_dir_smooth = (float *) malloc( sizeof( float ) * size_ho ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); } @@ -1480,11 +1539,13 @@ static ivas_error ivas_dirac_alloc_mem( hDirAC->h_output_synthesis_psd_state.cy_auto_diff_smooth = hDirAC_mem->cy_auto_diff_smooth; /*Responses (gains/factors)*/ - if ( ( hDirAC_mem->direct_responses = (float *) malloc( sizeof( float ) * size ) ) == NULL ) + if ( ( hDirAC_mem->direct_responses = (float *) malloc( sizeof( float ) * size_ho ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); } set_zero( hDirAC_mem->direct_responses, size ); + + hDirAC->h_output_synthesis_psd_state.direct_responses = hDirAC_mem->direct_responses; /* Prototypes */ @@ -1521,18 +1582,19 @@ static ivas_error ivas_dirac_alloc_mem( /* Gains/power factors*/ hDirAC_mem->direct_power_factor = NULL; hDirAC_mem->diffuse_power_factor = NULL; + if ( renderer_type != RENDERER_BINAURAL_PARAMETRIC && renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && renderer_type != RENDERER_STEREO_PARAMETRIC ) { - if ( ( hDirAC_mem->direct_power_factor = (float *) malloc( sizeof( float ) * num_freq_bands ) ) == NULL ) + if ( ( hDirAC_mem->direct_power_factor = (float *) malloc( sizeof( float ) * size_pf ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); } - - if ( ( hDirAC_mem->diffuse_power_factor = (float *) malloc( sizeof( float ) * num_freq_bands ) ) == NULL ) + if ( ( hDirAC_mem->diffuse_power_factor = (float *) malloc( sizeof( float ) * size_pf ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate stack memory for DirAC\n" ) ); } } + hDirAC->h_output_synthesis_psd_state.direct_power_factor = hDirAC_mem->direct_power_factor; hDirAC->h_output_synthesis_psd_state.diffuse_power_factor = hDirAC_mem->diffuse_power_factor; @@ -1649,18 +1711,18 @@ static void ivas_dirac_free_mem( *------------------------------------------------------------------------*/ void ivas_dirac_dec_read_BS( - const int32_t ivas_total_brate, /* i : IVAS total bitrate */ - Decoder_State *st, /* i/o: decoder state structure */ - DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ - IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: q_metadata */ - int16_t *nb_bits, /* o : number of bits read */ - const SBA_MODE sba_mode, /* i : SBA mode */ - int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + Decoder_State *st, /* i/o: decoder state structure */ + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: q_metadata */ + int16_t *nb_bits, /* o : number of bits read */ + const SBA_MODE sba_mode, /* i : SBA mode */ + const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ + int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ) { int16_t i, j, b, dir, orig_dirac_bands; int16_t next_bit_pos_orig; - *nb_bits = 0; if ( !st->bfi && ivas_total_brate > IVAS_SID_5k2 ) { @@ -1750,7 +1812,8 @@ void ivas_dirac_dec_read_BS( hQMetaData->q_direction[0].cfg.nblocks = MAX_PARAM_SPATIAL_SUBFRAMES; } - *nb_bits += ivas_qmetadata_dec_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ) ); + *nb_bits += ivas_qmetadata_dec_decode( hQMetaData, st->bit_stream, &( st->next_bit_pos ), + hodirac_flag ); } #ifdef DEBUGGING @@ -1817,7 +1880,9 @@ void ivas_dirac_dec_read_BS( if ( hDirAC != NULL ) { - ivas_qmetadata_to_dirac( hQMetaData, hDirAC, NULL, ivas_total_brate, sba_mode, dirac_to_spar_md_bands ); + ivas_qmetadata_to_dirac( hQMetaData, hDirAC, NULL, ivas_total_brate, sba_mode, + hodirac_flag, + dirac_to_spar_md_bands ); } return; @@ -1836,6 +1901,7 @@ void ivas_qmetadata_to_dirac( MASA_DECODER_HANDLE hMasa, /* i : MASA decoder structure */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const SBA_MODE sba_mode, /* i : SBA mode */ + const int16_t hodirac_flag, /* i : flag to indicate HO-DirAC mode */ int16_t *dirac_to_spar_md_bands /* o : DirAC->SPAR MD bands */ ) { @@ -1849,9 +1915,11 @@ void ivas_qmetadata_to_dirac( int16_t *band_mapping; int16_t *band_grouping; int16_t start_band; - int16_t nbands; - int16_t nblocks; + int16_t nbands = 0; + int16_t nblocks = 0; int16_t qBand_idx; + int16_t idx_sec = 0; + int16_t no_secs = 1; q_direction = &( hQMetaData->q_direction[0] ); hDirAC->numSimultaneousDirections = hQMetaData->no_directions; @@ -1941,8 +2009,10 @@ void ivas_qmetadata_to_dirac( int16_t num_slots_in_subfr; int16_t tmp_write_idx_param_band; int16_t tmp_write_idx_band; + float diffuseness_sec = 0.f; num_slots_in_subfr = hDirAC->hConfig->dec_param_estim ? CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES : 1; + /* ungroup */ seed_ptr = &hDirAC->dithering_seed; nblocks = q_direction->cfg.nblocks; @@ -1959,7 +2029,6 @@ void ivas_qmetadata_to_dirac( } else { - assert( ( hQMetaData->no_directions == 1 ) && "Only 1 direction supported in SBA mode!" ); start_band = hDirAC->hConfig->enc_param_start_band; if ( sba_mode == SBA_MODE_SPAR ) @@ -1987,128 +2056,210 @@ void ivas_qmetadata_to_dirac( { band_start = band_grouping[band]; band_end = band_grouping[band + 1]; +#ifdef JBM_TSM_ON_TCS + tmp_write_idx_param_band = hDirAC->dirac_bs_md_write_idx; + for ( block = 0; block < MAX_PARAM_SPATIAL_SUBFRAMES; block++ ) +#else for ( block = 0; block < hDirAC->nb_subframes; block++ ) +#endif { +#ifdef JBM_TSM_ON_TCS + ts_start = hDirAC->block_grouping[block]; + ts_end = hDirAC->block_grouping[block + 1]; +#endif for ( b = band_start; b < band_end; b++ ) { +#ifdef JBM_TSM_ON_TCS + tmp_write_idx_band = tmp_write_idx_param_band; +#endif hDirAC->spreadCoherence[block][b] = 0.0f; hDirAC->surroundingCoherence[block][b] = 0.0f; +#ifdef JBM_TSM_ON_TCS + if ( hDirAC->hConfig->dec_param_estim == FALSE ) + { + hDirAC->elevation[tmp_write_idx_band][b] = 0; + hDirAC->azimuth[tmp_write_idx_band][b] = 0; + hDirAC->diffuseness_vector[tmp_write_idx_band][b] = 0.f; + + hDirAC->spreadCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->surroundingCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->energy_ratio1[tmp_write_idx_band][b] = 0; + tmp_write_idx_band = ( tmp_write_idx_band + 1 ) % hDirAC->dirac_md_buffer_length; + } + else + { + for ( ts = ts_start; ts < ts_end; ts++ ) + { + hDirAC->elevation[tmp_write_idx_band][b] = 0; + hDirAC->azimuth[tmp_write_idx_band][b] = 0; +#if 0 + hDirAC->diffuseness_vector[tmp_write_idx_band][b] = 0.f; +#endif + hDirAC->spreadCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->surroundingCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->energy_ratio1[tmp_write_idx_band][b] = 0; + tmp_write_idx_band = ( tmp_write_idx_band + 1 ) % hDirAC->dirac_md_buffer_length; + } + } +#endif } } } /* Bands with spatial data transmitted */ - - for ( band = start_band; band < nbands; band++ ) + if ( hodirac_flag ) { - band_start = band_grouping[band]; - band_end = band_grouping[band + 1]; - tmp_write_idx_param_band = hDirAC->dirac_bs_md_write_idx; - - if ( sba_mode == SBA_MODE_SPAR ) - { - qBand_idx = dirac_to_spar_md_bands[band] - start_band; - } - else - { - qBand_idx = band; - } - diffuseness = 1.0f - q_direction->band_data[qBand_idx].energy_ratio[0]; -#ifdef DEBUG_MODE_DIRAC - dbgwrite( &diffuseness, sizeof( float ), 1, 1, "./res/dirac_dec_diffuseness.dat" ); -#endif - diff_idx = q_direction->band_data[qBand_idx].energy_ratio_index[0]; + no_secs = DIRAC_HO_NUMSECTORS; + } - for ( block = 0; block < hDirAC->nb_subframes; block++ ) + for ( idx_sec = 0; idx_sec < no_secs; idx_sec++ ) + { + for ( band = start_band; band < nbands; band++ ) { - int16_t block_qmetadata; - - ts_start = hDirAC->block_grouping[block]; - ts_end = hDirAC->block_grouping[block + 1]; + band_start = band_grouping[band]; + band_end = band_grouping[band + 1]; + tmp_write_idx_param_band = hDirAC->dirac_bs_md_write_idx; - block_qmetadata = min( block, nblocks - 1 ); - block_qmetadata = max( block_qmetadata, 0 ); - - if ( q_direction->band_data[qBand_idx].azimuth[block_qmetadata] < 0.f ) + if ( sba_mode == SBA_MODE_SPAR ) + { + qBand_idx = dirac_to_spar_md_bands[band] - start_band; + } + else { - q_direction->band_data[qBand_idx].azimuth[block_qmetadata] += 360.f; + qBand_idx = band; } - azimuth = q_direction->band_data[qBand_idx].azimuth[block_qmetadata]; - elevation = q_direction->band_data[qBand_idx].elevation[block_qmetadata]; + diffuseness = 1.0f - q_direction->band_data[qBand_idx].energy_ratio[0]; +#ifdef DEBUG_MODE_DIRAC + dbgwrite( &diffuseness, sizeof( float ), 1, 1, "./res/dirac_dec_diffuseness.dat" ); +#endif + diff_idx = q_direction->band_data[qBand_idx].energy_ratio_index[0]; - for ( b = band_start; b < band_end; b++ ) +#ifdef JBM_TSM_ON_TCS + for ( block = 0; block < MAX_PARAM_SPATIAL_SUBFRAMES; block++ ) +#else + for ( block = 0; block < hDirAC->nb_subframes; block++ ) +#endif { - tmp_write_idx_band = tmp_write_idx_param_band; - azi = (int16_t) ( azimuth + rand_triangular_signed( seed_ptr ) * dirac_dithering_azi_scale[diff_idx] + 0.5f ); - ele = (int16_t) ( elevation + rand_triangular_signed( seed_ptr ) * dirac_dithering_ele_scale[diff_idx] + 0.5f ); - /* limit the elevation to [-90, 90] */ - ele = min( 90, ele ); - ele = max( -90, ele ); + int16_t block_qmetadata; - if ( ivas_total_brate > IVAS_SID_5k2 && q_direction->coherence_band_data != NULL ) - { - hDirAC->spreadCoherence[tmp_write_idx_band][b] = q_direction->coherence_band_data[qBand_idx].spread_coherence[block] / 255.0f; - } - else + ts_start = hDirAC->block_grouping[block]; + ts_end = hDirAC->block_grouping[block + 1]; + + block_qmetadata = min( block, nblocks - 1 ); + block_qmetadata = max( block_qmetadata, 0 ); + + if ( q_direction[idx_sec].band_data[qBand_idx].azimuth[block_qmetadata] < 0.f ) { - hDirAC->spreadCoherence[tmp_write_idx_band][b] = 0.0f; + q_direction[idx_sec].band_data[qBand_idx].azimuth[block_qmetadata] += 360.f; } - if ( ivas_total_brate > IVAS_SID_5k2 && q_direction->coherence_band_data != NULL ) + if ( hMasa == NULL && hodirac_flag ) { - hDirAC->surroundingCoherence[tmp_write_idx_band][b] = hQMetaData->surcoh_band_data[qBand_idx].surround_coherence[0] / 255.0f; + azimuth = q_direction[idx_sec].band_data[qBand_idx].azimuth[block_qmetadata]; + elevation = q_direction[idx_sec].band_data[qBand_idx].elevation[block_qmetadata]; + diffuseness = 1.f - q_direction[0].band_data[qBand_idx].energy_ratio[block_qmetadata]; + diffuseness_sec = q_direction[1].band_data[qBand_idx].energy_ratio[block_qmetadata]; + assert( diffuseness_sec < 1.0001f && diffuseness_sec > -0.0001f ); } else { - hDirAC->surroundingCoherence[tmp_write_idx_band][b] = 0.0f; + azimuth = q_direction->band_data[qBand_idx].azimuth[block_qmetadata]; + elevation = q_direction->band_data[qBand_idx].elevation[block_qmetadata]; } - hDirAC->energy_ratio1[tmp_write_idx_band][b] = q_direction->band_data[qBand_idx].energy_ratio[0]; - - if ( hDirAC->hConfig->dec_param_estim == FALSE ) + for ( b = band_start; b < band_end; b++ ) { - hDirAC->elevation[tmp_write_idx_band][b] = ele; - hDirAC->azimuth[tmp_write_idx_band][b] = azi; - hDirAC->diffuseness_vector[tmp_write_idx_band][b] = diffuseness; - } - else - { - for ( ts = ts_start; ts < ts_end; ts++ ) + tmp_write_idx_band = tmp_write_idx_param_band; + + if ( hodirac_flag ) + { + azi = (int16_t) ( azimuth + 0.5f ); + ele = (int16_t) ( elevation + 0.5f ); + } + else + { + azi = (int16_t) ( azimuth + rand_triangular_signed( seed_ptr ) * dirac_dithering_azi_scale[diff_idx] + 0.5f ); + ele = (int16_t) ( elevation + rand_triangular_signed( seed_ptr ) * dirac_dithering_ele_scale[diff_idx] + 0.5f ); + /* limit the elevation to [-90, 90] */ + ele = min( 90, ele ); + ele = max( -90, ele ); + } + + + if ( ivas_total_brate > IVAS_SID_5k2 && q_direction->coherence_band_data != NULL ) + { + hDirAC->spreadCoherence[tmp_write_idx_band][b] = q_direction->coherence_band_data[qBand_idx].spread_coherence[block] / 255.0f; + } + else { - hDirAC->elevation[tmp_write_idx_band][b] = ele; - hDirAC->azimuth[tmp_write_idx_band][b] = azi; + hDirAC->spreadCoherence[tmp_write_idx_band][b] = 0.0f; + } + + if ( ivas_total_brate > IVAS_SID_5k2 && q_direction->coherence_band_data != NULL ) + { + hDirAC->surroundingCoherence[tmp_write_idx_band][b] = hQMetaData->surcoh_band_data[qBand_idx].surround_coherence[0] / 255.0f; + } + else + { + hDirAC->surroundingCoherence[tmp_write_idx_band][b] = 0.0f; + } + + hDirAC->energy_ratio1[tmp_write_idx_band][b] = q_direction->band_data[qBand_idx].energy_ratio[0]; + + if ( hDirAC->hConfig->dec_param_estim == FALSE ) + { + hDirAC->diffuseness_vector[tmp_write_idx_band][b] = diffuseness; - tmp_write_idx_band = ( tmp_write_idx_band + 1 ) % hDirAC->dirac_md_buffer_length; + + if ( hodirac_flag ) + { + if ( idx_sec == 0 ) + { + hDirAC->elevation[tmp_write_idx_band][b] = ele; + hDirAC->azimuth[tmp_write_idx_band][b] = azi; + hDirAC->energy_ratio1[tmp_write_idx_band][b] = 0.f; // not in use + } + else + { + assert( idx_sec == 1 ); + hDirAC->elevation2[tmp_write_idx_band][b] = ele; + hDirAC->azimuth2[tmp_write_idx_band][b] = azi; + hDirAC->energy_ratio2[tmp_write_idx_band][b] = 1.f - diffuseness_sec; + } + } + else + { + hDirAC->elevation[tmp_write_idx_band][b] = ele; + hDirAC->azimuth[tmp_write_idx_band][b] = azi; + } + } + else + { + for ( ts = ts_start; ts < ts_end; ts++ ) + { + hDirAC->elevation[tmp_write_idx_band][b] = ele; + hDirAC->azimuth[tmp_write_idx_band][b] = azi; + hDirAC->diffuseness_vector[tmp_write_idx_band][b] = diffuseness; + tmp_write_idx_band = ( tmp_write_idx_band + 1 ) % hDirAC->dirac_md_buffer_length; + } } } - } /* for ( band = ...) */ - - tmp_write_idx_param_band = ( tmp_write_idx_param_band + num_slots_in_subfr ) % hDirAC->dirac_md_buffer_length; - } /* for ( block =...) */ - } -#ifdef DEBUG_MODE_DIRAC - { - for ( block = 0; block < hDirAC->nb_subframes; block++ ) - { - int16_t block_qmetadata; + tmp_write_idx_param_band = ( tmp_write_idx_param_band + num_slots_in_subfr ) % hDirAC->dirac_md_buffer_length; - block_qmetadata = min( block, nblocks - 1 ); - block_qmetadata = max( block_qmetadata, 0 ); - for ( band = start_band; band < nbands; band++ ) - { - dbgwrite( &q_direction->band_data[band].azimuth[block_qmetadata], sizeof( float ), 1, 1, "./res/dirac_dec_azi.dat" ); - dbgwrite( &q_direction->band_data[band].elevation[block_qmetadata], sizeof( float ), 1, 1, "./res/dirac_dec_ele.dat" ); - } - } - } -#endif + } /* for ( block =...) */ + } /* for ( band = ...) */ + } /* for ( idx_sec = ...)*/ /* Bands not transmitted -> zeroed*/ for ( b = band_grouping[band]; b < hDirAC->num_freq_bands; b++ ) { tmp_write_idx_band = hDirAC->dirac_bs_md_write_idx; +#ifdef JBM_TSM_ON_TCS + for ( block = 0; block < MAX_PARAM_SPATIAL_SUBFRAMES; block++ ) +#else for ( block = 0; block < hDirAC->nb_subframes; block++ ) +#endif { ts_start = hDirAC->block_grouping[block]; ts_end = hDirAC->block_grouping[block + 1]; @@ -2122,6 +2273,11 @@ void ivas_qmetadata_to_dirac( hDirAC->elevation[tmp_write_idx_band][b] = 0; hDirAC->azimuth[tmp_write_idx_band][b] = 0; hDirAC->diffuseness_vector[tmp_write_idx_band][b] = 0.f; +#ifdef JBM_TSM_ON_TCS + hDirAC->spreadCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->surroundingCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->energy_ratio1[tmp_write_idx_band][b] = 0; +#endif tmp_write_idx_band = ( tmp_write_idx_band + 1 ) % hDirAC->dirac_md_buffer_length; } else @@ -2131,6 +2287,11 @@ void ivas_qmetadata_to_dirac( hDirAC->elevation[tmp_write_idx_band][b] = 0; hDirAC->azimuth[tmp_write_idx_band][b] = 0; hDirAC->diffuseness_vector[tmp_write_idx_band][b] = 0.f; +#ifdef JBM_TSM_ON_TCS + hDirAC->spreadCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->surroundingCoherence[tmp_write_idx_band][b] = 0.0f; + hDirAC->energy_ratio1[tmp_write_idx_band][b] = 0; +#endif tmp_write_idx_band = ( tmp_write_idx_band + 1 ) % hDirAC->dirac_md_buffer_length; } } @@ -2152,19 +2313,222 @@ void ivas_qmetadata_to_dirac( } +#ifdef JBM_TSM_ON_TCS +/*------------------------------------------------------------------------- + * ivas_dirac_dec_set_md_map() + * + * Set metadata index mapping for DirAC + *------------------------------------------------------------------------*/ +void ivas_dirac_dec_set_md_map( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + int16_t nCldfbTs ) +{ + int16_t num_slots_in_subfr; + DIRAC_DEC_HANDLE hDirAC; + + hDirAC = st_ivas->hDirAC; +#ifdef DEBUGGING + assert( hDirAC ); +#endif + + /* adapt subframes */ + hDirAC->num_slots = nCldfbTs; + hDirAC->slots_rendered = 0; + if ( hDirAC->hParamIsm != NULL || hDirAC->hConfig->dec_param_estim == 0 ) + { + num_slots_in_subfr = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + num_slots_in_subfr = 1; + } + hDirAC->subframes_rendered = 0; + + ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hDirAC->subframe_nbslots, &hDirAC->nb_subframes ); + + /* set mapping according to dirac_read_idx */ + + set_s( hDirAC->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); + + if ( hDirAC->hConfig == NULL || hDirAC->hConfig->dec_param_estim == 0 ) + { + ivas_jbm_dec_get_md_map( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbTs, num_slots_in_subfr, 0, hDirAC->dirac_md_buffer_length, hDirAC->render_to_md_map ); + } + else + { + ivas_jbm_dec_get_md_map( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbTs, num_slots_in_subfr, hDirAC->dirac_read_idx, hDirAC->dirac_md_buffer_length, hDirAC->render_to_md_map ); + } + + if ( hDirAC->hConfig == NULL || hDirAC->hConfig->dec_param_estim == 0 ) + { + float tmp; + int16_t sf_idx, slot_idx, slot_idx_abs; + slot_idx_abs = 0; + for ( sf_idx = 0; sf_idx < hDirAC->nb_subframes; sf_idx++ ) + { + tmp = 0.0f; + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[sf_idx]; slot_idx++ ) + { + tmp += (float) hDirAC->render_to_md_map[slot_idx_abs]; + slot_idx_abs++; + } + hDirAC->render_to_md_map[sf_idx] = ( (int16_t) roundf( tmp / (float) hDirAC->subframe_nbslots[sf_idx] ) + hDirAC->dirac_read_idx ) % hDirAC->dirac_md_buffer_length; + } + set_s( &hDirAC->render_to_md_map[hDirAC->nb_subframes], 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME - hDirAC->nb_subframes ); + } + + return; +} + /*------------------------------------------------------------------------- * ivas_dirac_dec() * * DirAC decoding process *------------------------------------------------------------------------*/ +void ivas_dirac_dec( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ + const int16_t nchan_transport /* i : number of transport channels */ +) +{ + int16_t subframe_idx; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + float cng_td_buffer[L_FRAME16k]; + int16_t nchan_out, n, n_samples_sf; + nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; + + n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * st_ivas->hDirAC->slot_size; + + for ( n = 0; n < nchan_out; n++ ) + { + output_f_local[n] = &output_f[n][0]; + } + for ( n = 0; n < nchan_transport; n++ ) + { + st_ivas->hTcBuffer->tc[n] = output_f[n]; + } + if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->sba_mode != SBA_MODE_SPAR ) + { + Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0]; + st_ivas->hTcBuffer->tc[nchan_transport] = &cng_td_buffer[0]; + generate_masking_noise_lb_dirac( st->hFdCngDec->hFdCngCom, st_ivas->hTcBuffer->tc[1], DEFAULT_JBM_CLDFB_TIMESLOTS, st->cna_dirac_flag && st->flag_cna ); + } + ivas_dirac_dec_set_md_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); + for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) + { + ivas_dirac_dec_render_sf( st_ivas, output_f_local, nchan_transport, NULL, NULL ); + for ( n = 0; n < nchan_out; n++ ) + { + output_f_local[n] += n_samples_sf; + } + } + if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_CLDFB_TIMESLOTS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + else + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_SUBFRAMES_5MS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + for ( n = 0; n < nchan_transport; n++ ) + { + st_ivas->hTcBuffer->tc[n] = NULL; + } + if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->sba_mode != SBA_MODE_SPAR ) + { + st_ivas->hTcBuffer->tc[nchan_transport] = NULL; + } + return; +} + +void ivas_dirac_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +) +{ + int16_t slots_to_render, first_sf, last_sf, subframe_idx; + uint16_t slot_size, n_samples_sf, ch, nchan_intern; + DIRAC_DEC_HANDLE hDirAC; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + + hDirAC = st_ivas->hDirAC; + + nchan_intern = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; +#ifdef DEBUGGING + assert( hDirAC ); +#endif + for ( ch = 0; ch < nchan_intern; ch++ ) + { + output_f_local[ch] = output_f[ch]; + } + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( hDirAC->num_slots - hDirAC->slots_rendered, nSamplesAsked / slot_size ); + *nSamplesRendered = slots_to_render * slot_size; + first_sf = hDirAC->subframes_rendered; + last_sf = first_sf; + while ( slots_to_render > 0 ) + { + slots_to_render -= hDirAC->subframe_nbslots[last_sf]; + last_sf++; + } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + ivas_dirac_dec_render_sf( st_ivas, output_f_local, nchan_transport, NULL, NULL ); + n_samples_sf = hDirAC->subframe_nbslots[subframe_idx] * st_ivas->hDirAC->slot_size; + for ( ch = 0; ch < nchan_intern; ch++ ) + { + output_f_local[ch] += n_samples_sf; + } + } + if ( hDirAC->slots_rendered == hDirAC->num_slots ) + { + if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_CLDFB_TIMESLOTS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + else + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_SUBFRAMES_5MS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + } + *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + return; +} +#endif + +/*------------------------------------------------------------------------- + * ivas_dirac_dec() + * + * DirAC decoding process + *------------------------------------------------------------------------*/ +#ifndef JBM_TSM_ON_TCS void ivas_dirac_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#else +void ivas_dirac_dec_render_sf( +#endif + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ +#else + float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif const int16_t nchan_transport, /* i : number of transport channels */ float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX], - float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX], - const int16_t i_sf ) + float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] +#ifndef JBM_TSM_ON_TCS + , + const int16_t i_sf +#endif +) { int16_t i, ch, idx_in, idx_lfe; DIRAC_DEC_HANDLE hDirAC; @@ -2172,9 +2536,15 @@ void ivas_dirac_dec( float surCohEner; float surCohRatio[CLDFB_NO_CHANNELS_MAX]; int16_t subframe_idx; +#ifndef JBM_TSM_ON_TCS int16_t sf1, sf2; +#endif int16_t slot_idx, index_slot; + int16_t hodirac_flag; float *p_Rmat; +#ifdef JBM_TSM_ON_TCS + int16_t slot_idx_start, slot_idx_start_cldfb_synth, md_idx; +#endif /*CLDFB: last output channels reserved to LFT for CICPx*/ float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; @@ -2183,12 +2553,23 @@ void ivas_dirac_dec( float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; int16_t index, num_freq_bands; +#ifdef JBM_TSM_ON_TCS + /* local copies of azi, ele, diffuseness */ + int16_t azimuth[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + int16_t elevation[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + float diffuseness_vector[JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; +#endif + DIRAC_DEC_STACK_MEM DirAC_mem; float *reference_power, *reference_power_smooth; float *onset_filter, *onset_filter_subframe, *p_onset_filter = NULL; uint16_t coherence_flag; +#ifndef JBM_TSM_ON_TCS push_wmops( "ivas_dirac_dec" ); +#else + push_wmops( "ivas_dirac_dec_render" ); +#endif /* Initialize aux buffers */ hDirAC = st_ivas->hDirAC; @@ -2200,6 +2581,8 @@ void ivas_dirac_dec( onset_filter = DirAC_mem.onset_filter; onset_filter_subframe = DirAC_mem.onset_filter + hDirAC->num_freq_bands; + hodirac_flag = ivas_get_hodirac_flag( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order ); + if ( st_ivas->hQMetaData != NULL && st_ivas->sba_mode != SBA_MODE_SPAR ) { coherence_flag = st_ivas->hQMetaData->coherence_flag; @@ -2228,7 +2611,7 @@ void ivas_dirac_dec( #endif /* Subframe loop */ - +#ifndef JBM_TSM_ON_TCS if ( i_sf == -1 ) { sf1 = 0; @@ -2239,624 +2622,958 @@ void ivas_dirac_dec( sf1 = i_sf; sf2 = i_sf + 1; } +#endif +#ifdef JBM_TSM_ON_TCS + slot_idx_start = hDirAC->slots_rendered; + slot_idx_start_cldfb_synth = 0; +#endif +#ifdef JBM_TSM_ON_TCS + subframe_idx = hDirAC->subframes_rendered; +#else for ( subframe_idx = sf1; subframe_idx < sf2; subframe_idx++ ) { - if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) +#endif +#ifdef JBM_TSM_ON_TCS + if ( hDirAC->hConfig->dec_param_estim == FALSE ) + { + md_idx = hDirAC->render_to_md_map[subframe_idx]; + } + else + { + md_idx = hDirAC->render_to_md_map[slot_idx_start]; + } +#endif +#ifdef JBM_TSM_ON_TCS + /* Another workaround for self test BE */ +#ifndef FIX_642 + if ( st_ivas->hHeadTrackData && st_ivas->hDecoderConfig->voip_active == 0 ) + { + QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); + + p_Rmat = &st_ivas->hHeadTrackData->Rmat[0][0]; + + if ( st_ivas->hHeadTrackData->shd_rot_max_order == 0 ) { - set_zero( reference_power_smooth, hDirAC->num_freq_bands ); + num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) + { + index_slot = slot_idx_start + slot_idx; + rotateAziEle_DirAC( hDirAC->azimuth[index_slot], hDirAC->elevation[index_slot], num_freq_bands, hDirAC->num_freq_bands, p_Rmat ); + } } - else + } + else + { + p_Rmat = 0; + } +#endif + + /* copy parameters into local buffers*/ + + if ( hDirAC->hConfig->dec_param_estim == TRUE ) + { + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) + { + mvs2s( hDirAC->azimuth[hDirAC->render_to_md_map[slot_idx + slot_idx_start]], azimuth[slot_idx], hDirAC->num_freq_bands ); + mvs2s( hDirAC->elevation[hDirAC->render_to_md_map[slot_idx + slot_idx_start]], elevation[slot_idx], hDirAC->num_freq_bands ); + mvr2r( hDirAC->diffuseness_vector[hDirAC->render_to_md_map[slot_idx + slot_idx_start]], diffuseness_vector[slot_idx], hDirAC->num_freq_bands ); + } + } + else + { + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) { - set_zero( onset_filter_subframe, hDirAC->num_freq_bands ); + mvs2s( hDirAC->azimuth[hDirAC->render_to_md_map[subframe_idx]], azimuth[slot_idx], hDirAC->num_freq_bands ); + mvs2s( hDirAC->elevation[hDirAC->render_to_md_map[subframe_idx]], elevation[slot_idx], hDirAC->num_freq_bands ); + mvr2r( hDirAC->diffuseness_vector[hDirAC->render_to_md_map[subframe_idx]], diffuseness_vector[slot_idx], hDirAC->num_freq_bands ); } + } + +#endif + + if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) + { + set_zero( reference_power_smooth, hDirAC->num_freq_bands ); + } + else + { + set_zero( onset_filter_subframe, hDirAC->num_freq_bands ); + } +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hHeadTrackData +#ifndef FIX_642 + && st_ivas->hDecoderConfig->voip_active == 1 +#endif + ) +#else if ( st_ivas->hHeadTrackData ) - { - QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); +#endif + { + QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], st_ivas->hHeadTrackData->Rmat ); - p_Rmat = &st_ivas->hHeadTrackData->Rmat[0][0]; + p_Rmat = &st_ivas->hHeadTrackData->Rmat[0][0]; - if ( st_ivas->hHeadTrackData->shd_rot_max_order == 0 ) - { - num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; + if ( st_ivas->hHeadTrackData->shd_rot_max_order == 0 ) + { + num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; +#ifdef JBM_TSM_ON_TCS + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) +#else for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots; slot_idx++ ) - { +#endif + { +#ifdef JBM_TSM_ON_TCS + rotateAziEle_DirAC( azimuth[slot_idx], elevation[slot_idx], num_freq_bands, hDirAC->num_freq_bands, p_Rmat ); +#else + /* note, this seems wrong since it does not take the dirac read ptr into account */ index_slot = subframe_idx * hDirAC->subframe_nbslots + slot_idx; /* Todo: This access to azimuth & elevation may use wrong indices as access should probably be based on hDirAC->dirac_read_idx */ rotateAziEle_DirAC( hDirAC->azimuth[index_slot], hDirAC->elevation[index_slot], num_freq_bands, hDirAC->num_freq_bands, p_Rmat ); - } +#endif } } + } +#if defined( JBM_TSM_ON_TCS ) & !defined( FIX_642 ) + else if ( !st_ivas->hHeadTrackData ) +#else else - { - p_Rmat = 0; - } +#endif + { + p_Rmat = 0; + } - if ( hDirAC->hConfig->dec_param_estim == FALSE ) + if ( hDirAC->hConfig->dec_param_estim == FALSE ) + { + + /* compute response */ + if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) { - /* compute response */ - if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) - { - ivas_dirac_dec_compute_power_factors( hDirAC->num_freq_bands, + ivas_dirac_dec_compute_power_factors( hDirAC->num_freq_bands, +#ifdef JBM_TSM_ON_TCS + diffuseness_vector[0], +#else hDirAC->diffuseness_vector[hDirAC->dirac_read_idx], - hDirAC->h_output_synthesis_psd_params.max_band_decorr, - hDirAC->h_output_synthesis_psd_state.direct_power_factor, - hDirAC->h_output_synthesis_psd_state.diffuse_power_factor ); +#endif + hDirAC->h_output_synthesis_psd_params.max_band_decorr, + hDirAC->h_output_synthesis_psd_state.direct_power_factor, + hDirAC->h_output_synthesis_psd_state.diffuse_power_factor ); - if ( coherence_flag ) + if ( coherence_flag ) + { + for ( i = 0; i < hDirAC->num_freq_bands; i++ ) { - for ( i = 0; i < hDirAC->num_freq_bands; i++ ) - { - dirEne = hDirAC->h_output_synthesis_psd_state.direct_power_factor[i]; + dirEne = hDirAC->h_output_synthesis_psd_state.direct_power_factor[i]; +#ifdef JBM_TSM_ON_TCS + surCohEner = hDirAC->h_output_synthesis_psd_state.diffuse_power_factor[i] * hDirAC->surroundingCoherence[md_idx][i]; +#else surCohEner = hDirAC->h_output_synthesis_psd_state.diffuse_power_factor[i] * hDirAC->surroundingCoherence[hDirAC->dirac_read_idx][i]; - hDirAC->h_output_synthesis_psd_state.diffuse_power_factor[i] -= surCohEner; - hDirAC->h_output_synthesis_psd_state.direct_power_factor[i] += surCohEner; +#endif + hDirAC->h_output_synthesis_psd_state.diffuse_power_factor[i] -= surCohEner; + hDirAC->h_output_synthesis_psd_state.direct_power_factor[i] += surCohEner; - surCohRatio[i] = surCohEner / ( 1e-12f + dirEne + surCohEner ); - } - } - else - { - set_zero( surCohRatio, hDirAC->num_freq_bands ); + surCohRatio[i] = surCohEner / ( 1e-12f + dirEne + surCohEner ); } } else { - ivas_dirac_dec_compute_gain_factors( hDirAC->num_freq_bands, + set_zero( surCohRatio, hDirAC->num_freq_bands ); + } + } + else + { + ivas_dirac_dec_compute_gain_factors( hDirAC->num_freq_bands, +#ifdef JBM_TSM_ON_TCS + hDirAC->diffuseness_vector[md_idx], +#else hDirAC->diffuseness_vector[hDirAC->dirac_read_idx], - hDirAC->h_output_synthesis_psd_params.max_band_decorr, - hDirAC->h_output_synthesis_psd_state.direct_power_factor, - hDirAC->h_output_synthesis_psd_state.diffuse_power_factor ); +#endif + hDirAC->h_output_synthesis_psd_params.max_band_decorr, + hDirAC->h_output_synthesis_psd_state.direct_power_factor, + hDirAC->h_output_synthesis_psd_state.diffuse_power_factor ); - if ( coherence_flag ) + if ( coherence_flag ) + { + for ( i = 0; i < hDirAC->num_freq_bands; i++ ) { - for ( i = 0; i < hDirAC->num_freq_bands; i++ ) - { +#ifdef JBM_TSM_ON_TCS + surCohRatio[i] = hDirAC->surroundingCoherence[md_idx][i]; +#else surCohRatio[i] = hDirAC->surroundingCoherence[hDirAC->dirac_read_idx][i]; - } - } - else - { - set_zero( surCohRatio, hDirAC->num_freq_bands ); +#endif } } - - if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order == 1 ) - { - ivas_dirac_dec_compute_directional_responses( hDirAC, - st_ivas->hVBAPdata, - st_ivas->hMasa, - surCohRatio, - st_ivas->hHeadTrackData->shd_rot_max_order, - p_Rmat ); - } else { - ivas_dirac_dec_compute_directional_responses( hDirAC, - st_ivas->hVBAPdata, - st_ivas->hMasa, - surCohRatio, - 0, - 0 ); + set_zero( surCohRatio, hDirAC->num_freq_bands ); } } + + if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order == 1 ) + { + ivas_dirac_dec_compute_directional_responses( hDirAC, + st_ivas->hVBAPdata, + st_ivas->hMasa, +#ifdef JBM_TSM_ON_TCS + hDirAC->azimuth[md_idx], + hDirAC->elevation[md_idx], + md_idx, +#endif + surCohRatio, + st_ivas->hHeadTrackData->shd_rot_max_order, + p_Rmat, + hodirac_flag ); + } + else + { + ivas_dirac_dec_compute_directional_responses( hDirAC, + st_ivas->hVBAPdata, + st_ivas->hMasa, +#ifdef JBM_TSM_ON_TCS + hDirAC->azimuth[md_idx], + hDirAC->elevation[md_idx], + md_idx, +#endif + surCohRatio, + 0, + NULL, + hodirac_flag ); + } + } + + +#ifdef JBM_TSM_ON_TCS + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) +#else for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots; slot_idx++ ) +#endif + { +#ifdef JBM_TSM_ON_TCS + index_slot = slot_idx_start + slot_idx; + if ( hDirAC->hConfig->dec_param_estim == TRUE ) + { + md_idx = hDirAC->render_to_md_map[index_slot]; + } + else { + md_idx = hDirAC->render_to_md_map[subframe_idx]; + } +#else index_slot = subframe_idx * hDirAC->subframe_nbslots + slot_idx; +#endif - if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + for ( ch = 0; ch < nchan_transport; ch++ ) { - for ( ch = 0; ch < nchan_transport; ch++ ) - { - mvr2r( pppQMfFrame_ts_re[ch][slot_idx], Cldfb_RealBuffer[ch][0], hDirAC->num_freq_bands ); - mvr2r( pppQMfFrame_ts_im[ch][slot_idx], Cldfb_ImagBuffer[ch][0], hDirAC->num_freq_bands ); - } + mvr2r( pppQMfFrame_ts_re[ch][slot_idx], Cldfb_RealBuffer[ch][0], hDirAC->num_freq_bands ); + mvr2r( pppQMfFrame_ts_im[ch][slot_idx], Cldfb_ImagBuffer[ch][0], hDirAC->num_freq_bands ); } - else + } + else + { + /* CLDFB Analysis*/ + for ( ch = 0; ch < nchan_transport; ch++ ) { - /* CLDFB Analysis*/ - for ( ch = 0; ch < nchan_transport; ch++ ) - { - cldfbAnalysis_ts( &( output_f[sba_map_tc[ch]][hDirAC->num_freq_bands * index_slot] ), +#ifdef JBM_TSM_ON_TCS + cldfbAnalysis_ts( &( st_ivas->hTcBuffer->tc[hDirAC->sba_map_tc[ch]][hDirAC->num_freq_bands * index_slot] ), + Cldfb_RealBuffer[ch][0], + Cldfb_ImagBuffer[ch][0], + hDirAC->num_freq_bands, + st_ivas->cldfbAnaDec[ch] ); +#else + cldfbAnalysis_ts( &( output_f[hDirAC->sba_map_tc[ch]][hDirAC->num_freq_bands * index_slot] ), Cldfb_RealBuffer[ch][0], Cldfb_ImagBuffer[ch][0], hDirAC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); - } +#endif + } + } + + /* CNG in DirAC, extra CLDFB ana for CNA*/ + if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->sba_mode != SBA_MODE_SPAR ) + { + Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0]; + + generate_masking_noise_dirac( st->hFdCngDec->hFdCngCom, + st_ivas->cldfbAnaDec[1], +#ifdef JBM_TSM_ON_TCS + st_ivas->hTcBuffer->tc[1], +#else + &( output_f[1][L_FRAME48k - L_FRAME16k] ), +#endif + Cldfb_RealBuffer[1][0], + Cldfb_ImagBuffer[1][0], + index_slot, + st->cna_dirac_flag && st->flag_cna, + ( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && st->cng_type == FD_CNG && st->cng_sba_flag ); + } + + /* LFE synthesis */ + if ( st_ivas->mc_mode == MC_MODE_MCMASA && !hDirAC->hOutSetup.separateChannelEnabled && !( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM && hDirAC->hOutSetup.num_lfe == 0 ) ) + { + ivas_lfe_synth_with_cldfb( st_ivas->hMasa->hMasaLfeSynth, + Cldfb_RealBuffer, Cldfb_ImagBuffer, + Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS - 1], Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS - 1], + slot_idx, +#ifdef JBM_TSM_ON_TCS + md_idx, +#else + subframe_idx, +#endif + nchan_transport ); + } + + /*-----------------------------------------------------------------* + * protoype signal computation + *-----------------------------------------------------------------*/ + + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) + { + if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order == 0 ) + { + protoSignalComputation_shd( Cldfb_RealBuffer, Cldfb_ImagBuffer, + hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, + hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f, + reference_power, slot_idx, nchan_transport, + hDirAC->num_outputs_diff, + hDirAC->num_freq_bands, + p_Rmat ); + } + else + { + protoSignalComputation_shd( Cldfb_RealBuffer, Cldfb_ImagBuffer, + hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, + hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f, + reference_power, slot_idx, nchan_transport, + hDirAC->num_outputs_diff, + hDirAC->num_freq_bands, + 0 ); + } + } + else if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_MONO ) + { + protoSignalComputation2( Cldfb_RealBuffer, Cldfb_ImagBuffer, hDirAC->proto_frame_f, + hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, + reference_power, hDirAC->h_output_synthesis_psd_state.proto_power_smooth, + 0, slot_idx, hDirAC->num_freq_bands, hDirAC->masa_stereo_type_detect ); + } + else + { + switch ( nchan_transport ) + { + case 11: + case 8: + case 6: + case 4: + protoSignalComputation4( Cldfb_RealBuffer, Cldfb_ImagBuffer, + hDirAC->proto_frame_f, + hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, + reference_power, + hDirAC->h_output_synthesis_psd_state.proto_power_smooth, + slot_idx, hDirAC->num_outputs_diff, + hDirAC->num_freq_bands, + hDirAC->hoa_decoder, + nchan_transport, + hDirAC->sba_map_tc ); + break; + case 2: + protoSignalComputation2( Cldfb_RealBuffer, Cldfb_ImagBuffer, + hDirAC->proto_frame_f, + hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, + reference_power, + hDirAC->h_output_synthesis_psd_state.proto_power_smooth, + hDirAC->hOutSetup.is_loudspeaker_setup, + slot_idx, + hDirAC->num_freq_bands, + hDirAC->masa_stereo_type_detect ); + break; + case 1: + protoSignalComputation1( Cldfb_RealBuffer, Cldfb_ImagBuffer, + hDirAC->proto_frame_f, + hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, + reference_power, + hDirAC->h_output_synthesis_psd_state.proto_power_smooth, + slot_idx, + hDirAC->num_protos_diff, + hDirAC->num_freq_bands ); + break; + default: + return; } + } - /* CNG in DirAC, extra CLDFB ana for CNA*/ - if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->sba_mode != SBA_MODE_SPAR ) - { - Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0]; - generate_masking_noise_dirac( st->hFdCngDec->hFdCngCom, - st_ivas->cldfbAnaDec[1], - &( output_f[1][L_FRAME48k - L_FRAME16k] ), - Cldfb_RealBuffer[1][0], - Cldfb_ImagBuffer[1][0], - index_slot, - st->cna_dirac_flag && st->flag_cna, - ( st->core_brate == FRAME_NO_DATA || st->core_brate == SID_2k40 ) && st->cng_type == FD_CNG && st->cng_sba_flag ); - } + /*-----------------------------------------------------------------* + * Compute DirAC parameters at decoder side + *-----------------------------------------------------------------*/ - /* LFE synthesis */ - if ( st_ivas->mc_mode == MC_MODE_MCMASA && !hDirAC->hOutSetup.separateChannelEnabled && !( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM && hDirAC->hOutSetup.num_lfe == 0 ) ) - { - ivas_lfe_synth_with_cldfb( st_ivas->hMasa->hMasaLfeSynth, - Cldfb_RealBuffer, Cldfb_ImagBuffer, - Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS - 1], Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS - 1], - slot_idx, - subframe_idx, - nchan_transport ); - } + if ( hDirAC->hConfig->dec_param_estim == TRUE ) + { + hDirAC->index_buffer_intensity = ( hDirAC->index_buffer_intensity % DIRAC_NO_COL_AVG_DIFF ) + 1; /* averaging_length = 32 */ - /*-----------------------------------------------------------------* - * protoype signal computation - *-----------------------------------------------------------------*/ + index = hDirAC->index_buffer_intensity; - if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) - { - if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order == 0 ) - { - protoSignalComputation_shd( Cldfb_RealBuffer, Cldfb_ImagBuffer, - hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, - hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f, - reference_power, slot_idx, nchan_transport, - hDirAC->num_outputs_diff, - hDirAC->num_freq_bands, - p_Rmat ); - } - else - { - protoSignalComputation_shd( Cldfb_RealBuffer, Cldfb_ImagBuffer, - hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, - hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f, - reference_power, slot_idx, nchan_transport, - hDirAC->num_outputs_diff, - hDirAC->num_freq_bands, - 0 ); - } - } - else if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_MONO ) - { - protoSignalComputation2( Cldfb_RealBuffer, Cldfb_ImagBuffer, hDirAC->proto_frame_f, - hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, - reference_power, hDirAC->h_output_synthesis_psd_state.proto_power_smooth, - 0, slot_idx, hDirAC->num_freq_bands, hDirAC->masa_stereo_type_detect ); - } - else - { - switch ( nchan_transport ) - { - case 8: - case 6: - case 4: - protoSignalComputation4( Cldfb_RealBuffer, Cldfb_ImagBuffer, - hDirAC->proto_frame_f, - hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, - reference_power, - hDirAC->h_output_synthesis_psd_state.proto_power_smooth, - slot_idx, hDirAC->num_outputs_diff, - hDirAC->num_freq_bands, - hDirAC->hoa_decoder, - nchan_transport ); - break; - case 2: - protoSignalComputation2( Cldfb_RealBuffer, Cldfb_ImagBuffer, - hDirAC->proto_frame_f, - hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, - reference_power, - hDirAC->h_output_synthesis_psd_state.proto_power_smooth, - hDirAC->hOutSetup.is_loudspeaker_setup, - slot_idx, - hDirAC->num_freq_bands, - hDirAC->masa_stereo_type_detect ); - break; - case 1: - protoSignalComputation1( Cldfb_RealBuffer, Cldfb_ImagBuffer, - hDirAC->proto_frame_f, - hDirAC->h_output_synthesis_psd_state.proto_direct_buffer_f, - reference_power, - hDirAC->h_output_synthesis_psd_state.proto_power_smooth, - slot_idx, - hDirAC->num_protos_diff, - hDirAC->num_freq_bands ); - break; - default: - return; - } - } - - /*-----------------------------------------------------------------* - * Compute DirAC parameters at decoder side - *-----------------------------------------------------------------*/ - - if ( hDirAC->hConfig->dec_param_estim == TRUE ) - { - hDirAC->index_buffer_intensity = ( hDirAC->index_buffer_intensity % DIRAC_NO_COL_AVG_DIFF ) + 1; /* averaging_length = 32 */ - - index = hDirAC->index_buffer_intensity; - - num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; - - computeIntensityVector_dec( Cldfb_RealBuffer, - Cldfb_ImagBuffer, - num_freq_bands, - hDirAC->buffer_intensity_real[0][index - 1], - hDirAC->buffer_intensity_real[1][index - 1], - hDirAC->buffer_intensity_real[2][index - 1] ); - - computeDirectionAngles( hDirAC->buffer_intensity_real[0][index - 1], - hDirAC->buffer_intensity_real[1][index - 1], - hDirAC->buffer_intensity_real[2][index - 1], + num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; + + computeIntensityVector_dec( Cldfb_RealBuffer, + Cldfb_ImagBuffer, num_freq_bands, + hDirAC->buffer_intensity_real[0][index - 1], + hDirAC->buffer_intensity_real[1][index - 1], + hDirAC->buffer_intensity_real[2][index - 1] ); + computeDirectionAngles( hDirAC->buffer_intensity_real[0][index - 1], + hDirAC->buffer_intensity_real[1][index - 1], + hDirAC->buffer_intensity_real[2][index - 1], + num_freq_bands, +#ifdef JBM_TSM_ON_TCS + azimuth[slot_idx], + elevation[slot_idx] +#else hDirAC->azimuth[hDirAC->dirac_estimator_idx], - hDirAC->elevation[hDirAC->dirac_estimator_idx] ); + hDirAC->elevation[hDirAC->dirac_estimator_idx] +#endif + ); - mvr2r( reference_power, &( hDirAC->buffer_energy[( index - 1 ) * num_freq_bands] ), num_freq_bands ); + mvr2r( reference_power, &( hDirAC->buffer_energy[( index - 1 ) * num_freq_bands] ), num_freq_bands ); - computeDiffuseness( hDirAC->buffer_intensity_real, - hDirAC->buffer_energy, - num_freq_bands, - hDirAC->diffuseness_vector[hDirAC->dirac_estimator_idx] ); + computeDiffuseness( hDirAC->buffer_intensity_real, + hDirAC->buffer_energy, + num_freq_bands, +#ifdef JBM_TSM_ON_TCS + diffuseness_vector[slot_idx] +#else + hDirAC->diffuseness_vector[hDirAC->dirac_estimator_idx] +#endif + ); - hDirAC->dirac_estimator_idx = ( hDirAC->dirac_estimator_idx + 1 ) % hDirAC->dirac_md_buffer_length; - } +#ifndef JBM_TSM_ON_TCS + hDirAC->dirac_estimator_idx = ( hDirAC->dirac_estimator_idx + 1 ) % hDirAC->dirac_md_buffer_length; +#endif + } #ifdef DEBUG_MODE_DIRAC - { - static FILE *fp_direction_vector = NULL, *fp_diffuseness = NULL, *fp_referencePower = NULL; + { + static FILE *fp_direction_vector = NULL, *fp_diffuseness = NULL, *fp_referencePower = NULL; - if ( fp_direction_vector == NULL ) - fp_direction_vector = fopen( "./res/dbg_direction_vector_C_dec.bin", "wb" ); - if ( fp_diffuseness == NULL ) - fp_diffuseness = fopen( "./res/dbg_diffuseness_C_dec.bin", "wb" ); - if ( fp_referencePower == NULL ) - fp_referencePower = fopen( "./res/dbg_reference_power_C_dec.bin", "wb" ); + if ( fp_direction_vector == NULL ) + fp_direction_vector = fopen( "./res/dbg_direction_vector_C_dec.bin", "wb" ); + if ( fp_diffuseness == NULL ) + fp_diffuseness = fopen( "./res/dbg_diffuseness_C_dec.bin", "wb" ); + if ( fp_referencePower == NULL ) + fp_referencePower = fopen( "./res/dbg_reference_power_C_dec.bin", "wb" ); - for ( i = 0; i < hDirAC->num_freq_bands; i++ ) - { - float radius_length; - float dv[3]; + for ( i = 0; i < hDirAC->num_freq_bands; i++ ) + { + float radius_length; + float dv[3]; - if ( hDirAC->hConfig->dec_param_estim == FALSE ) - { - radius_length = cos( hDirAC->elevation[subframe_idx][i] * PI_OVER_180 ); - dv[0] = radius_length * cos( hDirAC->azimuth[subframe_idx][i] * PI_OVER_180 ); - dv[1] = radius_length * sin( hDirAC->azimuth[subframe_idx][i] * PI_OVER_180 ); - dv[2] = sin( hDirAC->elevation[subframe_idx][i] * PI_OVER_180 ); - - fwrite( dv, sizeof( float ), 3, fp_direction_vector ); - fwrite( &( hDirAC->diffuseness_vector[0][i] ), sizeof( float ), 1, fp_diffuseness ); - if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) - { - reference_power[i] = Cldfb_RealBuffer[0][0][i] * Cldfb_RealBuffer[0][0][i] + Cldfb_ImagBuffer[0][0][i] * Cldfb_ImagBuffer[0][0][i]; - } - fwrite( &( reference_power[i] ), sizeof( float ), 1, fp_referencePower ); - } - else + if ( hDirAC->hConfig->dec_param_estim == FALSE ) + { + radius_length = cos( hDirAC->elevation[subframe_idx][i] * PI_OVER_180 ); + dv[0] = radius_length * cos( hDirAC->azimuth[subframe_idx][i] * PI_OVER_180 ); + dv[1] = radius_length * sin( hDirAC->azimuth[subframe_idx][i] * PI_OVER_180 ); + dv[2] = sin( hDirAC->elevation[subframe_idx][i] * PI_OVER_180 ); + + fwrite( dv, sizeof( float ), 3, fp_direction_vector ); + fwrite( &( hDirAC->diffuseness_vector[0][i] ), sizeof( float ), 1, fp_diffuseness ); + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { - radius_length = cos( hDirAC->elevation[index_slot][i] * PI_OVER_180 ); - dv[0] = radius_length * cos( hDirAC->azimuth[index_slot][i] * PI_OVER_180 ); - dv[1] = radius_length * sin( hDirAC->azimuth[index_slot][i] * PI_OVER_180 ); - dv[2] = sin( hDirAC->elevation[index_slot][i] * PI_OVER_180 ); - - fwrite( dv, sizeof( float ), 3, fp_direction_vector ); - fwrite( &( hDirAC->diffuseness_vector[index_slot][i] ), sizeof( float ), 1, fp_diffuseness ); - fwrite( &( reference_power[i] ), sizeof( float ), 1, fp_referencePower ); + reference_power[i] = Cldfb_RealBuffer[0][0][i] * Cldfb_RealBuffer[0][0][i] + Cldfb_ImagBuffer[0][0][i] * Cldfb_ImagBuffer[0][0][i]; } + fwrite( &( reference_power[i] ), sizeof( float ), 1, fp_referencePower ); + } + else + { + radius_length = cos( hDirAC->elevation[index_slot][i] * PI_OVER_180 ); + dv[0] = radius_length * cos( hDirAC->azimuth[index_slot][i] * PI_OVER_180 ); + dv[1] = radius_length * sin( hDirAC->azimuth[index_slot][i] * PI_OVER_180 ); + dv[2] = sin( hDirAC->elevation[index_slot][i] * PI_OVER_180 ); + + fwrite( dv, sizeof( float ), 3, fp_direction_vector ); + fwrite( &( hDirAC->diffuseness_vector[index_slot][i] ), sizeof( float ), 1, fp_diffuseness ); + fwrite( &( reference_power[i] ), sizeof( float ), 1, fp_referencePower ); } } + } #endif - /*-----------------------------------------------------------------* - * frequency domain decorrelation - *-----------------------------------------------------------------*/ + /*-----------------------------------------------------------------* + * frequency domain decorrelation + *-----------------------------------------------------------------*/ - if ( hDirAC->proto_signal_decorr_on == 1 ) + if ( hDirAC->proto_signal_decorr_on == 1 ) + { + /* decorrelate prototype frame */ + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { - /* decorrelate prototype frame */ - if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) - { - ivas_dirac_dec_decorr_process( hDirAC->num_freq_bands, - hDirAC->num_outputs_diff, - hDirAC->num_protos_diff, - hDirAC->synthesisConf, - nchan_transport, - hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f + slot_idx * 2 * hDirAC->num_freq_bands * hDirAC->num_outputs_diff, - hDirAC->num_protos_diff, - hDirAC->proto_index_diff, - hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f + slot_idx * 2 * hDirAC->num_freq_bands * hDirAC->num_outputs_diff + 2 * hDirAC->num_freq_bands * min( 4, nchan_transport ), - onset_filter, - hDirAC->h_freq_domain_decorr_ap_params, - hDirAC->h_freq_domain_decorr_ap_state ); - - v_multc( onset_filter, 0.25f, onset_filter, hDirAC->num_freq_bands ); - v_add( onset_filter, onset_filter_subframe, onset_filter_subframe, hDirAC->num_freq_bands ); - p_onset_filter = onset_filter_subframe; - } - else - { - ivas_dirac_dec_decorr_process( hDirAC->num_freq_bands, - hDirAC->num_outputs_diff, - hDirAC->num_protos_diff, - hDirAC->synthesisConf, - nchan_transport, - hDirAC->proto_frame_f, - hDirAC->num_protos_diff, - hDirAC->proto_index_diff, - DirAC_mem.frame_dec_f, - onset_filter, - hDirAC->h_freq_domain_decorr_ap_params, - hDirAC->h_freq_domain_decorr_ap_state ); - - hDirAC->proto_frame_dec_f = DirAC_mem.frame_dec_f; - p_onset_filter = onset_filter; - } + ivas_dirac_dec_decorr_process( hDirAC->num_freq_bands, + hDirAC->num_outputs_diff, + hDirAC->num_protos_diff, + hDirAC->synthesisConf, + nchan_transport, + hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f + slot_idx * 2 * hDirAC->num_freq_bands * hDirAC->num_outputs_diff, + hDirAC->num_protos_diff, + hDirAC->proto_index_diff, + hDirAC->h_output_synthesis_psd_state.proto_diffuse_buffer_f + slot_idx * 2 * hDirAC->num_freq_bands * hDirAC->num_outputs_diff + 2 * hDirAC->num_freq_bands * min( 4, nchan_transport ), + onset_filter, + hDirAC->h_freq_domain_decorr_ap_params, + hDirAC->h_freq_domain_decorr_ap_state ); + + v_multc( onset_filter, 0.25f, onset_filter, hDirAC->num_freq_bands ); + v_add( onset_filter, onset_filter_subframe, onset_filter_subframe, hDirAC->num_freq_bands ); + p_onset_filter = onset_filter_subframe; } else { - if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) - { - set_f( onset_filter_subframe, 1.f, hDirAC->num_freq_bands ); - p_onset_filter = onset_filter_subframe; - } - else - { - /* no frequency domain decorrelation: use prototype frame */ - hDirAC->proto_frame_dec_f = hDirAC->proto_frame_f; - p_onset_filter = NULL; - } + ivas_dirac_dec_decorr_process( hDirAC->num_freq_bands, + hDirAC->num_outputs_diff, + hDirAC->num_protos_diff, + hDirAC->synthesisConf, + nchan_transport, + hDirAC->proto_frame_f, + hDirAC->num_protos_diff, + hDirAC->proto_index_diff, + DirAC_mem.frame_dec_f, + onset_filter, + hDirAC->h_freq_domain_decorr_ap_params, + hDirAC->h_freq_domain_decorr_ap_state ); + + hDirAC->proto_frame_dec_f = DirAC_mem.frame_dec_f; + p_onset_filter = onset_filter; } - - /*-----------------------------------------------------------------* - * output synthesis - *-----------------------------------------------------------------*/ - - if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_LS || hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) + } + else + { + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) + { + set_f( onset_filter_subframe, 1.f, hDirAC->num_freq_bands ); + p_onset_filter = onset_filter_subframe; + } + else { - /*Compute diffuse prototypes*/ - ivas_dirac_dec_compute_diffuse_proto( hDirAC, slot_idx ); + /* no frequency domain decorrelation: use prototype frame */ + hDirAC->proto_frame_dec_f = hDirAC->proto_frame_f; + p_onset_filter = NULL; } + } + + /*-----------------------------------------------------------------* + * output synthesis + *-----------------------------------------------------------------*/ + + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_LS || hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) + { + /*Compute diffuse prototypes*/ + ivas_dirac_dec_compute_diffuse_proto( hDirAC, slot_idx ); + } + + /*Compute PSDs*/ +#ifndef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order == 2 ) + { + ivas_dirac_dec_output_synthesis_process_slot( reference_power, + p_onset_filter, + hDirAC, + p_Rmat, + st_ivas->hVBAPdata, + hDirAC->hOutSetup, + nchan_transport, + st_ivas->sba_analysis_order > 1 && + st_ivas->hDecoderConfig->ivas_total_brate > IVAS_256k ); + } + else + { + ivas_dirac_dec_output_synthesis_process_slot( reference_power, + p_onset_filter, + hDirAC, + 0, + st_ivas->hVBAPdata, + hDirAC->hOutSetup, + nchan_transport, + st_ivas->sba_analysis_order > 1 && + st_ivas->hDecoderConfig->ivas_total_brate > IVAS_256k - /*Compute PSDs*/ - if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order == 2 ) + ); + } +#else + if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData->shd_rot_max_order > 0 ) { ivas_dirac_dec_output_synthesis_process_slot( reference_power, p_onset_filter, + azimuth[slot_idx], + elevation[slot_idx], + diffuseness_vector[slot_idx], hDirAC, + st_ivas->hHeadTrackData->shd_rot_max_order, p_Rmat, st_ivas->hVBAPdata, hDirAC->hOutSetup, - nchan_transport ); + nchan_transport, + md_idx, + hodirac_flag + + ); } else { ivas_dirac_dec_output_synthesis_process_slot( reference_power, p_onset_filter, + azimuth[slot_idx], + elevation[slot_idx], + diffuseness_vector[slot_idx], hDirAC, 0, + 0, st_ivas->hVBAPdata, hDirAC->hOutSetup, - nchan_transport ); - } - - if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) - { - v_add( reference_power, reference_power_smooth, reference_power_smooth, hDirAC->num_freq_bands ); + nchan_transport, + md_idx, + hodirac_flag ); } +#endif - if ( hDirAC->hConfig->dec_param_estim ) - { - hDirAC->dirac_read_idx = ( hDirAC->dirac_read_idx + 1 ) % hDirAC->dirac_md_buffer_length; - } + if ( hDirAC->synthesisConf != DIRAC_SYNTHESIS_GAIN_SHD ) + { + v_add( reference_power, reference_power_smooth, reference_power_smooth, hDirAC->num_freq_bands ); } - if ( hDirAC->hConfig->dec_param_estim == 0 ) +#ifndef JBM_TSM_ON_TCS + if ( hDirAC->hConfig->dec_param_estim ) { hDirAC->dirac_read_idx = ( hDirAC->dirac_read_idx + 1 ) % hDirAC->dirac_md_buffer_length; } +#endif + } +#ifndef JBM_TSM_ON_TCS + if ( hDirAC->hConfig->dec_param_estim == 0 ) + { + hDirAC->dirac_read_idx = ( hDirAC->dirac_read_idx + 1 ) % hDirAC->dirac_md_buffer_length; + } +#endif +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec_output_synthesis_get_interpolator( &hDirAC->h_output_synthesis_psd_params, hDirAC->subframe_nbslots[subframe_idx] ); - if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) + if ( hDirAC->hConfig->dec_param_estim == FALSE ) + { + md_idx = hDirAC->render_to_md_map[subframe_idx]; + } + else + { + md_idx = hDirAC->render_to_md_map[slot_idx_start]; + } + + /* Workaround for BE (should be gone when #393 is adressed and diffuseness index in the gain SHD renderer with HO-DirAC is fixed) */ + /* :TODO: remove */ + /* get the correct md index for the diffuseness in direction smoothing and HO-DirAC, it is always the first slot of the next subframe*/ + if ( slot_idx_start + hDirAC->subframe_nbslots[subframe_idx] == hDirAC->num_slots ) + { + /* we are at the end, get the next one using the normal dirac read idx...*/ + if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) + { + md_idx = ( hDirAC->dirac_read_idx + DEFAULT_JBM_CLDFB_TIMESLOTS ) % hDirAC->dirac_md_buffer_length; + } + else + { + md_idx = ( hDirAC->dirac_read_idx + DEFAULT_JBM_SUBFRAMES_5MS ) % hDirAC->dirac_md_buffer_length; + } + } + else + { + if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) { - ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( Cldfb_RealBuffer, - Cldfb_ImagBuffer, - hDirAC, - nchan_transport, - p_onset_filter ); + md_idx = hDirAC->render_to_md_map[slot_idx_start + hDirAC->subframe_nbslots[subframe_idx]]; } else { - /* Determine encoding quality based additional smoothing factor */ - float qualityBasedSmFactor = 1.0f; - if ( st_ivas->hMasa != NULL ) + md_idx = hDirAC->render_to_md_map[subframe_idx + 1]; + } + } + +#endif + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) + { + ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( Cldfb_RealBuffer, + Cldfb_ImagBuffer, + hDirAC, + nchan_transport, +#ifdef JBM_TSM_ON_TCS + hDirAC->subframe_nbslots[subframe_idx], +#endif + p_onset_filter, +#ifdef JBM_TSM_ON_TCS + md_idx, +#endif + hodirac_flag ); + } + else + { + /* Determine encoding quality based additional smoothing factor */ + float qualityBasedSmFactor = 1.0f; + + if ( st_ivas->hMasa != NULL ) + { + qualityBasedSmFactor = st_ivas->hMasa->data.dir_decode_quality; + qualityBasedSmFactor *= qualityBasedSmFactor; + } +#ifdef JBM_TSM_ON_TCS + /* Workaround for BE (should be gone when #393 is adressed) */ + if ( hDirAC->hConfig->dec_param_estim == 1 ) + { + num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) { - qualityBasedSmFactor = st_ivas->hMasa->data.dir_decode_quality; - qualityBasedSmFactor *= qualityBasedSmFactor; + mvs2s( azimuth[slot_idx], hDirAC->azimuth[hDirAC->render_to_md_map[slot_idx + slot_idx_start]], num_freq_bands ); + mvs2s( elevation[slot_idx], hDirAC->elevation[hDirAC->render_to_md_map[slot_idx + slot_idx_start]], num_freq_bands ); + mvr2r( diffuseness_vector[slot_idx], hDirAC->diffuseness_vector[hDirAC->render_to_md_map[slot_idx + slot_idx_start]], num_freq_bands ); } - - ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( Cldfb_RealBuffer, - Cldfb_ImagBuffer, - hDirAC, - reference_power_smooth, - qualityBasedSmFactor ); } - /*-----------------------------------------------------------------* - * CLDFB synthesis (and binaural rendering) - *-----------------------------------------------------------------*/ +#endif + ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( Cldfb_RealBuffer, + Cldfb_ImagBuffer, + hDirAC, +#ifdef JBM_TSM_ON_TCS + hDirAC->subframe_nbslots[subframe_idx], + md_idx, +#endif + reference_power_smooth, + qualityBasedSmFactor ); + } + + /*-----------------------------------------------------------------* + * CLDFB synthesis (and binaural rendering) + *-----------------------------------------------------------------*/ + +#ifdef JBM_TSM_ON_TCS + index_slot = slot_idx_start_cldfb_synth; +#else index_slot = subframe_idx * hDirAC->subframe_nbslots; +#endif - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) - { - /* Perform binaural rendering */ - ivas_binRenderer( st_ivas->hBinRenderer, - st_ivas->hHeadTrackData, - Cldfb_RealBuffer_Binaural, - Cldfb_ImagBuffer_Binaural, - Cldfb_RealBuffer, - Cldfb_ImagBuffer ); + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + /* Perform binaural rendering */ + ivas_binRenderer( st_ivas->hBinRenderer, + st_ivas->hHeadTrackData, +#ifdef JBM_TSM_ON_TCS + hDirAC->subframe_nbslots[subframe_idx], +#endif + Cldfb_RealBuffer_Binaural, + Cldfb_ImagBuffer_Binaural, + Cldfb_RealBuffer, + Cldfb_ImagBuffer ); - /* Inverse CLDFB*/ - for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ ) - { - /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ - float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; - float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; + /* Inverse CLDFB*/ + for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ ) + { + /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ + float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; + float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < hDirAC->subframe_nbslots[subframe_idx]; i++ ) +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) - { - RealBuffer[i] = Cldfb_RealBuffer_Binaural[ch][i]; - ImagBuffer[i] = Cldfb_ImagBuffer_Binaural[ch][i]; - } +#endif + { + RealBuffer[i] = Cldfb_RealBuffer_Binaural[ch][i]; + ImagBuffer[i] = Cldfb_ImagBuffer_Binaural[ch][i]; + } +#ifdef JBM_TSM_ON_TCS + cldfbSynthesis( RealBuffer, + ImagBuffer, + &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), + hDirAC->num_freq_bands * hDirAC->subframe_nbslots[subframe_idx], + st_ivas->cldfbSynDec[ch] ); +#else cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots, st_ivas->cldfbSynDec[ch] ); - } +#endif } - else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + } + else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + for ( ch = 0; ch < hDirAC->hOutSetup.nchan_out_woLFE; ch++ ) { - for ( ch = 0; ch < hDirAC->hOutSetup.nchan_out_woLFE; ch++ ) - { +#ifdef JBM_TSM_ON_TCS + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) +#else for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots; slot_idx++ ) - { - mvr2r( Cldfb_RealBuffer[ch][slot_idx], pppQMfFrame_ts_re[ch][slot_idx], hDirAC->num_freq_bands ); - mvr2r( Cldfb_ImagBuffer[ch][slot_idx], pppQMfFrame_ts_im[ch][slot_idx], hDirAC->num_freq_bands ); - } +#endif + { + mvr2r( Cldfb_RealBuffer[ch][slot_idx], pppQMfFrame_ts_re[ch][slot_idx], hDirAC->num_freq_bands ); + mvr2r( Cldfb_ImagBuffer[ch][slot_idx], pppQMfFrame_ts_im[ch][slot_idx], hDirAC->num_freq_bands ); } } - else - { - float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; - float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; - int16_t outchannels; + } + else + { + float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; + float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES]; + int16_t outchannels; - idx_in = 0; - idx_lfe = 0; + idx_in = 0; + idx_lfe = 0; - outchannels = hDirAC->hOutSetup.nchan_out_woLFE + hDirAC->hOutSetup.num_lfe; - if ( hDirAC->hOutSetup.separateChannelEnabled && ( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_5_1 || - hDirAC->hOutSetup.output_config == AUDIO_CONFIG_7_1 || - hDirAC->hOutSetup.output_config == AUDIO_CONFIG_5_1_2 || - hDirAC->hOutSetup.output_config == AUDIO_CONFIG_5_1_4 || - hDirAC->hOutSetup.output_config == AUDIO_CONFIG_7_1_4 || - ( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hLsSetupCustom->separate_ch_found ) ) ) - { - outchannels++; - } + outchannels = hDirAC->hOutSetup.nchan_out_woLFE + hDirAC->hOutSetup.num_lfe; + if ( hDirAC->hOutSetup.separateChannelEnabled && ( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_5_1 || + hDirAC->hOutSetup.output_config == AUDIO_CONFIG_7_1 || + hDirAC->hOutSetup.output_config == AUDIO_CONFIG_5_1_2 || + hDirAC->hOutSetup.output_config == AUDIO_CONFIG_5_1_4 || + hDirAC->hOutSetup.output_config == AUDIO_CONFIG_7_1_4 || + ( hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hLsSetupCustom->separate_ch_found ) ) ) + { + outchannels++; + } - if ( hDirAC->hOutSetup.separateChannelEnabled && hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM ) - { - float tmp_separated[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; - float tmp_lfe[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; - const int16_t subframe_start_sample = index_slot * hDirAC->num_freq_bands; + if ( hDirAC->hOutSetup.separateChannelEnabled && hDirAC->hOutSetup.output_config == AUDIO_CONFIG_LS_CUSTOM ) + { + float tmp_separated[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; + float tmp_lfe[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; + const int16_t subframe_start_sample = index_slot * hDirAC->num_freq_bands; +#ifdef JBM_TSM_ON_TCS + const int16_t num_samples_subframe = hDirAC->num_freq_bands * hDirAC->subframe_nbslots[subframe_idx]; +#else const int16_t num_samples_subframe = hDirAC->num_freq_bands * hDirAC->subframe_nbslots; +#endif - /* Move the separated and the LFE channels to temporary variables as spatial synthesis may overwrite current channels */ - mvr2r( &( output_f[st_ivas->hOutSetup.separateChannelIndex][subframe_start_sample] ), tmp_separated, num_samples_subframe ); - mvr2r( &( output_f[LFE_CHANNEL][subframe_start_sample] ), tmp_lfe, num_samples_subframe ); + /* Move the separated and the LFE channels to temporary variables as spatial synthesis may overwrite current channels */ + mvr2r( &( output_f[st_ivas->hOutSetup.separateChannelIndex][subframe_start_sample] ), tmp_separated, num_samples_subframe ); + mvr2r( &( output_f[LFE_CHANNEL][subframe_start_sample] ), tmp_lfe, num_samples_subframe ); - for ( ch = 0; ch < outchannels; ch++ ) + for ( ch = 0; ch < outchannels; ch++ ) + { + if ( ( hDirAC->hOutSetup.num_lfe > 0 ) && ( hDirAC->hOutSetup.index_lfe[idx_lfe] == ch ) ) { - if ( ( hDirAC->hOutSetup.num_lfe > 0 ) && ( hDirAC->hOutSetup.index_lfe[idx_lfe] == ch ) ) - { - /* Move the LFE channel to the correct place */ - mvr2r( tmp_lfe, &( output_f[ch][subframe_start_sample] ), num_samples_subframe ); + /* Move the LFE channel to the correct place */ + mvr2r( tmp_lfe, &( output_f[ch][subframe_start_sample] ), num_samples_subframe ); - if ( idx_lfe < ( hDirAC->hOutSetup.num_lfe - 1 ) ) - { - idx_lfe++; - } - } - else if ( ( st_ivas->hLsSetupCustom->separate_ch_found ) && ( hDirAC->hOutSetup.separateChannelIndex == ch ) ) + if ( idx_lfe < ( hDirAC->hOutSetup.num_lfe - 1 ) ) { - /* Move the separated channel to the correct place. Thus, the separated channel is - * combined with the synthesized channels here when there is a matching channel. */ - mvr2r( tmp_separated, &( output_f[ch][subframe_start_sample] ), num_samples_subframe ); + idx_lfe++; } - else - { - /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ + } + else if ( ( st_ivas->hLsSetupCustom->separate_ch_found ) && ( hDirAC->hOutSetup.separateChannelIndex == ch ) ) + { + /* Move the separated channel to the correct place. Thus, the separated channel is + * combined with the synthesized channels here when there is a matching channel. */ + mvr2r( tmp_separated, &( output_f[ch][subframe_start_sample] ), num_samples_subframe ); + } + else + { + /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < hDirAC->subframe_nbslots[subframe_idx]; i++ ) +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) - { - RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; - ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; - } - cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][subframe_start_sample] ), num_samples_subframe, st_ivas->cldfbSynDec[idx_in] ); - - if ( !st_ivas->hLsSetupCustom->separate_ch_found ) - { - /* Pan the separated channel and mix with the synthesized channels. Thus, the separated channel - * is combined with the synthesized channels here when there is no matching channel. */ - v_multc_acc( tmp_separated, st_ivas->hLsSetupCustom->separate_ch_gains[idx_in], &( output_f[ch][subframe_start_sample] ), num_samples_subframe ); - } +#endif + { + RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; + ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; + } + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][subframe_start_sample] ), num_samples_subframe, st_ivas->cldfbSynDec[idx_in] ); - idx_in++; + if ( !st_ivas->hLsSetupCustom->separate_ch_found ) + { + /* Pan the separated channel and mix with the synthesized channels. Thus, the separated channel + * is combined with the synthesized channels here when there is no matching channel. */ + v_multc_acc( tmp_separated, st_ivas->hLsSetupCustom->separate_ch_gains[idx_in], &( output_f[ch][subframe_start_sample] ), num_samples_subframe ); } + + idx_in++; } } - else + } + else + { + for ( ch = 0; ch < outchannels; ch++ ) { - for ( ch = 0; ch < outchannels; ch++ ) + if ( ( hDirAC->hOutSetup.num_lfe > 0 ) && ( hDirAC->hOutSetup.index_lfe[idx_lfe] == ch ) ) { - if ( ( hDirAC->hOutSetup.num_lfe > 0 ) && ( hDirAC->hOutSetup.index_lfe[idx_lfe] == ch ) ) + if ( st_ivas->mc_mode == MC_MODE_MCMASA && !hDirAC->hOutSetup.separateChannelEnabled ) { - if ( st_ivas->mc_mode == MC_MODE_MCMASA && !hDirAC->hOutSetup.separateChannelEnabled ) - { +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < hDirAC->subframe_nbslots[subframe_idx]; i++ ) +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) - { - RealBuffer[i] = Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS - 1][i]; - ImagBuffer[i] = Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS - 1][i]; - } - cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots, st_ivas->cldfbSynDec[hDirAC->hOutSetup.nchan_out_woLFE + idx_lfe] ); - } - else if ( st_ivas->mc_mode == MC_MODE_MCMASA && hDirAC->hOutSetup.separateChannelEnabled ) - { - /* LFE has been synthesized in the time domain, do nothing. */ - } - else - { - set_zero( &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->subframe_nbslots * hDirAC->num_freq_bands ); - } - - if ( idx_lfe < ( hDirAC->hOutSetup.num_lfe - 1 ) ) +#endif { - idx_lfe++; + RealBuffer[i] = Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS - 1][i]; + ImagBuffer[i] = Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS - 1][i]; } +#ifdef JBM_TSM_ON_TCS + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots[subframe_idx], st_ivas->cldfbSynDec[hDirAC->hOutSetup.nchan_out_woLFE + idx_lfe] ); +#else + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots, st_ivas->cldfbSynDec[hDirAC->hOutSetup.nchan_out_woLFE + idx_lfe] ); +#endif } - else if ( ( hDirAC->hOutSetup.separateChannelEnabled ) && ( hDirAC->hOutSetup.separateChannelIndex == ch ) ) + else if ( st_ivas->mc_mode == MC_MODE_MCMASA && hDirAC->hOutSetup.separateChannelEnabled ) { - /* The separated channel is already set to output_f[hOutSetup.separateChannelIndex]. Thus, the separated - * channel is combined with the synthesized channels here. */ + /* LFE has been synthesized in the time domain, do nothing. */ } else { - /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ +#ifdef JBM_TSM_ON_TCS + set_zero( &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->subframe_nbslots[subframe_idx] * hDirAC->num_freq_bands ); +#else + set_zero( &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->subframe_nbslots * hDirAC->num_freq_bands ); +#endif + } + + if ( idx_lfe < ( hDirAC->hOutSetup.num_lfe - 1 ) ) + { + idx_lfe++; + } + } + else if ( ( hDirAC->hOutSetup.separateChannelEnabled ) && ( hDirAC->hOutSetup.separateChannelIndex == ch ) ) + { + /* The separated channel is already set to output_f[hOutSetup.separateChannelIndex]. Thus, the separated + * channel is combined with the synthesized channels here. */ + } + else + { + /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < hDirAC->subframe_nbslots[subframe_idx]; i++ ) +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) - { - RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; - ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; - } - cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots, st_ivas->cldfbSynDec[idx_in] ); - idx_in++; +#endif + { + RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; + ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; } +#ifdef JBM_TSM_ON_TCS + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots[subframe_idx], st_ivas->cldfbSynDec[idx_in] ); +#else + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][index_slot * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots, st_ivas->cldfbSynDec[idx_in] ); +#endif + idx_in++; } } } } +#ifdef JBM_TSM_ON_TCS + hDirAC->slots_rendered += hDirAC->subframe_nbslots[subframe_idx]; + hDirAC->subframes_rendered++; +#endif +#ifndef JBM_TSM_ON_TCS +} +#endif - pop_wmops(); +pop_wmops(); - return; +return; } @@ -3544,7 +4261,8 @@ static void protoSignalComputation4( const int16_t num_outputs_diff, const int16_t num_freq_bands, const float *mtx_hoa_decoder, - const int16_t nchan_transport ) + const int16_t nchan_transport, + const int16_t *sba_map_tc_ind ) { int16_t k, l; int16_t n; @@ -3570,8 +4288,8 @@ static void protoSignalComputation4( proto_frame_f[2 * l * num_freq_bands + 2 * k + 1] = 0.f; for ( n = 0; n < nchan_transport; n++ ) { - proto_frame_f[2 * l * num_freq_bands + 2 * k] += RealBuffer[n][0][k] * mtx_hoa_decoder[l * 16 + sba_map_tc[n]]; - proto_frame_f[2 * l * num_freq_bands + 2 * k + 1] += ImagBuffer[n][0][k] * mtx_hoa_decoder[l * 16 + sba_map_tc[n]]; + proto_frame_f[2 * l * num_freq_bands + 2 * k] += RealBuffer[n][0][k] * mtx_hoa_decoder[l * 16 + sba_map_tc_ind[n]]; + proto_frame_f[2 * l * num_freq_bands + 2 * k + 1] += ImagBuffer[n][0][k] * mtx_hoa_decoder[l * 16 + sba_map_tc_ind[n]]; } } } diff --git a/lib_dec/ivas_dirac_output_synthesis_cov.c b/lib_dec/ivas_dirac_output_synthesis_cov.c index a2fc9ee8210be12378d3175c808075fd88ebcd8d..892cfe4acbd1120a7f3d2f4b90eae08a2fa2ad76 100644 --- a/lib_dec/ivas_dirac_output_synthesis_cov.c +++ b/lib_dec/ivas_dirac_output_synthesis_cov.c @@ -104,12 +104,19 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open( set_zero( h_dirac_output_synthesis_state->cx_old[idx], nchan_in * nchan_in ); set_zero( h_dirac_output_synthesis_state->cy_old[idx], nchan_out * nchan_out ); set_zero( h_dirac_output_synthesis_state->mixing_matrix_old[idx], nchan_out * nchan_in ); +#ifdef JBM_TSM_ON_TCS + h_dirac_output_synthesis_state->mixing_matrix[idx] = (float *) malloc( nchan_out * nchan_in * sizeof( float ) ); + set_zero( h_dirac_output_synthesis_state->mixing_matrix[idx], nchan_out * nchan_in ); +#endif } for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { h_dirac_output_synthesis_state->cx_old[idx] = NULL; h_dirac_output_synthesis_state->cy_old[idx] = NULL; h_dirac_output_synthesis_state->mixing_matrix_old[idx] = NULL; +#ifdef JBM_TSM_ON_TCS + h_dirac_output_synthesis_state->mixing_matrix[idx] = NULL; +#endif } for ( idx = 0; idx < num_param_bands_residual; idx++ ) { @@ -118,10 +125,17 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis covariance\n" ) ); } set_zero( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx], nchan_out * nchan_out ); +#ifdef JBM_TSM_ON_TCS + h_dirac_output_synthesis_state->mixing_matrix_res[idx] = (float *) malloc( nchan_out * nchan_out * sizeof( float ) ); + set_zero( h_dirac_output_synthesis_state->mixing_matrix_res[idx], nchan_out * nchan_out ); +#endif } for ( ; idx < CLDFB_NO_CHANNELS_MAX; idx++ ) { h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] = NULL; +#ifdef JBM_TSM_ON_TCS + h_dirac_output_synthesis_state->mixing_matrix_res[idx] = NULL; +#endif } /*-----------------------------------------------------------------* @@ -144,6 +158,28 @@ ivas_error ivas_dirac_dec_output_synthesis_cov_open( return IVAS_ERR_OK; } +#ifdef JBM_TSM_ON_TCS +/*-------------------------------------------------------------------* + * ivas_dirac_dec_output_synthesis_cov_open() + * + * Sets up the state and parameters for the Covariance Synthesis + *-------------------------------------------------------------------*/ + +void ivas_dirac_dec_output_synthesis_get_interpolator( + DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params, /* i/o: handle for the covariance synthesis parameters */ + const uint16_t interp_length ) +{ + int16_t idx; + + for ( idx = 1; idx <= interp_length; ++idx ) + { + h_dirac_output_synthesis_params->interpolator[idx - 1] = (float) idx / (float) interp_length; + } + + return; +} +#endif + /*-------------------------------------------------------------------* * ivas_dirac_dec_output_synthesis_cov_init() @@ -168,11 +204,17 @@ void ivas_dirac_dec_output_synthesis_cov_init( set_zero( h_dirac_output_synthesis_state->cx_old[idx], nchan_in * nchan_in ); set_zero( h_dirac_output_synthesis_state->cy_old[idx], nchan_out * nchan_out ); set_zero( h_dirac_output_synthesis_state->mixing_matrix_old[idx], nchan_out * nchan_in ); +#ifdef JBM_TSM_ON_TCS + set_zero( h_dirac_output_synthesis_state->mixing_matrix[idx], nchan_out * nchan_in ); +#endif } for ( idx = 0; idx < n_param_bands_res; idx++ ) { set_zero( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx], nchan_out * nchan_out ); +#ifdef JBM_TSM_ON_TCS + set_zero( h_dirac_output_synthesis_state->mixing_matrix_res[idx], nchan_out * nchan_out ); +#endif } return; @@ -243,6 +285,19 @@ void ivas_dirac_dec_output_synthesis_cov_close( free( h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] ); h_dirac_output_synthesis_state->mixing_matrix_res_old[idx] = NULL; } +#ifdef JBM_TSM_ON_TCS + if ( h_dirac_output_synthesis_state->mixing_matrix[idx] != NULL ) + { + free( h_dirac_output_synthesis_state->mixing_matrix[idx] ); + h_dirac_output_synthesis_state->mixing_matrix[idx] = NULL; + } + + if ( h_dirac_output_synthesis_state->mixing_matrix_res[idx] != NULL ) + { + free( h_dirac_output_synthesis_state->mixing_matrix_res[idx] ); + h_dirac_output_synthesis_state->mixing_matrix_res[idx] = NULL; + } +#endif } return; @@ -256,13 +311,21 @@ void ivas_dirac_dec_output_synthesis_cov_close( *-------------------------------------------------------------------*/ void ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot( - float RealBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (real part) */ - float ImagBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (imaginary part */ +#ifdef JBM_TSM_ON_TCS + float *RealBuffer, /* i : input channel filter bank samples (real part) */ + float *ImagBuffer, /* i : input channel filter bank samples (imaginary part */ +#else + float RealBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (real part) */ + float ImagBuffer[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (imaginary part */ +#endif float cx[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : accumulated input covariance (real part) */ float cx_imag[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : accumulated input covariance (imaginary part) */ PARAM_MC_DEC_HANDLE hParamMC, /* i : handle to Parametric MC state */ - const int16_t nchan_in, /* i : number of input channels */ - const int16_t idx_slot /* i : index of the slot to be added to the input covariance */ + const int16_t nchan_in /* i : number of input channels */ +#ifndef JBM_TSM_ON_TCS + , + const int16_t idx_slot /* i : index of the slot to be added to the input covariance */ +#endif ) { int16_t param_band, band_idx, ch_idx; @@ -288,8 +351,13 @@ void ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot( int16_t band = brange[0] + band_idx; for ( ch_idx = 0; ch_idx < nchan_in; ch_idx++ ) { +#ifdef JBM_TSM_ON_TCS + real_in_buffer[band_idx + num_bands * ch_idx] = RealBuffer[ch_idx * hParamMC->num_freq_bands + band]; + imag_in_buffer[band_idx + num_bands * ch_idx] = ImagBuffer[ch_idx * hParamMC->num_freq_bands + band]; +#else real_in_buffer[band_idx + num_bands * ch_idx] = RealBuffer[ch_idx][idx_slot][band]; imag_in_buffer[band_idx + num_bands * ch_idx] = ImagBuffer[ch_idx][idx_slot][band]; +#endif } } @@ -312,17 +380,27 @@ void ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot( *-------------------------------------------------------------------*/ void ivas_dirac_dec_output_synthesis_cov_param_mc_synthesise_slot( - float Cldfb_RealBuffer_in[][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (real part) */ - float Cldfb_ImagBuffer_in[][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : input channel filter bank samples (imaginary part) */ - float Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (real part) */ - float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (imaginary part) */ +#ifdef JBM_TSM_ON_TCS + float *Cldfb_RealBuffer_in, /* i : input channel filter bank samples (real part) */ + float *Cldfb_ImagBuffer_in, /* i : input channel filter bank samples (imaginary part) */ +#else + float Cldfb_RealBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : CLDFB samples of the transport channels (real part) */ + float Cldfb_ImagBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : CLDFB samples of the transport channels (imaginary part) */ +#endif + float Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (real part) */ + float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : output channel filter bank samples (imaginary part) */ +#ifdef JBM_TSM_ON_TCS + float *mixing_matrix[], /* i : parameter band wise mixing matrices (direct part) */ + float *mixing_matrix_res[], /* i : parameter band wise mixing matrices (residual part) */ +#else float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : parameter band wise mixing matrices (direct part) */ float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* i : parameter band wise mixing matrices (residual part) */ - const uint16_t slot_idx_sfr, /* i : time slot index for the current slot within the current subframe */ - const uint16_t slot_idx_tot, /* i : time slot index for the current slot within the frame */ - const int16_t nX, /* i : number of input channels */ - const int16_t nY, /* i : number of output channels */ - PARAM_MC_DEC_HANDLE hParamMC /* i : handle to the Parametric MC decoder state */ +#endif + const uint16_t slot_idx_sfr, /* i : time slot index for the current slot within the current subframe */ + const uint16_t slot_idx_tot, /* i : time slot index for the current slot within the frame */ + const int16_t nX, /* i : number of input channels */ + const int16_t nY, /* i : number of output channels */ + PARAM_MC_DEC_HANDLE hParamMC /* i : handle to the Parametric MC decoder state */ ) { int16_t param_band_idx, band, ch_idx; @@ -407,8 +485,13 @@ void ivas_dirac_dec_output_synthesis_cov_param_mc_synthesise_slot( /* collect input signals, still in cldfb buffers */ for ( ch_idx = 0; ch_idx < nX; ch_idx++ ) { +#ifdef JBM_TSM_ON_TCS + input_f_real[ch_idx] = Cldfb_RealBuffer_in[ch_idx * hParamMC->num_freq_bands + band]; + input_f_imag[ch_idx] = Cldfb_ImagBuffer_in[ch_idx * hParamMC->num_freq_bands + band]; +#else input_f_real[ch_idx] = Cldfb_RealBuffer_in[ch_idx][slot_idx_tot][band]; input_f_imag[ch_idx] = Cldfb_ImagBuffer_in[ch_idx][slot_idx_tot][band]; +#endif } /* apply mixing matrix */ diff --git a/lib_dec/ivas_dirac_output_synthesis_dec.c b/lib_dec/ivas_dirac_output_synthesis_dec.c index 362b63c04b3bba68812fa8b1209dd0f7672d774d..1ad87d6618dc729bc86c982f5034136c3d142aa9 100644 --- a/lib_dec/ivas_dirac_output_synthesis_dec.c +++ b/lib_dec/ivas_dirac_output_synthesis_dec.c @@ -87,13 +87,16 @@ static void normalizePanningGains( float *direct_response, const int16_t num_cha *------------------------------------------------------------------------*/ ivas_error ivas_dirac_dec_output_synthesis_open( - DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ - RENDERER_TYPE renderer_type, /* i : renderer type */ - const int16_t nchan_transport, /* i : number of transport channels*/ - const int32_t output_Fs /* i : output sampling rate */ + DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ + RENDERER_TYPE renderer_type, /* i : renderer type */ + const int16_t nchan_transport, /* i : number of transport channels */ + const int32_t output_Fs /* i : output sampling rate */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { int16_t idx, ch_idx; + int16_t size; float tmp; uint16_t num_diffuse_responses; float temp_alpha_synthesis[CLDFB_NO_CHANNELS_MAX]; @@ -161,13 +164,25 @@ ivas_error ivas_dirac_dec_output_synthesis_open( } /* buffer length and interpolator */ +#ifdef JBM_TSM_ON_TCS + if ( ( dirac_output_synthesis_params->interpolator = (float *) malloc( JBM_CLDFB_SLOTS_IN_SUBFRAME * sizeof( float ) ) ) == NULL ) +#else if ( ( dirac_output_synthesis_params->interpolator = (float *) malloc( hDirAC->subframe_nbslots * sizeof( float ) ) ) == NULL ) +#endif { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); } /* target PSD buffers */ - if ( ( dirac_output_synthesis_state->cy_cross_dir_smooth_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ) ) == NULL ) + if ( hodirac_flag ) + { + size = hDirAC->num_freq_bands * hDirAC->num_outputs_dir * DIRAC_HO_NUMSECTORS; + } + else + { + size = hDirAC->num_freq_bands * hDirAC->num_outputs_dir; + } + if ( ( dirac_output_synthesis_state->cy_cross_dir_smooth_prev = (float *) malloc( size * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); } @@ -204,7 +219,7 @@ ivas_error ivas_dirac_dec_output_synthesis_open( } /* direct and diffuse gain buffers */ - if ( ( dirac_output_synthesis_state->gains_dir_prev = (float *) malloc( hDirAC->num_freq_bands * hDirAC->num_outputs_dir * sizeof( float ) ) ) == NULL ) + if ( ( dirac_output_synthesis_state->gains_dir_prev = (float *) malloc( size * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC synthesis\n" ) ); } @@ -272,9 +287,17 @@ ivas_error ivas_dirac_dec_output_synthesis_open( } /* compute interpolator */ +#ifdef JBM_TSM_ON_TCS + for ( idx = 1; idx <= JBM_CLDFB_SLOTS_IN_SUBFRAME; ++idx ) +#else for ( idx = 1; idx <= hDirAC->subframe_nbslots; ++idx ) +#endif { +#ifdef JBM_TSM_ON_TCS + dirac_output_synthesis_params->interpolator[idx - 1] = (float) idx / (float) JBM_CLDFB_SLOTS_IN_SUBFRAME; +#else dirac_output_synthesis_params->interpolator[idx - 1] = (float) idx / (float) hDirAC->subframe_nbslots; +#endif } /* prepare diffuse response function */ @@ -346,8 +369,12 @@ ivas_error ivas_dirac_dec_output_synthesis_open( void ivas_dirac_dec_output_synthesis_init( DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const int16_t nchan_out_woLFE /* i : number of output audio channels without LFE */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { + int16_t size; + DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params; DIRAC_OUTPUT_SYNTHESIS_STATE *h_dirac_output_synthesis_state; @@ -364,7 +391,16 @@ void ivas_dirac_dec_output_synthesis_init( set_zero( h_dirac_output_synthesis_state->cy_auto_dir_smooth_prev, hDirAC->num_freq_bands * hDirAC->num_outputs_dir ); } - set_zero( h_dirac_output_synthesis_state->cy_cross_dir_smooth_prev, hDirAC->num_freq_bands * hDirAC->num_outputs_dir ); + if ( hodirac_flag ) + { + size = hDirAC->num_freq_bands * hDirAC->num_outputs_dir * DIRAC_HO_NUMSECTORS; + } + else + { + size = hDirAC->num_freq_bands * hDirAC->num_outputs_dir; + } + set_zero( h_dirac_output_synthesis_state->cy_cross_dir_smooth_prev, size ); + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { set_zero( h_dirac_output_synthesis_state->cy_auto_diff_smooth_prev, h_dirac_output_synthesis_params->max_band_decorr * hDirAC->num_outputs_diff ); @@ -382,8 +418,7 @@ void ivas_dirac_dec_output_synthesis_init( { set_zero( h_dirac_output_synthesis_state->proto_power_smooth_prev, hDirAC->num_freq_bands * hDirAC->num_protos_dir ); } - - set_zero( h_dirac_output_synthesis_state->gains_dir_prev, hDirAC->num_freq_bands * hDirAC->num_outputs_dir ); + set_zero( h_dirac_output_synthesis_state->gains_dir_prev, size ); if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { @@ -511,13 +546,27 @@ void ivas_dirac_dec_output_synthesis_close( *------------------------------------------------------------------------*/ void ivas_dirac_dec_output_synthesis_process_slot( - const float *reference_power, /* i : Estimated power */ - const float *onset, /* i : onset filter */ - DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ + const float *reference_power, /* i : Estimated power */ + const float *onset, /* i : onset filter */ +#ifdef JBM_TSM_ON_TCS + const int16_t *azimuth, + const int16_t *elevation, + const float *diffuseness, +#endif + DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t sh_rot_max_order, +#endif const float *p_Rmat, /* i : rotation matrix */ const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ const int16_t nchan_transport /* i : number of transport channels*/ +#if defined( JBM_TSM_ON_TCS ) + , + const int16_t md_idx +#endif + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { int16_t num_freq_bands, num_channels_dir; @@ -525,11 +574,15 @@ void ivas_dirac_dec_output_synthesis_process_slot( int16_t ch_idx; float aux_buf[CLDFB_NO_CHANNELS_MAX]; int16_t diff_start_band; +#ifndef JBM_TSM_ON_TCS const float *diffuseness; +#endif DIRAC_OUTPUT_SYNTHESIS_PARAMS *h_dirac_output_synthesis_params; DIRAC_OUTPUT_SYNTHESIS_STATE *h_dirac_output_synthesis_state; +#ifndef JBM_TSM_ON_TCS diffuseness = hDirAC->diffuseness_vector[hDirAC->dirac_read_idx]; +#endif h_dirac_output_synthesis_params = &( hDirAC->h_output_synthesis_psd_params ); h_dirac_output_synthesis_state = &( hDirAC->h_output_synthesis_psd_state ); @@ -550,112 +603,195 @@ void ivas_dirac_dec_output_synthesis_process_slot( num_channels_dir = hOutSetup.nchan_out_woLFE; } - if ( hDirAC->hConfig->dec_param_estim == TRUE ) + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD && hodirac_flag ) { - /* compute direct responses */ ivas_dirac_dec_compute_directional_responses( hDirAC, hVBAPdata, NULL, +#ifdef JBM_TSM_ON_TCS + azimuth, + elevation, + md_idx, +#endif NULL, 2, - p_Rmat ); + p_Rmat, + hodirac_flag ); + } + if ( hDirAC->hConfig->dec_param_estim == FALSE && hodirac_flag ) + { if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { +#ifdef JBM_TSM_ON_TCS + v_multc( hDirAC->energy_ratio1[md_idx], -1.f, aux_buf, num_freq_bands ); + v_addc( aux_buf, 1.f, aux_buf, num_freq_bands ); + mvr2r( hDirAC->energy_ratio1[md_idx], + h_dirac_output_synthesis_state->direct_power_factor, + num_freq_bands ); + mvr2r( aux_buf, + h_dirac_output_synthesis_state->diffuse_power_factor, + num_freq_bands ); + + v_multc( hDirAC->energy_ratio2[md_idx], -1.f, aux_buf, num_freq_bands ); + v_addc( aux_buf, 1.f, aux_buf, num_freq_bands ); + mvr2r( hDirAC->energy_ratio2[md_idx], + &h_dirac_output_synthesis_state->direct_power_factor[hDirAC->num_freq_bands], + num_freq_bands ); + mvr2r( aux_buf, + &h_dirac_output_synthesis_state->diffuse_power_factor[hDirAC->num_freq_bands], + num_freq_bands ); +#else + v_multc( hDirAC->energy_ratio1[hDirAC->dirac_read_idx], -1.f, aux_buf, num_freq_bands ); + v_addc( aux_buf, 1.f, aux_buf, num_freq_bands ); + mvr2r( hDirAC->energy_ratio1[hDirAC->dirac_read_idx], + h_dirac_output_synthesis_state->direct_power_factor, + num_freq_bands ); + mvr2r( aux_buf, + h_dirac_output_synthesis_state->diffuse_power_factor, + num_freq_bands ); + + v_multc( hDirAC->energy_ratio2[hDirAC->dirac_read_idx], -1.f, aux_buf, num_freq_bands ); + v_addc( aux_buf, 1.f, aux_buf, num_freq_bands ); + mvr2r( hDirAC->energy_ratio2[hDirAC->dirac_read_idx], + &h_dirac_output_synthesis_state->direct_power_factor[hDirAC->num_freq_bands], + num_freq_bands ); + mvr2r( aux_buf, + &h_dirac_output_synthesis_state->diffuse_power_factor[hDirAC->num_freq_bands], + num_freq_bands ); +#endif + } + else + { +#ifdef JBM_TSM_ON_TCS ivas_dirac_dec_compute_gain_factors( num_freq_bands, - diffuseness, + hDirAC->diffuseness_vector[md_idx], h_dirac_output_synthesis_params->max_band_decorr, h_dirac_output_synthesis_state->direct_power_factor, h_dirac_output_synthesis_state->diffuse_power_factor ); +#else + ivas_dirac_dec_compute_gain_factors( num_freq_bands, + hDirAC->diffuseness_vector[hDirAC->dirac_read_idx], + h_dirac_output_synthesis_params->max_band_decorr, + h_dirac_output_synthesis_state->direct_power_factor, + h_dirac_output_synthesis_state->diffuse_power_factor ); +#endif + } + } + else // ( hDirAC->hConfig->dec_param_estim == TRUE ) + if ( hDirAC->hConfig->dec_param_estim == TRUE ) + { - v_multc( h_dirac_output_synthesis_state->direct_power_factor, - 0.25f, - h_dirac_output_synthesis_state->direct_power_factor, - num_freq_bands ); - v_multc( h_dirac_output_synthesis_state->diffuse_power_factor, - 0.25f, - h_dirac_output_synthesis_state->diffuse_power_factor, - num_freq_bands ); - + /* compute direct responses */ +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec_compute_directional_responses( hDirAC, + hVBAPdata, + NULL, + azimuth, + elevation, + md_idx, + NULL, + sh_rot_max_order, + p_Rmat, + hodirac_flag ); +#endif - /*Direct gain*/ - for ( ch_idx = 0; ch_idx < min( 4, nchan_transport ); ch_idx++ ) + if ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { - int16_t k; - if ( ch_idx != 0 ) - { - float a, b, c; + ivas_dirac_dec_compute_gain_factors( num_freq_bands, + diffuseness, + h_dirac_output_synthesis_params->max_band_decorr, + h_dirac_output_synthesis_state->direct_power_factor, + h_dirac_output_synthesis_state->diffuse_power_factor ); + + + v_multc( h_dirac_output_synthesis_state->direct_power_factor, + 0.25f, + h_dirac_output_synthesis_state->direct_power_factor, + num_freq_bands ); + v_multc( h_dirac_output_synthesis_state->diffuse_power_factor, + 0.25f, + h_dirac_output_synthesis_state->diffuse_power_factor, + num_freq_bands ); - /*Directonal sound gain nrg compensation*/ - for ( k = 0; k < num_freq_bands_diff; k++ ) + /*Direct gain*/ + for ( ch_idx = 0; ch_idx < min( 4, nchan_transport ); ch_idx++ ) + { + int16_t k; + if ( ch_idx != 0 ) { - a = h_dirac_output_synthesis_state->direct_responses[ch_idx * num_freq_bands + k]; - b = reference_power[k + num_freq_bands] / ( reference_power[k + ( ch_idx + 1 ) * num_freq_bands] + EPSILON ); - c = 1.f + ( 1.f / 6.f ) * ( h_dirac_output_synthesis_params->diffuse_compensation_factor_decorr - 1.f ); /*Diffuseness modellling nrg compensation*/ - h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( diffuseness[k] * c + ( ( 1.f - diffuseness[k] ) * a * a * b ) ); + float a, b, c; + + /*Directonal sound gain nrg compensation*/ + for ( k = 0; k < num_freq_bands_diff; k++ ) + { + a = h_dirac_output_synthesis_state->direct_responses[ch_idx * num_freq_bands + k]; + b = reference_power[k + num_freq_bands] / ( reference_power[k + ( ch_idx + 1 ) * num_freq_bands] + EPSILON ); + c = 1.f + ( 1.f / 6.f ) * ( h_dirac_output_synthesis_params->diffuse_compensation_factor_decorr - 1.f ); /*Diffuseness modellling nrg compensation*/ + h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( diffuseness[k] * c + ( ( 1.f - diffuseness[k] ) * a * a * b ) ); + } + for ( ; k < num_freq_bands; k++ ) + { + a = h_dirac_output_synthesis_state->direct_responses[ch_idx * num_freq_bands + k]; + b = reference_power[k + num_freq_bands] / ( reference_power[k + ( ch_idx + 1 ) * num_freq_bands] + EPSILON ); + c = 1.f + ( 1.f / 6.f ) * ( h_dirac_output_synthesis_params->diffuse_compensation_factor - 1.f ); /*Diffuseness modellling nrg compensation*/ + h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( diffuseness[k] * c + ( ( 1.f - diffuseness[k] ) * a * a * b ) ); + } } - for ( ; k < num_freq_bands; k++ ) + else { - a = h_dirac_output_synthesis_state->direct_responses[ch_idx * num_freq_bands + k]; - b = reference_power[k + num_freq_bands] / ( reference_power[k + ( ch_idx + 1 ) * num_freq_bands] + EPSILON ); - c = 1.f + ( 1.f / 6.f ) * ( h_dirac_output_synthesis_params->diffuse_compensation_factor - 1.f ); /*Diffuseness modellling nrg compensation*/ - h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( diffuseness[k] * c + ( ( 1.f - diffuseness[k] ) * a * a * b ) ); + /*Diffuseness modellling nrg compensation*/ + for ( k = 0; k < num_freq_bands_diff; k++ ) + { + h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( 1.0f + diffuseness[k] * 0.5f * ( h_dirac_output_synthesis_params->diffuse_compensation_factor_decorr - 1.f ) ); + } + for ( ; k < num_freq_bands; k++ ) + { + h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( 1.0f + diffuseness[k] * 0.5f * ( h_dirac_output_synthesis_params->diffuse_compensation_factor - 1.f ) ); + } } } - else + + /*Directional gain (panning)*/ + for ( ch_idx = min( 4, nchan_transport ); ch_idx < num_channels_dir; ch_idx++ ) { - /*Diffuseness modellling nrg compensation*/ - for ( k = 0; k < num_freq_bands_diff; k++ ) - { - h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( 1.0f + diffuseness[k] * 0.5f * ( h_dirac_output_synthesis_params->diffuse_compensation_factor_decorr - 1.f ) ); - } - for ( ; k < num_freq_bands; k++ ) - { - h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands + k] += 0.25f * sqrtf( 1.0f + diffuseness[k] * 0.5f * ( h_dirac_output_synthesis_params->diffuse_compensation_factor - 1.f ) ); - } + v_mult( h_dirac_output_synthesis_state->direct_power_factor, + &h_dirac_output_synthesis_state->direct_responses[ch_idx * num_freq_bands], + aux_buf, + num_freq_bands ); + + v_add( aux_buf, + &h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands], + &h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands], + num_freq_bands ); } - } - /*Directional gain (panning)*/ - for ( ch_idx = min( 4, nchan_transport ); ch_idx < num_channels_dir; ch_idx++ ) - { - v_mult( h_dirac_output_synthesis_state->direct_power_factor, - &h_dirac_output_synthesis_state->direct_responses[ch_idx * num_freq_bands], - aux_buf, - num_freq_bands ); - - v_add( aux_buf, - &h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands], - &h_dirac_output_synthesis_state->cy_cross_dir_smooth[ch_idx * num_freq_bands], - num_freq_bands ); - } - /*Diffuse gain*/ - for ( ch_idx = min( 4, nchan_transport ); ch_idx < num_channels_diff; ch_idx++ ) + /*Diffuse gain*/ + for ( ch_idx = min( 4, nchan_transport ); ch_idx < num_channels_diff; ch_idx++ ) + { + v_multc( h_dirac_output_synthesis_state->diffuse_power_factor, + hDirAC->diffuse_response_function[ch_idx], + aux_buf, + num_freq_bands_diff ); + + v_add( aux_buf, + &h_dirac_output_synthesis_state->cy_auto_diff_smooth[ch_idx * num_freq_bands_diff], + &h_dirac_output_synthesis_state->cy_auto_diff_smooth[ch_idx * num_freq_bands_diff], + num_freq_bands_diff ); + } + + return; + } + else { - v_multc( h_dirac_output_synthesis_state->diffuse_power_factor, - hDirAC->diffuse_response_function[ch_idx], - aux_buf, - num_freq_bands_diff ); - - v_add( aux_buf, - &h_dirac_output_synthesis_state->cy_auto_diff_smooth[ch_idx * num_freq_bands_diff], - &h_dirac_output_synthesis_state->cy_auto_diff_smooth[ch_idx * num_freq_bands_diff], - num_freq_bands_diff ); + /* compute reference and diffuse power factor for this frame */ + ivas_dirac_dec_compute_power_factors( num_freq_bands, + diffuseness, + h_dirac_output_synthesis_params->max_band_decorr, + h_dirac_output_synthesis_state->direct_power_factor, + h_dirac_output_synthesis_state->diffuse_power_factor ); } - - return; } - else - { - /* compute reference and diffuse power factor for this frame */ - - ivas_dirac_dec_compute_power_factors( num_freq_bands, - diffuseness, - h_dirac_output_synthesis_params->max_band_decorr, - h_dirac_output_synthesis_state->direct_power_factor, - h_dirac_output_synthesis_state->diffuse_power_factor ); - } - } diff_start_band = 0; if ( h_dirac_output_synthesis_params->use_onset_filters ) @@ -695,7 +831,15 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const int16_t nchan_transport, /* i : number of transport channels */ - const float *onset_filter ) +#ifdef JBM_TSM_ON_TCS + const int16_t nbslots, /* i : number of slots to process */ +#endif + const float *onset_filter, +#ifdef JBM_TSM_ON_TCS + const int16_t md_idx, +#endif + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ +) { int16_t buf_idx, ch_idx, i, l; int16_t num_freq_bands, num_freq_bands_diff; @@ -714,6 +858,9 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( DIRAC_OUTPUT_SYNTHESIS_STATE h_dirac_output_synthesis_state; int16_t nchan_transport_foa; int16_t ch_idx_diff; + float aux_buf[CLDFB_NO_CHANNELS_MAX]; + float ratio[DIRAC_HO_NUMSECTORS * CLDFB_NO_CHANNELS_MAX]; + const float *diffuseness; /* collect some often used parameters */ h_dirac_output_synthesis_params = hDirAC->h_output_synthesis_psd_params; @@ -727,11 +874,70 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( num_channels_diff = hDirAC->num_outputs_diff; nchan_transport_foa = min( 4, nchan_transport ); +#ifdef JBM_TSM_ON_TCS + diffuseness = hDirAC->diffuseness_vector[md_idx]; +#else + diffuseness = hDirAC->diffuseness_vector[hDirAC->dirac_read_idx]; +#endif + /*-----------------------------------------------------------------* * comput target Gains *-----------------------------------------------------------------*/ - if ( hDirAC->hConfig->dec_param_estim == FALSE ) + if ( hodirac_flag ) + { + assert( hDirAC->hConfig->dec_param_estim == FALSE ); + /*Direct gain*/ + for ( ch_idx = 0; ch_idx < nchan_transport_foa; ch_idx++ ) + { + v_multc( diffuseness, + 1.f, + &h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands], + num_freq_bands ); + v_multc( &h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands], + h_dirac_output_synthesis_params.diffuse_compensation_factor - 1.f, + &h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands], + num_freq_bands ); + + for ( l = 0; l < num_freq_bands; l++ ) + { + h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands + l] = sqrtf( 1.f + h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands + l] ); + } + } + + /*Directional gain*/ + for ( ch_idx = nchan_transport_foa; ch_idx < num_channels_dir; ch_idx++ ) + { + for ( l = 0; l < num_freq_bands; l++ ) + { + aux_buf[l] = 1.f - diffuseness[l]; + ratio[l] = 1.f - h_dirac_output_synthesis_state.direct_power_factor[hDirAC->num_freq_bands + l]; + ratio[l + num_freq_bands] = 1.f - ratio[l]; + } + + v_mult( aux_buf, ratio, ratio, num_freq_bands ); + v_mult( aux_buf, &ratio[num_freq_bands], &ratio[num_freq_bands], num_freq_bands ); + + v_mult( ratio, + &h_dirac_output_synthesis_state.direct_responses[ch_idx * num_freq_bands], + &h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands], + num_freq_bands ); + v_mult( &ratio[num_freq_bands], + &h_dirac_output_synthesis_state.direct_responses[ch_idx * num_freq_bands + num_freq_bands * num_channels_dir], + &h_dirac_output_synthesis_state.cy_cross_dir_smooth[ch_idx * num_freq_bands + num_freq_bands * num_channels_dir], + num_freq_bands ); + } + + /*Diffuse gain*/ + for ( ch_idx = nchan_transport_foa; ch_idx < num_channels_diff; ch_idx++ ) + { + v_multc( h_dirac_output_synthesis_state.diffuse_power_factor, + hDirAC->diffuse_response_function[ch_idx], + &h_dirac_output_synthesis_state.cy_auto_diff_smooth[ch_idx * num_freq_bands_diff], + num_freq_bands_diff ); + } + } + else if ( hDirAC->hConfig->dec_param_estim == FALSE ) { /*Direct gain*/ for ( ch_idx = 0; ch_idx < nchan_transport_foa; ch_idx++ ) @@ -777,17 +983,35 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( p_cy_cross_dir_smooth = h_dirac_output_synthesis_state.cy_cross_dir_smooth; p_gains_dir = h_dirac_output_synthesis_state.cy_cross_dir_smooth_prev; - /*Direct gains*/ - for ( ch_idx = 0; ch_idx < nchan_transport_foa; ch_idx++ ) + /* Direct gains */ + if ( hodirac_flag ) { - for ( l = 0; l < num_freq_bands; l++ ) + for ( ch_idx = 0; ch_idx < nchan_transport_foa; ch_idx++ ) { - g1 = 0.3679f + onset_filter[l] * ( 0.1175f - 0.3679f ); - g2 = ( 1.f - g1 ) * *( p_gains_dir ); - g2 += g1 * ( *( p_cy_cross_dir_smooth++ ) ); - g2 = max( g2, 0.85f ); - g2 = min( g2, 1.15f ); - *( p_gains_dir++ ) = g2; + for ( l = 0; l < num_freq_bands; l++ ) + { + g1 = 0.3679f + onset_filter[l] * ( 0.1175f - 0.3679f ); + g2 = ( 1.f - g1 ) * *( p_gains_dir ); + g2 += g1 * ( *( p_cy_cross_dir_smooth++ ) ); + g2 = max( g2, 0.99f ); + g2 = min( g2, 2.0f ); + *( p_gains_dir++ ) = g2; + } + } + } + else + { + for ( ch_idx = 0; ch_idx < nchan_transport_foa; ch_idx++ ) + { + for ( l = 0; l < num_freq_bands; l++ ) + { + g1 = 0.3679f + onset_filter[l] * ( 0.1175f - 0.3679f ); + g2 = ( 1.f - g1 ) * *( p_gains_dir ); + g2 += g1 * ( *( p_cy_cross_dir_smooth++ ) ); + g2 = max( g2, 0.85f ); + g2 = min( g2, 1.15f ); + *( p_gains_dir++ ) = g2; + } } } @@ -805,6 +1029,36 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( } } + if ( hodirac_flag ) + { + p_cy_cross_dir_smooth = h_dirac_output_synthesis_state.cy_cross_dir_smooth + num_freq_bands * num_channels_dir; + p_gains_dir = h_dirac_output_synthesis_state.cy_cross_dir_smooth_prev + num_freq_bands * num_channels_dir; + + /*Direct gains*/ + for ( ch_idx = 0; ch_idx < nchan_transport_foa; ch_idx++ ) + { + for ( l = 0; l < num_freq_bands; l++ ) + { + p_cy_cross_dir_smooth++; + p_gains_dir++; + } + } + + /*Directional gains*/ + for ( ch_idx = nchan_transport_foa; ch_idx < num_channels_dir; ch_idx++ ) + { + for ( l = 0; l < num_freq_bands; l++ ) + { + g1 = 0.3679f + onset_filter[l] * ( 0.1175f - 0.3679f ); + g2 = ( 1.f - g1 ) * *( p_gains_dir ); + g2 += g1 * ( *( p_cy_cross_dir_smooth++ ) ); + g2 = max( g2, -DIRAC_GAIN_LIMIT ); + g2 = min( g2, DIRAC_GAIN_LIMIT ); + *( p_gains_dir++ ) = g2; + } + } + } + /*Diffuse gains*/ p_cy_auto_diff_smooth = h_dirac_output_synthesis_state.cy_auto_diff_smooth + nchan_transport_foa * num_freq_bands_diff; p_gains_diff = h_dirac_output_synthesis_state.cy_auto_diff_smooth_prev + nchan_transport_foa * num_freq_bands_diff; @@ -825,7 +1079,11 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( * gain interpolation and output streams *-----------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS + for ( buf_idx = 0; buf_idx < nbslots; ++buf_idx ) +#else for ( buf_idx = 0; buf_idx < hDirAC->subframe_nbslots; ++buf_idx ) +#endif { g1 = h_dirac_output_synthesis_params.interpolator[buf_idx]; g2 = 1.f - g1; @@ -847,26 +1105,74 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( /*Directional stream*/ for ( ch_idx = nchan_transport_foa; ch_idx < num_channels_dir; ch_idx++ ) { - p_proto = h_dirac_output_synthesis_state.proto_direct_buffer_f + - buf_idx * 2 * num_freq_bands * num_protos_dir + - proto_direct_index[ch_idx] * 2 * num_freq_bands; - if ( proto_direct_index[ch_idx] == 0 ) + if ( hodirac_flag ) { - for ( l = 0; l < num_freq_bands; l++ ) + if ( proto_direct_index[ch_idx] == 0 ) { - g = g1 * ( *( p_gains_dir++ ) ) + g2 * ( *( p_gains_dir_prev++ ) ); - output_real[l * num_channels_dir + ch_idx] = g * ( *( p_proto++ ) ); - output_imag[l * num_channels_dir + ch_idx] = g * ( *( p_proto++ ) ); + float *p_proto2; + float gs1, gs2; + p_proto = h_dirac_output_synthesis_state.proto_direct_buffer_f + + buf_idx * 2 * num_freq_bands * num_protos_dir + + proto_direct_index[0] * 2 * num_freq_bands; + p_proto2 = h_dirac_output_synthesis_state.proto_direct_buffer_f + + buf_idx * 2 * num_freq_bands * num_protos_dir + + proto_direct_index[1] * 2 * num_freq_bands; + for ( l = 0; l < num_freq_bands; l++ ) + { + gs1 = g1 * ( *( p_gains_dir ) ) + g2 * ( *( p_gains_dir_prev ) ); + gs2 = g1 * ( *( p_gains_dir + num_freq_bands * num_channels_dir ) ) + g2 * ( *( p_gains_dir_prev + num_freq_bands * num_channels_dir ) ); + p_gains_dir++; + p_gains_dir_prev++; + + output_real[l * num_channels_dir + ch_idx] = 0.5f * gs1 * ( 1.772454e+00f * ( *p_proto ) + 1.023327e+00f * ( *p_proto2 ) ) + // s1 + 0.5f * gs2 * ( 1.772454e+00f * ( *p_proto ) - 1.023327e+00f * ( *p_proto2 ) ); // s2 + p_proto++; + p_proto2++; + output_imag[l * num_channels_dir + ch_idx] = 0.5f * gs1 * ( 1.772454e+00f * ( *p_proto ) + 1.023327e+00f * ( *p_proto2 ) ) + + 0.5f * gs2 * ( 1.772454e+00f * ( *p_proto ) - 1.023327e+00f * ( *p_proto2 ) ); + p_proto++; + p_proto2++; + } + } + else + { + p_proto = h_dirac_output_synthesis_state.proto_direct_buffer_f + + buf_idx * 2 * num_freq_bands * num_protos_dir + + proto_direct_index[ch_idx] * 2 * num_freq_bands; + for ( l = 0; l < num_freq_bands; l++ ) + { + p_gains_dir++; + p_gains_dir_prev++; + + + output_real[l * num_channels_dir + ch_idx] = *( p_proto++ ); + output_imag[l * num_channels_dir + ch_idx] = *( p_proto++ ); + } } } else { - for ( l = 0; l < num_freq_bands; l++ ) + p_proto = h_dirac_output_synthesis_state.proto_direct_buffer_f + + buf_idx * 2 * num_freq_bands * num_protos_dir + + proto_direct_index[ch_idx] * 2 * num_freq_bands; + if ( proto_direct_index[ch_idx] == 0 ) + { + for ( l = 0; l < num_freq_bands; l++ ) + { + g = g1 * ( *( p_gains_dir++ ) ) + g2 * ( *( p_gains_dir_prev++ ) ); + output_real[l * num_channels_dir + ch_idx] = g * ( *( p_proto++ ) ); + output_imag[l * num_channels_dir + ch_idx] = g * ( *( p_proto++ ) ); + } + } + else { - p_gains_dir++; - p_gains_dir_prev++; - output_real[l * num_channels_dir + ch_idx] = *( p_proto++ ); - output_imag[l * num_channels_dir + ch_idx] = *( p_proto++ ); + for ( l = 0; l < num_freq_bands; l++ ) + { + p_gains_dir++; + p_gains_dir_prev++; + output_real[l * num_channels_dir + ch_idx] = *( p_proto++ ); + output_imag[l * num_channels_dir + ch_idx] = *( p_proto++ ); + } } } } @@ -884,8 +1190,8 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( for ( l = 0; l < num_freq_bands_diff; l++ ) { g = g1 * ( *( p_gains_diff++ ) ) + g2 * ( *( p_gains_diff_prev++ ) ); - output_real[l * num_channels_dir + sba_map_tc[ch_idx]] += g * ( *( p_proto++ ) ); /* maps ch_idx 5 to 8 */ - output_imag[l * num_channels_dir + sba_map_tc[ch_idx]] += g * ( *( p_proto++ ) ); + output_real[l * num_channels_dir + hDirAC->sba_map_tc[ch_idx]] += g * ( *( p_proto++ ) ); /* maps ch_idx 5 to 8 */ + output_imag[l * num_channels_dir + hDirAC->sba_map_tc[ch_idx]] += g * ( *( p_proto++ ) ); } } else @@ -949,11 +1255,27 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd( *-----------------------------------------------------------------*/ /* store estimates for next synthesis block */ - mvr2r( h_dirac_output_synthesis_state.cy_cross_dir_smooth_prev, h_dirac_output_synthesis_state.gains_dir_prev, num_freq_bands * num_channels_dir ); + if ( hodirac_flag ) + { + mvr2r( h_dirac_output_synthesis_state.cy_cross_dir_smooth_prev, h_dirac_output_synthesis_state.gains_dir_prev, num_freq_bands * num_channels_dir * DIRAC_HO_NUMSECTORS ); + } + else + { + mvr2r( h_dirac_output_synthesis_state.cy_cross_dir_smooth_prev, h_dirac_output_synthesis_state.gains_dir_prev, num_freq_bands * num_channels_dir ); + } + mvr2r( h_dirac_output_synthesis_state.cy_auto_diff_smooth_prev, h_dirac_output_synthesis_state.gains_diff_prev, num_freq_bands_diff * num_channels_diff ); /* reset values */ - set_zero( h_dirac_output_synthesis_state.cy_cross_dir_smooth, num_freq_bands * num_channels_dir ); + if ( hodirac_flag ) + { + set_zero( h_dirac_output_synthesis_state.cy_cross_dir_smooth, num_freq_bands * num_channels_dir * DIRAC_HO_NUMSECTORS ); + } + else + { + set_zero( h_dirac_output_synthesis_state.cy_cross_dir_smooth, num_freq_bands * num_channels_dir ); + } + set_zero( h_dirac_output_synthesis_state.cy_auto_diff_smooth, num_freq_bands_diff * num_channels_diff ); return; @@ -970,10 +1292,15 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ +#ifdef JBM_TSM_ON_TCS + const int16_t nbslots, /* i : number of slots to process */ + const int16_t diff_md_idx, /* i : md slot idx of diffuseness to use */ +#endif float *reference_power_smooth, float qualityBasedSmFactor ) { - int16_t buf_idx, num_freq_bands, diff_start_band; + int16_t buf_idx, num_freq_bands; + int16_t diff_start_band; int16_t k, l; int16_t nchan_out_woLFE; float *p_power_smooth_prev, *p_power_diff_smooth_prev; @@ -1015,7 +1342,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( /*-----------------------------------------------------------------* * compute target PSDs *-----------------------------------------------------------------*/ - if ( hDirAC->hConfig->enc_param_start_band == 0 ) { diff_start_band = h_dirac_output_synthesis_params->use_onset_filters == 1 ? h_dirac_output_synthesis_params->max_band_decorr : 0; @@ -1043,7 +1369,6 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( h_dirac_output_synthesis_state->diffuse_responses_square, h_dirac_output_synthesis_state->cy_auto_diff_smooth ); } - /*-----------------------------------------------------------------* * compute variables for stereo transport signal type detection *-----------------------------------------------------------------*/ @@ -1096,7 +1421,14 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( indexFast = min( l, alphaMaxBinFast ); /* Estimate the smoothness of the directions based on the diffuseness parameter */ + /* TODO: check this, seems buggy in the case of parame estim on the decoder side, + because the pointer here points already to the following subframe, ist this intended?*/ +#ifdef JBM_TSM_ON_TCS + /* Workaround for BE */ + instDirectionSmoothness = 1.0f - hDirAC->diffuseness_vector[diff_md_idx][l]; /* Currently, all subframes have same energy ratio value. */ +#else instDirectionSmoothness = 1.0f - hDirAC->diffuseness_vector[hDirAC->dirac_read_idx][l]; /* Currently, all subframes have same energy ratio value. */ +#endif instDirectionSmoothness = min( max( instDirectionSmoothness, 0.0f ), 1.0f ); /* Average the direction smoothness parameter over time */ @@ -1240,8 +1572,11 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls( /*-----------------------------------------------------------------* * gain interpolation and output streams *-----------------------------------------------------------------*/ - +#ifdef JBM_TSM_ON_TCS + for ( buf_idx = 0; buf_idx < nbslots; ++buf_idx ) +#else for ( buf_idx = 0; buf_idx < hDirAC->subframe_nbslots; ++buf_idx ) +#endif { g1 = h_dirac_output_synthesis_params->interpolator[buf_idx]; g2 = 1.f - g1; @@ -1483,9 +1818,16 @@ void ivas_dirac_dec_compute_directional_responses( DIRAC_DEC_HANDLE hDirAC, /* i/o: DirAC handle */ const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ const MASA_DECODER_HANDLE hMasa, /* i : MASA decoder structure */ +#ifdef JBM_TSM_ON_TCS + const int16_t *azimuth, + const int16_t *elevation, + const int16_t md_idx, +#endif const float *surCohRatio, const int16_t shd_rot_max_order, /* i : split-order rotation method */ const float *p_Rmat /* i : rotation matrix */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { int16_t k, l; @@ -1494,7 +1836,9 @@ void ivas_dirac_dec_compute_directional_responses( float direct_response_ls[MAX_OUTPUT_CHANNELS]; float direct_response_square[MAX_OUTPUT_CHANNELS]; float *direct_response; +#ifndef JBM_TSM_ON_TCS const int16_t *azimuth, *elevation; +#endif const int16_t *azimuth2, *elevation2; float direct_response_dir2[MAX_OUTPUT_CHANNELS]; float directRatio[MASA_MAXIMUM_DIRECTIONS]; @@ -1515,6 +1859,13 @@ void ivas_dirac_dec_compute_directional_responses( } num_channels_dir = hDirAC->num_outputs_dir; +#ifdef JBM_TSM_ON_TCS + if ( hDirAC->numSimultaneousDirections == 2 ) + { + azimuth2 = hDirAC->azimuth2[md_idx]; + elevation2 = hDirAC->elevation2[md_idx]; + } +#else azimuth = hDirAC->azimuth[hDirAC->dirac_read_idx]; elevation = hDirAC->elevation[hDirAC->dirac_read_idx]; if ( hDirAC->numSimultaneousDirections == 2 ) @@ -1522,6 +1873,7 @@ void ivas_dirac_dec_compute_directional_responses( azimuth2 = hDirAC->azimuth2[hDirAC->dirac_read_idx]; elevation2 = hDirAC->elevation2[hDirAC->dirac_read_idx]; } +#endif codingBand = -1; assert( num_channels_dir <= MAX_OUTPUT_CHANNELS && "Number of channels is too high" ); @@ -1555,35 +1907,63 @@ void ivas_dirac_dec_compute_directional_responses( if ( hDirAC->panningConf == DIRAC_PANNING_HOA3 ) { set_f( direct_response_hoa, 1.0f, MAX_OUTPUT_CHANNELS ); + set_f( direct_response_dir2, 1.0f, MAX_OUTPUT_CHANNELS ); + if ( p_Rmat != 0 ) { ivas_dirac_dec_get_response_split_order( azimuth[k], elevation[k], direct_response_hoa, shd_rot_max_order, p_Rmat ); + + if ( hodirac_flag ) + { + ivas_dirac_dec_get_response_split_order( azimuth2[k], elevation2[k], direct_response_dir2, shd_rot_max_order, p_Rmat ); + } } else { ivas_dirac_dec_get_response( azimuth[k], elevation[k], direct_response_hoa, hDirAC->hOutSetup.ambisonics_order ); + + if ( hodirac_flag ) + { + ivas_dirac_dec_get_response( azimuth2[k], elevation2[k], direct_response_dir2, hDirAC->hOutSetup.ambisonics_order ); + } } if ( hMasa == NULL && hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) { mvr2r_inc( direct_response_hoa, 1, &hDirAC->h_output_synthesis_psd_state.direct_responses[k], hDirAC->num_freq_bands, num_channels_dir ); + + if ( hodirac_flag ) + { + mvr2r_inc( direct_response_dir2, 1, &hDirAC->h_output_synthesis_psd_state.direct_responses[k + hDirAC->num_freq_bands * num_channels_dir], hDirAC->num_freq_bands, num_channels_dir ); + } } else if ( ( ( hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) && ( hMasa != NULL ) ) || hDirAC->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD || hDirAC->synthesisConf == DIRAC_SYNTHESIS_MONO ) { /* Synthesize the first direction */ +#ifdef JBM_TSM_ON_TCS + spreadCoherencePanningHoa( azimuth[k], elevation[k], hDirAC->spreadCoherence[md_idx][k], direct_response_hoa, num_channels_dir, hDirAC->hOutSetup.ambisonics_order ); +#else spreadCoherencePanningHoa( azimuth[k], elevation[k], hDirAC->spreadCoherence[hDirAC->dirac_read_idx][k], direct_response_hoa, num_channels_dir, hDirAC->hOutSetup.ambisonics_order ); - +#endif /* Synthesize the second direction and combine the gains */ if ( hDirAC->numSimultaneousDirections == 2 ) { +#ifdef JBM_TSM_ON_TCS + spreadCoherencePanningHoa( azimuth2[k], elevation2[k], hDirAC->spreadCoherence2[md_idx][k], direct_response_dir2, num_channels_dir, hDirAC->hOutSetup.ambisonics_order ); +#else spreadCoherencePanningHoa( azimuth2[k], elevation2[k], hDirAC->spreadCoherence2[hDirAC->dirac_read_idx][k], direct_response_dir2, num_channels_dir, hDirAC->hOutSetup.ambisonics_order ); - +#endif /* Combine gains from the two directions */ +#ifdef JBM_TSM_ON_TCS + totalDirect = hDirAC->energy_ratio1[md_idx][k] + hDirAC->energy_ratio2[md_idx][k] + EPSILON; + directRatio[0] = hDirAC->energy_ratio1[md_idx][k] / totalDirect; + directRatio[1] = hDirAC->energy_ratio2[md_idx][k] / totalDirect; +#else totalDirect = hDirAC->energy_ratio1[hDirAC->dirac_read_idx][k] + hDirAC->energy_ratio2[hDirAC->dirac_read_idx][k] + EPSILON; directRatio[0] = hDirAC->energy_ratio1[hDirAC->dirac_read_idx][k] / totalDirect; directRatio[1] = hDirAC->energy_ratio2[hDirAC->dirac_read_idx][k] / totalDirect; - +#endif for ( l = 0; l < num_channels_dir; l++ ) { direct_response_hoa[l] *= directRatio[0]; @@ -1631,20 +2011,33 @@ void ivas_dirac_dec_compute_directional_responses( else if ( hDirAC->panningConf == DIRAC_PANNING_VBAP ) /*VBAP*/ { /* Synthesize the first direction */ +#ifdef JBM_TSM_ON_TCS + spreadCoherencePanningVbap( azimuth[k], elevation[k], hDirAC->spreadCoherence[md_idx][k], direct_response_ls, num_channels_dir, hVBAPdata ); +#else spreadCoherencePanningVbap( azimuth[k], elevation[k], hDirAC->spreadCoherence[hDirAC->dirac_read_idx][k], direct_response_ls, num_channels_dir, hVBAPdata ); +#endif normalizePanningGains( direct_response_ls, num_channels_dir ); /* Synthesize the second direction and combine the gains */ if ( hDirAC->numSimultaneousDirections == 2 ) { +#ifdef JBM_TSM_ON_TCS + spreadCoherencePanningVbap( azimuth2[k], elevation2[k], hDirAC->spreadCoherence2[md_idx][k], direct_response_dir2, num_channels_dir, hVBAPdata ); +#else spreadCoherencePanningVbap( azimuth2[k], elevation2[k], hDirAC->spreadCoherence2[hDirAC->dirac_read_idx][k], direct_response_dir2, num_channels_dir, hVBAPdata ); - +#endif normalizePanningGains( direct_response_dir2, num_channels_dir ); /* Combine gains from the two directions */ +#ifdef JBM_TSM_ON_TCS + totalDirect = hDirAC->energy_ratio1[md_idx][k] + hDirAC->energy_ratio2[md_idx][k] + EPSILON; + directRatio[0] = hDirAC->energy_ratio1[md_idx][k] / totalDirect; + directRatio[1] = hDirAC->energy_ratio2[md_idx][k] / totalDirect; +#else totalDirect = hDirAC->energy_ratio1[hDirAC->dirac_read_idx][k] + hDirAC->energy_ratio2[hDirAC->dirac_read_idx][k] + EPSILON; directRatio[0] = hDirAC->energy_ratio1[hDirAC->dirac_read_idx][k] / totalDirect; directRatio[1] = hDirAC->energy_ratio2[hDirAC->dirac_read_idx][k] / totalDirect; +#endif for ( l = 0; l < num_channels_dir; l++ ) { direct_response_ls[l] *= directRatio[0]; diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index a58220a9b7247078ac39cdba10924f39e77646df..98ddbe5ec8e1b18ef076c4a66ff63e48a3c7579c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -63,6 +63,11 @@ static ivas_error doSanityChecks_IVAS( Decoder_Struct *st_ivas ); ivas_error ivas_dec_setup( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ + int16_t *data /* o : flushed PCM samples */ +#endif ) { int16_t k, idx, num_bits_read; @@ -112,10 +117,17 @@ ivas_error ivas_dec_setup( st_ivas->nchan_ism = nchan_ism; +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + { + return error; + } +#else if ( ( error = ivas_ism_dec_config( st_ivas, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) { return error; } +#endif } else if ( st_ivas->ivas_format == SBA_FORMAT ) { @@ -189,7 +201,11 @@ ivas_error ivas_dec_setup( num_bits_read += MC_LS_SETUP_BITS; /* select MC format mode; reconfigure the MC format decoder */ +#ifdef JBM_TSM_ON_TCS + ivas_mc_dec_config( st_ivas, idx, nSamplesRendered, data ); +#else ivas_mc_dec_config( st_ivas, idx ); +#endif } /*-------------------------------------------------------------------* @@ -369,7 +385,6 @@ static ivas_error ivas_read_format( st_ivas->ivas_format = MC_FORMAT; break; case 2: -#ifdef COMBINED_FORMAT_SIGNALING st_ivas->ivas_format = ISM_FORMAT; if ( ivas_total_brate >= IVAS_24k4 ) @@ -383,9 +398,6 @@ static ivas_error ivas_read_format( ( *num_bits_read )++; } -#else - st_ivas->ivas_format = ISM_FORMAT; -#endif break; case 3: @@ -422,6 +434,7 @@ static ivas_error ivas_read_format( break; case SID_ISM: st_ivas->ivas_format = ISM_FORMAT; + break; case SID_MULTICHANNEL: st_ivas->ivas_format = MC_FORMAT; @@ -750,6 +763,12 @@ ivas_error ivas_init_decoder( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { +#ifdef FIX_439_OTR_PARAMS + if ( ( error = ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, st_ivas->hDecoderConfig->orientation_tracking ) ) != IVAS_ERR_OK ) + { + return error; + } +#else if ( st_ivas->hDecoderConfig->orientation_tracking == IVAS_ORIENT_TRK_NONE ) { if ( ( error = ivas_orient_trk_SetTrackingType( st_ivas->hHeadTrackData->OrientationTracker, OTR_TRACKING_NONE ) ) != IVAS_ERR_OK ) @@ -789,6 +808,7 @@ ivas_error ivas_init_decoder( { return IVAS_ERR_WRONG_MODE; } +#endif } /*-----------------------------------------------------------------* @@ -876,9 +896,7 @@ ivas_error ivas_init_decoder( st_ivas->hSCE[sce_id]->hCoreCoder[0]->is_ism_format = 1; } -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT st_ivas->hISMDTX.sce_id_dtx = 0; -#endif if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { @@ -917,7 +935,16 @@ ivas_error ivas_init_decoder( } } - if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_dirac_sba_config( + st_ivas->hQMetaData, + &st_ivas->nchan_transport, + &st_ivas->nSCE, + &st_ivas->nCPE, + &st_ivas->element_mode_init, + ivas_total_brate, + st_ivas->sba_analysis_order, + st_ivas->sba_mode, + ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) ) != IVAS_ERR_OK ) { return error; } @@ -940,6 +967,13 @@ ivas_error ivas_init_decoder( int16_t band_grouping[IVAS_MAX_NUM_BANDS + 1]; st_ivas->hSpar->enc_param_start_band = min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); + if ( ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ) + { + st_ivas->hSpar->enc_param_start_band = 0; + + set_c( (int8_t *) st_ivas->hQMetaData->twoDirBands, (int8_t) 1, st_ivas->hQMetaData->q_direction[0].cfg.nbands ); + st_ivas->hQMetaData->numTwoDirBands = (uint8_t) st_ivas->hQMetaData->q_direction[0].cfg.nbands; + } ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ), st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 ); @@ -1049,6 +1083,46 @@ ivas_error ivas_init_decoder( return error; } } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + /* init EFAP for custom LS setup */ + if ( output_config == AUDIO_CONFIG_LS_CUSTOM ) + { + if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hLsSetupCustom->ls_azimuth, st_ivas->hLsSetupCustom->ls_elevation, st_ivas->hLsSetupCustom->num_spk, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + st_ivas->nSCE = 0; + st_ivas->nCPE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS / 2; + st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; + + if ( ( error = ivas_mc_paramupmix_dec_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + st_ivas->element_mode_init = IVAS_CPE_MDCT; + + for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) + { + if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / ( st_ivas->nchan_transport - 1 ) * CPE_CHANNELS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + + for ( n = 0; n < CPE_CHANNELS; n++ ) + { + reset_indices_dec( st_ivas->hCPE[cpe_id]->hCoreCoder[n] ); + } + } + + if ( ( error = create_mct_dec( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { /* init EFAP for custom LS setup */ @@ -1239,6 +1313,7 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) { + if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK ) { return error; @@ -1251,6 +1326,19 @@ ivas_error ivas_init_decoder( return error; } } +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) + { + int16_t granularity; + int16_t n_channels_transport_jbm; + granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); + n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } else if ( st_ivas->renderer_type == RENDERER_MC ) { @@ -1283,11 +1371,25 @@ ivas_error ivas_init_decoder( } st_ivas->binaural_latency_ns = st_ivas->hCrendWrapper->binaural_latency_ns; +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) + { + int16_t granularity; + int16_t n_channels_transport_jbm; + granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); + n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, granularity ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif } if ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_DISC && ( st_ivas->renderer_type == RENDERER_TD_PANNING || + st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || @@ -1302,8 +1404,7 @@ ivas_error ivas_init_decoder( /*-----------------------------------------------------------------* * LFE handles for rendering after rendering to adjust LFE delay to binaural filter delay *-----------------------------------------------------------------*/ - - if ( st_ivas->mc_mode == MC_MODE_MCT ) + if ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { binauralization_delay_ns = st_ivas->binaural_latency_ns; if ( st_ivas->hBinRenderer != NULL ) @@ -1373,9 +1474,32 @@ ivas_error ivas_init_decoder( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Failed to open limiter handle" ); } +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active && st_ivas->hTcBuffer == NULL ) + { + /* no module has yet open the TC buffer, open a default one */ + int16_t n_channels_transport_jbm = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, ivas_jbm_dec_get_tc_buffer_mode( st_ivas ), n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } + if ( st_ivas->hTcBuffer == NULL ) + { + /* we need the handle anyway, but without the buffer*/ + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_NONE, 0, 0, 0, 1 ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif + return error; } +#ifdef JBM_TSM_ON_TCS + +#endif /*------------------------------------------------------------------------- * destroy_core_dec() @@ -1569,6 +1693,7 @@ void ivas_initialize_handles_dec( st_ivas->hMasa = NULL; st_ivas->hQMetaData = NULL; st_ivas->hMCT = NULL; + st_ivas->hMCParamUpmix = NULL; st_ivas->hParamMC = NULL; st_ivas->hLFE = NULL; @@ -1593,6 +1718,10 @@ void ivas_initialize_handles_dec( st_ivas->hLsSetupCustom = NULL; st_ivas->hRenderConfig = NULL; +#ifdef JBM_TSM_ON_TCS + st_ivas->hTcBuffer = NULL; +#endif + return; } @@ -1670,6 +1799,9 @@ void ivas_destroy_dec( /* ISM renderer handle */ if ( st_ivas->hIsmRendererData != NULL ) { +#ifdef JBM_TSM_ON_TCS + free( st_ivas->hIsmRendererData->interpolator ); +#endif free( st_ivas->hIsmRendererData ); st_ivas->hIsmRendererData = NULL; } @@ -1706,6 +1838,9 @@ void ivas_destroy_dec( /* LFE handle */ ivas_lfe_dec_close( &( st_ivas->hLFE ) ); + /* Param-Upmix MC handle */ + ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); + /* Parametric MC handle */ ivas_param_mc_dec_close( &st_ivas->hParamMC ); @@ -1780,6 +1915,10 @@ void ivas_destroy_dec( st_ivas->hDecoderConfig = NULL; } +#ifdef JBM_TSM_ON_TCS + ivas_jbm_dec_tc_buffer_close( &st_ivas->hTcBuffer ); +#endif + /* main IVAS handle */ free( st_ivas ); @@ -1823,6 +1962,7 @@ void ivas_init_dec_get_num_cldfb_instances( *numCldfbAnalyses += 2; } break; + case RENDERER_NON_DIEGETIC_DOWNMIX: case RENDERER_MONO_DOWNMIX: if ( st_ivas->ivas_format == ISM_FORMAT ) { @@ -1950,6 +2090,11 @@ void ivas_init_dec_get_num_cldfb_instances( default: assert( 0 && "Renderer not handled for CLDFB reservation." ); } + if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) + { + *numCldfbAnalyses = max( MC_PARAMUPMIX_MIN_CLDFB, *numCldfbAnalyses ); + *numCldfbSyntheses = max( MC_PARAMUPMIX_MIN_CLDFB, *numCldfbSyntheses ); + } return; } @@ -1984,6 +2129,12 @@ static ivas_error doSanityChecks_IVAS( assert( st_ivas->ivas_format != UNDEFINED_FORMAT && "\n IVAS format undefined" ); assert( st_ivas->ivas_format != MONO_FORMAT && "\n Wrong IVAS format: MONO" ); + /* Verify output configuration compatible with non-diegetic panning */ + if ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan && ( st_ivas->ivas_format != MONO_FORMAT ) && ( st_ivas->transport_config != AUDIO_CONFIG_ISM1 ) ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Error: Non-diegetic panning not supported in this IVAS format" ); + } + /* Verify stereo output configuration */ if ( st_ivas->ivas_format == STEREO_FORMAT ) { @@ -2033,7 +2184,7 @@ static ivas_error doSanityChecks_IVAS( } #ifdef DEBUGGING - if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) + if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && ( st_ivas->mc_mode != MC_MODE_MCT && st_ivas->mc_mode != MC_MODE_PARAMUPMIX ) ) ) ) { return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" ); } diff --git a/lib_dec/ivas_ism_dec.c b/lib_dec/ivas_ism_dec.c index dda939529d0597262156af814db645645614f574..571da52921b7bd2a581a06f08815ff7471c779f0 100644 --- a/lib_dec/ivas_ism_dec.c +++ b/lib_dec/ivas_ism_dec.c @@ -32,6 +32,9 @@ #include #include "options.h" +#ifdef JBM_TSM_ON_TCS +#include "prot.h" +#endif #include "ivas_prot.h" #include "ivas_prot_rend.h" #ifdef DEBUGGING @@ -50,13 +53,26 @@ static ivas_error ivas_ism_bitrate_switching( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nchan_transport_old, /* i : last number of transport channels */ const ISM_MODE last_ism_mode /* i : last ISM mode */ +#ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, + int16_t *data +#endif ) { ivas_error error; int32_t element_brate_tmp[MAX_NUM_OBJECTS]; int16_t nSCE_old, nCPE_old; -#ifdef FIX_416_ISM_BR_SWITCHING int16_t numCldfbAnalyses_old, numCldfbSyntheses_old, ism_mode; + +#ifdef JBM_TSM_ON_TCS + TC_BUFFER_MODE tc_buffer_mode_new; + int16_t tc_nchan_tc_new; + int16_t tc_nchan_allocate_new; + int16_t tc_granularity_new; + AUDIO_CONFIG intern_config_old; + IVAS_OUTPUT_SETUP hIntSetupOld; + RENDERER_TYPE renderer_type_old; #endif error = IVAS_ERR_OK; @@ -64,15 +80,13 @@ static ivas_error ivas_ism_bitrate_switching( nCPE_old = st_ivas->nCPE; nSCE_old = st_ivas->nSCE; -#ifdef FIX_416_ISM_BR_SWITCHING /* we have to temporarily set the ism mode back to the old one, otherwise this can give wrong results*/ ism_mode = st_ivas->ism_mode; st_ivas->ism_mode = last_ism_mode; ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); st_ivas->ism_mode = ism_mode; -#endif - if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->nchan_ism, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) { return error; } @@ -97,6 +111,14 @@ static ivas_error ivas_ism_bitrate_switching( return error; } +#ifdef JBM_TSM_ON_TCS + /* save old IntSetup, might be needed for JBM flushing...*/ + intern_config_old = st_ivas->intern_config; + hIntSetupOld = st_ivas->hIntSetup; + tc_granularity_new = 1; + renderer_type_old = st_ivas->renderer_type; +#endif + /*-----------------------------------------------------------------* * Initialize the needed renderer struct and destroy the unnecessary renderer struct *-----------------------------------------------------------------*/ @@ -109,6 +131,39 @@ static ivas_error ivas_ism_bitrate_switching( ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->hDecoderConfig->output_config ); } +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) + { + /* transfer subframe info from DirAC or ParamMC to central tc buffer */ + if ( last_ism_mode == ISM_MODE_PARAM && st_ivas->hDirAC != NULL && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) ) + { + st_ivas->hTcBuffer->nb_subframes = st_ivas->hDirAC->nb_subframes; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hDirAC->subframes_rendered; + st_ivas->hTcBuffer->num_slots = st_ivas->hDirAC->num_slots; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hDirAC->slots_rendered; + mvs2s( st_ivas->hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + /* JBM: when granularity goes down (e.g. Discrete ISM with TD Obj Renderer -> ParamISM with binaural fastconv + render what still fits in the new granularity */ + tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->hDecoderConfig->output_Fs ); + if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) + { + if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, MC_MODE_NONE, last_ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + { + return error; + } + } + /* JBM: when granularity goes up set samples to discard at the beginning of the frame */ + else if ( tc_granularity_new > st_ivas->hTcBuffer->n_samples_granularity ) + { + if ( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } +#endif + if ( st_ivas->ism_mode != last_ism_mode ) { /* EFAP handle */ @@ -141,6 +196,9 @@ static ivas_error ivas_ism_bitrate_switching( /* close the ISM renderer and reinitialize */ if ( st_ivas->hIsmRendererData != NULL ) { +#ifdef JBM_TSM_ON_TCS + free( st_ivas->hIsmRendererData->interpolator ); +#endif free( st_ivas->hIsmRendererData ); st_ivas->hIsmRendererData = NULL; } @@ -209,6 +267,9 @@ static ivas_error ivas_ism_bitrate_switching( /* Close the ISM renderer */ if ( st_ivas->hIsmRendererData != NULL ) { +#ifdef JBM_TSM_ON_TCS + free( st_ivas->hIsmRendererData->interpolator ); +#endif free( st_ivas->hIsmRendererData ); st_ivas->hIsmRendererData = NULL; } @@ -232,7 +293,6 @@ static ivas_error ivas_ism_bitrate_switching( } } -#ifdef FIX_416_ISM_BR_SWITCHING /*-----------------------------------------------------------------* * CLDFB instances *-----------------------------------------------------------------*/ @@ -241,6 +301,49 @@ static ivas_error ivas_ism_bitrate_switching( { return error; } + +#ifdef JBM_TSM_ON_TCS + /*-----------------------------------------------------------------* + * Reconfigure TC buffer + *-----------------------------------------------------------------*/ + if ( st_ivas->hDecoderConfig->voip_active == 1 ) + { + int16_t tc_nchan_full_new; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + + hTcBuffer = st_ivas->hTcBuffer; + tc_buffer_mode_new = ivas_jbm_dec_get_tc_buffer_mode( st_ivas ); + tc_nchan_tc_new = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + tc_nchan_allocate_new = tc_nchan_tc_new; + tc_nchan_full_new = tc_nchan_tc_new; + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + tc_nchan_allocate_new = 2 * BINAURAL_CHANNELS; + tc_nchan_full_new = tc_nchan_allocate_new; + } + if ( st_ivas->ism_mode == ISM_MODE_PARAM && ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + tc_nchan_full_new = 0; + } + /* reconfigure buffer */ + if ( hTcBuffer->tc_buffer_mode != tc_buffer_mode_new || hTcBuffer->nchan_transport_jbm != tc_nchan_tc_new || + hTcBuffer->nchan_buffer_full != tc_nchan_full_new || hTcBuffer->nchan_transport_internal != tc_nchan_allocate_new ) + { + if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode_new, tc_nchan_tc_new, tc_nchan_allocate_new, tc_nchan_full_new, tc_granularity_new ) ) != IVAS_ERR_OK ) + { + return error; + } + } + /* transfer subframe info from central tc buffer to ParamMC or McMASA (DirAC) */ + if ( st_ivas->hDirAC != NULL ) + { + st_ivas->hDirAC->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hDirAC->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + st_ivas->hDirAC->num_slots = st_ivas->hTcBuffer->num_slots; + st_ivas->hDirAC->slots_rendered = st_ivas->hTcBuffer->slots_rendered; + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hDirAC->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + } #endif return error; @@ -258,6 +361,11 @@ ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ , const ISM_MODE last_ism_mode /* i/o: last ISM mode */ +#ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : number of samples flushed when the renderer granularity changes */ + int16_t *data +#endif ) { int32_t ivas_total_brate; @@ -298,7 +406,11 @@ ivas_error ivas_ism_dec_config( { if ( ( st_ivas->ism_mode != last_ism_mode ) || ( st_ivas->hDecoderConfig->ivas_total_brate != st_ivas->hDecoderConfig->last_ivas_total_brate ) ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -321,7 +433,11 @@ ivas_error ivas_ism_dec_config( /* ISM mode switching */ if ( st_ivas->ism_mode != last_ism_mode ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode, nSamplesRendered, data ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_ism_bitrate_switching( st_ivas, nchan_transport_old, last_ism_mode ) ) != IVAS_ERR_OK ) +#endif { return error; } diff --git a/lib_dec/ivas_ism_dtx_dec.c b/lib_dec/ivas_ism_dtx_dec.c index 935db95eea5708afbf995aaa599ac212607d1094..7c22ff2e9e16aa871944278f3d3eba7dba5df3d6 100644 --- a/lib_dec/ivas_ism_dtx_dec.c +++ b/lib_dec/ivas_ism_dtx_dec.c @@ -39,42 +39,6 @@ #endif #include "wmc_auto.h" -#ifndef FIX_ISM_DTX_CNG_BWIDTH_ALT -/*-------------------------------------------------------------------* - * ivas_ism_preprocessing() - * - * - *-------------------------------------------------------------------*/ - -static void ivas_ism_preprocessing( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const int16_t sce_id /* i : SCE # identifier */ -) -{ - Decoder_State *st; - - st = st_ivas->hSCE[sce_id]->hCoreCoder[0]; - - { - /* reset the bitstream to at least read the cng type and bandwidth for non transmitted SCE */ - st->bit_stream = st_ivas->hSCE[0]->hCoreCoder[0]->bit_stream; - st->next_bit_pos = 0; /* note: needed in paramISM -> discISM switching */ - - if ( sce_id == st_ivas->hISMDTX.sce_id_dtx ) - { - st->read_sid_info = 1; /* read the sid info from bitstream */ - } - else - { - st->read_sid_info = 0; /* do not read the sid info from bitstream but use the estimated noise */ - } - - st->cng_ism_flag = 1; - } - - return; -} -#endif /*-------------------------------------------------------------------* * ivas_ism_dtx_dec() @@ -93,9 +57,7 @@ ivas_error ivas_ism_dtx_dec( int16_t idx, flag_noisy_speech, sce_id_dtx; ISM_MODE last_ism_mode, ism_mode_bstr; ivas_error error; -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT Decoder_State *st; -#endif ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; @@ -133,8 +95,11 @@ ivas_error ivas_ism_dtx_dec( ism_mode_bstr = (ISM_MODE) ( idx + 1 ); st_ivas->ism_mode = ism_mode_bstr; } - +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_ism_dec_config( st_ivas, last_ism_mode, NULL, NULL ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_ism_dec_config( st_ivas, last_ism_mode ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -185,15 +150,11 @@ ivas_error ivas_ism_dtx_dec( { for ( ch = 0; ch < st_ivas->nchan_transport; ch++ ) { -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT st = st_ivas->hSCE[ch]->hCoreCoder[0]; st->bit_stream = st_ivas->hSCE[0]->hCoreCoder[0]->bit_stream; st->next_bit_pos = 0; /* note: needed in paramISM -> discISM switching */ st->cng_ism_flag = 1; st->L_frame = min( st->L_frame, L_FRAME16k ); /* note: needed for switching from active frame with L_frame=640 to CNG in object with no SID */ -#else - ivas_ism_preprocessing( st_ivas, ch ); // VE: after the acceptance of switches, replace the function call by its content -#endif } } diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index 7a61424a1fd3d73b6d5e6b51aecabbcf94993fb1..e269d1e6041209e0336d7e8df22a5d7f8d46ce47 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -48,7 +48,8 @@ * Local functions *-----------------------------------------------------------------------*/ -static void decode_angle_indices( DEC_CORE_HANDLE st0, ISM_METADATA_ANGLE_HANDLE angle, int16_t *flag_abs_azimuth ); +static void decode_angle_indices( DEC_CORE_HANDLE st0, ISM_METADATA_ANGLE_HANDLE angle, const int16_t non_diegetic_flag, int16_t *flag_abs_azimuth ); + static int16_t decode_radius( DEC_CORE_HANDLE st0, int16_t *last_radius_idx, int16_t *flag_abs_radius ); @@ -156,6 +157,7 @@ ivas_error ivas_ism_metadata_dec( int32_t element_brate[MAX_NUM_OBJECTS], total_brate[MAX_NUM_OBJECTS]; DEC_CORE_HANDLE st0; int16_t ism_extmeta_bitstream; + int16_t non_diegetic_flag_global; float yaw, pitch, radius; int16_t flag_abs_radius; int16_t flag_abs_orientation; @@ -185,6 +187,7 @@ ivas_error ivas_ism_metadata_dec( next_bit_pos_orig = st0->next_bit_pos; st0->next_bit_pos = 0; ism_extmeta_bitstream = 0; + non_diegetic_flag_global = 0; /* reverse the bitstream for easier reading of indices */ for ( i = 0; i < min( MAX_BITS_METADATA, last_bit_pos ); i++ ) @@ -224,6 +227,12 @@ ivas_error ivas_ism_metadata_dec( if ( ism_total_brate >= ISM_EXTENDED_METADATA_BRATE ) { ism_extmeta_bitstream = get_next_indice( st0, ISM_EXTENDED_METADATA_BITS ); + + /* read global non-diegetic object flag */ + if ( ism_extmeta_bitstream ) + { + non_diegetic_flag_global = get_next_indice( st0, ISM_METADATA_IS_NDP_BITS ); + } } /* Apply hysteresis in case rate switching causes fluctuation in presence of extended metadata */ if ( *ism_extmeta_active == -1 || *ism_extmeta_active == ism_extmeta_bitstream ) /* If first frame or bitstream matches internal state */ @@ -304,53 +313,81 @@ ivas_error ivas_ism_metadata_dec( if ( hIsmMeta[ch]->ism_metadata_flag ) { - decode_angle_indices( st0, &( hIsmMetaData->position_angle ), &flag_abs_position ); - idx_angle1 = hIsmMetaData->position_angle.last_angle1_idx; - idx_angle2 = hIsmMetaData->position_angle.last_angle2_idx; - /* Azimuth/Elevation dequantization */ - if ( ism_mode == ISM_MODE_PARAM ) + if ( non_diegetic_flag_global ) { - hParamIsm->azi_index[ch] = idx_angle1; - hParamIsm->ele_index[ch] = idx_angle2; + /* read non-diegetic flag for each object */ + hIsmMetaData->non_diegetic_flag = get_next_indice( st0, ISM_METADATA_IS_NDP_BITS ); } - else /* ISM_MODE_DISC */ + else + { + hIsmMetaData->non_diegetic_flag = 0; + } + + if ( hIsmMetaData->non_diegetic_flag ) { + /* Panning gain decoding */ + decode_angle_indices( st0, &( hIsmMetaData->position_angle ), hIsmMetaData->non_diegetic_flag, &flag_abs_position ); + idx_angle1 = hIsmMetaData->position_angle.last_angle1_idx; + idx_angle2 = 1 << ( ISM_ELEVATION_NBITS - 1 ); + + /* Panning gain dequantization */ hIsmMetaData->azimuth = ism_dequant_meta( idx_angle1, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); - hIsmMetaData->elevation = ism_dequant_meta( idx_angle2, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); + hIsmMetaData->elevation = 0.0f; - /* radius/raw/pitch dequantization */ - if ( ism_extmeta_bitstream ) + /* save for smoothing metadata evolution */ + hIsmMetaData->last_true_azimuth = hIsmMetaData->azimuth; + hIsmMetaData->last_true_elevation = hIsmMetaData->elevation; + } + else + { + decode_angle_indices( st0, &( hIsmMetaData->position_angle ), hIsmMeta[ch]->non_diegetic_flag, &flag_abs_position ); + idx_angle1 = hIsmMetaData->position_angle.last_angle1_idx; + idx_angle2 = hIsmMetaData->position_angle.last_angle2_idx; + + /* Azimuth/Elevation dequantization */ + if ( ism_mode == ISM_MODE_PARAM ) { - decode_angle_indices( st0, &( hIsmMetaData->orientation_angle ), &flag_abs_orientation ); - idx_angle1 = hIsmMetaData->orientation_angle.last_angle1_idx; - idx_angle2 = hIsmMetaData->orientation_angle.last_angle2_idx; - yaw = ism_dequant_meta( idx_angle1, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); - pitch = ism_dequant_meta( idx_angle2, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); - - idx_radius = decode_radius( st0, &hIsmMetaData->last_radius_idx, &flag_abs_radius ); - radius = usdequant( idx_radius, ISM_RADIUS_MIN, ISM_RADIUS_DELTA ); - if ( *ism_extmeta_active == 1 ) - { - hIsmMetaData->yaw = yaw; - hIsmMetaData->pitch = pitch; - hIsmMetaData->radius = radius; - } + hParamIsm->azi_index[ch] = idx_angle1; + hParamIsm->ele_index[ch] = idx_angle2; } - else + else /* ISM_MODE_DISC */ { - if ( *ism_extmeta_active == 0 ) + hIsmMetaData->azimuth = ism_dequant_meta( idx_angle1, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); + hIsmMetaData->elevation = ism_dequant_meta( idx_angle2, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); + + /* radius/raw/pitch dequantization */ + if ( ism_extmeta_bitstream ) + { + decode_angle_indices( st0, &( hIsmMetaData->orientation_angle ), hIsmMeta[ch]->non_diegetic_flag, &flag_abs_orientation ); + idx_angle1 = hIsmMetaData->orientation_angle.last_angle1_idx; + idx_angle2 = hIsmMetaData->orientation_angle.last_angle2_idx; + yaw = ism_dequant_meta( idx_angle1, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); + pitch = ism_dequant_meta( idx_angle2, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); + + idx_radius = decode_radius( st0, &hIsmMetaData->last_radius_idx, &flag_abs_radius ); + radius = usdequant( idx_radius, ISM_RADIUS_MIN, ISM_RADIUS_DELTA ); + if ( *ism_extmeta_active == 1 ) + { + hIsmMetaData->yaw = yaw; + hIsmMetaData->pitch = pitch; + hIsmMetaData->radius = radius; + } + } + else { - hIsmMetaData->yaw = 0.0f; - hIsmMetaData->pitch = 0.0f; - hIsmMetaData->radius = 1.0f; + if ( *ism_extmeta_active == 0 ) + { + hIsmMetaData->yaw = 0.0f; + hIsmMetaData->pitch = 0.0f; + hIsmMetaData->radius = 1.0f; + } } } + /* save for smoothing metadata evolution */ + hIsmMetaData->last_true_azimuth = hIsmMetaData->azimuth; + hIsmMetaData->last_true_elevation = hIsmMetaData->elevation; } - /* save for smoothing metadata evolution */ - hIsmMetaData->last_true_azimuth = hIsmMetaData->azimuth; - hIsmMetaData->last_true_elevation = hIsmMetaData->elevation; } - /* save number of metadata bits read */ if ( ism_mode == ISM_MODE_DISC ) { @@ -442,7 +479,7 @@ ivas_error ivas_ism_metadata_dec( if ( !bfi ) { - if ( ( error = ivas_ism_config( ism_total_brate, *nchan_transport, nchan_ism, hIsmMeta, localVAD, ism_imp, element_brate, total_brate, nb_bits_metadata ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_config( ism_total_brate, *nchan_transport, nchan_ism, hIsmMeta, ism_extmeta_bitstream, localVAD, ism_imp, element_brate, total_brate, nb_bits_metadata ) ) != IVAS_ERR_OK ) { return error; } @@ -451,14 +488,9 @@ ivas_error ivas_ism_metadata_dec( { hIsmMeta[ch]->last_ism_metadata_flag = hIsmMeta[ch]->ism_metadata_flag; -#ifdef FIX_419_ISM_BRATE_SW_DTX hSCE[ch]->hCoreCoder[0]->low_rate_mode = 0; -#endif if ( ism_mode == ISM_MODE_DISC ) { -#ifndef FIX_419_ISM_BRATE_SW_DTX - hSCE[ch]->hCoreCoder[0]->low_rate_mode = 0; -#endif if ( hIsmMeta[ch]->ism_metadata_flag == 0 && localVAD[ch] == 0 && ism_metadata_flag_global ) { hSCE[ch]->hCoreCoder[0]->low_rate_mode = 1; @@ -552,7 +584,7 @@ ivas_error ivas_ism_metadata_dec_create( ivas_ism_reset_metadata( st_ivas->hIsmMetaData[ch] ); } - if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, n_ISms, n_ISms, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_config( st_ivas->hDecoderConfig->ivas_total_brate, n_ISms, n_ISms, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) { return error; } @@ -572,6 +604,7 @@ ivas_error ivas_ism_metadata_dec_create( static void decode_angle_indices( DEC_CORE_HANDLE st0, /* i/o: bitstream handle */ ISM_METADATA_ANGLE_HANDLE angle, /* i/o: angle handle */ + const int16_t non_diegetic_flag, /* i : Non diegetic flag */ int16_t *flag_abs_angle1 /* o : Azimuth/yaw encoding mode */ ) { @@ -650,60 +683,67 @@ static void decode_angle_indices( * Elevation/pitch decoding and dequantization *----------------------------------------------------------------*/ - /* Decode elevation/pitch index */ - if ( *flag_abs_angle1 == 0 && get_next_indice( st0, 1 ) == 1 ) /* elevation_abs_flag */ + if ( non_diegetic_flag == 0 ) { - idx_angle2 = get_next_indice( st0, ISM_ELEVATION_NBITS ); - } - else - { - diff = 0; - sgn = 1; - - if ( get_next_indice( st0, 1 ) == 0 ) + /* Decode elevation/pitch index */ + if ( *flag_abs_angle1 == 0 && get_next_indice( st0, 1 ) == 1 ) /* elevation_abs_flag */ { - nbits_diff_angle2 = 1; + idx_angle2 = get_next_indice( st0, ISM_ELEVATION_NBITS ); } else { - nbits_diff_angle2 = 1; + diff = 0; + sgn = 1; - if ( get_next_indice( st0, 1 ) == 1 ) /* negative sign */ + if ( get_next_indice( st0, 1 ) == 0 ) { - sgn = -1; + nbits_diff_angle2 = 1; } + else + { + nbits_diff_angle2 = 1; - nbits_diff_angle2++; + if ( get_next_indice( st0, 1 ) == 1 ) /* negative sign */ + { + sgn = -1; + } - /* read until the stop bit */ - while ( ( nbits_diff_angle2 < ISM_ELEVATION_NBITS ) && ( get_next_indice( st0, 1 ) == 1 ) ) - { - diff++; nbits_diff_angle2++; - } - if ( nbits_diff_angle2 < ISM_ELEVATION_NBITS ) - { - /* count stop bit */ - nbits_diff_angle2++; + /* read until the stop bit */ + while ( ( nbits_diff_angle2 < ISM_ELEVATION_NBITS ) && ( get_next_indice( st0, 1 ) == 1 ) ) + { + diff++; + nbits_diff_angle2++; + } + + if ( nbits_diff_angle2 < ISM_ELEVATION_NBITS ) + { + /* count stop bit */ + nbits_diff_angle2++; + } } + + idx_angle2 = angle->last_angle2_idx + sgn * diff; } - idx_angle2 = angle->last_angle2_idx + sgn * diff; + /* sanity check in case of FER or BER */ + if ( idx_angle2 < 0 || idx_angle2 > ( 1 << ISM_ELEVATION_NBITS ) - 1 ) + { + idx_angle2 = angle->last_angle2_idx; + } } - - /* sanity check in case of FER or BER */ - if ( idx_angle2 < 0 || idx_angle2 > ( 1 << ISM_ELEVATION_NBITS ) - 1 ) + else { - idx_angle2 = angle->last_angle2_idx; + idx_angle2 = angle->last_angle2_idx; /* second MD parameter is not transmitted for non-diegetic object */ } /*----------------------------------------------------------------* * Final updates *----------------------------------------------------------------*/ - angle->last_angle1_idx = idx_angle1; angle->last_angle2_idx = idx_angle2; + angle->last_angle1_idx = idx_angle1; return; } @@ -893,12 +933,6 @@ void ivas_ism_metadata_sid_dec( hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence = (float) ( idx ) / (float) ( ( 1 << nBits_coh ) - 1 ); } } -#ifndef FIX_ISM_DTX_CNG_BWIDTH_ALT - else - { - *sce_id_dtx = 0; - } -#endif if ( ism_mode == ISM_MODE_PARAM ) { @@ -912,7 +946,6 @@ void ivas_ism_metadata_sid_dec( for ( ch = 0; ch < nchan_ism; ch++ ) { hIsmMetaData = hIsmMeta[ch]; - if ( md_diff_flag[ch] == 1 ) { /* Azimuth decoding */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 244bf1f3987925f4b01f3876d3a578d598b9068f..5236de4109e9a7344cbb722341c74d50b4e183da 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -157,7 +157,133 @@ static void ivas_ism_get_proto_matrix( return; } +#ifdef JBM_TSM_ON_TCS +static void ivas_param_ism_collect_slot( + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + float *Cldfb_RealBuffer_in, + float *Cldfb_ImagBuffer_in, + const int16_t ch, + float ref_power[], + float cx_diag[][PARAM_ISM_MAX_DMX] ) +{ + + int16_t band_idx, bin_idx; + int16_t brange[2]; + float tmp; + + /* loop over parameter bands to collect transport channel energies */ + for ( band_idx = 0; band_idx < hDirAC->hParamIsm->nbands; band_idx++ ) + { + brange[0] = hDirAC->hParamIsm->band_grouping[band_idx]; + brange[1] = hDirAC->hParamIsm->band_grouping[band_idx + 1]; + for ( bin_idx = brange[0]; bin_idx < brange[1]; bin_idx++ ) + { + tmp = 0.0f; + tmp += ( Cldfb_RealBuffer_in[bin_idx] * Cldfb_RealBuffer_in[bin_idx] ); + tmp += ( Cldfb_ImagBuffer_in[bin_idx] * Cldfb_ImagBuffer_in[bin_idx] ); + cx_diag[bin_idx][ch] += tmp; + ref_power[bin_idx] += tmp; + } + } + return; +} + +static void ivas_param_ism_compute_mixing_matrix( + const int16_t nchan_ism, /* i : number of ISM channels */ + DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ + ISM_DTX_DATA_DEC hISMDTX, /* i : ISM DTX handle */ + float direct_response[MAX_NUM_OBJECTS][PARAM_ISM_MAX_CHAN], + const int16_t nchan_transport, + const int16_t nchan_out_woLFE, + float cx_diag[][PARAM_ISM_MAX_DMX], + float ref_power[], + float mixing_matrix[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX] ) +{ + int16_t band_idx, bin_idx; + int16_t i, w, obj_indx; + int16_t brange[2]; + float direct_power[MAX_NUM_OBJECTS]; + float cy_diag[PARAM_ISM_MAX_CHAN]; + float cy_diag_tmp[MAX_NUM_OBJECTS][PARAM_ISM_MAX_CHAN]; + float *dir_res_ptr; + float *proto_matrix; + float response_matrix[PARAM_ISM_MAX_CHAN * MAX_NUM_OBJECTS]; + int16_t num_wave; + + proto_matrix = hDirAC->hParamIsmRendering->proto_matrix; + + assert( ( nchan_ism == 3 ) || ( nchan_ism == 4 ) ); + assert( nchan_transport == 2 ); + + if ( hDirAC->hParamIsm->flag_noisy_speech || hISMDTX.dtx_flag ) + { + num_wave = nchan_ism; + } + else + { + num_wave = MAX_PARAM_ISM_WAVE; + } + set_zero( response_matrix, PARAM_ISM_MAX_CHAN * MAX_NUM_OBJECTS ); + + /* loop over parameter bands to compute the mixing matrix */ + for ( band_idx = 0; band_idx < hDirAC->hParamIsm->nbands; band_idx++ ) + { + brange[0] = hDirAC->hParamIsm->band_grouping[band_idx]; + brange[1] = hDirAC->hParamIsm->band_grouping[band_idx + 1]; + + /* Compute covaraince matrix from direct response*/ + for ( w = 0; w < num_wave; w++ ) + { + set_zero( cy_diag_tmp[w], nchan_out_woLFE ); + + if ( hDirAC->hParamIsm->flag_noisy_speech || hISMDTX.dtx_flag ) + { + dir_res_ptr = direct_response[w]; + } + else + { + obj_indx = hDirAC->hParamIsm->obj_indices[band_idx][0][w]; + dir_res_ptr = direct_response[obj_indx]; + } + mvr2r( dir_res_ptr, response_matrix + w * nchan_out_woLFE, nchan_out_woLFE ); + /* we only need the diagonal of Cy*/ + matrix_product_diag( dir_res_ptr, nchan_out_woLFE, 1, 0, dir_res_ptr, 1, nchan_out_woLFE, 0, cy_diag_tmp[w] ); + } + + for ( bin_idx = brange[0]; bin_idx < brange[1]; bin_idx++ ) + { + + set_zero( cy_diag, nchan_out_woLFE ); + for ( w = 0; w < num_wave; w++ ) + { + if ( hDirAC->hParamIsm->flag_noisy_speech || hISMDTX.dtx_flag ) + { + direct_power[w] = ( 1.0f / nchan_ism ) * ref_power[bin_idx]; + } + else + { + direct_power[w] = hDirAC->power_ratios[band_idx][0][w] * ref_power[bin_idx]; + } + + if ( direct_power[w] != 0.f ) + { + for ( i = 0; i < nchan_out_woLFE; i++ ) + { + cy_diag[i] += direct_power[w] * cy_diag_tmp[w][i]; + } + } + direct_power[w] = sqrtf( direct_power[w] ); + } + /* Compute mixing matrix */ + computeMixingMatricesISM( nchan_transport, num_wave, nchan_out_woLFE, response_matrix, direct_power, cx_diag[bin_idx], cy_diag, proto_matrix, 1, + PARAM_MC_REG_SX, PARAM_MC_REG_GHAT, mixing_matrix[bin_idx] ); + } + } + return; +} + +#else static void ivas_param_ism_compute_mixing_matrix( const int16_t nchan_ism, /* i : number of ISM channels */ DIRAC_DEC_HANDLE hDirAC, /* i/o: decoder DirAC handle */ @@ -276,7 +402,45 @@ static void ivas_param_ism_compute_mixing_matrix( return; } +#endif + +#ifdef JBM_TSM_ON_TCS +static void ivas_param_ism_render_slot( + DIRAC_DEC_HANDLE hDirAC, + float *Cldfb_RealBuffer_in[PARAM_ISM_MAX_DMX], + float *Cldfb_ImagBuffer_in[PARAM_ISM_MAX_DMX], + float Cldfb_RealBuffer[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], + float Cldfb_ImagBuffer[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], + float mixing_matrix[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX], + const int16_t interpolator_idx, + const int16_t out_slot_idx, + const int16_t num_ch_LS, + const int16_t nchan_transport ) +{ + int16_t outchIdx, inchIdx, bin_idx; + float tmp_1, mixing_matrix_smooth; + + tmp_1 = hDirAC->hParamIsmRendering->interpolator[interpolator_idx]; + + for ( bin_idx = 0; bin_idx < hDirAC->num_freq_bands; bin_idx++ ) + { + /* smooth the mixing matrix */ + for ( outchIdx = 0; outchIdx < num_ch_LS; outchIdx++ ) + { + for ( inchIdx = 0; inchIdx < nchan_transport; inchIdx++ ) + { + mixing_matrix_smooth = tmp_1 * mixing_matrix[bin_idx][outchIdx + inchIdx * num_ch_LS] + + ( 1 - tmp_1 ) * hDirAC->hParamIsmRendering->mixing_matrix_lin_old[bin_idx][outchIdx + inchIdx * num_ch_LS]; + + Cldfb_RealBuffer[outchIdx][out_slot_idx][bin_idx] += mixing_matrix_smooth * Cldfb_RealBuffer_in[inchIdx][bin_idx]; + Cldfb_ImagBuffer[outchIdx][out_slot_idx][bin_idx] += mixing_matrix_smooth * Cldfb_ImagBuffer_in[inchIdx][bin_idx]; + } + } + } + return; +} +#endif static void ivas_param_ism_rendering( DIRAC_DEC_HANDLE hDirAC, @@ -434,9 +598,19 @@ ivas_error ivas_param_ism_dec_open( *-----------------------------------------------------------------*/ hDirAC->slot_size = (int16_t) ( ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX ); +#ifdef JBM_TSM_ON_TCS + hDirAC->hConfig = NULL; + set_s( hDirAC->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( hDirAC->subframe_nbslots, JBM_CLDFB_SLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS ); + hDirAC->nb_subframes = DEFAULT_JBM_SUBFRAMES_5MS; + hDirAC->subframes_rendered = 0; + hDirAC->slots_rendered = 0; + hDirAC->num_slots = DEFAULT_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME; +#else hDirAC->subframe_nbslots = (int16_t) ( CLDFB_NO_COL_MAX * 5.f / 20.f + 0.5f ); hDirAC->nb_subframes = CLDFB_NO_COL_MAX / hDirAC->subframe_nbslots; assert( hDirAC->nb_subframes <= MAX_PARAM_SPATIAL_SUBFRAMES ); +#endif hDirAC->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); hDirAC->hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; @@ -468,10 +642,24 @@ ivas_error ivas_param_ism_dec_open( if ( !( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) ) { /* Initialize Param ISM Rendering handle */ - if ( ( error = ivas_param_ism_rendering_init( hDirAC->hParamIsmRendering, hOutSetup, st_ivas->nchan_transport, CLDFB_NO_COL_MAX, output_config ) ) != IVAS_ERR_OK ) +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) { - return error; + if ( ( error = ivas_param_ism_rendering_init( hDirAC->hParamIsmRendering, hOutSetup, st_ivas->nchan_transport, MAX_JBM_CLDFB_TIMESLOTS, output_config ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { +#endif + if ( ( error = ivas_param_ism_rendering_init( hDirAC->hParamIsmRendering, hOutSetup, st_ivas->nchan_transport, CLDFB_NO_COL_MAX, output_config ) ) != IVAS_ERR_OK ) + { + return error; + } +#ifdef JBM_TSM_ON_TCS } +#endif } if ( !( output_config == AUDIO_CONFIG_EXTERNAL || output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM || output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) ) @@ -487,120 +675,82 @@ ivas_error ivas_param_ism_dec_open( set_zero( hDirAC->azimuth_values, MAX_NUM_OBJECTS ); set_zero( hDirAC->elevation_values, MAX_NUM_OBJECTS ); +#ifdef JBM_TSM_ON_TCS + hDirAC->dirac_md_buffer_length = MAX_PARAM_SPATIAL_SUBFRAMES; +#else hDirAC->dirac_md_buffer_length = 0; +#endif hDirAC->dirac_bs_md_write_idx = 0; hDirAC->dirac_read_idx = 0; hDirAC->spar_to_dirac_write_idx = 0; if ( ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM ) ) { +#ifndef JBM_TSM_ON_TCS hDirAC->dirac_md_buffer_length = MAX_PARAM_SPATIAL_SUBFRAMES; - if ( ( hDirAC->azimuth = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - - if ( ( hDirAC->elevation = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - - if ( ( hDirAC->azimuth2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - - if ( ( hDirAC->elevation2 = (int16_t **) malloc( hDirAC->dirac_md_buffer_length * sizeof( int16_t * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - - if ( ( hDirAC->energy_ratio1 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - - if ( ( hDirAC->spreadCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - - if ( ( hDirAC->energy_ratio2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) +#endif + if ( ( error = ivas_dirac_allocate_parameters( hDirAC, 1 ) ) != IVAS_ERR_OK ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); + return error; } - if ( ( hDirAC->spreadCoherence2 = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) + if ( ( error = ivas_dirac_allocate_parameters( hDirAC, 2 ) ) != IVAS_ERR_OK ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); + return error; } + } - if ( ( hDirAC->surroundingCoherence = (float **) malloc( hDirAC->dirac_md_buffer_length * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } + st_ivas->hISMDTX.dtx_flag = 0; - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) + st_ivas->hDirAC = hDirAC; +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) + { + if ( st_ivas->renderer_type != RENDERER_MONO_DOWNMIX && st_ivas->renderer_type != RENDERER_DISABLE ) { - if ( ( hDirAC->azimuth[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - set_s( hDirAC->azimuth[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->elevation[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - set_s( hDirAC->elevation[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->azimuth2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) + int16_t nchan_transport = st_ivas->nchan_transport; + int16_t nchan_full = 0; + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); + nchan_full = nchan_transport; + hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; + hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; } - set_s( hDirAC->azimuth2[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->elevation2[i] = (int16_t *) malloc( hDirAC->num_freq_bands * sizeof( int16_t ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - set_s( hDirAC->elevation2[i], 0, hDirAC->num_freq_bands ); - - if ( ( hDirAC->energy_ratio1[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - set_f( hDirAC->energy_ratio1[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->spreadCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); - } - set_f( hDirAC->spreadCoherence[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->energy_ratio2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + else { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); + hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ); + set_zero( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands ); + hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands * sizeof( float ) ); + set_zero( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hDirAC->num_freq_bands ); } - set_f( hDirAC->energy_ratio2[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->spreadCoherence2[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + if ( st_ivas->hTcBuffer == NULL ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, nchan_transport, nchan_transport, nchan_full, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } } - set_f( hDirAC->spreadCoherence2[i], 0.0f, hDirAC->num_freq_bands ); - - if ( ( hDirAC->surroundingCoherence[i] = (float *) malloc( hDirAC->num_freq_bands * sizeof( float ) ) ) == NULL ) + } + else + { + hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; + hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; + if ( st_ivas->hTcBuffer == NULL ) { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param ISM Rendering handle\n" ) ); + int16_t nchan_to_allocate = st_ivas->hDecoderConfig->nchan_out; + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_BUFFER, nchan_to_allocate, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } } - set_f( hDirAC->surroundingCoherence[i], 0.0f, hDirAC->num_freq_bands ); } } - - st_ivas->hISMDTX.dtx_flag = 0; - - st_ivas->hDirAC = hDirAC; + else + { + hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; + hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; + } +#endif pop_wmops(); return error; @@ -618,7 +768,6 @@ void ivas_param_ism_dec_close( AUDIO_CONFIG output_config /* i : output audio configuration */ ) { - int16_t i; DIRAC_DEC_HANDLE hDirAC; if ( hDirAC_out == NULL || *hDirAC_out == NULL ) @@ -637,154 +786,46 @@ void ivas_param_ism_dec_close( if ( ( output_config == AUDIO_CONFIG_BINAURAL || output_config == AUDIO_CONFIG_BINAURAL_ROOM ) ) { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->azimuth[i] != NULL ) - { - free( hDirAC->azimuth[i] ); - hDirAC->azimuth[i] = NULL; - } - - if ( hDirAC->elevation[i] != NULL ) - { - free( hDirAC->elevation[i] ); - hDirAC->elevation[i] = NULL; - } - } + ivas_dirac_deallocate_parameters( hDirAC, 1 ); + ivas_dirac_deallocate_parameters( hDirAC, 2 ); + } - if ( hDirAC->azimuth != NULL ) + if ( !( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) ) + { + /* Param ISM Rendering */ + if ( hDirAC->hParamIsmRendering->interpolator != NULL ) { - free( hDirAC->azimuth ); - hDirAC->azimuth = NULL; + free( hDirAC->hParamIsmRendering->interpolator ); + hDirAC->hParamIsmRendering->interpolator = NULL; } - if ( hDirAC->elevation != NULL ) + if ( hDirAC->hParamIsmRendering->proto_matrix != NULL ) { - free( hDirAC->elevation ); - hDirAC->elevation = NULL; + free( hDirAC->hParamIsmRendering->proto_matrix ); + hDirAC->hParamIsmRendering->proto_matrix = NULL; } + } - if ( hDirAC->azimuth2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->azimuth2[i] != NULL ) - { - free( hDirAC->azimuth2[i] ); - hDirAC->azimuth2[i] = NULL; - } - } - free( hDirAC->azimuth2 ); - hDirAC->azimuth2 = NULL; - } +#ifdef JBM_TSM_ON_TCS + if ( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc != NULL ) + { + free( hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc ); + hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc = NULL; + } + if ( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc != NULL ) + { + free( hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc ); + hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc = NULL; + } +#endif - if ( hDirAC->elevation2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->elevation2[i] != NULL ) - { - free( hDirAC->elevation2[i] ); - hDirAC->elevation2[i] = NULL; - } - } - free( hDirAC->elevation2 ); - hDirAC->elevation2 = NULL; - } + if ( hDirAC->hParamIsmRendering != NULL ) + { + free( hDirAC->hParamIsmRendering ); + hDirAC->hParamIsmRendering = NULL; + } - if ( hDirAC->energy_ratio1 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->energy_ratio1[i] != NULL ) - { - free( hDirAC->energy_ratio1[i] ); - hDirAC->energy_ratio1[i] = NULL; - } - } - free( hDirAC->energy_ratio1 ); - hDirAC->energy_ratio1 = NULL; - } - - if ( hDirAC->energy_ratio2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->energy_ratio2[i] != NULL ) - { - free( hDirAC->energy_ratio2[i] ); - hDirAC->energy_ratio2[i] = NULL; - } - } - free( hDirAC->energy_ratio2 ); - hDirAC->energy_ratio2 = NULL; - } - - if ( hDirAC->spreadCoherence != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->spreadCoherence[i] != NULL ) - { - free( hDirAC->spreadCoherence[i] ); - hDirAC->spreadCoherence[i] = NULL; - } - } - free( hDirAC->spreadCoherence ); - hDirAC->spreadCoherence = NULL; - } - - if ( hDirAC->spreadCoherence2 != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->spreadCoherence2[i] != NULL ) - { - free( hDirAC->spreadCoherence2[i] ); - hDirAC->spreadCoherence2[i] = NULL; - } - } - free( hDirAC->spreadCoherence2 ); - hDirAC->spreadCoherence2 = NULL; - } - - if ( hDirAC->surroundingCoherence != NULL ) - { - for ( i = 0; i < hDirAC->dirac_md_buffer_length; i++ ) - { - if ( hDirAC->surroundingCoherence[i] != NULL ) - { - free( hDirAC->surroundingCoherence[i] ); - hDirAC->surroundingCoherence[i] = NULL; - } - } - free( hDirAC->surroundingCoherence ); - hDirAC->surroundingCoherence = NULL; - } - } - - if ( !( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) ) - { - /* Param ISM Rendering */ - if ( hDirAC->hParamIsmRendering->interpolator != NULL ) - { - free( hDirAC->hParamIsmRendering->interpolator ); - hDirAC->hParamIsmRendering->interpolator = NULL; - } - if ( hDirAC->hParamIsmRendering->proto_matrix != NULL ) - { - free( hDirAC->hParamIsmRendering->proto_matrix ); - hDirAC->hParamIsmRendering->proto_matrix = NULL; - } - } - - if ( hDirAC->hParamIsmRendering != NULL ) - { - free( hDirAC->hParamIsmRendering ); - hDirAC->hParamIsmRendering = NULL; - } - - free( *hDirAC_out ); - *hDirAC_out = NULL; + free( *hDirAC_out ); + *hDirAC_out = NULL; return; } @@ -804,7 +845,10 @@ void ivas_param_ism_dec( int16_t ch, nchan_transport, nchan_out, nchan_out_woLFE, i; int16_t subframe_idx, slot_idx, index_slot, bin_idx; int32_t ivas_total_brate; - +#ifdef JBM_TSM_ON_TCS + float ref_power[CLDFB_NO_CHANNELS_MAX]; + float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; +#endif /* CLDFB Input Buffers */ float Cldfb_RealBuffer_in[PARAM_ISM_MAX_DMX][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer_in[PARAM_ISM_MAX_DMX][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; @@ -846,6 +890,15 @@ void ivas_param_ism_dec( push_wmops( "ivas_param_ism_dec" ); +#ifdef JBM_TSM_ON_TCS + /* set buffers to zero */ + for ( bin_idx = 0; bin_idx < CLDFB_NO_CHANNELS_MAX; bin_idx++ ) + { + set_zero( cx_diag[bin_idx], PARAM_ISM_MAX_DMX ); + } + set_zero( ref_power, CLDFB_NO_CHANNELS_MAX ); +#endif + /* Frame-level Processing */ /* De-quantization */ if ( !( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) ) @@ -910,6 +963,10 @@ void ivas_param_ism_dec( for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) { cldfbAnalysis_ts( &( output_f[ch][hDirAC->num_freq_bands * slot_idx] ), Cldfb_RealBuffer_in[ch][slot_idx], Cldfb_ImagBuffer_in[ch][slot_idx], hDirAC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + +#ifdef JBM_TSM_ON_TCS + ivas_param_ism_collect_slot( hDirAC, Cldfb_RealBuffer_in[ch][slot_idx], Cldfb_ImagBuffer_in[ch][slot_idx], ch, ref_power, cx_diag ); +#endif } } @@ -920,26 +977,41 @@ void ivas_param_ism_dec( } /* Compute mixing matrix */ +#ifdef JBM_TSM_ON_TCS + ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hDirAC, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, mixing_matrix ); +#else ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hDirAC, st_ivas->hISMDTX, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, direct_response, nchan_transport, nchan_out_woLFE, 0, CLDFB_NO_COL_MAX, mixing_matrix ); - +#endif /* subframe loop for synthesis*/ for ( subframe_idx = 0; subframe_idx < hDirAC->nb_subframes; subframe_idx++ ) { +#ifdef JBM_TSM_ON_TCS + uint16_t slot_idx_start = subframe_idx * hDirAC->subframe_nbslots[subframe_idx]; +#else uint16_t slot_idx_start = subframe_idx * hDirAC->subframe_nbslots; +#endif uint16_t idx_in; uint16_t idx_lfe; /* Set some memories to zero */ for ( ch = 0; ch < nchan_out_woLFE; ch++ ) { +#ifdef JBM_TSM_ON_TCS + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) +#else for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots; slot_idx++ ) +#endif { set_f( Cldfb_RealBuffer[ch][slot_idx], 0.0f, hDirAC->num_freq_bands ); set_f( Cldfb_ImagBuffer[ch][slot_idx], 0.0f, hDirAC->num_freq_bands ); } } +#ifdef JBM_TSM_ON_TCS + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) +#else for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots; slot_idx++ ) +#endif { index_slot = slot_idx_start + slot_idx; @@ -957,8 +1029,11 @@ void ivas_param_ism_dec( { if ( ( hSetup.num_lfe > 0 ) && ( hSetup.index_lfe[idx_lfe] == ch ) ) { +#ifdef JBM_TSM_ON_TCS + set_zero( &( output_f[ch][slot_idx_start * hDirAC->num_freq_bands] ), hDirAC->subframe_nbslots[subframe_idx] * hDirAC->num_freq_bands ); +#else set_zero( &( output_f[ch][slot_idx_start * hDirAC->num_freq_bands] ), hDirAC->subframe_nbslots * hDirAC->num_freq_bands ); - +#endif if ( idx_lfe < ( hSetup.num_lfe - 1 ) ) { idx_lfe++; @@ -970,14 +1045,22 @@ void ivas_param_ism_dec( float *ImagBuffer[16]; /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < hDirAC->subframe_nbslots[subframe_idx]; i++ ) +#else for ( i = 0; i < hDirAC->subframe_nbslots; i++ ) +#endif { RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; } - +#ifdef JBM_TSM_ON_TCS + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][slot_idx_start * hDirAC->num_freq_bands] ), + hDirAC->num_freq_bands * hDirAC->subframe_nbslots[subframe_idx], st_ivas->cldfbSynDec[ch] ); +#else cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][slot_idx_start * hDirAC->num_freq_bands] ), hDirAC->num_freq_bands * hDirAC->subframe_nbslots, st_ivas->cldfbSynDec[ch] ); +#endif idx_in++; } @@ -1008,6 +1091,402 @@ void ivas_param_ism_dec( return; } +#ifdef JBM_TSM_ON_TCS +void ivas_ism_dec_digest_tc( + Decoder_Struct *st_ivas ) +{ + + ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); + + if ( + st_ivas->renderer_type == RENDERER_TD_PANNING || + st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || + st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || + st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || + ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) + { + int16_t i, num_objects; + int16_t azimuth, elevation; + /* we have a full frame interpolator, adapt it */ + /* for BE testing */ + if ( ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ) == st_ivas->hTcBuffer->n_samples_available ) + { + int16_t interpolator_length = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ); + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + st_ivas->hIsmRendererData->interpolator[0] = 0.0f; + for ( i = 1; i < interpolator_length; i++ ) + { + st_ivas->hIsmRendererData->interpolator[i] = st_ivas->hIsmRendererData->interpolator[i - 1] + 1.f / ( interpolator_length - 1 ); + } + } + else + { + for ( i = 0; i < interpolator_length; i++ ) + { + st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length - 1 ); + } + } + } + else + { + ivas_jbm_dec_get_adapted_linear_interpolator( (int16_t) ( st_ivas->hDecoderConfig->output_Fs / (int32_t) FRAMES_PER_SECOND ), + st_ivas->hTcBuffer->n_samples_available, + st_ivas->hIsmRendererData->interpolator ); + } + /* also get the gains here */ + num_objects = st_ivas->nchan_transport; + for ( i = 0; i < num_objects; i++ ) + { + mvr2r( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmRendererData->prev_gains[i], MAX_OUTPUT_CHANNELS ); + if ( st_ivas->intern_config == AUDIO_CONFIG_STEREO ) + { + ivas_ism_get_stereo_gains( st_ivas->hIsmMetaData[i]->azimuth, + st_ivas->hIsmMetaData[i]->elevation, + &st_ivas->hIsmRendererData->gains[i][0], + &st_ivas->hIsmRendererData->gains[i][1] ); + } + else + { + // TODO tmu review when #215 is resolved + azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->azimuth + 0.5f ); + elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->elevation + 0.5f ); + if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) && st_ivas->hHeadTrackData == NULL ) + { + + + if ( st_ivas->hIntSetup.is_planar_setup ) + { + /* If no elevation support in output format, then rendering should be done with zero elevation */ + elevation = 0; + } + if ( st_ivas->hEFAPdata != NULL ) + { + efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); + } + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + /*get HOA gets for direction (ACN/SN3D)*/ + ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order ); + } + } + } + } + return; +} + +void ivas_param_ism_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nCldfbSlots, /* i : number of CLFBS slots in the transport channels */ + float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ +) +{ + int16_t ch, nchan_transport, nchan_out, nchan_out_woLFE, i; + int16_t slot_idx, bin_idx; + int32_t ivas_total_brate; + float ref_power[CLDFB_NO_CHANNELS_MAX]; + float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; + /* Direct Response/EFAP Gains */ + float direct_response[MAX_NUM_OBJECTS][PARAM_ISM_MAX_CHAN]; + + DIRAC_DEC_HANDLE hDirAC; + + /* Initialization */ + hDirAC = st_ivas->hDirAC; + assert( hDirAC ); + + nchan_transport = st_ivas->nchan_transport; + ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + { + nchan_out = st_ivas->nchan_ism; + nchan_out_woLFE = nchan_out; + st_ivas->hDecoderConfig->nchan_out = nchan_out; + } + else + { + nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; + nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; + } + + push_wmops( "ivas_param_ism_dec" ); + + /* general setup */ + ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbSlots, hDirAC->hParamIsmRendering->interpolator ); + + ivas_dirac_dec_set_md_map( st_ivas, nCldfbSlots ); + + /* set buffers to zero */ + for ( bin_idx = 0; bin_idx < CLDFB_NO_CHANNELS_MAX; bin_idx++ ) + { + set_zero( cx_diag[bin_idx], PARAM_ISM_MAX_DMX ); + } + set_zero( ref_power, CLDFB_NO_CHANNELS_MAX ); + + /* Frame-level Processing */ + /* De-quantization */ + if ( !( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) ) + { + ivas_param_ism_dec_dequant_DOA( hDirAC, st_ivas->nchan_ism ); + ivas_param_ism_dec_dequant_powrat( hDirAC ); + st_ivas->hISMDTX.dtx_flag = 0; + } + else + { + st_ivas->hISMDTX.dtx_flag = 1; + } + + /* obtain the direct response using EFAP */ + if ( !( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) ) + { + for ( i = 0; i < st_ivas->nchan_ism; i++ ) + { + efap_determine_gains( st_ivas->hEFAPdata, direct_response[i], hDirAC->azimuth_values[i], hDirAC->elevation_values[i], EFAP_MODE_EFAP ); + } + } + else + { + int16_t j; + + for ( i = 0; i < st_ivas->nchan_ism; i++ ) + { + for ( j = 0; j < nchan_out_woLFE; j++ ) + { + if ( i == j ) + { + direct_response[i][j] = 1.0f; + } + else + { + direct_response[i][j] = 0.0f; + } + } + } + + for ( i = 0; i < nchan_transport; i++ ) + { + for ( j = 0; j < nchan_out_woLFE; j++ ) + { + if ( i == j ) + { + hDirAC->hParamIsmRendering->proto_matrix[( i * nchan_out_woLFE ) + j] = 1.0f; + } + else + { + hDirAC->hParamIsmRendering->proto_matrix[( i * nchan_out_woLFE ) + j] = 0.0f; + } + } + } + } + + for ( ch = 0; ch < nchan_transport; ch++ ) + { + /*-----------------------------------------------------------------* + * CLDFB Analysis + *-----------------------------------------------------------------*/ + for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) + { + float RealBuffer[CLDFB_NO_CHANNELS_MAX]; + float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; + + cldfbAnalysis_ts( &( transport_channels_f[ch][hDirAC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hDirAC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + mvr2r( RealBuffer, &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], hDirAC->num_freq_bands ); + mvr2r( ImagBuffer, &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands], hDirAC->num_freq_bands ); + + ivas_param_ism_collect_slot( hDirAC, RealBuffer, ImagBuffer, ch, ref_power, cx_diag ); + } + } + + /* Obtain Mixing Matrix on a frame-level */ + for ( bin_idx = 0; bin_idx < hDirAC->num_freq_bands; bin_idx++ ) + { + set_f( hDirAC->hParamIsmRendering->mixing_matrix_lin[bin_idx], 0.0f, nchan_transport * nchan_out_woLFE ); + } + + /* Compute mixing matrix */ + ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hDirAC, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, hDirAC->hParamIsmRendering->mixing_matrix_lin ); + + + pop_wmops(); + + return; +} + +static void ivas_ism_param_dec_render_sf( Decoder_Struct *st_ivas, + IVAS_OUTPUT_SETUP hSetup, + const int16_t nchan_transport, + const int16_t nchan_out, + const int16_t nchan_out_woLFE, + float *output_f[] /* o : rendered time signal */ +) +{ + + int16_t ch, slot_idx, i, index_slot; + /* CLDFB Output Buffers */ + float Cldfb_RealBuffer[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer[PARAM_ISM_MAX_CHAN][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + float *Cldfb_RealBuffer_in[PARAM_ISM_MAX_DMX]; + float *Cldfb_ImagBuffer_in[PARAM_ISM_MAX_DMX]; + DIRAC_DEC_HANDLE hDirAC; + + int16_t slot_idx_start; + int16_t idx_in; + int16_t idx_lfe; + int16_t subframe_idx; + + hDirAC = st_ivas->hDirAC; + slot_idx_start = hDirAC->slots_rendered; + subframe_idx = hDirAC->subframes_rendered; + + /* Set some memories to zero */ + for ( ch = 0; ch < nchan_out_woLFE; ch++ ) + { + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) + { + set_f( Cldfb_RealBuffer[ch][slot_idx], 0.0f, hDirAC->num_freq_bands ); + set_f( Cldfb_ImagBuffer[ch][slot_idx], 0.0f, hDirAC->num_freq_bands ); + } + } + + for ( slot_idx = 0; slot_idx < hDirAC->subframe_nbslots[subframe_idx]; slot_idx++ ) + { + index_slot = slot_idx_start + slot_idx; + + for ( ch = 0; ch < nchan_transport; ch++ ) + { + Cldfb_RealBuffer_in[ch] = &hDirAC->hParamIsmRendering->Cldfb_RealBuffer_tc[index_slot * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands]; + Cldfb_ImagBuffer_in[ch] = &hDirAC->hParamIsmRendering->Cldfb_ImagBuffer_tc[index_slot * hDirAC->num_freq_bands * nchan_transport + ch * hDirAC->num_freq_bands]; + } + + + /* Compute bandwise rendering to target LS using covariance rendering */ + ivas_param_ism_render_slot( hDirAC, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, + Cldfb_RealBuffer, Cldfb_ImagBuffer, hDirAC->hParamIsmRendering->mixing_matrix_lin, index_slot, slot_idx, + nchan_out_woLFE, nchan_transport ); + } + + /* CLDFB Synthesis */ + idx_in = 0; + idx_lfe = 0; + + for ( ch = 0; ch < nchan_out; ch++ ) + { + if ( ( hSetup.num_lfe > 0 ) && ( hSetup.index_lfe[idx_lfe] == ch ) ) + { + set_zero( output_f[ch], hDirAC->subframe_nbslots[subframe_idx] * hDirAC->num_freq_bands ); + if ( idx_lfe < ( hSetup.num_lfe - 1 ) ) + { + idx_lfe++; + } + } + else + { + float *RealBuffer[16]; + float *ImagBuffer[16]; + + /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ + for ( i = 0; i < hDirAC->subframe_nbslots[subframe_idx]; i++ ) + { + RealBuffer[i] = Cldfb_RealBuffer[idx_in][i]; + ImagBuffer[i] = Cldfb_ImagBuffer[idx_in][i]; + } + cldfbSynthesis( RealBuffer, ImagBuffer, output_f[ch], + hDirAC->num_freq_bands * hDirAC->subframe_nbslots[subframe_idx], st_ivas->cldfbSynDec[ch] ); + idx_in++; + } + } + hDirAC->slots_rendered += hDirAC->subframe_nbslots[subframe_idx]; + hDirAC->subframes_rendered++; +} + +void ivas_param_ism_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +) +{ + int16_t ch, slots_to_render, first_sf, last_sf, subframe_idx; + uint16_t slot_size, n_samples_sf; + DIRAC_DEC_HANDLE hDirAC; + IVAS_OUTPUT_SETUP hSetup; + int16_t nchan_transport, nchan_out, nchan_out_woLFE; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + + hDirAC = st_ivas->hDirAC; + hSetup = st_ivas->hIntSetup; +#ifdef DEBUGGING + assert( hDirAC ); +#endif + nchan_transport = st_ivas->nchan_transport; + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + { + nchan_out = st_ivas->nchan_ism; + nchan_out_woLFE = nchan_out; + st_ivas->hDecoderConfig->nchan_out = nchan_out; + } + else + { + nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; + nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; + } + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( hDirAC->num_slots - hDirAC->slots_rendered, nSamplesAsked / slot_size ); + *nSamplesRendered = slots_to_render * slot_size; + first_sf = hDirAC->subframes_rendered; + last_sf = first_sf; + while ( slots_to_render > 0 ) + { + slots_to_render -= hDirAC->subframe_nbslots[last_sf]; + last_sf++; + } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] = &output_f[ch][0]; + } + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + ivas_ism_param_dec_render_sf( st_ivas, hSetup, nchan_transport, nchan_out, nchan_out_woLFE, output_f_local ); + n_samples_sf = hDirAC->subframe_nbslots[subframe_idx] * st_ivas->hDirAC->slot_size; + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] += n_samples_sf; + } + } + if ( hDirAC->slots_rendered == hDirAC->num_slots ) + { + /* copy the memories */ + /* store mixing matrix for next subframe */ + ivas_param_ism_update_mixing_matrix( hDirAC, hDirAC->hParamIsmRendering->mixing_matrix_lin, nchan_transport, nchan_out_woLFE ); + + /* store MetaData parameters */ + for ( ch = 0; ch < st_ivas->nchan_ism; ch++ ) + { + if ( st_ivas->hDirAC->azimuth_values[ch] > 180.0f ) + { + st_ivas->hIsmMetaData[ch]->azimuth = st_ivas->hDirAC->azimuth_values[ch] - 360.0f; + } + else + { + st_ivas->hIsmMetaData[ch]->azimuth = st_ivas->hDirAC->azimuth_values[ch]; + } + + st_ivas->hIsmMetaData[ch]->elevation = st_ivas->hDirAC->elevation_values[ch]; + } + } + *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + return; +} + +#endif + /*-------------------------------------------------------------------------* * ivas_param_ism_params_to_masa_param_mapping() diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 1e60143cb43e0249d3d146fbf6120be3de2d9656..3b38e2d890f0c28df26f3841e5e89d502e51cc5b 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -58,6 +58,9 @@ ivas_error ivas_ism_renderer_open( { int16_t i; uint16_t interpolator_length; +#ifdef JBM_TSM_ON_TCS + uint16_t init_interpolator_length; +#endif ivas_error error; error = IVAS_ERR_OK; @@ -78,14 +81,34 @@ ivas_error ivas_ism_renderer_open( for ( i = 0; i < MAX_NUM_OBJECTS; i++ ) { set_f( st_ivas->hIsmRendererData->prev_gains[i], 0.0f, MAX_OUTPUT_CHANNELS ); +#ifdef JBM_TSM_ON_TCS + set_f( st_ivas->hIsmRendererData->gains[i], 0.0f, MAX_OUTPUT_CHANNELS ); +#endif } +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) + { + init_interpolator_length = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_CLDFB_TIMESLOTS * CLDFB_SLOT_NS ); + interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + } + else + { + init_interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + interpolator_length = init_interpolator_length; + } + st_ivas->hIsmRendererData->interpolator = (float *) malloc( sizeof( float ) * init_interpolator_length ); + for ( i = 0; i < interpolator_length; i++ ) + { + st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length - 1 ); + } +#else interpolator_length = (uint16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); for ( i = 0; i < interpolator_length; i++ ) { st_ivas->hIsmRendererData->interpolator[i] = (float) i / ( (float) interpolator_length - 1 ); } - +#endif return error; } @@ -97,9 +120,13 @@ ivas_error ivas_ism_renderer_open( *-------------------------------------------------------------------------*/ void ivas_ism_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: core-coder transport channels/object output */ +#else float output_f[][L_FRAME48k], /* i/o: core-coder transport channels/object output */ - const int16_t output_frame /* i : output frame length per channel */ +#endif + const int16_t output_frame /* i : output frame length per channel */ ) { int16_t i, j, k, j2; @@ -149,7 +176,7 @@ void ivas_ism_render( else { /* Head rotation: rotate the object positions depending the head's orientation */ - if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) + if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 && !st_ivas->hIsmMetaData[i]->non_diegetic_flag ) { rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, Rmat, st_ivas->hIntSetup.is_planar_setup ); } @@ -201,6 +228,87 @@ void ivas_ism_render( return; } +#ifdef JBM_TSM_ON_TCS +void ivas_ism_render_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float *output_f[], /* i/o: core-coder transport channels/object output */ + const int16_t n_samples_to_render /* i : output frame length per channel */ +) +{ + int16_t i, j, k, j2; + float *g1, g2, *tc; + int16_t num_objects, nchan_out_woLFE, lfe_index; + int16_t azimuth, elevation; + int16_t tc_offset; + int16_t interp_offset; + float Rmat[3][3]; + float gain, prev_gain; + + num_objects = st_ivas->nchan_transport; + nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; + + tc_offset = st_ivas->hTcBuffer->n_samples_rendered; + interp_offset = st_ivas->hTcBuffer->n_samples_rendered; + + for ( i = 0; i < nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; i++ ) + { + set_f( output_f[i], 0.0f, n_samples_to_render ); + } + + if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) + { + /* Calculate rotation matrix from the quaternion */ + QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[st_ivas->hHeadTrackData->num_quaternions++], Rmat ); + ivas_jbm_dec_get_adapted_linear_interpolator( n_samples_to_render, + n_samples_to_render, + st_ivas->hIsmRendererData->interpolator ); + interp_offset = 0; + } + + for ( i = 0; i < num_objects; i++ ) + { + + /* Head rotation: rotate the object positions depending the head's orientation */ + if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) + { + rotateAziEle( st_ivas->hIsmMetaData[i]->azimuth, st_ivas->hIsmMetaData[i]->elevation, &azimuth, &elevation, Rmat, st_ivas->hIntSetup.is_planar_setup ); + if ( st_ivas->hEFAPdata != NULL ) + { + efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); + } + } + + lfe_index = 0; + for ( j = 0, j2 = 0; j < nchan_out_woLFE; j++, j2++ ) + { + if ( ( st_ivas->hIntSetup.num_lfe > 0 ) && ( st_ivas->hIntSetup.index_lfe[lfe_index] == j ) ) + { + ( lfe_index < ( st_ivas->hIntSetup.num_lfe - 1 ) ) ? ( lfe_index++, j2++ ) : j2++; + } + + gain = st_ivas->hIsmRendererData->gains[i][j]; + prev_gain = st_ivas->hIsmRendererData->prev_gains[i][j]; + if ( fabsf( gain ) > 0.0f || fabsf( prev_gain ) > 0.0f ) + { + g1 = &st_ivas->hIsmRendererData->interpolator[interp_offset]; + tc = &st_ivas->hTcBuffer->tc[i][tc_offset]; + for ( k = 0; k < n_samples_to_render; k++ ) + { + g2 = 1.0f - *g1; + output_f[j2][k] += ( *( g1++ ) * gain + g2 * prev_gain ) * *( tc++ ); + } + } + /* update here only in case of head rotation */ + if ( st_ivas->hHeadTrackData != NULL && st_ivas->hHeadTrackData->num_quaternions >= 0 ) + { + st_ivas->hIsmRendererData->prev_gains[i][j] = gain; + } + } + } + return; +} +#endif + /*-------------------------------------------------------------------------* * ivas_ism_get_stereo_gains() diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c new file mode 100644 index 0000000000000000000000000000000000000000..74acc77d688a43d02d56e7837ca9366f7fa5f11f --- /dev/null +++ b/lib_dec/ivas_jbm_dec.c @@ -0,0 +1,1714 @@ +/****************************************************************************************************** + + (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. + +*******************************************************************************************************/ + +#include +#include "options.h" +#include "cnst.h" +#include "ivas_cnst.h" +#include "rom_com.h" +#include "prot.h" +#include "ivas_prot.h" +#include "ivas_prot_rend.h" +#include "ivas_rom_com.h" +#include +#ifdef DEBUGGING +#include "debug.h" +#endif +#include "wmc_auto.h" + + +#ifdef JBM_TSM_ON_TCS + +/*-----------------------------------------------------------------------* + * Local function prototypes + *-----------------------------------------------------------------------*/ +static void ivas_jbm_dec_copy_tc( Decoder_Struct *st_ivas, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *data, float *tc_digest_f[] ); +static void ivas_jbm_dec_tc_buffer_playout( Decoder_Struct *st_ivas, const uint16_t nSamplesAsked, uint16_t *nSamplesRendered, float *output[] ); + + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_tc() + * + * Principal IVAS decoder routine, decoding of metadata and transport channels + *--------------------------------------------------------------------------*/ +ivas_error ivas_jbm_dec_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float *data /* o : transport channel signal */ +) +{ + int16_t n, output_frame, nchan_out; + Decoder_State *st; /* used for bitstream handling */ + float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */ /* IVAS_fmToDo: buffer can be allocated dynamically based on the actual number of output channels */ + int16_t nchan_remapped; + float output_lfe_ch[L_FRAME48k]; + int16_t nb_bits_metadata[MAX_SCE]; + int32_t output_Fs, ivas_total_brate; + AUDIO_CONFIG output_config; + ivas_error error; + float *p_output[MAX_TRANSPORT_CHANNELS]; + + error = IVAS_ERR_OK; + + push_wmops( "ivas_jbm_dec_tc" ); + + /*----------------------------------------------------------------* + * Initialization of local vars after struct has been set + *----------------------------------------------------------------*/ + + output_Fs = st_ivas->hDecoderConfig->output_Fs; + nchan_out = st_ivas->hTcBuffer->nchan_transport_jbm; + output_config = st_ivas->hDecoderConfig->output_config; + ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + + output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + + for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) + { + p_output[n] = &output[n][0]; + } + + /*----------------------------------------------------------------* + * Decoding + Rendering + *----------------------------------------------------------------*/ + + if ( st_ivas->bfi && st_ivas->ini_frame == 0 ) + { + /* zero output when first frame(s) is lost */ + for ( n = 0; n < nchan_out; n++ ) + { + set_f( output[n], 0.0f, output_frame ); + } + +#ifdef DEBUG_MODE_INFO + create_sce_dec( st_ivas, 0, ivas_total_brate ); + output_debug_mode_info_dec( st_ivas->hSCE[0]->hCoreCoder, 1, output_frame, NULL ); + destroy_sce_dec( st_ivas->hSCE[0] ); + st_ivas->hSCE[0] = NULL; +#endif + } + else if ( st_ivas->ivas_format == STEREO_FORMAT ) + { + st_ivas->hCPE[0]->element_brate = ivas_total_brate; + + if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* HP filtering */ + for ( n = 0; n < min( nchan_out, st_ivas->nchan_transport ); n++ ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hDecoderConfig->nchan_out == 1 ) + { + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); + } + } + else if ( st_ivas->ivas_format == ISM_FORMAT ) + { + /* Metadata decoding and configuration */ + if ( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) + { + if ( ( error = ivas_ism_dtx_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) + { + // VE: call ivas_ism_metadata_dec() with 'st_ivas' - TBD + if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, st_ivas->hDirAC->hParamIsm, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else /* ISM_MODE_DISC */ + { + if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, NULL, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + for ( n = 0; n < st_ivas->nchan_transport; n++ ) + { + if ( ( error = ivas_sce_dec( st_ivas, n, &output[n], output_frame, nb_bits_metadata[n] ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* HP filtering */ + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) + { + ivas_mono_downmix_render_passive( st_ivas, output, output_frame ); + } + } + else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) + { + set_s( nb_bits_metadata, 0, MAX_SCE ); + + /* read parameters from the bitstream */ + if ( st_ivas->hQMetaData != NULL && st_ivas->sba_mode != SBA_MODE_SPAR ) + { + st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; + + if ( st_ivas->ivas_format == SBA_FORMAT ) + { + ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, + st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k, + 0 ); + } + else + { + if ( ( error = ivas_masa_decode( st_ivas, st, &nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + if ( st_ivas->hQMetaData != NULL ) + { + st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; + ivas_dirac_dec_read_BS( + ivas_total_brate, + st, + st_ivas->hDirAC, + st_ivas->hQMetaData, + &nb_bits_metadata[0], + st_ivas->sba_mode, + st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k, + st_ivas->hSpar->dirac_to_spar_md_bands ); + } + + if ( ( error = ivas_spar_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( st_ivas->nchan_transport == CPE_CHANNELS && st_ivas->nCPE >= 1 ) + { + st_ivas->hCPE[0]->element_brate = ivas_total_brate; + } + + /* core-decoding of transport channels */ + if ( st_ivas->nSCE == 1 ) + { + if ( ( error = ivas_sce_dec( st_ivas, 0, &output[0], output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->nCPE == 1 ) + { + if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->nCPE > 1 ) + { + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + +#ifdef DEBUG_SBA_AUDIO_DUMP + /* Dump audio signal after core-decoding */ + ivas_spar_dump_signal_wav( output_frame, NULL, output, st_ivas->nchan_transport, spar_foa_dec_wav[0], "core-decoding" ); +#endif + /* TCs remapping */ + nchan_remapped = st_ivas->nchan_transport; + if ( st_ivas->sba_dirac_stereo_flag ) + { + nchan_remapped = nchan_out; + + if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + ivas_agc_dec_process( st_ivas->hSpar->hAgcDec, output, output, st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, output_frame ); + + if ( st_ivas->hSpar->hPCA != NULL ) + { + ivas_pca_dec( st_ivas->hSpar->hPCA, output_frame, st_ivas->hSpar->hMdDec->spar_md_cfg.nchan_transport, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, output ); + } + + ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi, + ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate ) ); + } + + ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, st_ivas->ivas_format == MC_FORMAT ); + } + else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) + { + nchan_remapped = 1; /* Only one channel transported */ + } + + /* HP filtering */ +#ifndef DEBUG_SPAR_BYPASS_EVS_CODEC + for ( n = 0; n < nchan_remapped; n++ ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } +#endif + if ( st_ivas->ivas_format == SBA_FORMAT ) + { + nchan_remapped = ivas_sba_remapTCs( output, st_ivas, output_frame ); + + if ( st_ivas->sba_mode == SBA_MODE_SPAR && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame ); + } + else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + ivas_spar_dec_agc_pca( st_ivas, output, output_frame ); + } + } + + if ( st_ivas->ivas_format == MASA_FORMAT ) + { + ivas_masa_prerender( st_ivas, output, output_frame ); + } + else if ( st_ivas->ivas_format == SBA_FORMAT && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + float gain = 0.8414f; /* Todo: Temporary gain for roughly matching the loudness. To be tuned later together with other outputs. */ + + for ( n = 0; n < nchan_remapped; n++ ) + { + v_multc( output[n], gain, output[n], output_frame ); + } + } + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; + + /* LFE channel decoder */ + if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + if ( st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg == NULL ) + { + st_ivas->hCPE[1]->hCoreCoder[1]->hTcxCfg = st_ivas->hCPE[1]->hCoreCoder[0]->hTcxCfg; + } + ivas_lfe_dec( st_ivas->hLFE, st, output_frame, st_ivas->bfi, output_lfe_ch ); + } + + if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + + mvr2r( output_lfe_ch, output[LFE_CHANNEL], output_frame ); + + /* HP filtering */ + for ( n = 0; n < st_ivas->nchan_transport; n++ ) + { + if ( n != LFE_CHANNEL ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + } + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { + if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) <= ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) + { + ivas_mc2sba( st_ivas->hTransSetup, p_output, p_output, output_frame, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); + } + } + if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) + { + if ( st_ivas->renderer_type == RENDERER_MC ) + { + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, output_frame, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + } + } + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + /* read Parametric MC parameters from the bitstream */ + ivas_param_mc_dec_read_BS( ivas_total_brate, st, st_ivas->hParamMC, &nb_bits_metadata[0] ); + + if ( st_ivas->nCPE == 1 ) + { + if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->nCPE > 1 ) + { + if ( ( error = ivas_mct_dec( st_ivas, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + /* HP filtering */ + for ( n = 0; n < st_ivas->nchan_transport; n++ ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + + /* Rendering */ + if ( output_config == AUDIO_CONFIG_MONO || output_config == AUDIO_CONFIG_STEREO ) + { + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, output_frame, p_output, p_output ); + } + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + st = st_ivas->hCPE[0]->hCoreCoder[0]; /* Metadata is always with CPE in the case of separated channel */ + } + + /* read McMASA parameters from the bitstream */ + if ( ( error = ivas_masa_decode( st_ivas, st, &nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + /* Decode the transport audio signals */ + if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* Identify the index of the separated channel, always LFE_CHANNEL-1 here */ + n = LFE_CHANNEL - 1; + + /* Decode the separated channel to output[n] to be combined with the synthesized channels */ + if ( ( error = ivas_sce_dec( st_ivas, 0, &output[n], output_frame, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + + /* Delay the separated channel to sync with CLDFB delay of the DirAC synthesis, and synthesize the LFE signal. */ + if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || + output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || + output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) + { + ivas_lfe_synth_with_filters( st_ivas->hMasa->hMasaLfeSynth, output, output_frame, n, LFE_CHANNEL ); + } + else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) + { + /* Delay the separated channel to sync with the DirAC rendering */ + delay_signal( output[n], output_frame, st_ivas->hMasa->hMasaLfeSynth->delayBuffer_syncDirAC, st_ivas->hMasa->hMasaLfeSynth->delayBuffer_syncDirAC_size ); + } + } + else + { + if ( st_ivas->nSCE == 1 ) + { + if ( ( error = ivas_sce_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( st_ivas->nCPE == 1 ) + { + if ( ( error = ivas_cpe_dec( st_ivas, 0, output, output_frame, nb_bits_metadata[0] ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + + if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */ + { + ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, 1 ); + } + + /* HP filtering */ + for ( n = 0; n < getNumChanSynthesis( st_ivas ); n++ ) + { + hp20( output[n], output_frame, st_ivas->mem_hp20_out[n], output_Fs ); + } + + if ( st_ivas->renderer_type == RENDERER_MCMASA_MONO_STEREO ) + { + ivas_mono_stereo_downmix_mcmasa( st_ivas, output, output_frame ); + } + } + } + + + /*----------------------------------------------------------------* + * Write IVAS transport channels + *----------------------------------------------------------------*/ + + ivas_syn_output_f( p_output, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data ); + + + /*----------------------------------------------------------------* + * Common updates + *----------------------------------------------------------------*/ + + if ( !st_ivas->bfi ) /* do not update if first frame(s) are lost or NO_DATA */ + { + st_ivas->hDecoderConfig->last_ivas_total_brate = ivas_total_brate; + st_ivas->last_active_ivas_total_brate = ( ivas_total_brate <= IVAS_SID_5k2 ) ? st_ivas->last_active_ivas_total_brate : ivas_total_brate; + } + + if ( st_ivas->ini_frame < MAX_FRAME_COUNTER && !( st_ivas->bfi && st_ivas->ini_frame == 0 ) ) /* keep "st_ivas->ini_frame = 0" until first good received frame */ + { + st_ivas->ini_frame++; + } + + if ( st_ivas->ini_active_frame < MAX_FRAME_COUNTER && !( st_ivas->bfi && st_ivas->ini_frame == 0 ) && ivas_total_brate > IVAS_SID_5k2 ) /* needed in MASA decoder in case the first active frame is BFI, and there were SID-frames decoded before */ + { + st_ivas->ini_active_frame++; + } + +#ifdef DEBUG_MODE_INFO + dbgwrite( &st_ivas->bfi, sizeof( int16_t ), 1, output_frame, "res/bfi" ); + dbgwrite( &st_ivas->BER_detect, sizeof( int16_t ), 1, output_frame, "res/BER_detect" ); + { + float tmpF = ivas_total_brate / 1000.0f; + dbgwrite( &tmpF, sizeof( float ), 1, output_frame, "res/ivas_total_brate.dec" ); + } +#endif + + pop_wmops(); + return error; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_feed_tc_to_renderer() + * + * Feed decoded transport channels and metadata to the IVAS renderer routine + *--------------------------------------------------------------------------*/ + +ivas_error ivas_jbm_dec_feed_tc_to_renderer( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t nSamplesForRendering, /* i: : number of TC samples available for rendering */ + int16_t *nSamplesResidual, /* o: : number of samples not fitting into the renderer grid and buffer for the next call*/ + float *data /* i : transport channels */ +) +{ + + float data_f[MAX_CLDFB_DIGEST_CHANNELS][MAX_JBM_L_FRAME48k]; /* 'float' buffer for transport channels that will be directly converted with the CLDFB */ + float *p_data_f[MAX_CLDFB_DIGEST_CHANNELS]; + int16_t n_render_timeslots; + int16_t n; + ivas_error error; + + error = IVAS_ERR_OK; + + push_wmops( "ivas_jbm_dec_feed_tc_to_rendererer" ); + + for ( n = 0; n < MAX_CLDFB_DIGEST_CHANNELS; n++ ) + { + p_data_f[n] = &data_f[n][0]; + } + ivas_jbm_dec_copy_tc( st_ivas, nSamplesForRendering, nSamplesResidual, data, p_data_f ); + n_render_timeslots = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; + + if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) + { + ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); + } + else if ( st_ivas->ivas_format == STEREO_FORMAT ) + { + ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); + } + else if ( st_ivas->ivas_format == ISM_FORMAT ) + { + /* Rendering */ + if ( st_ivas->ism_mode == ISM_MODE_PARAM ) + { + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + ivas_dirac_dec_set_md_map( st_ivas, n_render_timeslots ); + ivas_param_ism_params_to_masa_param_mapping( st_ivas ); + } + else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + ivas_param_ism_dec_digest_tc( st_ivas, n_render_timeslots, p_data_f ); + } + } + else /* ISM_MODE_DISC */ + { + ivas_ism_dec_digest_tc( st_ivas ); + } + } + else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) + { + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); + } + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + ivas_param_mc_dec_digest_tc( st_ivas, (uint8_t) n_render_timeslots, p_data_f ); + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + ivas_sba_dec_digest_tc( st_ivas, n_render_timeslots, st_ivas->hTcBuffer->n_samples_available ); + } + } + + pop_wmops(); + + return error; +} + + +/*--------------------------------------------------------------------------* + * ivas_dec_render() + * + * Principal IVAS rendering routine + *--------------------------------------------------------------------------*/ +ivas_error ivas_jbm_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const uint16_t nSamplesAsked, /* i : number of samples wanted */ + uint16_t *nSamplesRendered, /* o : number of samples rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ + int16_t *data /* o : output synthesis signal */ +) +{ + + int16_t n, nchan_out; + int16_t nchan_transport; + float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ /* IVAS_fmToDo: buffer can be allocated dynamically based on the actual number of output channels */ + int16_t nchan_remapped; + int32_t output_Fs; + AUDIO_CONFIG output_config; + int16_t nSamplesAskedLocal; + ivas_error error; + float *p_output[MAX_OUTPUT_CHANNELS]; + float *p_tc[MAX_TRANSPORT_CHANNELS]; + + error = IVAS_ERR_OK; + + push_wmops( "ivas_dec_render" ); + + /*----------------------------------------------------------------* + * Initialization of local vars after struct has been set + *----------------------------------------------------------------*/ + + output_Fs = st_ivas->hDecoderConfig->output_Fs; + nchan_out = st_ivas->hDecoderConfig->nchan_out; + nchan_transport = st_ivas->hTcBuffer->nchan_transport_jbm; + output_config = st_ivas->hDecoderConfig->output_config; + nSamplesAskedLocal = nSamplesAsked + st_ivas->hTcBuffer->n_samples_discard; + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output[n] = &output[n][0]; + } + + for ( n = 0; n < st_ivas->hTcBuffer->nchan_transport_internal; n++ ) + { + p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; + } + + /*----------------------------------------------------------------* + * Rendering + *----------------------------------------------------------------*/ + + if ( st_ivas->ivas_format == UNDEFINED_FORMAT ) + { + assert( 0 ); + } + else if ( st_ivas->hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_BUFFER ) + { + ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); + } + else if ( st_ivas->ivas_format == STEREO_FORMAT ) + { + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_MC ) + { + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); + } + } + else if ( st_ivas->ivas_format == ISM_FORMAT ) + { + /* Rendering */ + if ( st_ivas->ism_mode == ISM_MODE_PARAM ) + { + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, st_ivas->nchan_transport, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + ivas_param_ism_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + /* Convert CICP19 -> Ambisonics */ + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + } + } + else /* ISM_MODE_DISC */ + { + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + /* Loudspeaker or Ambisonics rendering */ + if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ + ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + /* Convert to Ambisonics; used also for ISM->HOA3->binaural rendering */ + ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); + } + + /* Binaural rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { + ObjRenderIVASSubframe( st_ivas, p_output, *nSamplesRendered ); + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, + AUDIO_CONFIG_7_1_4, + AUDIO_CONFIG_BINAURAL_ROOM, + st_ivas->hDecoderConfig, + NULL, + NULL, + NULL, + st_ivas->hTcBuffer, + p_output, + p_output, + *nSamplesRendered, + output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, p_output, p_output ); + } +#ifdef DEBUGGING + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + ivas_binaural_cldfb_sf( st_ivas, *nSamplesRendered, p_output ); + } +#endif + } + } + else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) + { + nchan_remapped = nchan_transport; + /* Loudspeakers, Ambisonics or Binaural rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); + } + else if ( st_ivas->sba_mode == SBA_MODE_DIRAC || st_ivas->ivas_format == MASA_FORMAT ) + { + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) + { + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + for ( n = 0; n < nchan_remapped; n++ ) + { + mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); + } + ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); + } + else if ( st_ivas->renderer_type == RENDERER_DIRAC ) + { + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + } + else /* SBA_MODE_SPAR */ + { + ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { + ivas_mc2sba( st_ivas->hTransSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE ); + } + + /* Rendering */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, + st_ivas->intern_config, + st_ivas->hOutSetup.output_config, + st_ivas->hDecoderConfig, + st_ivas->hHeadTrackData, + &st_ivas->hIntSetup, + st_ivas->hEFAPdata, + st_ivas->hTcBuffer, + p_tc, + p_output, + *nSamplesRendered, + output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_MC ) + { + *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); + ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + ivas_mc2sba( st_ivas->hIntSetup, p_tc, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { + ObjRenderIVASSubframe( st_ivas, p_output, *nSamplesRendered ); + ivas_binaural_add_LFE( st_ivas, *nSamplesRendered, st_ivas->hTcBuffer->tc, p_output ); + } + } + else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) + { + ivas_param_mc_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + + /* Rendering */ + int16_t offset = st_ivas->hDirAC->slots_rendered * st_ivas->hDirAC->slot_size; + nchan_remapped = st_ivas->nchan_transport; + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + ivas_dirac_dec_binaural_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, nchan_remapped, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_DIRAC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) /* rendering to CICPxx and Ambisonics */ + { + ivas_dirac_dec_render( st_ivas, nchan_remapped, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, p_output ); + + + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + /* we still need to copy the separate channel if available */ + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); + } + ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + else if ( st_ivas->intern_config == AUDIO_CONFIG_5_1 && ( output_config == AUDIO_CONFIG_5_1_2 || output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1 ) ) + { + for ( n = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; n < st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; n++ ) + { + set_zero( output[n], *nSamplesRendered ); + } + } + } + /* copy discrete C and TD LFE from internal TC to output */ + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + if ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || + output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || + output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) + { + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, output[LFE_CHANNEL], *nSamplesRendered ); + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); + } + else if ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) + { + /* Delay the separated channel to sync with the DirAC rendering */ + mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); + } + } + } + } + + /*----------------------------------------------------------------* + * Write IVAS output channels + * - compensation for saturation + * - float to integer conversion + *----------------------------------------------------------------*/ + st_ivas->hTcBuffer->n_samples_available -= *nSamplesRendered; + st_ivas->hTcBuffer->n_samples_rendered += *nSamplesRendered; + if ( st_ivas->hTcBuffer->n_samples_discard > 0 ) + { + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + p_output[n] += st_ivas->hTcBuffer->n_samples_discard; + } + *nSamplesRendered -= st_ivas->hTcBuffer->n_samples_discard; + st_ivas->hTcBuffer->n_samples_discard = 0; + } + + ivas_limiter_dec( st_ivas->hLimiter, p_output, nchan_out, *nSamplesRendered, st_ivas->BER_detect ); + +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, *nSamplesRendered, nchan_out, data ); + + *nSamplesAvailableNext = st_ivas->hTcBuffer->n_samples_available; + + pop_wmops(); + return error; +} + + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_dec_flush_renderer() + * + * Flush samples if renderer granularity changes on a bitrate change + *--------------------------------------------------------------------------*/ +ivas_error ivas_jbm_dec_flush_renderer( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t tc_granularity_new, /* i : new renderer granularity */ + const RENDERER_TYPE renderer_type_old, /* i : old renderer type */ + const AUDIO_CONFIG intern_config_old, /* i : old internal config */ + const IVAS_OUTPUT_SETUP_HANDLE hIntSetupOld, /* i : old internal output setup */ + const MC_MODE mc_mode_old, /* i : old MC mode */ + const ISM_MODE ism_mode_old, /* i : old ISM mode */ + uint16_t *nSamplesRendered, /* o : number of samples flushed */ + int16_t *data /* o : rendered samples */ +) +{ + ivas_error error; + int16_t n_samples_still_available; + int16_t n_slots_still_available; + int16_t n_samples_to_render; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + float output[MAX_CICP_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; + float *p_output[MAX_CICP_CHANNELS]; + + error = IVAS_ERR_OK; + + *nSamplesRendered = 0; + hTcBuffer = st_ivas->hTcBuffer; + /* get number of possible slots in new granularity */ + n_samples_still_available = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered; + n_slots_still_available = n_samples_still_available / tc_granularity_new; + *nSamplesRendered = n_slots_still_available * tc_granularity_new; + n_samples_to_render = *nSamplesRendered; + n_samples_still_available -= n_samples_to_render; + assert( n_samples_still_available < tc_granularity_new ); + if ( n_slots_still_available ) + { + int ch_idx; + /* render what is still there with zero padding */ + for ( ch_idx = 0; ch_idx < hTcBuffer->nchan_buffer_full; ch_idx++ ) + { + /* move it at the beginning of the TC buffer with zero padding */ + mvr2r( hTcBuffer->tc[ch_idx] + hTcBuffer->n_samples_rendered, hTcBuffer->tc[ch_idx], n_samples_to_render ); + set_zero( hTcBuffer->tc[ch_idx] + n_samples_to_render, hTcBuffer->n_samples_granularity - n_samples_to_render ); + mvr2r( hTcBuffer->tc[ch_idx] + hTcBuffer->n_samples_rendered + n_samples_to_render, hTcBuffer->tc[ch_idx] + hTcBuffer->n_samples_granularity, n_samples_still_available ); + } + /* simple change of the slot info */ + hTcBuffer->num_slots = 1; + hTcBuffer->nb_subframes = 1; + hTcBuffer->subframes_rendered = 0; + hTcBuffer->slots_rendered = 0; + hTcBuffer->subframe_nbslots[0] = 1; + hTcBuffer->n_samples_buffered = hTcBuffer->n_samples_granularity + n_samples_still_available; + hTcBuffer->n_samples_available = 0; + hTcBuffer->n_samples_flushed = n_samples_to_render; + hTcBuffer->n_samples_rendered = hTcBuffer->n_samples_granularity; + + for ( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) + { + p_output[ch_idx] = output[ch_idx]; + } + + if ( st_ivas->ivas_format == ISM_FORMAT ) + { + if ( ism_mode_old == ISM_MODE_DISC ) + { + /* Binaural rendering */ + if ( renderer_type_old == RENDERER_BINAURAL_OBJECTS_TD ) + { + ObjRenderIVASSubframe( st_ivas, p_output, hTcBuffer->n_samples_granularity ); + } + else if ( renderer_type_old == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ + set_f( st_ivas->hIsmRendererData->interpolator, 1.0f, hTcBuffer->n_samples_granularity ); + ivas_ism_render_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ); + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, + AUDIO_CONFIG_7_1_4, + AUDIO_CONFIG_BINAURAL_ROOM, + st_ivas->hDecoderConfig, + NULL, + NULL, + NULL, + st_ivas->hTcBuffer, + p_output, + p_output, + hTcBuffer->n_samples_granularity, + st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, p_output, p_output ); + } + } + else + { + return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong ISM_MODE in VoIP renderer flushing!" ); + } + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + if ( mc_mode_old == MC_MODE_MCT ) + { + if ( renderer_type_old == RENDERER_BINAURAL_MIXER_CONV || renderer_type_old == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, + intern_config_old, + st_ivas->hOutSetup.output_config, + st_ivas->hDecoderConfig, + st_ivas->hHeadTrackData, + hIntSetupOld, + st_ivas->hEFAPdata, + st_ivas->hTcBuffer, + hTcBuffer->tc, + p_output, + hTcBuffer->n_samples_granularity, + st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) + { + ObjRenderIVASSubframe( st_ivas, p_output, hTcBuffer->n_samples_granularity ); + ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); + } + } + else + { + return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong MC_MODE in VoIP renderer flushing!" ); + } + } + else + { + return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong IVAS format in VoIP renderer flushing!" ); + } + } + + /* Only write out the valid data*/ + ivas_limiter_dec( st_ivas->hLimiter, p_output, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect ); + +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, data ); + + + return error; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_set_discard_samples() + * + * Set number of samples to discard in the first subframe if the renderer granularity changes on a bitrate change + *--------------------------------------------------------------------------*/ +ivas_error ivas_jbm_dec_set_discard_samples( + Decoder_Struct *st_ivas /* i/o: main IVAS decoder structre */ +) +{ + int16_t nMaxSlotsPerSubframe, nSlotsInFirstSubframe; + ivas_error error; + + error = IVAS_ERR_OK; + + /* render first frame with front zero padding and discarding those samples */ + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; + if ( nSlotsInFirstSubframe > 0 ) + { + st_ivas->hTcBuffer->n_samples_discard = ( nMaxSlotsPerSubframe - nSlotsInFirstSubframe ) * st_ivas->hTcBuffer->n_samples_granularity; + /* set last subframes number to max to ensure correct continuation */ + st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1] = nMaxSlotsPerSubframe; + } + return error; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_get_adapted_linear_interpolator() + * + * Get an interpolator that is adapted to time scale modified IVAS frame + *--------------------------------------------------------------------------*/ + +void ivas_jbm_dec_get_adapted_linear_interpolator( + const int16_t default_interp_length, /* i : default length of the (full-frame) interpolator */ + const int16_t interp_length, /* i : length of the interpolator to be created */ + float *interpolator /* o : the interpolator */ +) +{ + int16_t jbm_segment_len, idx; + float dec; +#ifdef DEBUGGING + assert( default_interp_length % 2 == 0 ); +#endif + + jbm_segment_len = ( default_interp_length >> 1 ); + dec = 1.0f / default_interp_length; + + interpolator[interp_length - 1] = 1.0f; + for ( idx = interp_length - 2; idx >= jbm_segment_len; idx-- ) + { + interpolator[idx] = max( 0.0f, interpolator[idx + 1] - dec ); + } + if ( interpolator[idx + 1] > 0.0f ) + { + dec = interpolator[idx + 1] / ( jbm_segment_len + 1 ); + for ( ; idx >= 0; idx-- ) + { + interpolator[idx] = interpolator[idx + 1] - dec; + } + } + else + { + set_f( interpolator, 0.0f, idx + 1 ); + } +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_get_adapted_subframes() + * + * Get an interpolator that is adapted to time scale modified IVAS frame + *--------------------------------------------------------------------------*/ +void ivas_jbm_dec_get_adapted_subframes( + const int16_t nCldfbTs, /* i : number of time slots in the current frame */ + int16_t *subframe_nbslots, /* i/o: subframe grid */ + int16_t *nb_subframes /* i/o: number of subframes in the frame */ +) +{ + uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; + uint16_t nCldfbSlotsLocal = nCldfbTs; + /* get last subframe size from previous frame, determine how many slots have to be processed + in the first subframe (i.e. potential leftover of a 5ms subframe) */ + nSlotsInFirstSubframe = ( PARAM_MC_MAX_NSLOTS_IN_SUBFRAME - subframe_nbslots[*nb_subframes - 1] ); + *nb_subframes = 0; + if ( nSlotsInFirstSubframe > 0 ) + { + *nb_subframes = 1; + nCldfbSlotsLocal -= nSlotsInFirstSubframe; + } + *nb_subframes += (int16_t) ceilf( (float) nCldfbSlotsLocal / (float) PARAM_MC_MAX_NSLOTS_IN_SUBFRAME ); + nSlotsInLastSubframe = nCldfbSlotsLocal % PARAM_MC_MAX_NSLOTS_IN_SUBFRAME; + set_s( subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( subframe_nbslots, PARAM_MC_MAX_NSLOTS_IN_SUBFRAME, *nb_subframes ); + if ( nSlotsInFirstSubframe > 0 ) + { + subframe_nbslots[0] = nSlotsInFirstSubframe; + } + if ( nSlotsInLastSubframe > 0 ) + { + subframe_nbslots[*nb_subframes - 1] = nSlotsInLastSubframe; + } + return; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_get_adapted_linear_interpolator() + * + * Get an meta data map adapted to a time scale modified IVAS frame + *--------------------------------------------------------------------------*/ +void ivas_jbm_dec_get_md_map( + const int16_t default_len, /* i : default frame length in metadata slots */ + const int16_t len, /* i : length of the modfied frames in metadata slots */ + const int16_t subframe_len, /* i : default length of a subframe */ + const int16_t offset, /* i : current read offset into the md buffer */ + const int16_t buf_len, /* i : length of the metadata buffer */ + int16_t *map /* o : metadata index map */ +) +{ + int16_t jbm_segment_len, map_idx, src_idx, src_idx_map; + float dec, src_idx_f; +#ifdef DEBUGGING + assert( default_len % 2 == 0 ); +#endif + + jbm_segment_len = ( default_len >> 1 ); + dec = 1.0f / default_len; + + + for ( map_idx = len - 1, src_idx = default_len - 1; map_idx >= jbm_segment_len; map_idx--, src_idx-- ) + { + src_idx_map = max( 0, src_idx / subframe_len ); + map[map_idx] = ( offset + src_idx_map ) % buf_len; + } + /* changed part (first segment), interpolate index to parameters + (we do not want to interpolate and smooth acutal direction/diffuseness values even more) */ + if ( src_idx >= 0 ) + { + dec = ( (float) ( src_idx + 1 ) ) / ( (float) jbm_segment_len ); + src_idx_f = (float) ( src_idx + 1 ) - dec; + for ( ; map_idx >= 0; map_idx-- ) + { + src_idx = max( 0, ( (int16_t) round_f( src_idx_f ) ) / subframe_len ); + map[map_idx] = ( offset + src_idx ) % buf_len; + src_idx_f -= dec; + } + } + else + { + set_s( map, offset, map_idx + 1 ); + } +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_get_num_tc_channels() + * + * Get the number of transport channels provided by the JBM transport channel decode function + *--------------------------------------------------------------------------*/ +int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas ) /* i : IVAS decoder handle */ +{ + int16_t num_tc; + int32_t ivas_total_brate; + AUDIO_CONFIG output_config; + + if ( st_ivas->renderer_type == RENDERER_DISABLE ) + { + num_tc = st_ivas->hDecoderConfig->nchan_out; + } + else + { + num_tc = st_ivas->nchan_transport; + } + output_config = st_ivas->hDecoderConfig->output_config; + + ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) + { + num_tc = 1; + } + else if ( st_ivas->ivas_format == ISM_FORMAT ) + { + if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX ) + { + num_tc = 1; + } + } + else if ( st_ivas->ivas_format == SBA_FORMAT || st_ivas->ivas_format == MASA_FORMAT ) + { + if ( st_ivas->sba_dirac_stereo_flag ) + { + num_tc = CPE_CHANNELS; + } + else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) + { + num_tc = 1; /* Only one channel transported */ + } + + if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL && st_ivas->nchan_transport == 2 && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE && st_ivas->hDecoderConfig->ivas_total_brate > IVAS_SID_5k2 ) + { + num_tc = CPE_CHANNELS; + } + if ( st_ivas->ivas_format == SBA_FORMAT ) + { + if ( ( st_ivas->sba_mode != SBA_MODE_SPAR && st_ivas->sba_planar && num_tc >= 3 ) || + ( ( st_ivas->sba_mode == SBA_MODE_SPAR ) && num_tc == 3 ) ) + { + num_tc++; + } + } + } + else if ( st_ivas->ivas_format == MC_FORMAT ) + { + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) + { + num_tc = 1; + } + else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) + { + num_tc = 2; + } + else if ( st_ivas->mc_mode == MC_MODE_MCT ) + { + /* do all static dmx already in the TC decoder if less channels than transported... */ + if ( st_ivas->transport_config != st_ivas->intern_config && ( st_ivas->intern_config == AUDIO_CONFIG_FOA || st_ivas->intern_config == AUDIO_CONFIG_HOA2 || st_ivas->intern_config == AUDIO_CONFIG_HOA3 ) ) + { + if ( ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) > ( st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe ) ) + { + num_tc = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; + } + } + else if ( ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) + { + num_tc = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; + } + } + else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) + { + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + num_tc++; + } + if ( st_ivas->hOutSetup.separateChannelEnabled && ( output_config == AUDIO_CONFIG_5_1 || output_config == AUDIO_CONFIG_7_1 || + output_config == AUDIO_CONFIG_5_1_4 || output_config == AUDIO_CONFIG_7_1_4 || + output_config == AUDIO_CONFIG_5_1_2 || ( output_config == AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) ) + { + /* LFE is synthesized in TD with the TCs*/ + num_tc++; + } + } + } + + return num_tc; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_copy_tc() + * + * Copy interleaved transport chnannels to the correct buffers, update the TC + * buffer handle + *--------------------------------------------------------------------------*/ +void ivas_jbm_dec_copy_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t nSamplesForRendering, /* i : number of samples to digest */ + int16_t *nSamplesResidual, /* o : number of samples that will be left for the next frame */ + float *data, /* i : (interleaved) transport channel samples */ + float *tc_digest_f[] /* o : samples that will be directly digestest (eg. by CLDFB) */ +) +{ + int16_t ch; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + int16_t n_samples_still_available, m; + int16_t n_ch_full_copy; + int16_t n_ch_res_copy; + + + hTcBuffer = st_ivas->hTcBuffer; + n_samples_still_available = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered; + hTcBuffer->n_samples_buffered = n_samples_still_available + nSamplesForRendering + hTcBuffer->n_samples_discard; + hTcBuffer->n_samples_available = hTcBuffer->n_samples_granularity * ( hTcBuffer->n_samples_buffered / hTcBuffer->n_samples_granularity ); + *nSamplesResidual = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_available; + n_ch_full_copy = min( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ); + n_ch_res_copy = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full; + + for ( ch = 0; ch < n_ch_full_copy; ch++ ) + { + set_zero( hTcBuffer->tc[ch], hTcBuffer->n_samples_discard ); + mvr2r( hTcBuffer->tc[ch] + hTcBuffer->n_samples_rendered, hTcBuffer->tc[ch] + hTcBuffer->n_samples_discard, n_samples_still_available ); + for ( m = 0; m < nSamplesForRendering; m++ ) + { + hTcBuffer->tc[ch][n_samples_still_available + hTcBuffer->n_samples_discard + m] = data[m * st_ivas->hTcBuffer->nchan_transport_jbm + ch]; + } + } + if ( n_ch_res_copy > 0 ) + { + for ( ; ch < hTcBuffer->nchan_transport_jbm; ch++ ) + { + mvr2r( hTcBuffer->tc[ch], tc_digest_f[ch], n_samples_still_available ); + for ( m = 0; m < nSamplesForRendering; m++ ) + { + tc_digest_f[ch][n_samples_still_available + m] = data[m * st_ivas->hTcBuffer->nchan_transport_jbm + ch]; + } + mvr2r( tc_digest_f[ch] + hTcBuffer->n_samples_available, hTcBuffer->tc[ch], *nSamplesResidual ); + } + } + hTcBuffer->n_samples_rendered = 0; + return; +} + + +int16_t ivas_jbm_dec_get_render_granularity( const RENDERER_TYPE rendererType, + const int32_t output_Fs ) +{ + int16_t render_granularity; + + if ( rendererType == RENDERER_BINAURAL_OBJECTS_TD || rendererType == RENDERER_BINAURAL_MIXER_CONV || rendererType == RENDERER_BINAURAL_MIXER_CONV_ROOM ) + { + render_granularity = NS2SA( output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); + } + else + { + render_granularity = NS2SA( output_Fs, CLDFB_SLOT_NS ); + } + + return render_granularity; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_tc_buffer_open() + * + * open and initialize the transport channel buffer + *--------------------------------------------------------------------------*/ +ivas_error ivas_jbm_dec_tc_buffer_open( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const TC_BUFFER_MODE tc_buffer_mode, /* i : buffer mode */ + const int16_t nchan_transport_jbm, /* i : number of real transport channels */ + const int16_t nchan_transport_internal, /* i : number of totally buffered channels */ + const int16_t nchan_full, /* i : nubmer of channels to fully store */ + const int16_t n_samples_granularity /* i : granularity of the renderer/buffer */ +) +{ + int16_t nsamp_to_allocate; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + ivas_error error; + int16_t nMaxSlotsPerSubframe; + int16_t nchan_residual; + int16_t ch_idx; + + error = IVAS_ERR_OK; + + /*-----------------------------------------------------------------* + * prepare library opening + *-----------------------------------------------------------------*/ + + if ( ( hTcBuffer = (DECODER_TC_BUFFER_HANDLE) malloc( sizeof( DECODER_TC_BUFFER ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for TC Buffer\n" ) ); + } + hTcBuffer->tc_buffer_mode = tc_buffer_mode; + hTcBuffer->nchan_transport_jbm = nchan_transport_jbm; + hTcBuffer->nchan_transport_internal = nchan_transport_internal; + hTcBuffer->nchan_buffer_full = nchan_full; + nchan_residual = nchan_transport_internal - nchan_full; + hTcBuffer->n_samples_granularity = n_samples_granularity; + hTcBuffer->n_samples_available = 0; + hTcBuffer->n_samples_buffered = 0; + hTcBuffer->n_samples_rendered = 0; + hTcBuffer->slots_rendered = 0; + hTcBuffer->subframes_rendered = 0; + hTcBuffer->n_samples_discard = 0; + hTcBuffer->n_samples_flushed = 0; + hTcBuffer->nb_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; + nsamp_to_allocate = 0; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / hTcBuffer->n_samples_granularity; + hTcBuffer->num_slots = nMaxSlotsPerSubframe * MAX_PARAM_SPATIAL_SUBFRAMES; + set_s( hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, MAX_PARAM_SPATIAL_SUBFRAMES ); + + if ( hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_NONE ) + { + hTcBuffer->tc_buffer = NULL; + for ( ch_idx = 0; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = NULL; + } + } + else + { + int16_t n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + int16_t n_samp_residual = hTcBuffer->n_samples_granularity - 1; + int32_t offset; + nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; + nsamp_to_allocate += nchan_residual * n_samp_residual; + hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ); + set_zero( hTcBuffer->tc_buffer, nsamp_to_allocate ); + offset = 0; + for ( ch_idx = 0; ch_idx < hTcBuffer->nchan_buffer_full; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; + offset += n_samp_full; + } + for ( ; ch_idx < hTcBuffer->nchan_transport_internal; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; + offset += n_samp_residual; + } + for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = NULL; + } + } + + st_ivas->hTcBuffer = hTcBuffer; + return error; +} + +/*--------------------------------------------------------------------------* + * ivas_jbm_dec_tc_buffer_reconfigure() + * + * open and initialize the transport channel buffer + *--------------------------------------------------------------------------*/ +ivas_error ivas_jbm_dec_tc_buffer_reconfigure( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const TC_BUFFER_MODE tc_buffer_mode, /* i : new buffer mode */ + const int16_t nchan_transport_jbm, /* i : new number of real transport channels */ + const int16_t nchan_transport_internal, /* i : new number of totally buffered channels */ + const int16_t nchan_full, /* i : new number of channels to fully store */ + const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ +) +{ + ivas_error error; + int16_t nsamp_to_allocate, n_samp_full, n_samp_residual, offset, nchan_residual; + int16_t ch_idx; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + + error = IVAS_ERR_OK; + + hTcBuffer = st_ivas->hTcBuffer; + + /* if granularity changes, adapt subframe_nb_slots */ + if ( n_samples_granularity != hTcBuffer->n_samples_granularity ) + { +#ifdef DEBUGGING + int16_t nMaxSlotsPerSubframeOld; +#endif + int16_t nMaxSlotsPerSubframeNew; + + nMaxSlotsPerSubframeNew = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / n_samples_granularity; +#ifdef DEBUGGING + nMaxSlotsPerSubframeOld = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + assert( hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] == nMaxSlotsPerSubframeOld ); + if ( n_samples_granularity < hTcBuffer->n_samples_granularity ) + { + assert( ( hTcBuffer->n_samples_granularity % n_samples_granularity ) == 0 ); + } + else + { + assert( ( n_samples_granularity % hTcBuffer->n_samples_granularity ) == 0 ); + } +#endif + /* if samples were flushed, take that into account here */ + if ( n_samples_granularity < hTcBuffer->n_samples_granularity && hTcBuffer->n_samples_flushed > 0 ) + { + hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] = hTcBuffer->n_samples_flushed / n_samples_granularity; + hTcBuffer->n_samples_flushed = 0; + } + else + { + hTcBuffer->subframe_nbslots[hTcBuffer->subframes_rendered - 1] = nMaxSlotsPerSubframeNew; + } + } + + hTcBuffer->tc_buffer_mode = tc_buffer_mode; + hTcBuffer->nchan_transport_jbm = nchan_transport_jbm; + hTcBuffer->nchan_transport_internal = nchan_transport_internal; + hTcBuffer->nchan_buffer_full = nchan_full; + nchan_residual = nchan_transport_internal - nchan_full; + hTcBuffer->n_samples_granularity = n_samples_granularity; + /* what is remaining from last frames needs always be smaller than n_samples_granularity */ + assert( ( hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered ) < n_samples_granularity ); + + /* realloc buffers */ + free( hTcBuffer->tc_buffer ); + n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 ); + n_samp_residual = hTcBuffer->n_samples_granularity - 1; + nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full; + nsamp_to_allocate += nchan_residual * n_samp_residual; + hTcBuffer->tc_buffer = (float *) malloc( nsamp_to_allocate * sizeof( float ) ); + set_zero( hTcBuffer->tc_buffer, nsamp_to_allocate ); + offset = 0; + for ( ch_idx = 0; ch_idx < hTcBuffer->nchan_buffer_full; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; + offset += n_samp_full; + } + for ( ; ch_idx < hTcBuffer->nchan_transport_internal; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = &hTcBuffer->tc_buffer[offset]; + offset += n_samp_residual; + } + for ( ; ch_idx < MAX_TRANSPORT_CHANNELS; ch_idx++ ) + { + hTcBuffer->tc[ch_idx] = NULL; + } + + return error; +} + +void ivas_jbm_dec_tc_buffer_playout( + Decoder_Struct *st_ivas, + const uint16_t nSamplesAsked, + uint16_t *nSamplesRendered, + float *output[] ) +{ + + int16_t ch_idx, slot_size, slots_to_render, first_sf, last_sf; + + slot_size = st_ivas->hTcBuffer->n_samples_granularity; + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, nSamplesAsked / slot_size ); + st_ivas->hTcBuffer->slots_rendered += slots_to_render; + *nSamplesRendered = (uint16_t) slots_to_render * slot_size; + first_sf = st_ivas->hTcBuffer->subframes_rendered; + last_sf = first_sf; + while ( slots_to_render > 0 ) + { + slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; + last_sf++; + } + for ( ch_idx = 0; ch_idx < st_ivas->hTcBuffer->nchan_transport_jbm; ch_idx++ ) + { + mvr2r( st_ivas->hTcBuffer->tc[ch_idx] + st_ivas->hTcBuffer->n_samples_rendered, output[ch_idx], *nSamplesRendered ); + } + + st_ivas->hTcBuffer->subframes_rendered = last_sf; +} + +void ivas_jbm_dec_tc_buffer_close( + DECODER_TC_BUFFER_HANDLE *phTcBuffer /* i/o: TC buffer handle */ +) +{ + int16_t i; + + if ( *phTcBuffer != NULL ) + { + for ( i = 0; i < MAX_TRANSPORT_CHANNELS; i++ ) + { + ( *phTcBuffer )->tc[i] = NULL; + } + if ( ( *phTcBuffer )->tc_buffer != NULL ) + { + free( ( *phTcBuffer )->tc_buffer ); + ( *phTcBuffer )->tc_buffer = NULL; + } + + free( *phTcBuffer ); + *phTcBuffer = NULL; + } + return; +} + +void ivas_jbm_dec_td_renderers_adapt_subframes( + Decoder_Struct *st_ivas ) +{ + int16_t nMaxSlotsPerSubframe, nSlotsAvailable; + uint16_t nSlotsInLastSubframe, nSlotsInFirstSubframe; + nMaxSlotsPerSubframe = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ) / st_ivas->hTcBuffer->n_samples_granularity; + nSlotsAvailable = st_ivas->hTcBuffer->n_samples_available / st_ivas->hTcBuffer->n_samples_granularity; + st_ivas->hTcBuffer->num_slots = nSlotsAvailable; + st_ivas->hTcBuffer->n_samples_available = nSlotsAvailable * st_ivas->hTcBuffer->n_samples_granularity; + nSlotsInFirstSubframe = nMaxSlotsPerSubframe - st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1]; + st_ivas->hTcBuffer->nb_subframes = 0; + if ( nSlotsInFirstSubframe > 0 ) + { + st_ivas->hTcBuffer->nb_subframes = 1; + nSlotsAvailable -= nSlotsInFirstSubframe; + } + st_ivas->hTcBuffer->nb_subframes += (int16_t) ceilf( (float) nSlotsAvailable / (float) nMaxSlotsPerSubframe ); + nSlotsInLastSubframe = nSlotsAvailable % nMaxSlotsPerSubframe; + set_s( st_ivas->hTcBuffer->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( st_ivas->hTcBuffer->subframe_nbslots, nMaxSlotsPerSubframe, st_ivas->hTcBuffer->nb_subframes ); + if ( nSlotsInFirstSubframe > 0 ) + { + st_ivas->hTcBuffer->subframe_nbslots[0] = nSlotsInFirstSubframe; + } + if ( nSlotsInLastSubframe > 0 ) + { + st_ivas->hTcBuffer->subframe_nbslots[st_ivas->hTcBuffer->nb_subframes - 1] = nSlotsInLastSubframe; + } + st_ivas->hTcBuffer->slots_rendered = 0; + st_ivas->hTcBuffer->subframes_rendered = 0; +} + +TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( Decoder_Struct *st_ivas ) +{ + TC_BUFFER_MODE buffer_mode; + buffer_mode = TC_BUFFER_MODE_BUFFER; + + /*:TODO: wrap this maybe nicer without directly accessing the st_ivas struct...*/ + switch ( st_ivas->renderer_type ) + { + /* all renderers where we are done after TC decoding (might include DMX to mono/stereo */ + case RENDERER_DISABLE: + case RENDERER_MCMASA_MONO_STEREO: + case RENDERER_MONO_DOWNMIX: + buffer_mode = TC_BUFFER_MODE_BUFFER; + break; + case RENDERER_TD_PANNING: + case RENDERER_BINAURAL_OBJECTS_TD: + case RENDERER_BINAURAL_FASTCONV: + case RENDERER_BINAURAL_FASTCONV_ROOM: + case RENDERER_BINAURAL_PARAMETRIC: + case RENDERER_BINAURAL_PARAMETRIC_ROOM: + case RENDERER_STEREO_PARAMETRIC: + case RENDERER_DIRAC: + case RENDERER_PARAM_ISM: + case RENDERER_BINAURAL_MIXER_CONV: + case RENDERER_BINAURAL_MIXER_CONV_ROOM: + buffer_mode = TC_BUFFER_MODE_RENDERER; + break; + case RENDERER_MC_PARAMMC: + if ( st_ivas->hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; /* TCs are already the DMX to mono or stereo */ + } + else + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + } + break; + case RENDERER_MC: + if ( ivas_jbm_dec_get_num_tc_channels( st_ivas ) != st_ivas->hDecoderConfig->nchan_out ) + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + } + break; + case RENDERER_SBA_LINEAR_ENC: + if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT && ( st_ivas->renderer_type == RENDERER_MC || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) && ( st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe ) >= ( st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe ) ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + } + else + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + } + break; + case RENDERER_SBA_LINEAR_DEC: + if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + } + else + { + buffer_mode = TC_BUFFER_MODE_RENDERER; + } + break; +#ifdef DEBUGGING + default: + assert( 0 ); +#endif + } + + + return buffer_mode; +} +#endif diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index eead75925747f4c74be20decceb7fe52c3047f9e..7445bfb4894103069b518c76da51d939b6088b54 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -47,9 +47,11 @@ /*-----------------------------------------------------------------------* * Local constants *-----------------------------------------------------------------------*/ + #define SPAR_META_DELAY_SUBFRAMES 2 /* Number of subframes to delay the SPAR metadata */ #define SPH_IDX_FRONT ( MASA_NO_POINTS_EQUATOR / 2 ) /* Spherical index corresponding to front direction for setting as default value */ + /*-----------------------------------------------------------------------* * Local function prototypes *-----------------------------------------------------------------------*/ @@ -58,7 +60,9 @@ static int16_t quantize_theta( float x, int16_t no_cb, float *xhat ); static uint16_t index_theta_phi_16( float theta, float phi, SPHERICAL_GRID_DATA *Sph_Grid16 ); static int16_t quantize_phi_masa( float phi, int16_t flag_delta, float *phi_hat, const int16_t n ); #endif + static void index_16bits( IVAS_QMETADATA_HANDLE hQMetaData, SPHERICAL_GRID_DATA *Sph_Grid16 ); + static void create_masa_ext_out_meta( MASA_DECODER *hMasa, IVAS_QMETADATA_HANDLE hQMetaData, const int16_t nchan_transport ); static void replicate_subframes( IVAS_QMETADATA_HANDLE hQMetaData ); @@ -197,21 +201,32 @@ ivas_error ivas_masa_decode( { if ( ivas_total_brate >= IVAS_512k ) { - *nb_bits_read += ivas_qmetadata_dec_decode_hr_384_512( hQMetaData, st->bit_stream, &st->next_bit_pos, hMasa->data.sph_grid16, 16, 4 ); + *nb_bits_read += ivas_qmetadata_dec_decode_hr_384_512( hQMetaData, st->bit_stream, &st->next_bit_pos, hMasa->data.sph_grid16, 16, 4 +#ifdef FIX_HBR_MASAMETA + , + hMasa->config.numCodingBands +#endif + ); } else { - *nb_bits_read += ivas_qmetadata_dec_decode_hr_384_512( hQMetaData, st->bit_stream, &st->next_bit_pos, hMasa->data.sph_grid16, 11, 3 ); + *nb_bits_read += ivas_qmetadata_dec_decode_hr_384_512( hQMetaData, st->bit_stream, &st->next_bit_pos, hMasa->data.sph_grid16, 11, 3 +#ifdef FIX_HBR_MASAMETA + , + hMasa->config.numCodingBands +#endif + ); } } else { - #endif - *nb_bits_read += ivas_qmetadata_dec_decode( hQMetaData, st->bit_stream, &st->next_bit_pos ); + *nb_bits_read += ivas_qmetadata_dec_decode( hQMetaData, st->bit_stream, &st->next_bit_pos, + 0 ); #ifdef HR_METADATA } #endif + /* Get direction decoding quality. EC 1 and 2 are handled by the default value. */ if ( hQMetaData->ec_flag == 2 ) { @@ -293,7 +308,10 @@ ivas_error ivas_masa_decode( } if ( st_ivas->hDirAC != NULL ) { - ivas_qmetadata_to_dirac( hQMetaData, st_ivas->hDirAC, hMasa, ivas_total_brate, SBA_MODE_NONE, 0 ); + ivas_qmetadata_to_dirac( hQMetaData, st_ivas->hDirAC, hMasa, ivas_total_brate, + SBA_MODE_NONE, + 0, + 0 ); } st->next_bit_pos = next_bit_pos_orig; @@ -389,6 +407,25 @@ ivas_error ivas_masa_dec_open( st_ivas->hMasa = hMasa; +#ifdef JBM_TSM_ON_TCS + /* allocate transport channels*/ + if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL && st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC ) + { + int16_t nchan_to_allocate; + TC_BUFFER_MODE buffer_mode; + buffer_mode = TC_BUFFER_MODE_RENDERER; + if ( st_ivas->mc_mode == MC_MODE_MCMASA && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + } + nchan_to_allocate = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_to_allocate, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif /* JBM_TMS_ON_TCS*/ + return error; } @@ -470,6 +507,10 @@ static ivas_error ivas_masa_dec_config( { int16_t i; MASA_DECODER_HANDLE hMasa; +#ifdef FIX_HBR_MASAMETA + uint8_t maxBand; + int16_t maxBin; +#endif ivas_error error; error = IVAS_ERR_OK; @@ -520,6 +561,26 @@ static ivas_error ivas_masa_dec_config( ivas_set_qmetadata_maxbit_req( st_ivas->hQMetaData, st_ivas->ivas_format ); +#ifdef FIX_HBR_MASAMETA + /* Find maximum band usable */ + maxBin = (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH ); + maxBand = 0; + while ( maxBand <= MASA_FREQUENCY_BANDS && MASA_band_grouping_24[maxBand] <= maxBin ) + { + maxBand++; + } + maxBand--; + + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) + { + /* need to apply the sampling rate correction also for the EXT output MASA meta buffer */ + masa_sample_rate_band_correction( &( hMasa->config ), hMasa->data.band_mapping, st_ivas->hQMetaData, maxBand, 0, hMasa->data.extOutMeta ); + } + else + { + masa_sample_rate_band_correction( &( hMasa->config ), hMasa->data.band_mapping, st_ivas->hQMetaData, maxBand, 0, NULL ); + } +#else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) { /* need to apply the sampling rate correction also for the EXT output MASA meta buffer */ @@ -529,6 +590,7 @@ static ivas_error ivas_masa_dec_config( { masa_sample_rate_band_correction( &( hMasa->config ), hMasa->data.band_mapping, st_ivas->hQMetaData, st_ivas->hDecoderConfig->output_Fs, NULL ); } +#endif return error; } @@ -546,7 +608,11 @@ void ivas_masa_prerender( const int16_t output_frame /* i : output frame length per channel */ ) { +#ifdef FIX_490_MASA_2TC_LBR_DTX + if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_transport == 2 && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE ) +#else if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_transport == 2 && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE && st_ivas->hDecoderConfig->ivas_total_brate > IVAS_SID_5k2 ) +#endif { if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_EXTERNAL ) { @@ -1108,9 +1174,7 @@ ivas_error ivas_masa_dec_reconfigure( uint16_t *bit_stream; Decoder_State **sts; int32_t ivas_total_brate, last_ivas_total_brate; -#ifdef FIX_417_TD_DECORR_BRATE_SW int16_t numCldfbAnalyses_old, numCldfbSyntheses_old; -#endif ivas_error error; error = IVAS_ERR_OK; @@ -1118,11 +1182,8 @@ ivas_error ivas_masa_dec_reconfigure( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; -#ifdef FIX_417_TD_DECORR_BRATE_SW ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); -#endif -#ifdef FIX_425_MASA_BRSW_RENDERER /* renderer might have changed, reselect */ ivas_renderer_select( st_ivas ); @@ -1140,7 +1201,6 @@ ivas_error ivas_masa_dec_reconfigure( ivas_dirac_dec_close( &( st_ivas->hDirAC ) ); } /* possible reconfigure is done later */ -#endif /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles @@ -1198,14 +1258,11 @@ ivas_error ivas_masa_dec_reconfigure( } } } -#ifdef FIX_425_MASA_BRSW_RENDERER if ( st_ivas->hDiracDecBin != NULL ) { /* regularization factor is bitrate-dependent */ st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); } -#endif -#ifdef FIX_417_TD_DECORR_BRATE_SW /*-----------------------------------------------------------------* * TD Decorrelator *-----------------------------------------------------------------*/ @@ -1230,21 +1287,39 @@ ivas_error ivas_masa_dec_reconfigure( /*-----------------------------------------------------------------* * Set-up MASA coding elements and bitrates *-----------------------------------------------------------------*/ -#endif ivas_masa_set_elements( ivas_total_brate, st_ivas->mc_mode, st_ivas->nchan_transport, st_ivas->hQMetaData, &tmp, &tmp, &tmp ); +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active == 1 ) + { + int16_t tc_nchan_to_allocate; + int16_t tc_nchan_transport; + TC_BUFFER_MODE buffer_mode_new; + + buffer_mode_new = ivas_jbm_dec_get_tc_buffer_mode( st_ivas ); + tc_nchan_transport = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + tc_nchan_to_allocate = tc_nchan_transport; + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS; + } + if ( tc_nchan_transport != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || buffer_mode_new != st_ivas->hTcBuffer->tc_buffer_mode ) + { + if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, buffer_mode_new, tc_nchan_transport, tc_nchan_to_allocate, tc_nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } +#endif return error; } -/*-------------------------------------------------------------------* - * ivas_spar_param_to_masa_param_mapping() - * - * Determine MASA metadata from the SPAR metadata - *-------------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS +#endif -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS void ivas_spar_param_to_masa_param_mapping( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ @@ -1257,8 +1332,8 @@ void ivas_spar_param_to_masa_param_mapping( int16_t dirac_write_idx; DIRAC_DEC_HANDLE hDirAC; DIFFUSE_DISTRIBUTION_HANDLE hDiffuseDist; - float mixer_mat_sf_bands_real[MAX_PARAM_SPATIAL_SUBFRAMES][SPAR_DIRAC_SPLIT_START_BAND][FOA_CHANNELS][FOA_CHANNELS]; - float mixer_mat_sf_bins_real[MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX][FOA_CHANNELS][FOA_CHANNELS]; + float mixer_mat_sf_bands_real[SPAR_DIRAC_SPLIT_START_BAND][FOA_CHANNELS][FOA_CHANNELS]; + float mixer_mat_sf_bins_real[CLDFB_NO_CHANNELS_MAX][FOA_CHANNELS][FOA_CHANNELS]; int16_t *band_grouping; int16_t band_start, band_end; float transportSignalEnergies[2][CLDFB_NO_CHANNELS_MAX]; @@ -1268,6 +1343,12 @@ void ivas_spar_param_to_masa_param_mapping( float foaCovarianceMtx[FOA_CHANNELS][FOA_CHANNELS]; float Iy, Iz, Ix, E, azi, ele, I, ratio; float diffuseGainX, diffuseGainY, diffuseGainZ, diffuseGainSum; +#ifdef JBM_TSM_ON_TCS + int16_t slot_idx, slot_idx_start, sf; + SPAR_DEC_HANDLE hSpar; + float slot_fac; +#endif + /* Set values */ hDirAC = st_ivas->hDirAC; @@ -1275,7 +1356,12 @@ void ivas_spar_param_to_masa_param_mapping( hDiffuseDist = st_ivas->hDirAC->hDiffuseDist; nchan_transport = st_ivas->nchan_transport; band_grouping = hDirAC->band_grouping; +#ifdef JBM_TSM_ON_TCS + hSpar = st_ivas->hSpar; + dirac_write_idx = hDirAC->render_to_md_map[subframe]; +#else dirac_write_idx = hDirAC->dirac_read_idx; /* Mixing matrices, from which MASA meta is determined, already have the delay compensation */ +#endif /* Init arrays */ for ( i = 0; i < FOA_CHANNELS; i++ ) @@ -1284,34 +1370,61 @@ void ivas_spar_param_to_masa_param_mapping( } /* Delay the SPAR mixing matrices to have them synced with the audio */ - if ( subframe < SPAR_META_DELAY_SUBFRAMES ) +#ifdef JBM_TSM_ON_TCS + slot_idx_start = hSpar->slots_rendered; + slot_fac = 1.0f / (float) hSpar->subframe_nbslots[subframe]; + + for ( slot_idx = 0; slot_idx < hSpar->subframe_nbslots[subframe]; slot_idx++ ) { - mixer_mat_index = subframe + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; - for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) + sf = hSpar->render_to_md_map[slot_idx + slot_idx_start] / JBM_CLDFB_SLOTS_IN_SUBFRAME; +#endif + if ( subframe < SPAR_META_DELAY_SUBFRAMES ) { - for ( i = 0; i < FOA_CHANNELS; i++ ) +#ifdef JBM_TSM_ON_TCS + mixer_mat_index = sf + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; +#else + mixer_mat_index = subframe + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; +#endif + for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) { - for ( j = 0; j < FOA_CHANNELS; j++ ) + for ( i = 0; i < FOA_CHANNELS; i++ ) { - mixer_mat_sf_bands_real[subframe][band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat_prev[mixer_mat_index][i][j][band]; + for ( j = 0; j < FOA_CHANNELS; j++ ) + { +#ifdef JBM_TSM_ON_TCS + mixer_mat_sf_bands_real[band][i][j] = slot_fac * st_ivas->hSpar->hMdDec->mixer_mat_prev[mixer_mat_index][i][j][band]; +#else + mixer_mat_sf_bands_real[band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat_prev[mixer_mat_index][i][j][band]; +#endif + } } } } - } - else - { - mixer_mat_index = subframe - SPAR_META_DELAY_SUBFRAMES; - for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) + else { - for ( i = 0; i < FOA_CHANNELS; i++ ) +#ifdef JBM_TSM_ON_TCS + mixer_mat_index = sf - SPAR_META_DELAY_SUBFRAMES; +#else + mixer_mat_index = subframe - SPAR_META_DELAY_SUBFRAMES; +#endif + for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) { - for ( j = 0; j < FOA_CHANNELS; j++ ) + for ( i = 0; i < FOA_CHANNELS; i++ ) { - mixer_mat_sf_bands_real[subframe][band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat[i][j][band + mixer_mat_index * IVAS_MAX_NUM_BANDS]; + for ( j = 0; j < FOA_CHANNELS; j++ ) + { +#ifdef JBM_TSM_ON_TCS + mixer_mat_sf_bands_real[band][i][j] = slot_fac * st_ivas->hSpar->hMdDec->mixer_mat[i][j][band + mixer_mat_index * IVAS_MAX_NUM_BANDS]; +#else + mixer_mat_sf_bands_real[band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat[i][j][band + mixer_mat_index * IVAS_MAX_NUM_BANDS]; +#endif + } } } } +#ifdef JBM_TSM_ON_TCS } +#endif /* Map the mixing matrices from the frequency bands to frequency bins */ bin = 0; @@ -1325,7 +1438,7 @@ void ivas_spar_param_to_masa_param_mapping( { for ( j = 0; j < FOA_CHANNELS; j++ ) { - mixer_mat_sf_bins_real[subframe][bin][i][j] = mixer_mat_sf_bands_real[subframe][band][i][j]; + mixer_mat_sf_bins_real[bin][i][j] = mixer_mat_sf_bands_real[band][i][j]; } } } @@ -1340,7 +1453,11 @@ void ivas_spar_param_to_masa_param_mapping( set_zero( transportSignalEnergies[1], nBins ); set_zero( transportSignalCrossCorrelation, nBins ); +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < hDirAC->subframe_nbslots[subframe]; slot++ ) +#else for ( slot = 0; slot < hDirAC->subframe_nbslots; slot++ ) +#endif { for ( bin = 0; bin < nBins; bin++ ) { @@ -1358,9 +1475,15 @@ void ivas_spar_param_to_masa_param_mapping( if ( hDiffuseDist != NULL ) { +#ifdef JBM_TSM_ON_TCS + set_zero( hDiffuseDist->diffuseRatioX, CLDFB_NO_CHANNELS_MAX ); + set_zero( hDiffuseDist->diffuseRatioY, CLDFB_NO_CHANNELS_MAX ); + set_zero( hDiffuseDist->diffuseRatioZ, CLDFB_NO_CHANNELS_MAX ); +#else set_zero( hDiffuseDist->diffuseRatioX[subframe], CLDFB_NO_CHANNELS_MAX ); set_zero( hDiffuseDist->diffuseRatioY[subframe], CLDFB_NO_CHANNELS_MAX ); set_zero( hDiffuseDist->diffuseRatioZ[subframe], CLDFB_NO_CHANNELS_MAX ); +#endif } for ( bin = 0; bin < nBins; bin++ ) @@ -1387,7 +1510,7 @@ void ivas_spar_param_to_masa_param_mapping( inCovarianceMtx[1][0] = inCovarianceMtx[0][1]; } - compute_foa_cov_matrix( foaCovarianceMtx, inCovarianceMtx, mixer_mat_sf_bins_real[subframe][bin] ); + compute_foa_cov_matrix( foaCovarianceMtx, inCovarianceMtx, mixer_mat_sf_bins_real[bin] ); /* Estimate MASA metadata */ Iy = foaCovarianceMtx[0][1]; /* Intensity in Y direction */ @@ -1413,15 +1536,15 @@ void ivas_spar_param_to_masa_param_mapping( { if ( nchan_transport == 1 ) { - diffuseGainY = fabsf( mixer_mat_sf_bins_real[subframe][bin][1][1] ); - diffuseGainX = fabsf( mixer_mat_sf_bins_real[subframe][bin][3][2] ); - diffuseGainZ = fabsf( mixer_mat_sf_bins_real[subframe][bin][2][3] ); + diffuseGainY = fabsf( mixer_mat_sf_bins_real[bin][1][1] ); + diffuseGainX = fabsf( mixer_mat_sf_bins_real[bin][3][2] ); + diffuseGainZ = fabsf( mixer_mat_sf_bins_real[bin][2][3] ); } else if ( nchan_transport == 2 ) { - diffuseGainY = fabsf( mixer_mat_sf_bins_real[subframe][bin][1][1] * transportSignalEnergies[1][bin] ); - diffuseGainX = fabsf( mixer_mat_sf_bins_real[subframe][bin][3][2] * transportSignalEnergies[0][bin] ) + fabsf( mixer_mat_sf_bins_real[subframe][bin][3][1] * transportSignalEnergies[1][bin] ); - diffuseGainZ = fabsf( mixer_mat_sf_bins_real[subframe][bin][2][3] * transportSignalEnergies[0][bin] ) + fabsf( mixer_mat_sf_bins_real[subframe][bin][2][1] * transportSignalEnergies[1][bin] ); + diffuseGainY = fabsf( mixer_mat_sf_bins_real[bin][1][1] * transportSignalEnergies[1][bin] ); + diffuseGainX = fabsf( mixer_mat_sf_bins_real[bin][3][2] * transportSignalEnergies[0][bin] ) + fabsf( mixer_mat_sf_bins_real[bin][3][1] * transportSignalEnergies[1][bin] ); + diffuseGainZ = fabsf( mixer_mat_sf_bins_real[bin][2][3] * transportSignalEnergies[0][bin] ) + fabsf( mixer_mat_sf_bins_real[bin][2][1] * transportSignalEnergies[1][bin] ); } else { @@ -1432,243 +1555,38 @@ void ivas_spar_param_to_masa_param_mapping( diffuseGainSum = diffuseGainY + diffuseGainX + diffuseGainZ; +#ifdef JBM_TSM_ON_TCS if ( diffuseGainSum == 0.0f ) { - hDiffuseDist->diffuseRatioX[subframe][bin] = 1.0f / 3.0f; - hDiffuseDist->diffuseRatioY[subframe][bin] = 1.0f / 3.0f; - hDiffuseDist->diffuseRatioZ[subframe][bin] = 1.0f / 3.0f; + hDiffuseDist->diffuseRatioX[bin] = 1.0f / 3.0f; + hDiffuseDist->diffuseRatioY[bin] = 1.0f / 3.0f; + hDiffuseDist->diffuseRatioZ[bin] = 1.0f / 3.0f; } else { - hDiffuseDist->diffuseRatioX[subframe][bin] = diffuseGainX / ( diffuseGainSum + EPSILON ); - hDiffuseDist->diffuseRatioY[subframe][bin] = diffuseGainY / ( diffuseGainSum + EPSILON ); - hDiffuseDist->diffuseRatioZ[subframe][bin] = diffuseGainZ / ( diffuseGainSum + EPSILON ); + hDiffuseDist->diffuseRatioX[bin] = diffuseGainX / ( diffuseGainSum + EPSILON ); + hDiffuseDist->diffuseRatioY[bin] = diffuseGainY / ( diffuseGainSum + EPSILON ); + hDiffuseDist->diffuseRatioZ[bin] = diffuseGainZ / ( diffuseGainSum + EPSILON ); } - } - } - - return; -} #else -void ivas_spar_param_to_masa_param_mapping( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ - const int16_t firstSubframe, /* i : First subframe to map */ - const int16_t nSubframes /* i : Number of subframes to map */ -) -{ - int16_t i, j, sf, band, bin, slot, ch, nBins, nchan_transport; - int16_t mixer_mat_index; - int16_t dirac_write_idx; - DIRAC_DEC_HANDLE hDirAC; - DIFFUSE_DISTRIBUTION_HANDLE hDiffuseDist; - float mixer_mat_sf_bands_real[MAX_PARAM_SPATIAL_SUBFRAMES][SPAR_DIRAC_SPLIT_START_BAND][FOA_CHANNELS][FOA_CHANNELS]; - float mixer_mat_sf_bins_real[MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX][FOA_CHANNELS][FOA_CHANNELS]; - int16_t *band_grouping; - int16_t band_start, band_end; - float transportSignalEnergies[2][CLDFB_NO_CHANNELS_MAX]; - float transportSignalCrossCorrelation[CLDFB_NO_CHANNELS_MAX]; - float instEne; - float inCovarianceMtx[FOA_CHANNELS][FOA_CHANNELS]; - float foaCovarianceMtx[FOA_CHANNELS][FOA_CHANNELS]; - float Iy, Iz, Ix, E, azi, ele, I, ratio; - float diffuseGainX, diffuseGainY, diffuseGainZ, diffuseGainSum; - - /* Set values */ - hDirAC = st_ivas->hDirAC; - hDirAC->numSimultaneousDirections = 1; - hDiffuseDist = st_ivas->hDirAC->hDiffuseDist; - nchan_transport = st_ivas->nchan_transport; - band_grouping = hDirAC->band_grouping; - dirac_write_idx = hDirAC->dirac_read_idx; /* Mixing matrices, from which MASA meta is determined, already have the delay compensation */ - - /* Init arrays */ - for ( i = 0; i < FOA_CHANNELS; i++ ) - { - set_zero( inCovarianceMtx[i], FOA_CHANNELS ); - } - - /* Delay the SPAR mixing matrices to have them synced with the audio */ - for ( sf = firstSubframe; sf < ( firstSubframe + nSubframes ); sf++ ) - { - if ( sf < SPAR_META_DELAY_SUBFRAMES ) - { - mixer_mat_index = sf + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; - for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) - { - for ( i = 0; i < FOA_CHANNELS; i++ ) - { - for ( j = 0; j < FOA_CHANNELS; j++ ) - { - mixer_mat_sf_bands_real[sf][band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat_prev[mixer_mat_index][i][j][band]; - } - } - } - } - else - { - mixer_mat_index = sf - SPAR_META_DELAY_SUBFRAMES; - for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) - { - for ( i = 0; i < FOA_CHANNELS; i++ ) - { - for ( j = 0; j < FOA_CHANNELS; j++ ) - { - mixer_mat_sf_bands_real[sf][band][i][j] = st_ivas->hSpar->hMdDec->mixer_mat[i][j][band + mixer_mat_index * IVAS_MAX_NUM_BANDS]; - } - } - } - } - } - - /* Map the mixing matrices from the frequency bands to frequency bins */ - bin = 0; - for ( sf = firstSubframe; sf < ( firstSubframe + nSubframes ); sf++ ) - { - for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) - { - band_start = band_grouping[band]; - band_end = band_grouping[band + 1]; - for ( bin = band_start; bin < band_end; bin++ ) - { - for ( i = 0; i < FOA_CHANNELS; i++ ) - { - for ( j = 0; j < FOA_CHANNELS; j++ ) - { - mixer_mat_sf_bins_real[sf][bin][i][j] = mixer_mat_sf_bands_real[sf][band][i][j]; - } - } - } - } - } - nBins = bin; - - /* Determine MASA metadata */ - for ( sf = firstSubframe; sf < ( firstSubframe + nSubframes ); sf++ ) - { - /* Determine transport signal energies and cross correlations when more than 1 TC */ - if ( nchan_transport == 2 ) - { - set_zero( transportSignalEnergies[0], nBins ); - set_zero( transportSignalEnergies[1], nBins ); - set_zero( transportSignalCrossCorrelation, nBins ); - - for ( slot = 0; slot < hDirAC->subframe_nbslots; slot++ ) - { - int16_t slotThis = slot + ( hDirAC->subframe_nbslots * sf ); - - for ( bin = 0; bin < nBins; bin++ ) - { - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - instEne = ( inRe[ch][slotThis][bin] * inRe[ch][slotThis][bin] ); - instEne += ( inIm[ch][slotThis][bin] * inIm[ch][slotThis][bin] ); - transportSignalEnergies[ch][bin] += instEne; - } - transportSignalCrossCorrelation[bin] += inRe[0][slotThis][bin] * inRe[1][slotThis][bin]; - transportSignalCrossCorrelation[bin] += inIm[0][slotThis][bin] * inIm[1][slotThis][bin]; - } - } - } - - if ( hDiffuseDist != NULL ) - { - set_zero( hDiffuseDist->diffuseRatioX[sf], CLDFB_NO_CHANNELS_MAX ); - set_zero( hDiffuseDist->diffuseRatioY[sf], CLDFB_NO_CHANNELS_MAX ); - set_zero( hDiffuseDist->diffuseRatioZ[sf], CLDFB_NO_CHANNELS_MAX ); - } - - for ( bin = 0; bin < nBins; bin++ ) - { - /* Set the energy of the first transport signal */ - if ( nchan_transport == 1 ) + if ( diffuseGainSum == 0.0f ) { - inCovarianceMtx[0][0] = 1.0f; /* In case of 1TC, fixed value can be used */ + hDiffuseDist->diffuseRatioX[subframe][bin] = 1.0f / 3.0f; + hDiffuseDist->diffuseRatioY[subframe][bin] = 1.0f / 3.0f; + hDiffuseDist->diffuseRatioZ[subframe][bin] = 1.0f / 3.0f; } else { - inCovarianceMtx[0][0] = transportSignalEnergies[0][bin]; /* In case of 2TC, use actual energies */ - } - /* Decorrelated channels assumed to have the same energy as the source channel */ - inCovarianceMtx[1][1] = inCovarianceMtx[0][0]; - inCovarianceMtx[2][2] = inCovarianceMtx[0][0]; - inCovarianceMtx[3][3] = inCovarianceMtx[0][0]; - - /* In case residuals were transmitted, use their actual energies and cross correlations */ - if ( nchan_transport == 2 ) - { - inCovarianceMtx[1][1] = transportSignalEnergies[1][bin]; - inCovarianceMtx[0][1] = transportSignalCrossCorrelation[bin]; - inCovarianceMtx[1][0] = inCovarianceMtx[0][1]; - } - - compute_foa_cov_matrix( foaCovarianceMtx, inCovarianceMtx, mixer_mat_sf_bins_real[sf][bin] ); - - /* Estimate MASA metadata */ - Iy = foaCovarianceMtx[0][1]; /* Intensity in Y direction */ - Iz = foaCovarianceMtx[0][2]; /* Intensity in Z direction */ - Ix = foaCovarianceMtx[0][3]; /* Intensity in X direction */ - I = sqrtf( Ix * Ix + Iy * Iy + Iz * Iz ); /* Intensity vector length */ - E = ( foaCovarianceMtx[0][0] + foaCovarianceMtx[1][1] + foaCovarianceMtx[2][2] + foaCovarianceMtx[3][3] ) / 2.0f; /* Overall energy */ - azi = atan2f( Iy, Ix ); /* Azimuth */ - ele = atan2f( Iz, sqrtf( Ix * Ix + Iy * Iy ) ); /* Elevation */ - ratio = I / fmaxf( 1e-12f, E ); /* Energy ratio */ - ratio = fmaxf( 0.0f, fminf( 1.0f, ratio ) ); - - hDirAC->azimuth[dirac_write_idx][bin] = (int16_t) roundf( azi / PI_OVER_180 ); - hDirAC->elevation[dirac_write_idx][bin] = (int16_t) roundf( ele / PI_OVER_180 ); - hDirAC->energy_ratio1[dirac_write_idx][bin] = ratio; - hDirAC->diffuseness_vector[dirac_write_idx][bin] = 1.0f - ratio; - - hDirAC->spreadCoherence[dirac_write_idx][bin] = 0.0f; - hDirAC->surroundingCoherence[dirac_write_idx][bin] = 0.0f; - - /* Determine directional distribution of the indirect audio based on the SPAR mixing matrices (and the transport audio signals when 2 TC) */ - if ( hDiffuseDist != NULL ) - { - if ( nchan_transport == 1 ) - { - diffuseGainY = fabsf( mixer_mat_sf_bins_real[sf][bin][1][1] ); - diffuseGainX = fabsf( mixer_mat_sf_bins_real[sf][bin][3][2] ); - diffuseGainZ = fabsf( mixer_mat_sf_bins_real[sf][bin][2][3] ); - } - else if ( nchan_transport == 2 ) - { - diffuseGainY = fabsf( mixer_mat_sf_bins_real[sf][bin][1][1] * transportSignalEnergies[1][bin] ); - diffuseGainX = fabsf( mixer_mat_sf_bins_real[sf][bin][3][2] * transportSignalEnergies[0][bin] ) + fabsf( mixer_mat_sf_bins_real[sf][bin][3][1] * transportSignalEnergies[1][bin] ); - diffuseGainZ = fabsf( mixer_mat_sf_bins_real[sf][bin][2][3] * transportSignalEnergies[0][bin] ) + fabsf( mixer_mat_sf_bins_real[sf][bin][2][1] * transportSignalEnergies[1][bin] ); - } - else - { - diffuseGainY = 1.0f; - diffuseGainX = 1.0f; - diffuseGainZ = 1.0f; - } - - diffuseGainSum = diffuseGainY + diffuseGainX + diffuseGainZ; - - if ( diffuseGainSum == 0.0f ) - { - hDiffuseDist->diffuseRatioX[sf][bin] = 1.0f / 3.0f; - hDiffuseDist->diffuseRatioY[sf][bin] = 1.0f / 3.0f; - hDiffuseDist->diffuseRatioZ[sf][bin] = 1.0f / 3.0f; - } - else - { - hDiffuseDist->diffuseRatioX[sf][bin] = diffuseGainX / ( diffuseGainSum + EPSILON ); - hDiffuseDist->diffuseRatioY[sf][bin] = diffuseGainY / ( diffuseGainSum + EPSILON ); - hDiffuseDist->diffuseRatioZ[sf][bin] = diffuseGainZ / ( diffuseGainSum + EPSILON ); - } + hDiffuseDist->diffuseRatioX[subframe][bin] = diffuseGainX / ( diffuseGainSum + EPSILON ); + hDiffuseDist->diffuseRatioY[subframe][bin] = diffuseGainY / ( diffuseGainSum + EPSILON ); + hDiffuseDist->diffuseRatioZ[subframe][bin] = diffuseGainZ / ( diffuseGainSum + EPSILON ); } +#endif } - - dirac_write_idx = ( dirac_write_idx + 1 ) % hDirAC->dirac_md_buffer_length; } return; } -#endif /* Estimate FOA properties: foaCov = mixMtx * inCov * mixMtx' */ diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 65748bdf9558532621deff3270e518e416437120..c6e0776660877f0faf0577fb3e5583cf268e5d48 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -76,7 +76,11 @@ typedef struct parameter_band_mapping_struct static void ivas_param_mc_dec_init( PARAM_MC_DEC_HANDLE hParamMC, const int16_t nchan_in, const int16_t nchan_out ); +#ifdef JBM_TSM_ON_TCS +static void param_mc_protoSignalComputation( float *RealBuffer, float *ImagBuffer, float *proto_frame_f, const PARAM_MC_DIFF_PROTO_INFO *diff_proto_info, const int16_t num_freq_bands ); +#else static void param_mc_protoSignalComputation( float RealBuffer[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], float ImagBuffer[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], float *proto_frame_f, const PARAM_MC_DIFF_PROTO_INFO *diff_proto_info, const int16_t slot_index, const int16_t num_freq_bands ); +#endif static void ivas_param_mc_dec_copy_diffuse_proto( PARAM_MC_DEC_HANDLE hParamMC, float Cldfb_buffer_real[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float Cldfb_buffer_imag[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nY, const int16_t slot_idx ); @@ -86,13 +90,23 @@ static int16_t ivas_param_mc_uniform_decoder( float *seq, const int16_t sz_seq, static void ivas_param_mc_dequantize_cov( PARAM_MC_DEC_HANDLE hDirAC, float *ild_q, float *icc_q, const int16_t param_band_index, const int16_t nY_int, const PARAM_MC_SYNTHESIS_CONF synth_conf, const int16_t nY, const int16_t nX, float *Cx_state, float *Cproto, float *Cy_state ); +#ifdef JBM_TSM_ON_TCS +static void ivas_param_mc_get_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, IVAS_OUTPUT_SETUP *hSynthesisOutputSetup, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float *mixing_matrix[], float *mixing_matrix_res[], const int16_t nY_int, const PARAM_MC_SYNTHESIS_CONF synth_conf, const int16_t nX, const int16_t nY ); + +static void ivas_param_mc_get_mono_stereo_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float *mixing_matrix[], float *mixing_matrix_res[], const int16_t nY_intern, const int16_t nX, const int16_t nY_cov ); +#else static void ivas_param_mc_get_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, IVAS_OUTPUT_SETUP *hSynthesisOutputSetup, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], const int16_t nY_int, const PARAM_MC_SYNTHESIS_CONF synth_conf, const int16_t nX, const int16_t nY ); static void ivas_param_mc_get_mono_stereo_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], const int16_t nY_intern, const int16_t nX, const int16_t nY_cov ); +#endif +#ifdef JBM_TSM_ON_TCS +static void param_mc_update_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float *mixing_matrix[], float *mixing_matrix_res[], const uint16_t nX, const uint16_t nY ); +#else static void param_mc_update_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], const uint16_t nX, const uint16_t nY ); +#endif -static void param_mc_compute_interpolator( const uint16_t bAttackPresent, const uint16_t attackPos, const uint16_t interp_length, float *interpolator ); +static void ivas_param_mc_dec_compute_interpolator( const uint16_t bAttackPresent, const uint16_t attackPos, const uint16_t interp_length, float *interpolator ); static void param_mc_set_num_synth_bands( const int32_t output_Fs, PARAM_MC_DEC_HANDLE hParamMC ); @@ -224,7 +238,13 @@ ivas_error ivas_param_mc_dec_open( *-----------------------------------------------------------------*/ hParamMC->slot_size = (int16_t) ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX; +#ifdef JBM_TSM_ON_TCS + set_s( hParamMC->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( hParamMC->subframe_nbslots, PARAM_MC_MAX_NSLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS ); + hParamMC->nb_subframes = DEFAULT_JBM_SUBFRAMES_5MS; +#else hParamMC->subframe_nbslots = CLDFB_NO_COL_MAX / PARAM_MC_NSUBFRAMES_DEC; +#endif hParamMC->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); hParamMC->max_band_energy_compensation = hParamMC->num_freq_bands; @@ -420,6 +440,9 @@ ivas_error ivas_param_mc_dec_open( return error; } +#ifdef JBM_TSM_ON_TCS + ivas_param_mc_dec_compute_interpolator( 0, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hParamMC->h_output_synthesis_params.interpolator ); +#endif /* Head rotation */ if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && st_ivas->hDecoderConfig->Opt_Headrotation ) @@ -455,6 +478,30 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_dec_init( hParamMC, nchan_transport, nchan_out_cov ); +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active && hParamMC->synthesis_conf != PARAM_MC_SYNTH_MONO_STEREO ) + { + hParamMC->Cldfb_RealBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ); + set_zero( hParamMC->Cldfb_RealBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands ); + hParamMC->Cldfb_ImagBuffer_tc = (float *) malloc( MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands * sizeof( float ) ); + set_zero( hParamMC->Cldfb_ImagBuffer_tc, MAX_JBM_CLDFB_TIMESLOTS * nchan_transport * hParamMC->num_freq_bands ); + if ( st_ivas->hTcBuffer == NULL ) + { + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, nchan_transport, nchan_transport, 0, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + else + { + hParamMC->Cldfb_RealBuffer_tc = NULL; + hParamMC->Cldfb_ImagBuffer_tc = NULL; + } + hParamMC->subframes_rendered = 0; + hParamMC->slots_rendered = 0; +#endif + st_ivas->hParamMC = hParamMC; return error; @@ -597,12 +644,14 @@ ivas_error ivas_param_mc_dec_reconfig( #endif } - /*-----------------------------------------------------------------* - * set input parameters - *-----------------------------------------------------------------*/ + /*-----------------------------------------------------------------* + * set input parameters + *-----------------------------------------------------------------*/ +#ifndef JBM_TSM_ON_TCS hParamMC->slot_size = (int16_t) ( output_Fs / FRAMES_PER_SEC ) / CLDFB_NO_COL_MAX; hParamMC->subframe_nbslots = CLDFB_NO_COL_MAX / PARAM_MC_NSUBFRAMES_DEC; +#endif hParamMC->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); hParamMC->max_band_energy_compensation = hParamMC->num_freq_bands; @@ -914,6 +963,10 @@ ivas_error ivas_param_mc_dec_reconfig( return error; } +#ifdef JBM_TSM_ON_TCS + ivas_param_mc_dec_compute_interpolator( 0, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hParamMC->h_output_synthesis_params.interpolator ); +#endif + ivas_dirac_dec_output_synthesis_cov_init( &( hParamMC->h_output_synthesis_cov_state ), nchan_transport, nchan_out_cov, hParamMC->hMetadataPMC->num_parameter_bands, max_param_band_residual ); @@ -1124,6 +1177,19 @@ void ivas_param_mc_dec_close( hParamMC->hoa_encoder = NULL; } +#ifdef JBM_TSM_ON_TCS + if ( hParamMC->Cldfb_RealBuffer_tc != NULL ) + { + free( hParamMC->Cldfb_RealBuffer_tc ); + hParamMC->Cldfb_RealBuffer_tc = NULL; + } + if ( hParamMC->Cldfb_ImagBuffer_tc != NULL ) + { + free( hParamMC->Cldfb_ImagBuffer_tc ); + hParamMC->Cldfb_ImagBuffer_tc = NULL; + } +#endif + free( *hParamMC_out ); *hParamMC_out = NULL; @@ -1241,7 +1307,9 @@ void ivas_param_mc_dec_read_BS( num_lfe_bands = 0; } - param_mc_compute_interpolator( hMetadataPMC->bAttackPresent, hMetadataPMC->attackIndex, PARAM_MC_MAX_NSLOTS, hParamMC->h_output_synthesis_params.interpolator ); +#ifndef JBM_TSM_ON_TCS + ivas_param_mc_dec_compute_interpolator( hMetadataPMC->bAttackPresent, hMetadataPMC->attackIndex, PARAM_MC_MAX_NSLOTS, hParamMC->h_output_synthesis_params.interpolator ); +#endif if ( hMetadataPMC->flag_use_adaptive_icc_map == 1 ) { @@ -1328,8 +1396,8 @@ void ivas_param_mc_dec_read_BS( /* for PLC, use the saved ILDs and ICCs from the past and set the transient flag and transient position to zero */ hMetadataPMC->bAttackPresent = 0; hMetadataPMC->attackIndex = 0; -#ifdef FIX_431_PARAMMC_PLC_INTERPOLATOR - param_mc_compute_interpolator( hMetadataPMC->bAttackPresent, hMetadataPMC->attackIndex, PARAM_MC_MAX_NSLOTS, hParamMC->h_output_synthesis_params.interpolator ); +#ifndef JBM_TSM_ON_TCS + ivas_param_mc_dec_compute_interpolator( hMetadataPMC->bAttackPresent, hMetadataPMC->attackIndex, PARAM_MC_MAX_NSLOTS, hParamMC->h_output_synthesis_params.interpolator ); #endif } @@ -1338,13 +1406,471 @@ void ivas_param_mc_dec_read_BS( return; } +#ifdef JBM_TSM_ON_TCS +void ivas_param_mc_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint8_t nCldfbSlots, /* i : number of CLFBS slots in the transport channels */ + float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ +) +{ + PARAM_MC_DEC_HANDLE hParamMC; + int16_t i, ch; + int16_t slot_idx, param_band_idx; + int16_t nchan_transport, nchan_out_transport, nchan_out_cldfb; + int16_t nchan_out_cov; + /*CLDFB*/ + float cx[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS]; + float cx_imag[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS]; + float real_part, imag_part; + /* format converter */ + int16_t channel_active[MAX_OUTPUT_CHANNELS]; + IVAS_OUTPUT_SETUP *hSynthesisOutputSetup; + + hParamMC = st_ivas->hParamMC; + assert( hParamMC ); + + push_wmops( "param_mc_dec_digest_tc" ); + + set_s( channel_active, 0, MAX_CICP_CHANNELS ); + nchan_transport = st_ivas->nchan_transport; + nchan_out_transport = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + nchan_out_cldfb = BINAURAL_CHANNELS; + set_s( channel_active, 1, nchan_out_cldfb ); + nchan_out_cov = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + hSynthesisOutputSetup = &st_ivas->hTransSetup; + } + else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB ) + { + nchan_out_cov = nchan_out_transport; + nchan_out_cldfb = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; + hSynthesisOutputSetup = &st_ivas->hTransSetup; + } + else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + nchan_out_cov = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; + nchan_out_cldfb = nchan_out_cov; + set_s( channel_active, 1, nchan_out_cov ); + hSynthesisOutputSetup = &st_ivas->hOutSetup; + } + else + { + nchan_out_cov = nchan_out_transport; + nchan_out_cldfb = nchan_out_transport; + set_s( channel_active, 1, nchan_out_cov ); + hSynthesisOutputSetup = &st_ivas->hTransSetup; + } + + /* adapt transient position */ + if ( hParamMC->hMetadataPMC->bAttackPresent ) + { + hParamMC->hMetadataPMC->attackIndex = (int16_t) max( 0, hParamMC->hMetadataPMC->attackIndex + ( ( nCldfbSlots - DEFAULT_JBM_CLDFB_TIMESLOTS ) / 2 ) ); + } + /* adapt subframes */ + hParamMC->num_slots = nCldfbSlots; + hParamMC->slots_rendered = 0; + hParamMC->subframes_rendered = 0; + ivas_jbm_dec_get_adapted_subframes( nCldfbSlots, hParamMC->subframe_nbslots, &hParamMC->nb_subframes ); + + ivas_param_mc_dec_compute_interpolator( hParamMC->hMetadataPMC->bAttackPresent, hParamMC->hMetadataPMC->attackIndex, nCldfbSlots, hParamMC->h_output_synthesis_params.interpolator ); + + for ( param_band_idx = 0; param_band_idx < PARAM_MC_MAX_PARAMETER_BANDS; param_band_idx++ ) + { + set_zero( cx[param_band_idx], PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS ); + set_zero( cx_imag[param_band_idx], PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS ); + } + + /* slot loop for gathering the input data */ + for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) + { + float RealBuffer[CLDFB_NO_CHANNELS_MAX]; + float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; + + /* CLDFB Analysis*/ + for ( ch = 0; ch < nchan_transport; ch++ ) + { + cldfbAnalysis_ts( &( transport_channels_f[ch][hParamMC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hParamMC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + + mvr2r( RealBuffer, &hParamMC->Cldfb_RealBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); + mvr2r( ImagBuffer, &hParamMC->Cldfb_ImagBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); + } + + if ( slot_idx >= 2 * hParamMC->hMetadataPMC->attackIndex ) + { + ivas_dirac_dec_output_synthesis_cov_param_mc_collect_slot( &hParamMC->Cldfb_RealBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport], &hParamMC->Cldfb_ImagBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport], cx, cx_imag, hParamMC, nchan_transport ); + } + } + + /* map from complex input covariance to real values */ + for ( param_band_idx = 0; param_band_idx < hParamMC->num_param_bands_synth; param_band_idx++ ) + { + /* Cx for transport channels */ + for ( i = 0; i < nchan_transport * nchan_transport; i++ ) + { + real_part = cx[param_band_idx][i]; + imag_part = cx_imag[param_band_idx][i]; + + /* (a-ib)(c+id) = ac + bd + i(ad-bc) */ + if ( param_band_idx < hParamMC->max_param_band_abs_cov ) + { + cx[param_band_idx][i] = sqrtf( real_part * real_part + imag_part * imag_part ); + } + else + { + cx[param_band_idx][i] = real_part; + } + } + } + + /* we have to do it similar to the encoder in case of attacks (i.e. accumulate two bands) to ensure correct DMX of the target covariance*/ + if ( hParamMC->hMetadataPMC->bAttackPresent && ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) ) + { + for ( param_band_idx = 0; param_band_idx < hParamMC->num_param_bands_synth; param_band_idx += 2 ) + { + v_add( cx[param_band_idx], cx[param_band_idx + 1], cx[param_band_idx], nchan_transport * nchan_transport ); + mvr2r( cx[param_band_idx], cx[param_band_idx + 1], nchan_transport * nchan_transport ); + } + } + + + if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + ivas_param_mc_get_mono_stereo_mixing_matrices( hParamMC, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, nchan_transport, nchan_out_cov ); + } + else + { + /* generate mixing matrices */ + ivas_param_mc_get_mixing_matrices( hParamMC, hSynthesisOutputSetup, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov ); + } + + pop_wmops(); + + return; +} + +/*------------------------------------------------------------------------- + * ivas_param_mc_dec() + * + * Parametric MC decoding process + *------------------------------------------------------------------------*/ + +void ivas_param_mc_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +) +{ + PARAM_MC_DEC_HANDLE hParamMC; + int16_t i, ch; + int16_t subframe_idx; + int16_t slot_idx, slot_idx_start, slot_idx_start_cldfb_synth, first_sf, last_sf, slots_to_render; + int16_t nchan_transport, nchan_out_transport, nchan_out_cldfb; + int16_t nchan_out_cov; + /*CLDFB*/ + float Cldfb_RealBuffer[MAX_INTERN_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer[MAX_INTERN_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_RealBuffer_Binaural[BINAURAL_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer_Binaural[BINAURAL_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; + /*Decorrelator*/ + float onset_filter[MAX_CICP_CHANNELS * CLDFB_NO_CHANNELS_MAX]; + /* format converter */ + int16_t channel_active[MAX_OUTPUT_CHANNELS]; + uint16_t nband_synth, nbands_to_zero; + uint16_t nchan_out_init; + uint32_t output_Fs; + + hParamMC = st_ivas->hParamMC; + assert( hParamMC ); + + push_wmops( "param_mc_dec_render" ); + + set_s( channel_active, 0, MAX_CICP_CHANNELS ); + nchan_transport = st_ivas->nchan_transport; + nchan_out_transport = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + nchan_out_init = nchan_out_transport; + output_Fs = st_ivas->hDecoderConfig->output_Fs; + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + nchan_out_cldfb = BINAURAL_CHANNELS; + set_s( channel_active, 1, nchan_out_cldfb ); + if ( st_ivas->hHeadTrackData ) + { + nchan_out_init = MAX_INTERN_CHANNELS; + } + nchan_out_cov = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + } + else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB ) + { + nchan_out_cov = nchan_out_transport; + nchan_out_cldfb = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; + } + else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) + { + nchan_out_cov = st_ivas->hOutSetup.nchan_out_woLFE + st_ivas->hOutSetup.num_lfe; + nchan_out_cldfb = nchan_out_cov; + set_s( channel_active, 1, nchan_out_cov ); + } + else + { + nchan_out_cov = nchan_out_transport; + nchan_out_cldfb = nchan_out_transport; + set_s( channel_active, 1, nchan_out_cov ); + } + + /* set everything to zero that will not be decoded */ + nband_synth = hParamMC->band_grouping[hParamMC->num_param_bands_synth]; + nbands_to_zero = hParamMC->num_freq_bands - nband_synth; + for ( ch = 0; ch < nchan_out_init; ch++ ) + { + for ( slot_idx = 0; slot_idx < JBM_CLDFB_SLOTS_IN_SUBFRAME; slot_idx++ ) + { + set_zero( &( Cldfb_RealBuffer[ch][slot_idx][nband_synth] ), nbands_to_zero ); + set_zero( &( Cldfb_ImagBuffer[ch][slot_idx][nband_synth] ), nbands_to_zero ); + } + } + + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( hParamMC->num_slots - hParamMC->slots_rendered, nSamplesAsked / NS2SA( output_Fs, CLDFB_SLOT_NS ) ); + *nSamplesRendered = slots_to_render * NS2SA( output_Fs, CLDFB_SLOT_NS ); + first_sf = hParamMC->subframes_rendered; + last_sf = first_sf; + while ( slots_to_render > 0 ) + { + slots_to_render -= hParamMC->subframe_nbslots[last_sf]; + last_sf++; + } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + slots_to_render += hParamMC->subframe_nbslots[subframe_idx]; + } + } + slot_idx_start = hParamMC->slots_rendered; + slot_idx_start_cldfb_synth = 0; + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + for ( slot_idx = 0; slot_idx < hParamMC->subframe_nbslots[subframe_idx]; slot_idx++, hParamMC->slots_rendered++ ) + { + + if ( hParamMC->max_band_decorr > 0 ) + { + /*-----------------------------------------------------------------* + * protoype signal computation + *-----------------------------------------------------------------*/ + + param_mc_protoSignalComputation( &hParamMC->Cldfb_RealBuffer_tc[hParamMC->slots_rendered * nchan_transport * hParamMC->num_freq_bands], + &hParamMC->Cldfb_ImagBuffer_tc[hParamMC->slots_rendered * nchan_transport * hParamMC->num_freq_bands], + hParamMC->proto_frame_f, hParamMC->diff_proto_info, + hParamMC->num_freq_bands ); + + /*-----------------------------------------------------------------* + * frequency domain decorrelation + *-----------------------------------------------------------------*/ + + /* decorrelate prototype frame */ + ivas_dirac_dec_decorr_process( hParamMC->num_freq_bands, + hParamMC->num_outputs_diff, + hParamMC->diff_proto_info->num_protos_diff, + DIRAC_SYNTHESIS_COV_MC_LS, + nchan_transport, + hParamMC->proto_frame_f, + hParamMC->diff_proto_info->num_protos_diff, + hParamMC->diff_proto_info->proto_index_diff, + hParamMC->proto_frame_dec_f, + onset_filter, + hParamMC->h_freq_domain_decorr_ap_params, + hParamMC->h_freq_domain_decorr_ap_state ); + + /* copy decorrelated frame directly to output CLDFB buffer, acts also as intermediate */ + /* memory for the decorrelated signal */ + ivas_param_mc_dec_copy_diffuse_proto( hParamMC, Cldfb_RealBuffer, Cldfb_ImagBuffer, nchan_out_cov, slot_idx ); + } + + /*-----------------------------------------------------------------* + * output synthesis + *-----------------------------------------------------------------*/ + + ivas_dirac_dec_output_synthesis_cov_param_mc_synthesise_slot( &hParamMC->Cldfb_RealBuffer_tc[hParamMC->slots_rendered * nchan_transport * hParamMC->num_freq_bands], + &hParamMC->Cldfb_ImagBuffer_tc[hParamMC->slots_rendered * nchan_transport * hParamMC->num_freq_bands], + Cldfb_RealBuffer, Cldfb_ImagBuffer, + hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, slot_idx, slot_idx + slot_idx_start, + nchan_transport, nchan_out_cov, hParamMC ); + + if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) ) + { + if ( st_ivas->hHeadTrackData && st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) + { + ivas_param_mc_mc2sba_cldfb( st_ivas->hTransSetup, hParamMC->hoa_encoder, slot_idx, Cldfb_RealBuffer, Cldfb_ImagBuffer, nband_synth, GAIN_LFE ); + } + else + { + /* remove LFE */ + uint16_t idx_out; + uint16_t idx_lfe; + IVAS_OUTPUT_SETUP hLsSetup; + + hLsSetup = st_ivas->hTransSetup; + + /* If LFE should be rendered, add it to other channels before removing */ + if ( st_ivas->hBinRenderer->render_lfe ) + { + for ( idx_lfe = 0; idx_lfe < hLsSetup.num_lfe; idx_lfe++ ) + { + /* Copy just the first band of LFE*/ + v_multc( Cldfb_RealBuffer[hLsSetup.index_lfe[idx_lfe]][slot_idx], ( GAIN_LFE / hLsSetup.nchan_out_woLFE ), Cldfb_RealBuffer[hLsSetup.index_lfe[idx_lfe]][slot_idx], 1 ); + v_multc( Cldfb_ImagBuffer[hLsSetup.index_lfe[idx_lfe]][slot_idx], ( GAIN_LFE / hLsSetup.nchan_out_woLFE ), Cldfb_ImagBuffer[hLsSetup.index_lfe[idx_lfe]][slot_idx], 1 ); + + for ( ch = 0; ch < ( hLsSetup.nchan_out_woLFE + hLsSetup.num_lfe ); ch++ ) + { + if ( hLsSetup.index_lfe[idx_lfe] != ch ) + { + v_add( Cldfb_RealBuffer[ch][slot_idx], Cldfb_RealBuffer[hLsSetup.index_lfe[idx_lfe]][slot_idx], Cldfb_RealBuffer[ch][slot_idx], 1 ); + v_add( Cldfb_ImagBuffer[ch][slot_idx], Cldfb_ImagBuffer[hLsSetup.index_lfe[idx_lfe]][slot_idx], Cldfb_ImagBuffer[ch][slot_idx], 1 ); + } + } + } + } + + idx_out = 0; + idx_lfe = 0; + + for ( ch = 0; ch < ( hLsSetup.nchan_out_woLFE + hLsSetup.num_lfe ); ch++ ) + { + if ( ( hLsSetup.num_lfe > 0 ) && ( hLsSetup.index_lfe[idx_lfe] == ch ) ) + { + if ( idx_lfe < ( hLsSetup.num_lfe - 1 ) ) + { + idx_lfe++; + } + } + else if ( ch != idx_out ) + { + mvr2r( Cldfb_RealBuffer[ch][slot_idx], Cldfb_RealBuffer[idx_out][slot_idx], nband_synth ); + mvr2r( Cldfb_ImagBuffer[ch][slot_idx], Cldfb_ImagBuffer[idx_out][slot_idx], nband_synth ); + idx_out++; + } + else + { + idx_out++; + } + } + } + } + } + + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + ivas_binRenderer( st_ivas->hBinRenderer, st_ivas->hHeadTrackData, hParamMC->subframe_nbslots[subframe_idx], + Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer ); + } + else if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_CLDFB ) + { + /* format conversion*/ + ivas_lssetupconversion_process_param_mc( st_ivas, hParamMC->subframe_nbslots[subframe_idx], Cldfb_RealBuffer, Cldfb_ImagBuffer, channel_active ); + } + + /* CLDFB synthesis */ + for ( ch = 0; ch < nchan_out_cldfb; ch++ ) + { + float *RealBuffer[16]; + float *ImagBuffer[16]; + + if ( channel_active[ch] ) + { + /* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */ + for ( i = 0; i < hParamMC->subframe_nbslots[subframe_idx]; i++ ) + { + if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) + { + RealBuffer[i] = Cldfb_RealBuffer_Binaural[ch][i]; + ImagBuffer[i] = Cldfb_ImagBuffer_Binaural[ch][i]; + } + else + { + RealBuffer[i] = Cldfb_RealBuffer[ch][i]; + ImagBuffer[i] = Cldfb_ImagBuffer[ch][i]; + } + } + cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][slot_idx_start_cldfb_synth * hParamMC->num_freq_bands] ), + hParamMC->num_freq_bands * hParamMC->subframe_nbslots[subframe_idx], st_ivas->cldfbSynDec[ch] ); + } + else + { + set_f( &( output_f[ch][slot_idx_start_cldfb_synth * hParamMC->num_freq_bands] ), 0.0f, hParamMC->num_freq_bands * hParamMC->subframe_nbslots[subframe_idx] ); + } + } + slot_idx_start += hParamMC->subframe_nbslots[subframe_idx]; + slot_idx_start_cldfb_synth += hParamMC->subframe_nbslots[subframe_idx]; + } + + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) + { + ivas_mc2sba( st_ivas->hIntSetup, output_f, output_f, hParamMC->num_freq_bands * slots_to_render, st_ivas->hOutSetup.ambisonics_order, 0.f ); + } + + /* update */ + if ( hParamMC->slots_rendered == hParamMC->num_slots ) + { + hParamMC->hMetadataPMC->last_coded_bwidth = hParamMC->hMetadataPMC->coded_bwidth; + param_mc_update_mixing_matrices( hParamMC, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_transport, nchan_out_cov ); + } + hParamMC->subframes_rendered = last_sf; + *nSamplesAvailable = ( hParamMC->num_slots - hParamMC->slots_rendered ) * NS2SA( output_Fs, CLDFB_SLOT_NS ); + pop_wmops(); + + return; +} +#endif /*------------------------------------------------------------------------- * ivas_param_mc_dec() * * Parametric MC decoding process *------------------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS +void ivas_param_mc_dec( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ +) +{ + PARAM_MC_DEC_HANDLE hParamMC; + float Cldfb_RealBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer_in[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_NSLOTS * CLDFB_NO_CHANNELS_MAX]; + uint16_t nSamplesAsked, nSamplesAvailable, nSamplesRendered; + hParamMC = st_ivas->hParamMC; + assert( hParamMC ); + push_wmops( "param_mc_dec" ); + + /* set some handle pointers to the stack buffers */ + hParamMC->Cldfb_RealBuffer_tc = Cldfb_RealBuffer_in; + hParamMC->Cldfb_ImagBuffer_tc = Cldfb_ImagBuffer_in; + + nSamplesAsked = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + ivas_param_mc_dec_digest_tc( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS, output_f ); + ivas_param_mc_dec_render( st_ivas, nSamplesAsked, &nSamplesRendered, &nSamplesAvailable, output_f ); +#ifdef DEBUGGING + assert( nSamplesRendered == nSamplesAsked ); + assert( nSamplesAvailable == 0 ); +#endif + + /* set handle pointers back to NULL */ + hParamMC->Cldfb_RealBuffer_tc = NULL; + hParamMC->Cldfb_ImagBuffer_tc = NULL; + + pop_wmops(); + return; +} +#else void ivas_param_mc_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ @@ -1352,7 +1878,8 @@ void ivas_param_mc_dec( { PARAM_MC_DEC_HANDLE hParamMC; int16_t i, ch; - int16_t subframe_idx, num_subframes; + int16_t subframe_idx; + int16_t nb_subframes; int16_t slot_idx, param_band_idx, slot_idx_start; int16_t nchan_transport, nchan_out_transport, nchan_out_cldfb; int16_t nchan_out_cov; @@ -1499,12 +2026,13 @@ void ivas_param_mc_dec( ivas_param_mc_get_mixing_matrices( hParamMC, hSynthesisOutputSetup, cx, mixing_matrix, mixing_matrix_res, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov ); } + /*** split here... ***/ + /* subframe loop for synthesis*/ - num_subframes = CLDFB_NO_COL_MAX / hParamMC->subframe_nbslots; - for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ ) + nb_subframes = CLDFB_NO_COL_MAX / hParamMC->subframe_nbslots; + for ( subframe_idx = 0; subframe_idx < nb_subframes; subframe_idx++ ) { slot_idx_start = subframe_idx * hParamMC->subframe_nbslots; - for ( slot_idx = 0; slot_idx < hParamMC->subframe_nbslots; slot_idx++ ) { @@ -1643,7 +2171,6 @@ void ivas_param_mc_dec( ImagBuffer[i] = Cldfb_ImagBuffer[ch][i]; } } - cldfbSynthesis( RealBuffer, ImagBuffer, &( output_f[ch][slot_idx_start * hParamMC->num_freq_bands] ), hParamMC->num_freq_bands * hParamMC->subframe_nbslots, st_ivas->cldfbSynDec[ch] ); } @@ -1666,6 +2193,7 @@ void ivas_param_mc_dec( return; } +#endif /*------------------------------------------------------------------------- @@ -1740,12 +2268,19 @@ static void ivas_param_mc_dec_init( *------------------------------------------------------------------------*/ static void param_mc_protoSignalComputation( +#ifdef JBM_TSM_ON_TCS + float *RealBuffer, /* i : CLDFB samples of the transport channels (real part) */ + float *ImagBuffer, /* i : CLDFB samples of the transport channels (imaginary part) */ +#else float RealBuffer[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : CLDFB samples of the transport channels (real part) */ float ImagBuffer[PARAM_MC_MAX_TRANSPORT_CHANS][PARAM_MC_MAX_NSLOTS][CLDFB_NO_CHANNELS_MAX], /* i : CLDFB samples of the transport channels (imaginary part) */ - float *proto_frame_f, /* o : interleaved complex prototype CLDFB samples */ - const PARAM_MC_DIFF_PROTO_INFO *diff_proto_info, /* i : prototype generation information */ - const int16_t slot_index, /* i : current slot index */ - const int16_t num_freq_bands /* i : number of frequency bands for the prototypes */ +#endif + float *proto_frame_f, /* o : interleaved complex prototype CLDFB samples */ + const PARAM_MC_DIFF_PROTO_INFO *diff_proto_info, /* i : prototype generation information */ +#ifndef JBM_TSM_ON_TCS + const int16_t slot_index, /* i : current slot index */ +#endif + const int16_t num_freq_bands /* i : number of frequency bands for the prototypes */ ) { int16_t band; @@ -1766,8 +2301,13 @@ static void param_mc_protoSignalComputation( int16_t source_ch_idx = diff_proto_info->source_chan_idx[proto_ch_idx][source_ch_cnt]; p_proto_frame = &proto_frame_f[proto_ch_idx * num_freq_bands * 2]; +#ifdef JBM_TSM_ON_TCS + p_real_buffer = &RealBuffer[source_ch_idx * num_freq_bands]; + p_imag_buffer = &ImagBuffer[source_ch_idx * num_freq_bands]; +#else p_real_buffer = &RealBuffer[source_ch_idx][slot_index][0]; p_imag_buffer = &ImagBuffer[source_ch_idx][slot_index][0]; +#endif for ( band = 0; band < num_freq_bands; band++ ) { @@ -1939,15 +2479,18 @@ static int16_t ivas_param_mc_range_decoder_LC( * * compute the interpolator used in the final synthesis *------------------------------------------------------------------------*/ - -static void param_mc_compute_interpolator( +static void ivas_param_mc_dec_compute_interpolator( const uint16_t bAttackPresent, /* i : flag indicating if we have a transient in the current frame */ const uint16_t attackPos, /* i : position of the transient */ const uint16_t interp_length, /* i : number of interpolation values to be calculated */ float *interpolator /* o : interpolator */ ) { +#ifdef JBM_TSM_ON_TCS + int16_t idx; +#else uint16_t idx; +#endif if ( bAttackPresent ) { @@ -1962,10 +2505,14 @@ static void param_mc_compute_interpolator( } else { +#ifdef JBM_TSM_ON_TCS + ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, interp_length, interpolator ); +#else for ( idx = 1; idx <= interp_length; ++idx ) { interpolator[idx - 1] = (float) idx / (float) interp_length; } +#endif } return; @@ -2025,12 +2572,17 @@ static void ivas_param_mc_get_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, /* i : Parametric MC handle */ IVAS_OUTPUT_SETUP *hSynthesisOutputSetup, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : input covariance for all parameter bands */ - float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : direct mixing matrices for all parameter bands */ - float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* o : residual mixing matrices for all parameter bands */ - const int16_t nY_intern, /* i : number of channels in the transported format */ - const PARAM_MC_SYNTHESIS_CONF synth_config, /* i : Parametric MC synthesis config */ - const int16_t nX, /* i : number of transport channels */ - const int16_t nY_cov /* i : number of covariance synthesis output channels */ +#ifdef JBM_TSM_ON_TCS + float *mixing_matrix[], /* o : direct mixing matrices for all parameter bands */ + float *mixing_matrix_res[], /* o : residual mixing matrices for all parameter bands */ +#else + float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : direct mixing matrices for all parameter bands */ + float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* o : residual mixing matrices for all parameter bands */ +#endif + const int16_t nY_intern, /* i : number of channels in the transported format */ + const PARAM_MC_SYNTHESIS_CONF synth_config, /* i : Parametric MC synthesis config */ + const int16_t nX, /* i : number of transport channels */ + const int16_t nY_cov /* i : number of covariance synthesis output channels */ ) { int16_t param_band_idx; @@ -2279,11 +2831,16 @@ static void ivas_param_mc_get_mixing_matrices( static void ivas_param_mc_get_mono_stereo_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, /* i : Parametric MC handle */ float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : transport channel covariance for all parameter bands */ - float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : direct mixing matrix */ - float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* o : residual mixing matrix (set to zero) */ - const int16_t nY_intern, /* i : number of channels of the transport format */ - const int16_t nX, /* i : number of transport channels */ - const int16_t nY_cov ) /* i : number of output channels */ +#ifdef JBM_TSM_ON_TCS + float *mixing_matrix[], /* o : direct mixing matrices for all parameter bands */ + float *mixing_matrix_res[], /* o : residual mixing matrices for all parameter bands */ +#else + float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* o : direct mixing matrix */ + float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* o : residual mixing matrix (set to zero) */ +#endif + const int16_t nY_intern, /* i : number of channels of the transport format */ + const int16_t nX, /* i : number of transport channels */ + const int16_t nY_cov ) /* i : number of output channels */ { int16_t param_band_idx; float Cx[PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS]; @@ -2398,17 +2955,21 @@ static void ivas_param_mc_get_mono_stereo_mixing_matrices( *------------------------------------------------------------------------*/ static void param_mc_update_mixing_matrices( - PARAM_MC_DEC_HANDLE hParamMC, /* i/o: Parametric MC handle */ + PARAM_MC_DEC_HANDLE hParamMC, /* i/o: Parametric MC handle */ +#ifdef JBM_TSM_ON_TCS + float *mixing_matrix[], /* i : direct mixing matrices for the frame just processed */ + float *mixing_matrix_res[], /* i : residual mixing matrices for the frame just processed */ +#else float mixing_matrix[PARAM_MC_MAX_PARAMETER_BANDS][MAX_CICP_CHANNELS * PARAM_MC_MAX_TRANSPORT_CHANS], /* i : direct mixing matrices for the frame just processed */ float mixing_matrix_res[PARAM_MC_MAX_PARAMETER_BANDS_RES][MAX_CICP_CHANNELS * MAX_CICP_CHANNELS], /* i : residual mixing matrices for the frame just processed */ - const uint16_t nX, /* i : number of transport channels */ - const uint16_t nY ) /* i : number of synthesis channels */ +#endif + const uint16_t nX, /* i : number of transport channels */ + const uint16_t nY ) /* i : number of synthesis channels */ { uint16_t param_band_idx; for ( param_band_idx = 0; param_band_idx < hParamMC->hMetadataPMC->nbands_coded; param_band_idx++ ) { - /* final mixing */ int16_t brange[2]; brange[0] = hParamMC->band_grouping[param_band_idx]; diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c new file mode 100644 index 0000000000000000000000000000000000000000..346868ab6a4686978faf188fd65dbad3f220c634 --- /dev/null +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -0,0 +1,693 @@ +/****************************************************************************************************** + + (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. + +*******************************************************************************************************/ + +#include +#include "options.h" +#include +#include "cnst.h" +#include "prot.h" +#include "ivas_prot.h" +#include "ivas_cnst.h" +#include "ivas_rom_com.h" +#include "ivas_rom_dec.h" +#include "math.h" +#ifdef DEBUGGING +#include "debug.h" +#endif +#ifdef DEBUG_PLOT +#include "deb_out.h" +#endif +#include "wmc_auto.h" +#include "rom_dec.h" + +/*-----------------------------------------------------------------------* + * Local function prototypes + *-----------------------------------------------------------------------*/ +static void ps_pred_process( MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, float qmf_mod_re[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float qmf_mod_im[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float qmf_side_re[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float qmf_side_im[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], int16_t ch ); + +static void paramupmix_td_decorr_process( ivas_td_decorr_state_t *hTdDecorr[], float pcm_in[][L_FRAME48k], float **pp_out_pcm, const int16_t output_frame ); + +static int huff_read( Decoder_State *st, const int16_t ( *ht )[2] ); + +static void huffman_decode( Decoder_State *st, int16_t nv, int16_t ivStart, PAR_TYPE parType, QUANT_TYPE quant_type, int16_t bNoDt, int32_t *vq ); + +static void dequant_alpha( int16_t nv, int16_t ivStart, QUANT_TYPE quant_type, int32_t *vq, float *v ); + +static void dequant_beta( int16_t nv, int16_t ivStart, QUANT_TYPE quant_type, int32_t *aq, int32_t *bq, float *beta ); + +static void get_ec_data( Decoder_State *st, PAR_TYPE parType, QUANT_TYPE quant_type, int16_t nParBand, int16_t parBandStart, int32_t *parQ, int32_t *alphaQEnv, float ab[IVAS_MAX_NUM_BANDS] ); + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_dec_read_BS() + * + * Read the ParamUpmix MC metadata + *------------------------------------------------------------------------*/ + +void ivas_mc_paramupmix_dec_read_BS( + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + Decoder_State *st, /* i/o: decoder state structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, /* i/o: decoder MC Param-Upmix handle */ + int16_t *nb_bits /* o : number of bits written */ +) +{ + int16_t i, k; + int32_t alpha_quant[IVAS_MAX_NUM_BANDS]; + int16_t nb_bits_read_orig; + int16_t next_bit_pos_orig, last_bit_pos; + uint16_t bstr_meta[MAX_BITS_METADATA], *bit_stream_orig; + + push_wmops( "mc_paramupmix_read_bs" ); + *nb_bits = 0; + + if ( st->bfi ) + { + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + for ( k = 0; k < IVAS_MAX_NUM_BANDS; k++ ) + { + hMCParamUpmix->alphas[i][k] = hMCParamUpmix->alpha_prev[i][k]; + hMCParamUpmix->betas[i][k] = hMCParamUpmix->beta_prev[i][k]; + } + } + hMCParamUpmix->first_frame = 1; + } + else /* if (!st->bfi) */ + { + bit_stream_orig = st->bit_stream; + next_bit_pos_orig = st->next_bit_pos; + last_bit_pos = (int16_t) ( ( ivas_total_brate / FRAMES_PER_SEC ) - 1 ); + nb_bits_read_orig = 0; + last_bit_pos -= nb_bits_read_orig; /* reverse the bitstream for easier reading of indices */ + for ( i = 0; i < min( MAX_BITS_METADATA, last_bit_pos ); i++ ) + { + bstr_meta[i] = st_ivas->bit_stream[last_bit_pos - i]; + } + st->bit_stream = bstr_meta; + st->next_bit_pos = 0; + st->bits_frame = min( MAX_BITS_METADATA, last_bit_pos + 1 ); + st->total_brate = st_ivas->hDecoderConfig->ivas_total_brate; /* to avoid BER detect */ + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + get_ec_data( st, ALPHA, FINE /*quant_type*/, IVAS_MAX_NUM_BANDS /*nParBand*/, + 0 /*parBandStart*/, hMCParamUpmix->alpha_quant[i], alpha_quant, hMCParamUpmix->alphas[i] ); + + get_ec_data( st, BETA, FINE /*quant_type*/, IVAS_MAX_NUM_BANDS /*nParBand*/, + 0 /*parBandStart*/, hMCParamUpmix->beta_quant[i], alpha_quant, hMCParamUpmix->betas[i] ); + } + *nb_bits += st->next_bit_pos; + st->bit_stream = bit_stream_orig; + st->next_bit_pos = next_bit_pos_orig; + + if ( hMCParamUpmix->first_frame ) + { + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + mvr2r( hMCParamUpmix->alphas[i], hMCParamUpmix->alpha_prev[i], IVAS_MAX_NUM_BANDS ); + mvr2r( hMCParamUpmix->betas[i], hMCParamUpmix->beta_prev[i], IVAS_MAX_NUM_BANDS ); + } + hMCParamUpmix->first_frame = 0; + } + } + + pop_wmops(); + + return; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_dec() + * + * MC ParamUpmix decoding process + *------------------------------------------------------------------------*/ +void ivas_mc_paramupmix_dec( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels */ +) +{ + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; + int16_t i, k, ch; + int16_t slot_idx; + int16_t first_empty_channel; + int16_t nchan_out_transport; + /*CLDFB*/ + float Cldfb_RealBuffer[MC_PARAMUPMIX_MAX_TRANSPORT_CHANS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; + float Cldfb_ImagBuffer[MC_PARAMUPMIX_MAX_TRANSPORT_CHANS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; + int16_t channel_active[MAX_OUTPUT_CHANNELS]; + int32_t output_Fs; + int16_t output_frame; + float Pcm_decorr[MC_PARAMUPMIX_COMBINATIONS][L_FRAME48k]; /* decorrelated channels */ + float *pPcm_temp[MC_PARAMUPMIX_COMBINATIONS * 2]; /* decorrelated and undecorrelated*/ + int16_t noparamupmix_delay; + AUDIO_CONFIG output_config; + + hMCParamUpmix = st_ivas->hMCParamUpmix; + assert( hMCParamUpmix ); + + push_wmops( "mc_paramupmix_dec" ); + + set_s( channel_active, 0, MAX_CICP_CHANNELS ); + nchan_out_transport = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + set_s( channel_active, 1, nchan_out_transport ); /* change to nchan_out_transport */ + output_Fs = st_ivas->hDecoderConfig->output_Fs; + output_config = st_ivas->hDecoderConfig->output_config; + output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + + if ( ( output_config == AUDIO_CONFIG_STEREO ) || ( output_config == AUDIO_CONFIG_MONO ) ) + { + first_empty_channel = 8; /* Don't upmix */ + } + else + { + first_empty_channel = 12; + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + pPcm_temp[i] = Pcm_decorr[i]; /* decorrelated */ + } + + paramupmix_td_decorr_process( hMCParamUpmix->hTdDecorr, &( output_f[4] ), pPcm_temp, output_frame ); + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + pPcm_temp[2 * i] = output_f[i + 4]; /* un-decorrelated */ + pPcm_temp[2 * i + 1] = Pcm_decorr[i]; /* decorrelated */ + } + + /* CLDFB Analysis*/ + for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS * 2; ch++ ) + { + /* slot loop for gathering the input data */ + for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) + { + cldfbAnalysis_ts( &( pPcm_temp[ch][hMCParamUpmix->num_freq_bands * slot_idx] ), Cldfb_RealBuffer[ch][slot_idx], Cldfb_ImagBuffer[ch][slot_idx], hMCParamUpmix->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + } + } + for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS; ch++ ) + { + ps_pred_process( hMCParamUpmix, + Cldfb_RealBuffer[2 * ch], /* in/out */ + Cldfb_ImagBuffer[2 * ch], + Cldfb_RealBuffer[2 * ch + 1], /* in/out decorr */ + Cldfb_ImagBuffer[2 * ch + 1], + ch ); + + /*-- m, s -> l, r ----------------------------*/ + for ( i = 0; i < CLDFB_NO_COL_MAX; i++ ) + { + for ( k = 0; k < CLDFB_NO_CHANNELS_MAX; k++ ) + { + float qlre = Cldfb_RealBuffer[2 * ch][i][k]; + float qlim = Cldfb_ImagBuffer[2 * ch][i][k]; + float qrre = Cldfb_RealBuffer[2 * ch + 1][i][k]; + float qrim = Cldfb_ImagBuffer[2 * ch + 1][i][k]; + + Cldfb_RealBuffer[2 * ch][i][k] = qlre + qrre; + Cldfb_ImagBuffer[2 * ch][i][k] = qlim + qrim; + Cldfb_RealBuffer[2 * ch + 1][i][k] = qlre - qrre; + Cldfb_ImagBuffer[2 * ch + 1][i][k] = qlim - qrim; + } + } + + mvr2r( hMCParamUpmix->alphas[ch], hMCParamUpmix->alpha_prev[ch], IVAS_MAX_NUM_BANDS ); + mvr2r( hMCParamUpmix->betas[ch], hMCParamUpmix->beta_prev[ch], IVAS_MAX_NUM_BANDS ); + } + + /* boxes = { 0 1 2 3 [4 6] [5 7] [8 10] [9 11] }; */ + pPcm_temp[0] = output_f[4]; + pPcm_temp[1] = output_f[6]; + pPcm_temp[2] = output_f[5]; + pPcm_temp[3] = output_f[7]; + pPcm_temp[4] = output_f[8]; + pPcm_temp[5] = output_f[10]; + pPcm_temp[6] = output_f[9]; + pPcm_temp[7] = output_f[11]; + + /* CLDFB synthesis */ + for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS * 2; ch++ ) + { + for ( slot_idx = 0; slot_idx < CLDFB_NO_COL_MAX; slot_idx++ ) + { + float *ptr_im[1], *ptr_re[1]; + ptr_re[0] = Cldfb_RealBuffer[ch][slot_idx]; + ptr_im[0] = Cldfb_ImagBuffer[ch][slot_idx]; + + cldfbSynthesis( ptr_re, ptr_im, &( pPcm_temp[ch][hMCParamUpmix->num_freq_bands * slot_idx] ), + hMCParamUpmix->num_freq_bands, st_ivas->cldfbSynDec[ch] ); + } + } + + /* adjust delay of other channels */ + noparamupmix_delay = NS2SA( output_Fs, IVAS_FB_DEC_DELAY_NS ); + for ( ch = 0; ch < MC_PARAMUPMIX_COMBINATIONS; ch++ ) + { + float tmp_buf[L_SUBFRAME5MS_48k]; + mvr2r( &output_f[ch][output_frame - noparamupmix_delay], tmp_buf, noparamupmix_delay ); + mvr2r( output_f[ch], &output_f[ch][noparamupmix_delay], output_frame - noparamupmix_delay ); + mvr2r( hMCParamUpmix->pcm_delay[ch], output_f[ch], noparamupmix_delay ); + mvr2r( tmp_buf, hMCParamUpmix->pcm_delay[ch], noparamupmix_delay ); + } + } + + for ( ch = first_empty_channel; ch < MAX_OUTPUT_CHANNELS; ch++ ) + { + set_f( output_f[ch], 0.0, L_FRAME48k ); + } + pop_wmops(); + + return; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_getNumTransportChannels() + * + * + *------------------------------------------------------------------------*/ +int16_t ivas_mc_paramupmix_getNumTransportChannels() +{ + int16_t nchan_transport; + nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; /* 5.1.2 */ + return nchan_transport; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_dec_open() + * + * Open Parametric MC decoder handle + *-------------------------------------------------------------------------*/ + +ivas_error ivas_mc_paramupmix_dec_open( + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +) +{ + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; + int32_t output_Fs; + int16_t nchan_transport; + uint16_t i; + ivas_error error; + + error = IVAS_ERR_OK; + + /*-----------------------------------------------------------------* + * prepare library opening + *-----------------------------------------------------------------*/ + + if ( ( hMCParamUpmix = (MC_PARAMUPMIX_DEC_HANDLE) malloc( sizeof( MC_PARAMUPMIX_DEC_DATA ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Param-Upmix MC\n" ) ); + } + output_Fs = st_ivas->hDecoderConfig->output_Fs; + hMCParamUpmix->first_frame = 1; + + st_ivas->nchan_transport = ivas_mc_paramupmix_getNumTransportChannels(); + nchan_transport = st_ivas->nchan_transport; + + switch ( nchan_transport ) + { + case 8: + st_ivas->nCPE = 4; + st_ivas->nSCE = 0; + st_ivas->element_mode_init = IVAS_CPE_MDCT; + break; +#ifdef DEBUGGING + default: + assert( 0 && "Number of TC not supported for MC ParamUpmix!" ); +#endif + } + /*-----------------------------------------------------------------* + * set input parameters + *-----------------------------------------------------------------*/ + + hMCParamUpmix->num_freq_bands = (int16_t) ( output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ); + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + ivas_td_decorr_dec_open( &( hMCParamUpmix->hTdDecorr[i] ), output_Fs, 2, 1 ); + } + + for ( i = 0; i < MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; i++ ) + { + if ( ( hMCParamUpmix->pcm_delay[i] = (float *) malloc( 240 * sizeof( float ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for delay buffer\n" ) ); + } + set_zero( hMCParamUpmix->pcm_delay[i], 240 ); + } + + st_ivas->hMCParamUpmix = hMCParamUpmix; + + return error; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_dec_close() + * + * Close ParamUpmix MC memories + *------------------------------------------------------------------------*/ + +void ivas_mc_paramupmix_dec_close( + MC_PARAMUPMIX_DEC_HANDLE *hMCParamUpmix /* i/o: Parametric MC decoder handle */ +) +{ + int16_t i; + + if ( hMCParamUpmix == NULL || *hMCParamUpmix == NULL ) + { + return; + } + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + ivas_td_decorr_dec_close( &( ( *hMCParamUpmix )->hTdDecorr[i] ) ); + } + for ( i = 0; i < MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; i++ ) + { + if ( ( *hMCParamUpmix )->pcm_delay[i] != NULL ) + { + free( ( *hMCParamUpmix )->pcm_delay[i] ); + } + } + free( *hMCParamUpmix ); + + *hMCParamUpmix = NULL; + + return; +} + +/*****************************************************************************************/ +/* local functions */ +/*****************************************************************************************/ + +static void ps_pred_process( + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, + float qmf_mod_re[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* in/out */ + float qmf_mod_im[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], + float qmf_side_re[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* in/out */ + float qmf_side_im[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], + int16_t ch ) +{ + float vmre, vmim, vsre, vsim; + int16_t iqmf, ipar, ismp, iismp; + float alpha_smp, dalpha, beta_smp, dbeta; + float *alpha1, *alpha2; + float *beta1, *beta2; + float *alpha_prev = hMCParamUpmix->alpha_prev[ch]; + float *beta_prev = hMCParamUpmix->beta_prev[ch]; + + int16_t qmf_to_par_band[] = { + 0, 1, 2, 3, 4, 5, 5, 6, 6, 7, + 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, + 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11 + }; + + for ( iqmf = 0; iqmf < CLDFB_NO_CHANNELS_MAX; iqmf++ ) + { + /* For changing no of parameter bands (ipar1 != ipar2), TIGGER_FRAMING assumed */ + ipar = qmf_to_par_band[iqmf]; + alpha1 = alpha_prev; + beta1 = beta_prev; + + ismp = 0; + alpha2 = hMCParamUpmix->alphas[ch]; + beta2 = hMCParamUpmix->betas[ch]; + alpha_smp = alpha1[ipar]; + beta_smp = beta1[ipar]; + dalpha = ( alpha2[ipar] - alpha1[ipar] ) / CLDFB_NO_COL_MAX; + dbeta = ( beta2[ipar] - beta1[ipar] ) / CLDFB_NO_COL_MAX; + + for ( iismp = 0; iismp < CLDFB_NO_COL_MAX; iismp++ ) + { + alpha_smp += dalpha; + beta_smp += dbeta; + + vmre = qmf_mod_re[ismp][iqmf]; + vmim = qmf_mod_im[ismp][iqmf]; + vsre = qmf_side_re[ismp][iqmf]; + vsim = qmf_side_im[ismp][iqmf]; + + qmf_side_re[ismp][iqmf] = alpha_smp * vmre + beta_smp * vsre; + qmf_side_im[ismp][iqmf] = alpha_smp * vmim + beta_smp * vsim; + + ismp++; + } + + alpha1 = alpha2; + beta1 = beta2; + } +} + +static void paramupmix_td_decorr_process( + ivas_td_decorr_state_t *hTdDecorr[], /* i/o: SPAR Covar. decoder handle */ + float pcm_in[][L_FRAME48k], /* i : input audio channels */ + float **pp_out_pcm, /* o : output audio channels */ + const int16_t output_frame /* i : output frame length */ +) +{ + int16_t j, k; + int16_t offset; + float in_duck_gain[L_FRAME48k], out_duck_gain[L_FRAME48k]; + + offset = (int16_t) ( output_frame * FRAMES_PER_SEC * IVAS_DECORR_PARM_LOOKAHEAD_TAU ); + + /* Look-ahead delay */ + for ( k = 0; k < MC_PARAMUPMIX_COMBINATIONS; k++ ) + { + mvr2r( pcm_in[k], pp_out_pcm[k], output_frame ); + delay_signal( pp_out_pcm[k], output_frame, hTdDecorr[k]->look_ahead_buf, offset ); + + /* In ducking gains */ + if ( hTdDecorr[k]->ducking_flag ) + { + ivas_td_decorr_get_ducking_gains( hTdDecorr[k]->pTrans_det, pcm_in[k], in_duck_gain, out_duck_gain, output_frame, 0 ); + + for ( j = 0; j < output_frame; j++ ) + { + pp_out_pcm[k][j] = pp_out_pcm[k][j] * in_duck_gain[j]; + } + } + + /* All pass delay section */ + ivas_td_decorr_APD_iir_filter( &hTdDecorr[k]->APD_filt_state[0], pp_out_pcm[k], hTdDecorr[k]->num_apd_sections, output_frame ); + + /* Out ducking gains */ + if ( hTdDecorr[k]->ducking_flag ) + { + for ( j = 0; j < output_frame; j++ ) + { + pp_out_pcm[k][j] = pp_out_pcm[k][j] * out_duck_gain[j]; + } + } + } + + return; +} + +static int huff_read( + Decoder_State *st, + const int16_t ( *ht )[2] ) +{ + int16_t node = 0; + uint16_t next_bit = 0; + + do + { + next_bit = st->bit_stream[st->next_bit_pos]; + st->next_bit_pos++; + node = ht[node][next_bit]; + } while ( node > 0 ); + + return -( node + 1 ); +} + +static void huffman_decode( + Decoder_State *st, + int16_t nv, + int16_t ivStart, + PAR_TYPE parType, + QUANT_TYPE quant_type, + int16_t bNoDt, + int32_t *vq ) +{ + const int16_t( *huff_node_table )[2]; + int16_t iv, bdt, nquant, offset; + + + nquant = 0; + switch ( parType ) + { + case ALPHA: + nquant = alpha_quant_table[quant_type].nquant; + break; + case BETA: + nquant = beta_quant_table[quant_type][0].nquant; + break; + default: + assert( 0 ); + } + + offset = nquant - 1; /* range of df/dt [-(nquant - 1), nquant - 1] */ + + if ( bNoDt ) + { + bdt = 0; + } + else + { + bdt = st->bit_stream[st->next_bit_pos]; + st->next_bit_pos++; + } + if ( bdt ) + { /* Get dt */ + switch ( parType ) + { + case ALPHA: + huff_node_table = huff_nodes_dt.alpha[quant_type]; + break; + case BETA: + huff_node_table = huff_nodes_dt.beta[quant_type]; + break; + default: + huff_node_table = NULL; + assert( 0 ); + } + for ( iv = ivStart; iv < nv; iv++ ) + { + vq[iv] = huff_read( st, huff_node_table ) + vq[iv] - offset; + } + } + else /* Get f0, df */ + { + switch ( parType ) + { + case ALPHA: + huff_node_table = huff_nodes_df0.alpha[quant_type]; + break; + case BETA: + huff_node_table = huff_nodes_df0.beta[quant_type]; + break; + default: + huff_node_table = NULL; + assert( 0 ); + } + vq[ivStart] = huff_read( st, huff_node_table ); + + switch ( parType ) + { + case ALPHA: + huff_node_table = huff_nodes_df.alpha[quant_type]; + break; + case BETA: + huff_node_table = huff_nodes_df.beta[quant_type]; + break; + default: + assert( 0 ); + } + + for ( iv = ivStart + 1; iv < nv; iv++ ) + { + vq[iv] = huff_read( st, huff_node_table ) + vq[iv - 1] - offset; + } + } +} + +static void dequant_alpha( + int16_t nv, + int16_t ivStart, + QUANT_TYPE quant_type, + int32_t *vq, + float *v ) +{ + int16_t iv; + ACPL_QUANT_TABLE *quant_table = &alpha_quant_table[quant_type]; + + for ( iv = 0; iv < ivStart; iv++ ) + { + v[iv] = 0; + } + + for ( iv = ivStart; iv < nv; iv++ ) + { + v[iv] = quant_table->data[vq[iv]]; + } +} + +static void dequant_beta( + int16_t nv, + int16_t ivStart, + QUANT_TYPE quant_type, + int32_t *aq, + int32_t *bq, + float *beta ) +{ + int16_t iv; + ACPL_QUANT_TABLE *quant_table; + const int16_t qmap[2][33] = { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0 } + }; + + for ( iv = 0; iv < ivStart; iv++ ) + { + beta[iv] = 0; + } + + for ( iv = ivStart; iv < nv; iv++ ) + { + quant_table = &beta_quant_table[quant_type][qmap[quant_type][aq[iv]]]; + beta[iv] = quant_table->data[bq[iv]]; + } +} + +static void get_ec_data( + Decoder_State *st, + PAR_TYPE parType, + QUANT_TYPE quant_type, + int16_t nParBand, + int16_t parBandStart, + int32_t *parQ, + int32_t *alphaQEnv, + float ab[IVAS_MAX_NUM_BANDS] ) +{ + huffman_decode( st, nParBand, parBandStart, parType, quant_type, 0, parQ ); + if ( parType == ALPHA ) + { + dequant_alpha( nParBand, parBandStart, quant_type, parQ, ab ); + mvl2l( parQ, alphaQEnv, (int16_t) nParBand ); + } + else + { + dequant_beta( nParBand, parBandStart, quant_type, alphaQEnv, parQ, ab ); + } +} diff --git a/lib_dec/ivas_mcmasa_dec.c b/lib_dec/ivas_mcmasa_dec.c index 59d215e22ca4abfb1e784903fc1bc055efe51da6..99b3ff68744b0daf4e3460cd3c9ab3b764ad6bc3 100755 --- a/lib_dec/ivas_mcmasa_dec.c +++ b/lib_dec/ivas_mcmasa_dec.c @@ -131,7 +131,6 @@ ivas_error ivas_mcmasa_dec_reconfig( } else { -#ifdef FIX_417_TD_DECORR_BRATE_SW /* if necessary, close/open td-decorrs */ if ( ( error = ivas_td_decorr_reconfig_dec( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hDecoderConfig->output_Fs, &( st_ivas->hDiracDecBin->hTdDecorr ), &( st_ivas->hDiracDecBin->useTdDecorr ) ) ) != IVAS_ERR_OK ) { @@ -140,18 +139,6 @@ ivas_error ivas_mcmasa_dec_reconfig( /* regularization factor is bitrate-dependent */ st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); -#else - /* the decision for useTdDecorr is done in ivas_dirac_dec_init_binaural_data(). here, comparing against the same condition. */ - if ( st_ivas->hDiracDecBin->useTdDecorr != ( ivas_total_brate < IVAS_48k && st_ivas->nchan_transport == 1 ) ) - { - /* st_ivas->hDiracDecBin->useTdDecorr will change => close and re-open. */ - ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); - if ( ( error = ivas_dirac_dec_init_binaural_data( st_ivas, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) - { - return error; - } - } -#endif } } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c old mode 100644 new mode 100755 index 4d6f8343084bf4e1dc02862741c7351cd47389c5..6eada0e18b3912579410cf73cf7600bc67c8bf07 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -54,8 +54,11 @@ * Local function prototypes *-----------------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS +static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas, uint16_t *nSamplesRendered, int16_t *data ); +#else static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas ); - +#endif /*--------------------------------------------------------------------------* * ivas_mct_dec() @@ -195,6 +198,7 @@ ivas_error ivas_mct_dec( /* Equalization in MDCT Domain */ ivas_ls_setup_conversion_process_mdct( st_ivas, output ); } + else if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) { float *x_all[MAX_CICP_CHANNELS][NB_DIV]; @@ -273,7 +277,7 @@ ivas_error ivas_mct_dec( #endif } /* move channels after LFE to correct output for multi-channel MCT */ - if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT ) + if ( st_ivas->ivas_format == MC_FORMAT && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) { float tmp[L_FRAME48k]; @@ -344,6 +348,10 @@ ivas_error create_mct_dec( { hMCT->nchan_out_woLFE = st_ivas->nchan_transport - st_ivas->hTransSetup.num_lfe; } + else if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + hMCT->nchan_out_woLFE = st_ivas->nchan_transport - st_ivas->hTransSetup.num_lfe; + } else { assert( !"IVAS format currently not supported for MCT" ); @@ -449,6 +457,10 @@ ivas_error mct_dec_reconfigure( { hMCT->nchan_out_woLFE = st_ivas->nchan_transport - st_ivas->hTransSetup.num_lfe; } + else if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + hMCT->nchan_out_woLFE = st_ivas->nchan_transport - st_ivas->hTransSetup.num_lfe; + } else { assert( !"IVAS format currently not supported for MCT" ); @@ -613,6 +625,11 @@ void ivas_mct_dec_close( ivas_error ivas_mc_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t idx /* i : LS config. index */ +#ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : samples flushed from last frame (JBM) */ + int16_t *data /* o : flushed samples (JBM) */ +#endif ) { AUDIO_CONFIG signaled_config; @@ -642,7 +659,11 @@ ivas_error ivas_mc_dec_config( { if ( st_ivas->hDecoderConfig->last_ivas_total_brate != st_ivas->hDecoderConfig->ivas_total_brate || st_ivas->transport_config != signaled_config || last_mc_mode != st_ivas->mc_mode ) { +#ifdef JBM_TSM_ON_TCS + ivas_mc_dec_reconfig( st_ivas, nSamplesRendered, data ); +#else ivas_mc_dec_reconfig( st_ivas ); +#endif } } @@ -661,6 +682,11 @@ ivas_error ivas_mc_dec_config( static ivas_error ivas_mc_dec_reconfig( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + , + uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame (JBM) */ + int16_t *data /* o : flushed samples (JBM) */ +#endif ) { int16_t nchan_transport_old, nSCE_old, nCPE_old, sba_dirac_stereo_flag_old, nchan_hp20_old; @@ -670,6 +696,14 @@ static ivas_error ivas_mc_dec_reconfig( Decoder_State *st; ivas_error error; MC_MODE mc_mode, last_mc_mode; +#ifdef JBM_TSM_ON_TCS + TC_BUFFER_MODE tc_buffer_mode_new; + int16_t tc_nchan_tc_new; + int16_t tc_nchan_allocate_new; + int16_t tc_granularity_new; + AUDIO_CONFIG intern_config_old; + IVAS_OUTPUT_SETUP hIntSetupOld; +#endif error = IVAS_ERR_OK; @@ -700,13 +734,63 @@ static ivas_error ivas_mc_dec_reconfig( } st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); +#ifdef JBM_TSM_ON_TCS + /* save old IntSetup, might be needed for JBM flushing...*/ + intern_config_old = st_ivas->intern_config; + hIntSetupOld = st_ivas->hIntSetup; + tc_granularity_new = 1; +#endif + /* renderer might have changed, reselect */ renderer_type_old = st_ivas->renderer_type; ivas_renderer_select( st_ivas ); + /* side effect of the renderer selection can be a changed internal config */ ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config ); +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDecoderConfig->voip_active ) + { + /* transfer subframe info from DirAC or ParamMC to central tc buffer */ + if ( last_mc_mode == MC_MODE_PARAMMC ) + { + st_ivas->hTcBuffer->nb_subframes = st_ivas->hParamMC->nb_subframes; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hParamMC->subframes_rendered; + st_ivas->hTcBuffer->num_slots = st_ivas->hParamMC->num_slots; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hParamMC->slots_rendered; + mvs2s( st_ivas->hParamMC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + else if ( last_mc_mode == MC_MODE_MCMASA && st_ivas->hDirAC != NULL ) + { + st_ivas->hTcBuffer->nb_subframes = st_ivas->hDirAC->nb_subframes; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hDirAC->subframes_rendered; + st_ivas->hTcBuffer->num_slots = st_ivas->hDirAC->num_slots; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hDirAC->slots_rendered; + mvs2s( st_ivas->hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + /* JBM: when granularity goes down (e.g. MCT with CREND -> ParamMC with binaural fastconv + render what still fits in the new granularity */ + tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->hDecoderConfig->output_Fs ); + if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity ) + { + if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &hIntSetupOld, last_mc_mode, ISM_MODE_NONE, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + { + return error; + } + } + /* JBM: when granularity goes up set samples to discard at the beginning of the frame */ + else if ( tc_granularity_new > st_ivas->hTcBuffer->n_samples_granularity ) + { + if ( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } +#endif + + if ( st_ivas->mc_mode == MC_MODE_MCT ) { st_ivas->nchan_transport = ivas_mc_ls_setup_get_num_channels( ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ) ); @@ -724,10 +808,23 @@ static ivas_error ivas_mc_dec_reconfig( ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); } + if ( last_mc_mode == MC_MODE_PARAMUPMIX ) + { + ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); + ivas_ls_setup_conversion_close( &( st_ivas->hLsSetUpConversion ) ); + } /* De-allocate McMasa-related handles */ ivas_masa_dec_close( &( st_ivas->hMasa ) ); ivas_qmetadata_close( &st_ivas->hQMetaData ); +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDirAC != NULL ) + { + ivas_dirac_dec_close( &st_ivas->hDirAC ); + vbap_free_data( &( st_ivas->hVBAPdata ) ); + } +#endif + /* init LS conversion if the renderer type asks for it */ if ( st_ivas->renderer_type == RENDERER_MC && st_ivas->hLsSetUpConversion == NULL ) { @@ -738,6 +835,46 @@ static ivas_error ivas_mc_dec_reconfig( } } } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + st_ivas->nSCE = 0; + st_ivas->nCPE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS / 2; + st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; + + if ( last_mc_mode != MC_MODE_PARAMUPMIX ) + /* This should always be the case, only supporting one bitrate currently */ + { + /*De-allocate handles for other MC modes*/ + if ( st_ivas->hParamMC != NULL ) + { + ivas_param_mc_dec_close( &st_ivas->hParamMC ); + + /* remove ls conversion if it was allocated by ParamMC */ + ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); + } + + ivas_masa_dec_close( &( st_ivas->hMasa ) ); + ivas_qmetadata_close( &st_ivas->hQMetaData ); + + /* init LS conversion if the renderer type asks for it */ + if ( ( st_ivas->renderer_type == RENDERER_MC ) && st_ivas->hLsSetUpConversion == NULL ) + { + if ( ( error = ivas_ls_setup_conversion_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( ( error = ivas_mc_paramupmix_dec_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + assert( 0 ); + } + } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { if ( last_mc_mode != MC_MODE_PARAMMC ) @@ -765,6 +902,16 @@ static ivas_error ivas_mc_dec_reconfig( ivas_masa_dec_close( &( st_ivas->hMasa ) ); ivas_qmetadata_close( &st_ivas->hQMetaData ); +#ifdef JBM_TSM_ON_TCS + if ( st_ivas->hDirAC != NULL ) + { + ivas_dirac_dec_close( &st_ivas->hDirAC ); + + vbap_free_data( &( st_ivas->hVBAPdata ) ); + } +#endif + + if ( last_mc_mode == MC_MODE_MCT ) { if ( st_ivas->hMCT != NULL && st_ivas->nchan_transport <= CPE_CHANNELS ) @@ -799,6 +946,8 @@ static ivas_error ivas_mc_dec_reconfig( ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); } + ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); + if ( st_ivas->hParamMC != NULL ) { ivas_param_mc_dec_close( &st_ivas->hParamMC ); @@ -892,6 +1041,11 @@ static ivas_error ivas_mc_dec_reconfig( new_brate_SCE = 0; new_brate_CPE = ( ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS; } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + new_brate_SCE = 0; + new_brate_CPE = ( ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS; + } else { new_brate_SCE = 0; /* ivas_total_brate / st_ivas->nchan_transport;*/ @@ -929,21 +1083,10 @@ static ivas_error ivas_mc_dec_reconfig( } -#ifndef FIX_417_TD_DECORR_BRATE_SW - /*-----------------------------------------------------------------* - * CLDFB instances - *-----------------------------------------------------------------*/ - - if ( ( error = ivas_cldfb_dec_reconfig( st_ivas, nchan_transport_old, numCldfbAnalyses_old, numCldfbSyntheses_old ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif /*-----------------------------------------------------------------* * Allocate the LFE handle that is coded seperately after the allocation of the core coders *-----------------------------------------------------------------*/ - - if ( st_ivas->mc_mode == MC_MODE_MCT && st_ivas->hLFE == NULL ) + if ( ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && st_ivas->hLFE == NULL ) { int32_t binauralization_delay_ns = st_ivas->binaural_latency_ns; if ( st_ivas->hBinRenderer != NULL ) @@ -997,6 +1140,10 @@ static ivas_error ivas_mc_dec_reconfig( else if ( st_ivas->renderer_type == RENDERER_DISABLE && st_ivas->hDirAC != NULL ) { ivas_dirac_dec_close( &( st_ivas->hDirAC ) ); + +#ifdef JBM_TSM_ON_TCS + vbap_free_data( &( st_ivas->hVBAPdata ) ); +#endif } } @@ -1123,7 +1270,6 @@ static ivas_error ivas_mc_dec_reconfig( #endif } -#ifdef FIX_417_TD_DECORR_BRATE_SW /*-----------------------------------------------------------------* * TD Decorrelator *-----------------------------------------------------------------*/ @@ -1144,7 +1290,58 @@ static ivas_error ivas_mc_dec_reconfig( { return error; } -#endif +#ifdef JBM_TSM_ON_TCS + /*-----------------------------------------------------------------* + * Reconfigure TC buffer + *-----------------------------------------------------------------*/ + if ( st_ivas->hDecoderConfig->voip_active == 1 ) + { + int16_t tc_nchan_full_new; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + + hTcBuffer = st_ivas->hTcBuffer; + tc_buffer_mode_new = ivas_jbm_dec_get_tc_buffer_mode( st_ivas ); + tc_nchan_tc_new = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + tc_nchan_allocate_new = tc_nchan_tc_new; + tc_nchan_full_new = tc_nchan_tc_new; + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + tc_nchan_allocate_new = 2 * BINAURAL_CHANNELS; + tc_nchan_full_new = tc_nchan_allocate_new; + } + if ( st_ivas->mc_mode == MC_MODE_PARAMMC && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO && st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) + { + tc_nchan_full_new = 0; + } + /* reconfigure buffer */ + if ( hTcBuffer->tc_buffer_mode != tc_buffer_mode_new || hTcBuffer->nchan_transport_jbm != tc_nchan_tc_new || + hTcBuffer->nchan_buffer_full != tc_nchan_full_new || hTcBuffer->nchan_transport_internal != tc_nchan_allocate_new || + tc_granularity_new != hTcBuffer->n_samples_granularity ) + { + if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode_new, tc_nchan_tc_new, tc_nchan_allocate_new, tc_nchan_full_new, tc_granularity_new ) ) != IVAS_ERR_OK ) + { + return error; + } + } + /* transfer subframe info from central tc buffer to ParamMC or McMASA (DirAC) */ + if ( st_ivas->hDirAC != NULL ) + { + st_ivas->hDirAC->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hDirAC->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + st_ivas->hDirAC->num_slots = st_ivas->hTcBuffer->num_slots; + st_ivas->hDirAC->slots_rendered = st_ivas->hTcBuffer->slots_rendered; + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hDirAC->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + else if ( st_ivas->hParamMC != NULL ) + { + st_ivas->hParamMC->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hParamMC->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + st_ivas->hParamMC->num_slots = st_ivas->hTcBuffer->num_slots; + st_ivas->hParamMC->slots_rendered = st_ivas->hTcBuffer->slots_rendered; + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hParamMC->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + } +#endif return error; } diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 81a8dda3549bc069ea6bdde12056d5338b63b9c0..becf11e070428610fdc436ab17ac3a884021c195 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -35,9 +35,7 @@ #include "options.h" #include "prot.h" #include "rom_com.h" -#ifdef SNS_MSVQ #include "ivas_rom_com.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -371,7 +369,6 @@ void ivas_mdct_dec_side_bits_frame_channel( * SNS parameters *--------------------------------------------------------------------------------*/ -#ifdef SNS_MSVQ sns_low_br_mode = 0; skipped_first_channel = 0; if ( !MCT_flag && sts[0]->sr_core == 25600 && ( ( hCPE->element_brate == IVAS_48k || hCPE->element_brate == IVAS_64k ) ) ) @@ -470,44 +467,6 @@ void ivas_mdct_dec_side_bits_frame_channel( st->side_bits_frame_channel += st0->next_bit_pos - start_bit_pos_sns; } } -#else - skipped_first_channel = 0; - sns_low_br_mode = 0; - for ( ch = 0; ch < CPE_CHANNELS; ch++ ) - { - st = sts[ch]; - - if ( st->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) - { - skipped_first_channel = 1; - continue; - } - - start_bit_pos_sns = st0->next_bit_pos; - - if ( ch == 0 || skipped_first_channel ) - { - /* read SNS stereo mode */ - param_lpc[0][0] = get_next_indice( st0, 1 ) << 1; - - /* read low br mode flag (if it is possible to be non-zero) */ - if ( sts[0]->element_brate == IVAS_48k && !( ( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) ) ) - { - sns_low_br_mode = get_next_indice( st0, 1 ); - } - } - - tmp = ch; - if ( ch == 1 && param_lpc[0][0] == 2 ) - { - tmp = 3; - } - - getLPCparam( st, ¶m_lpc[ch][0], st0, tmp, sns_low_br_mode && !( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) ); - - st->side_bits_frame_channel += st0->next_bit_pos - start_bit_pos_sns; - } -#endif // SNS_MSVQ } return; @@ -543,11 +502,7 @@ void ivas_mdct_core_invQ( int16_t *prm[CPE_CHANNELS]; /* LPC */ Word16 Aind[CPE_CHANNELS][M + 1]; -#ifdef SNS_MSVQ float sns[CPE_CHANNELS][NB_DIV][M]; -#else - float lsf[CPE_CHANNELS][( NB_DIV + 1 ) * M]; -#endif /* TCX */ float xn_buf[L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX]; int16_t tcx_offset[CPE_CHANNELS]; @@ -714,7 +669,6 @@ void ivas_mdct_core_invQ( * LPC PARAMETERS *--------------------------------------------------------------------------------*/ -#ifdef SNS_MSVQ if ( bfi == 0 ) { if ( !MCT_flag && sts[0]->sr_core == 25600 && ( ( hCPE->element_brate == IVAS_48k || hCPE->element_brate == IVAS_64k ) ) ) @@ -725,11 +679,7 @@ void ivas_mdct_core_invQ( { if ( sts[0]->core == TCX_20_CORE && sts[1]->core == TCX_20_CORE && sts[0]->mct_chan_mode != MCT_CHAN_MODE_IGNORE && sts[1]->mct_chan_mode != MCT_CHAN_MODE_IGNORE ) { -#ifdef FIX_445_SNS_BUGFIXES sns_avq_dec_stereo( param_lpc[0], param_lpc[1], sts[0]->L_frame, &sns[0][0][0], &sns[1][0][0] ); -#else - sns_avq_dec_stereo( param_lpc[0], param_lpc[1], &sns[0][0][0], &sns[1][0][0] ); -#endif } else { @@ -738,44 +688,12 @@ void ivas_mdct_core_invQ( st = sts[ch]; if ( st->mct_chan_mode != MCT_CHAN_MODE_IGNORE ) { -#ifdef FIX_445_SNS_BUGFIXES sns_avq_dec( param_lpc[ch], sns[ch], st->L_frame, st->numlpc ); -#else - sns_avq_dec( param_lpc[ch], sns[ch], st->numlpc ); -#endif } } } } } -#else - if ( bfi == 0 ) - { - if ( sts[0]->core == TCX_20_CORE && sts[1]->core == TCX_20_CORE && sts[0]->mct_chan_mode != MCT_CHAN_MODE_IGNORE && sts[1]->mct_chan_mode != MCT_CHAN_MODE_IGNORE ) - { -#ifdef FIX_445_SNS_BUGFIXES - sns_avq_dec_stereo( param_lpc[0], param_lpc[1], sts[0]->L_frame, &lsf[0][M], &lsf[1][M] ); -#else - sns_avq_dec_stereo( param_lpc[0], param_lpc[1], &lsf[0][M], &lsf[1][M] ); -#endif - } - else - { - for ( ch = 0; ch < CPE_CHANNELS; ch++ ) - { - st = sts[ch]; - if ( st->mct_chan_mode != MCT_CHAN_MODE_IGNORE ) - { -#ifdef FIX_445_SNS_BUGFIXES - sns_avq_dec( param_lpc[ch], &lsf[ch][M], st->L_frame, st->numlpc ); -#else - sns_avq_dec( param_lpc[ch], &lsf[ch][M], st->numlpc ); -#endif - } - } - } - } -#endif /*--------------------------------------------------------------* @@ -820,11 +738,7 @@ void ivas_mdct_core_invQ( /* Stability Factor */ if ( !bfi ) { -#ifdef SNS_MSVQ mvr2r( sns[ch][k], &Aq[ch][k * M], M ); -#else - mvr2r( &lsf[ch][( k + 1 ) * M], &Aq[ch][k * M], M ); -#endif } else { diff --git a/lib_dec/ivas_objectRenderer_internal.c b/lib_dec/ivas_objectRenderer_internal.c index f1c1fc04f207070edf6ba1652ee35d1fa5fe3c77..873c75938a8866752dc2bb2a01ba7998a9f6e475 100644 --- a/lib_dec/ivas_objectRenderer_internal.c +++ b/lib_dec/ivas_objectRenderer_internal.c @@ -66,9 +66,13 @@ ivas_error ivas_td_binaural_open( *---------------------------------------------------------------------*/ ivas_error ivas_td_binaural_renderer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: SCE channels / Binaural synthesis */ +#else float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ - const int16_t output_frame /* i : output frame length */ +#endif + const int16_t output_frame /* i : output frame length */ ) { return ivas_td_binaural_renderer_unwrap( @@ -78,3 +82,89 @@ ivas_error ivas_td_binaural_renderer( st_ivas->hIsmMetaData, st_ivas->hDecoderConfig->Opt_Headrotation, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Quaternions : NULL, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Pos : NULL, output, output_frame ); } + +#ifdef JBM_TSM_ON_TCS +/*---------------------------------------------------------------------* + * ObjRenderIVASFrame() + * + * Receives the current frames for the object streams, updates metadata + * and renders the current frame. + *---------------------------------------------------------------------*/ + +void ObjRenderIVASSubframe( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + float *output[], /* i/o: SCE channels / Binaural synthesis */ + const int16_t n_samples_asked ) +{ + int16_t first_sf, last_sf, subframe_idx; + float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; + float *p_reverb_signal[BINAURAL_CHANNELS]; + float *output_f_local[BINAURAL_CHANNELS]; + float *tc_local[MAX_TRANSPORT_CHANNELS]; + int16_t ch, slot_size, slots_to_render, output_frame; + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + p_reverb_signal[ch] = reverb_signal[ch]; + } + for ( ch = 0; ch < st_ivas->hTcBuffer->nchan_transport_internal; ch++ ) + { + tc_local[ch] = st_ivas->hTcBuffer->tc[ch] + st_ivas->hTcBuffer->n_samples_rendered; + } + for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ ) + { + output_f_local[ch] = output[ch]; + } + slot_size = st_ivas->hTcBuffer->n_samples_granularity; + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( st_ivas->hTcBuffer->num_slots - st_ivas->hTcBuffer->slots_rendered, n_samples_asked / slot_size ); + first_sf = st_ivas->hTcBuffer->subframes_rendered; + last_sf = first_sf; + st_ivas->hTcBuffer->slots_rendered += slots_to_render; + while ( slots_to_render > 0 ) + { + slots_to_render -= st_ivas->hTcBuffer->subframe_nbslots[last_sf]; + last_sf++; + } + + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + output_frame = st_ivas->hTcBuffer->subframe_nbslots[subframe_idx] * st_ivas->hTcBuffer->n_samples_granularity; + /* Update object position(s) */ + TDREND_Update_object_positions( st_ivas->hBinRendererTd, st_ivas->nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, tc_local ); + + /* Update the listener's location/orientation */ + TDREND_Update_listener_orientation( st_ivas->hBinRendererTd, + st_ivas->hDecoderConfig->Opt_Headrotation, + ( st_ivas->hHeadTrackData != NULL ) ? &st_ivas->hHeadTrackData->Quaternions[0] : NULL, + ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->Pos : NULL ); + + if ( ( st_ivas->hRenderConfig != NULL ) && ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) ) + { + ivas_reverb_process( st_ivas->hReverb, st_ivas->transport_config, 0, tc_local, p_reverb_signal, 0 ); + } + + /* Render subframe */ + TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0 ); + + if ( st_ivas->hRenderConfig != NULL ) /* Renderer Configuration not enabled in TD standalone renderer */ + { + if ( st_ivas->hRenderConfig->roomAcoustics.late_reverb_on ) + { + /* add reverb to rendered signals */ + v_add( reverb_signal[0], output_f_local[0], output_f_local[0], output_frame ); + v_add( reverb_signal[1], output_f_local[1], output_f_local[1], output_frame ); + } + } + for ( ch = 0; ch < st_ivas->hTcBuffer->nchan_transport_internal; ch++ ) + { + tc_local[ch] += output_frame; + } + for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ ) + { + output_f_local[ch] += output_frame; + } + } + st_ivas->hTcBuffer->subframes_rendered = last_sf; + return; +} +#endif diff --git a/lib_dec/ivas_out_setup_conversion.c b/lib_dec/ivas_out_setup_conversion.c index 2fb04af8d78f3dda0f1b974a1215b51c46f4bebf..131f07090cd0386c986910002fa8b1d51dbe8800 100644 --- a/lib_dec/ivas_out_setup_conversion.c +++ b/lib_dec/ivas_out_setup_conversion.c @@ -312,7 +312,16 @@ ivas_error ivas_ls_setup_conversion_open( int16_t output_frame; int32_t output_Fs; int16_t nchan_out; + int16_t paramUpmixMonoStereo; + if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) + { + paramUpmixMonoStereo = TRUE; + } + else + { + paramUpmixMonoStereo = FALSE; + } output_Fs = st_ivas->hDecoderConfig->output_Fs; nchan_out = st_ivas->hDecoderConfig->nchan_out; output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); @@ -351,7 +360,22 @@ ivas_error ivas_ls_setup_conversion_open( } else { - inChannels = st_ivas->nchan_transport; + if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + if ( paramUpmixMonoStereo == TRUE ) + { + inChannels = audioCfg2channels( AUDIO_CONFIG_5_1_2 ); + } + else + { + inChannels = st_ivas->hTransSetup.nchan_out_woLFE + st_ivas->hTransSetup.num_lfe; + } + } + else + { + inChannels = st_ivas->nchan_transport; + } + /*Initialization of MDCT bands with TCX20 resolution */ ivas_lssetupconversion_mdct_init_bands( output_frame, TCX_20_CORE, &hLsSetUpConversion->sfbOffset[0], &hLsSetUpConversion->sfbCnt ); if ( ( hLsSetUpConversion->targetEnergyPrev[0] = (float *) malloc( ( MAX_SFB + 2 ) * sizeof( float ) ) ) == NULL ) @@ -397,7 +421,14 @@ ivas_error ivas_ls_setup_conversion_open( { if ( st_ivas->transport_config != AUDIO_CONFIG_INVALID ) { - get_ls_conversion_matrix( hLsSetUpConversion, st_ivas->transport_config, st_ivas->hDecoderConfig->output_config ); + if ( paramUpmixMonoStereo == TRUE ) + { + get_ls_conversion_matrix( hLsSetUpConversion, AUDIO_CONFIG_5_1_2, st_ivas->hDecoderConfig->output_config ); + } + else + { + get_ls_conversion_matrix( hLsSetUpConversion, st_ivas->transport_config, st_ivas->hDecoderConfig->output_config ); + } } else { @@ -465,8 +496,14 @@ void ivas_ls_setup_conversion_close( void ivas_ls_setup_conversion( Decoder_Struct *st_ivas, /* i : IVAS decoder structure */ + const int16_t input_chans, /* i : number of input channels to the renderer */ const int16_t output_frame, /* i : frame length */ - float output[][L_FRAME48k] /* i/o: LS input/output synthesis signal */ +#ifdef JBM_TSM_ON_TCS + float *input[], /* i : LS input/output synthesis signal */ + float *output[] /* i/o: LS input/output synthesis signal */ +#else + float output[][L_FRAME48k] /* i/o: LS input/output synthesis signal */ +#endif ) { int16_t chInIdx, chOutIdx, idx; @@ -481,7 +518,7 @@ void ivas_ls_setup_conversion( for ( chOutIdx = 0; chOutIdx < st_ivas->hDecoderConfig->nchan_out; chOutIdx++ ) { set_zero( output_tmp[chOutIdx], output_frame ); - for ( chInIdx = 0; chInIdx < st_ivas->nchan_transport; chInIdx++ ) + for ( chInIdx = 0; chInIdx < input_chans; chInIdx++ ) { dmxCoeff = hLsSetUpConversion->dmxMtx[chInIdx][chOutIdx]; @@ -493,14 +530,22 @@ void ivas_ls_setup_conversion( { for ( idx = 0; idx < output_frame; idx++ ) { +#ifdef JBM_TSM_ON_TCS + output_tmp[chOutIdx][idx] += input[chInIdx][idx]; +#else output_tmp[chOutIdx][idx] += output[chInIdx][idx]; +#endif } } else { for ( idx = 0; idx < output_frame; idx++ ) { +#ifdef JBM_TSM_ON_TCS + tmpVal = dmxCoeff * input[chInIdx][idx]; +#else tmpVal = dmxCoeff * output[chInIdx][idx]; +#endif output_tmp[chOutIdx][idx] += tmpVal; } } @@ -1098,7 +1143,10 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( *-------------------------------------------------------------------------*/ void ivas_lssetupconversion_process_param_mc( - Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ + Decoder_Struct *st_ivas, /* i/o: LS setup conversion renderer handle */ +#ifdef JBM_TSM_ON_TCS + int16_t num_timeslots, +#endif float Cldfb_RealBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ float Cldfb_ImagBuffer_InOut[MAX_CICP_CHANNELS][PARAM_MC_MAX_NSLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i/o: LS signals */ int16_t channel_active[MAX_CICP_CHANNELS] /* i : bitmap indicating which output channels are active */ @@ -1125,8 +1173,12 @@ void ivas_lssetupconversion_process_param_mc( set_s( channel_active, 0, outChannels ); - /* Loop over each time slots and compute dmx for each time slot */ +/* Loop over each time slots and compute dmx for each time slot */ +#ifdef JBM_TSM_ON_TCS + for ( slotIdx = 0; slotIdx < num_timeslots; slotIdx++ ) +#else for ( slotIdx = 0; slotIdx < st_ivas->hParamMC->subframe_nbslots; slotIdx++ ) +#endif { /* copy buffers */ for ( chInIdx = 0; chInIdx < inChannels; chInIdx++ ) diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index ff73e6aa49d76ad1ebc592efb99a47e3b0afaf15..e1c2621ea81fbecaa9a1c157a6c37c0467ddb156 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -152,7 +152,8 @@ void ivas_renderer_select( if ( st_ivas->hDecoderConfig->Opt_Headrotation ) { - nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); + nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); if ( nchan_internal == 2 ) { st_ivas->hHeadTrackData->shd_rot_max_order = 1; @@ -191,16 +192,16 @@ void ivas_renderer_select( if ( output_config == AUDIO_CONFIG_BINAURAL ) { #ifdef DEBUGGING - if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) + if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) #else - if ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation && ( st_ivas->mc_mode == MC_MODE_MCT ) ) + if ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) #endif { *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; } else { - if ( st_ivas->mc_mode == MC_MODE_MCT ) + if ( ( st_ivas->mc_mode == MC_MODE_MCT ) || ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) { *renderer_type = RENDERER_BINAURAL_MIXER_CONV; } @@ -228,7 +229,7 @@ void ivas_renderer_select( } else /* AUDIO_CONFIG_BINAURAL_ROOM */ { - if ( st_ivas->mc_mode == MC_MODE_MCT ) + if ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) { *renderer_type = RENDERER_BINAURAL_MIXER_CONV_ROOM; } @@ -255,6 +256,13 @@ void ivas_renderer_select( * Non-binaural rendering configurations *-----------------------------------------------------------------*/ + else if ( st_ivas->ivas_format == MONO_FORMAT ) + { + if ( output_config == AUDIO_CONFIG_STEREO ) + { + *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX; + } + } else if ( st_ivas->ivas_format == STEREO_FORMAT ) { if ( output_config != AUDIO_CONFIG_STEREO && output_config != AUDIO_CONFIG_MONO ) @@ -264,37 +272,44 @@ void ivas_renderer_select( } else if ( st_ivas->ivas_format == ISM_FORMAT ) { - if ( st_ivas->ism_mode == ISM_MODE_PARAM ) + if ( ( output_config == AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) ) { - *renderer_type = RENDERER_PARAM_ISM; - if ( output_config == AUDIO_CONFIG_MONO ) - { - *renderer_type = RENDERER_MONO_DOWNMIX; - } - else if ( output_config == AUDIO_CONFIG_STEREO ) - { - *renderer_type = RENDERER_DISABLE; - } - else if ( output_config == AUDIO_CONFIG_FOA || output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_HOA3 ) - { - *renderer_type = RENDERER_SBA_LINEAR_ENC; - *internal_config = AUDIO_CONFIG_7_1_4; - } + *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX; } - else /* ISM_MODE_DISC */ + else { - *renderer_type = RENDERER_TD_PANNING; - if ( output_config == AUDIO_CONFIG_MONO ) - { - *renderer_type = RENDERER_MONO_DOWNMIX; - } - else if ( output_config == AUDIO_CONFIG_FOA || output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_HOA3 ) + if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { - *renderer_type = RENDERER_SBA_LINEAR_ENC; + *renderer_type = RENDERER_PARAM_ISM; + if ( output_config == AUDIO_CONFIG_MONO ) + { + *renderer_type = RENDERER_MONO_DOWNMIX; + } + else if ( output_config == AUDIO_CONFIG_STEREO ) + { + *renderer_type = RENDERER_DISABLE; + } + else if ( output_config == AUDIO_CONFIG_FOA || output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_HOA3 ) + { + *renderer_type = RENDERER_SBA_LINEAR_ENC; + *internal_config = AUDIO_CONFIG_7_1_4; + } } - else if ( output_config == AUDIO_CONFIG_EXTERNAL ) + else /* ISM_MODE_DISC */ { - *renderer_type = RENDERER_DISABLE; + *renderer_type = RENDERER_TD_PANNING; + if ( output_config == AUDIO_CONFIG_MONO ) + { + *renderer_type = RENDERER_MONO_DOWNMIX; + } + else if ( output_config == AUDIO_CONFIG_FOA || output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_HOA3 ) + { + *renderer_type = RENDERER_SBA_LINEAR_ENC; + } + else if ( output_config == AUDIO_CONFIG_EXTERNAL ) + { + *renderer_type = RENDERER_DISABLE; + } } } } @@ -355,6 +370,21 @@ void ivas_renderer_select( *renderer_type = RENDERER_SBA_LINEAR_ENC; } } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + *internal_config = transport_config; + if ( *internal_config != output_config ) + { + if ( output_config != AUDIO_CONFIG_FOA && output_config != AUDIO_CONFIG_HOA2 && output_config != AUDIO_CONFIG_HOA3 ) + { + *renderer_type = RENDERER_MC; + } + else + { + *renderer_type = RENDERER_SBA_LINEAR_ENC; + } + } + } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { if ( output_config == AUDIO_CONFIG_FOA || output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_HOA3 ) diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 47eb7917c0d17ea7ea1dd4333310a4a23ab8ddf7..67aefe90386249495c0756cf1e5d7d2a0731d1f5 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -52,14 +52,14 @@ static int16_t ivas_qmetadata_entropy_decode_df_ratio( uint16_t *bitstream, int1 static int16_t ivas_qmetadata_entropy_decode_dir( IVAS_QDIRECTION *q_direction, uint16_t *bitstream, int16_t *index, const uint16_t diffuseness_index_max_ec_frame, const int16_t nbands, const int16_t start_band #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); static int16_t ivas_qmetadata_raw_decode_dir( IVAS_QDIRECTION *q_direction, uint16_t *bitstream, int16_t *index, const int16_t nbands, const int16_t start_band #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); @@ -90,7 +90,7 @@ static ivas_error read_huf( int16_t *num_bits_read, const uint16_t *bitstream, u static int16_t read_coherence_data( uint16_t *bitstream, int16_t *p_bit_pos, IVAS_QMETADATA *hQMetaData, const int16_t idx_dir #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); @@ -99,7 +99,7 @@ static int16_t read_surround_coherence( uint16_t *bitstream, int16_t *p_bit_pos, static void decode_spread_coherence( IVAS_QMETADATA_HANDLE hQMetaData, int16_t idx_d, const int16_t no_frames #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); @@ -112,43 +112,18 @@ static int16_t read_GR_min_removed_data( uint16_t *bitstream, int16_t *p_bit_pos static int16_t decode_fixed_rate_composed_index_coherence( uint16_t *bitstream, int16_t *p_bit_pos, const int16_t no_bands, int16_t *no_cv_vec, uint16_t *decoded_index, const int16_t no_symb ); #ifdef HR_METADATA +static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( uint16_t *bitstream, int16_t *index, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); -static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( - uint16_t *bitstream, /* i : bitstream */ - int16_t *index, - IVAS_QDIRECTION *q_direction, - uint16_t *diffuseness_index_max_ec_frame ); +static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( uint16_t *bitstream, int16_t *index, IVAS_QDIRECTION *q_direction ); +static int16_t ivas_qmetadata_raw_decode_dir_512( IVAS_QDIRECTION *q_direction, uint16_t *bitstream, int16_t *index, const int16_t nbands, const int16_t start_band, const SPHERICAL_GRID_DATA *sph_grid16 ); -static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( - uint16_t *bitstream, /* i : bitstream */ - int16_t *index, - IVAS_QDIRECTION *q_direction ); - -static int16_t ivas_qmetadata_raw_decode_dir_512( - IVAS_QDIRECTION *q_direction, /* i/o: quantized direction structure */ - uint16_t *bitstream, /* i : bitstream */ - int16_t *index, - const int16_t nbands, - const int16_t start_band, - SPHERICAL_GRID_DATA *sph_grid16 /* i: spherical grid for deindexing */ -); -static int16_t read_surround_coherence_hr( - uint16_t *bitstream, /* i : bitstream */ - int16_t *p_bit_pos, /* i : position in the bitstream */ - IVAS_QMETADATA *hQMetaData /* i/o: quantized metadata structure */ -); - -/* !r: number of bits read */ -static int16_t read_coherence_data_hr_512( - uint16_t *bitstream, /* i : bitstream */ - int16_t *p_bit_pos, /* i : position in the bitstream */ - IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata structure */ - const int16_t idx_dir, /* i : direction index */ - int16_t nbits_coh ); +static int16_t read_surround_coherence_hr( uint16_t *bitstream, int16_t *p_bit_pos, IVAS_QMETADATA *hQMetaData ); +static int16_t read_coherence_data_hr_512( uint16_t *bitstream, int16_t *p_bit_pos, IVAS_QMETADATA *hQMetaData, const int16_t idx_dir, const int16_t nbits_coh ); #endif + /*-----------------------------------------------------------------------* * Global function definitions *-----------------------------------------------------------------------*/ @@ -159,12 +134,13 @@ static int16_t read_coherence_data_hr_512( * Main function for decoding Spatial Metadata *-----------------------------------------------------------------------*/ - /*! r: number of bits read */ int16_t ivas_qmetadata_dec_decode( - IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: hQMetaData handle */ - uint16_t *bitstream, /* i : bitstream */ - int16_t *index /* i/o: bitstream position */ + IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: hQMetaData handle */ + uint16_t *bitstream, /* i : bitstream */ + int16_t *index /* i/o: bitstream position */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ) { int16_t d, b, m; @@ -194,7 +170,6 @@ int16_t ivas_qmetadata_dec_decode( int16_t reduce_bits; int16_t ind_order[MASA_MAXIMUM_CODING_SUBBANDS]; - #ifdef DEBUG_MODE_QMETADATA static FILE *pF = NULL; static FILE *pF_azi = NULL; @@ -251,23 +226,43 @@ int16_t ivas_qmetadata_dec_decode( } bits_diff_sum = 0; - bits_diff_sum += ivas_qmetadata_entropy_decode_diffuseness( bitstream, index, &( hQMetaData->q_direction[0] ), &diffuseness_index_max_ec_frame_pre[0] ); - if ( hQMetaData->no_directions == 2 ) + if ( hodirac_flag ) { - /* Calculate bits for dfRatio */ - dir2band = 0; - for ( b = hQMetaData->q_direction[0].cfg.start_band; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) + if ( hQMetaData->no_directions == 2 ) { - if ( hQMetaData->twoDirBands[b] == 1 ) + /* Calculate bits for dfRatio */ + dir2band = 0; + for ( b = hQMetaData->q_direction[0].cfg.start_band; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) { - dfRatio_bits[dir2band] = ivas_get_df_ratio_bits( hQMetaData->q_direction[0].band_data[b].energy_ratio_index[0] ); - dir2band++; + if ( hQMetaData->twoDirBands[b] == 1 ) + { + dfRatio_bits[dir2band] = ivas_get_df_ratio_bits_hodirac( hQMetaData->q_direction[0].band_data[b].energy_ratio_index[0] ); + dir2band++; + } } + + bits_diff_sum += ivas_qmetadata_entropy_decode_df_ratio( bitstream, index, &( hQMetaData->q_direction[1] ), dfRatio_bits ); } + } + else + { + if ( hQMetaData->no_directions == 2 ) + { + /* Calculate bits for dfRatio */ + dir2band = 0; + for ( b = hQMetaData->q_direction[0].cfg.start_band; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) + { + if ( hQMetaData->twoDirBands[b] == 1 ) + { + dfRatio_bits[dir2band] = ivas_get_df_ratio_bits( hQMetaData->q_direction[0].band_data[b].energy_ratio_index[0] ); + dir2band++; + } + } - bits_diff_sum += ivas_qmetadata_entropy_decode_df_ratio( bitstream, index, &( hQMetaData->q_direction[1] ), dfRatio_bits ); + bits_diff_sum += ivas_qmetadata_entropy_decode_df_ratio( bitstream, index, &( hQMetaData->q_direction[1] ), dfRatio_bits ); + } } /* Calculate direct-to-total energy ratios for both directions from diffuse-to-total ratio and distribution factor of direct-to-total ratios */ @@ -283,14 +278,33 @@ int16_t ivas_qmetadata_dec_decode( diffRatio = diffuseness_reconstructions[hQMetaData->q_direction[0].band_data[b].energy_ratio_index[0]]; dfRatio_qsteps = 1 << dfRatio_bits[dir2band]; - dfRatio = usdequant( hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0], 0.5f, 0.5f / ( dfRatio_qsteps - 1 ) ); + /* already encoded as total and ratios in HO-DirAC */ + if ( hodirac_flag ) + { + dfRatio = usdequant( hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0], 0.0f, 1.f / ( dfRatio_qsteps - 1 ) ); + dir1ratio = 1.f - diffRatio; + dir2ratio = dfRatio; + } + else + { + dfRatio = usdequant( hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0], 0.5f, 0.5f / ( dfRatio_qsteps - 1 ) ); + + dir1ratio = dfRatio * ( 1.0f - diffRatio ); + dir2ratio = ( 1.0f - diffRatio ) - dir1ratio; + } - dir1ratio = dfRatio * ( 1.0f - diffRatio ); - dir2ratio = ( 1.0f - diffRatio ) - dir1ratio; /* Requantize the 1 - dirRatio separately for each direction to obtain inverted dirRatio index. These are used in further decoding. */ hQMetaData->q_direction[0].band_data[b].energy_ratio_index[0] = masa_sq( 1.0f - dir1ratio, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); - hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0] = masa_sq( 1.0f - dir2ratio, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); + if ( hodirac_flag ) + { + float tmp; + hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0] = usquant( dir2ratio, &tmp, 0.0f, 1.f / ( DIRAC_DIFFUSE_LEVELS - 1 ), DIRAC_DIFFUSE_LEVELS ); + } + else + { + hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0] = masa_sq( 1.0f - dir2ratio, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); + } for ( m = 0; m < hQMetaData->q_direction[0].cfg.nblocks; m++ ) { @@ -346,7 +360,8 @@ int16_t ivas_qmetadata_dec_decode( index_dirRatio1Inv = hQMetaData->q_direction[0].band_data[b].energy_ratio_index[0]; index_dirRatio2Inv = hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[0]; - masa_compensate_two_dir_energy_ratio_index( index_dirRatio1Inv, index_dirRatio2Inv, &index_dirRatio1Inv_mod, &index_dirRatio2Inv_mod ); + masa_compensate_two_dir_energy_ratio_index( index_dirRatio1Inv, index_dirRatio2Inv, &index_dirRatio1Inv_mod, &index_dirRatio2Inv_mod, + hodirac_flag ); for ( m = 0; m < hQMetaData->q_direction[0].cfg.nblocks; m++ ) { @@ -686,6 +701,7 @@ int16_t ivas_qmetadata_dec_decode( } #endif } + /* move 2 dir data to its correct subband */ if ( hQMetaData->no_directions == 2 ) { @@ -736,16 +752,19 @@ int16_t ivas_qmetadata_dec_decode( } /* Scale energy ratios that sum to over one */ - for ( b = 0; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) + if ( !hodirac_flag ) { - float ratioSum; + for ( b = 0; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) + { + float ratioSum; - ratioSum = hQMetaData->q_direction[0].band_data[b].energy_ratio[0] + hQMetaData->q_direction[1].band_data[b].energy_ratio[0]; + ratioSum = hQMetaData->q_direction[0].band_data[b].energy_ratio[0] + hQMetaData->q_direction[1].band_data[b].energy_ratio[0]; - if ( ratioSum > 1.0f ) - { - set_f( hQMetaData->q_direction[0].band_data[b].energy_ratio, hQMetaData->q_direction[0].band_data[b].energy_ratio[0] / ratioSum, nblocks ); - set_f( hQMetaData->q_direction[1].band_data[b].energy_ratio, hQMetaData->q_direction[1].band_data[b].energy_ratio[0] / ratioSum, nblocks ); + if ( ratioSum > 1.0f ) + { + set_f( hQMetaData->q_direction[0].band_data[b].energy_ratio, hQMetaData->q_direction[0].band_data[b].energy_ratio[0] / ratioSum, nblocks ); + set_f( hQMetaData->q_direction[1].band_data[b].energy_ratio, hQMetaData->q_direction[1].band_data[b].energy_ratio[0] / ratioSum, nblocks ); + } } } } @@ -760,24 +779,32 @@ int16_t ivas_qmetadata_dec_decode( hQMetaData->dir_comp_ratio = 1.0f; } - return ( start_index_0 - *index ); } #ifdef HR_METADATA +/*-----------------------------------------------------------------------* + * ivas_qmetadata_dec_decode_hr_384_512() + * + * Main function for decoding Spatial Metadata at HRs + *-----------------------------------------------------------------------*/ /*! r: number of bits read */ int16_t ivas_qmetadata_dec_decode_hr_384_512( - IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: hQMetaData handle */ - uint16_t *bitstream, /* i : bitstream */ - int16_t *index, /* i/o: bitstream position */ - SPHERICAL_GRID_DATA *sph_grid16, /* i: spherical grid for deindexing */ - int16_t bits_sph_idx, - int16_t bits_sp_coh ) + IVAS_QMETADATA_HANDLE hQMetaData, /* i/o: hQMetaData handle */ + uint16_t *bitstream, /* i : bitstream */ + int16_t *index, /* i/o: bitstream position */ + const SPHERICAL_GRID_DATA *sph_grid16, /* i : spherical grid for deindexing */ + const int16_t bits_sph_idx, + const int16_t bits_sp_coh +#ifdef FIX_HBR_MASAMETA + , + uint8_t ncoding_bands_config +#endif +) { int16_t d, b, m; - int16_t bits_diff_sum; int16_t nbands, start_band; IVAS_QDIRECTION *q_direction; @@ -785,6 +812,10 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( int16_t bits_no_dirs_coh, bits_sur_coherence; uint16_t all_coherence_zero; int16_t p[MASA_MAXIMUM_CODING_SUBBANDS], dif_p[MASA_MAXIMUM_CODING_SUBBANDS]; +#ifdef FIX_HBR_MASAMETA + int16_t codedBands, sf_nbands0, sf_nbands1; + sf_nbands1 = 1; +#endif #ifdef DEBUG_MODE_QMETADATA static FILE *pF = NULL; @@ -809,7 +840,57 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( #endif start_index_0 = *index; +#ifdef FIX_HBR_MASAMETA + /* read number of higher inactive/not encoded bands */ + if ( bitstream[( *index )--] ) + { + codedBands = MASA_MAXIMUM_CODING_SUBBANDS - ivas_qmetadata_DecodeExtendedGR( bitstream, index, MASA_MAXIMUM_CODING_SUBBANDS, 1 ) - 1; + } + else + { + codedBands = MASA_MAXIMUM_CODING_SUBBANDS; + } + for ( b = codedBands; b < ncoding_bands_config; b++ ) + { + for ( m = 0; m < MAX_PARAM_SPATIAL_SUBFRAMES; m++ ) + { + hQMetaData->q_direction[0].band_data[b].azimuth[m] = 0.0f; + hQMetaData->q_direction[0].band_data[b].elevation[m] = 0.0f; + hQMetaData->q_direction[0].band_data[b].energy_ratio[m] = 0.0f; + + if ( hQMetaData->coherence_flag && hQMetaData->q_direction[0].coherence_band_data != NULL ) + { + hQMetaData->q_direction[0].coherence_band_data[b].spread_coherence[m] = 0u; + } + + if ( hQMetaData->no_directions == 2 ) + { + hQMetaData->q_direction[1].band_data[b].azimuth[m] = 0.0f; + hQMetaData->q_direction[1].band_data[b].elevation[m] = 0.0f; + hQMetaData->q_direction[1].band_data[b].energy_ratio[m] = 0.0f; + + if ( hQMetaData->coherence_flag && hQMetaData->q_direction[1].coherence_band_data != NULL ) + { + hQMetaData->q_direction[1].coherence_band_data[b].spread_coherence[m] = 0u; + } + } + + if ( hQMetaData->coherence_flag && hQMetaData->surcoh_band_data != NULL ) + { + hQMetaData->surcoh_band_data[b].surround_coherence[m] = 0u; + } + } + if ( hQMetaData->no_directions == 2 ) + { + hQMetaData->twoDirBands[b] = 0; + } + } + sf_nbands0 = hQMetaData->q_direction[0].cfg.nbands; + + hQMetaData->q_direction[0].cfg.nbands = codedBands; + +#endif /*Coherence flag decoding*/ bits_no_dirs_coh = 0; all_coherence_zero = 1; @@ -831,12 +912,23 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( { /* Read which bands have 2 directions */ hQMetaData->q_direction[1].cfg.nbands = hQMetaData->numTwoDirBands; +#ifdef FIX_HBR_MASAMETA + sf_nbands1 = hQMetaData->q_direction[1].cfg.nbands; + if ( hQMetaData->q_direction[1].cfg.nbands > codedBands ) + { + hQMetaData->q_direction[1].cfg.nbands = codedBands; + } +#endif set_c( (int8_t *) hQMetaData->twoDirBands, 0, hQMetaData->q_direction[0].cfg.nbands ); d = *index; dif_p[0] = ivas_qmetadata_DecodeExtendedGR( bitstream, index, MASA_MAXIMUM_CODING_SUBBANDS, 0 ); p[0] = dif_p[0]; hQMetaData->twoDirBands[p[0]] = 1; +#ifdef FIX_HBR_MASAMETA + for ( b = 1; b < hQMetaData->q_direction[1].cfg.nbands; b++ ) +#else for ( b = 1; b < hQMetaData->numTwoDirBands; b++ ) +#endif { dif_p[b] = ivas_qmetadata_DecodeExtendedGR( bitstream, index, MASA_MAXIMUM_CODING_SUBBANDS, 0 ); p[b] = p[b - 1] + dif_p[b] + 1; @@ -845,6 +937,16 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( bits_no_dirs_coh += ( d - *index ); } +#ifdef FIX_HBR_MASAMETA + if ( bits_sph_idx == 16 && hQMetaData->no_directions == 2 ) + { + sf_nbands1 = hQMetaData->q_direction[1].cfg.nbands; + if ( hQMetaData->q_direction[1].cfg.nbands > codedBands ) + { + hQMetaData->q_direction[1].cfg.nbands = codedBands; + } + } +#endif bits_diff_sum = ivas_qmetadata_entropy_decode_diffuseness_hr_512( bitstream, index, &( hQMetaData->q_direction[0] ) ); if ( hQMetaData->no_directions == 2 ) @@ -896,7 +998,6 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( } } - if ( all_coherence_zero == 0 ) { bits_sur_coherence = read_surround_coherence_hr( bitstream, index, hQMetaData ); @@ -915,14 +1016,12 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( } bits_no_dirs_coh += bits_sur_coherence; - for ( d = 0; d < hQMetaData->no_directions; d++ ) { q_direction = &hQMetaData->q_direction[d]; nbands = q_direction->cfg.nbands; start_band = q_direction->cfg.start_band; - /* Read coherence, if any */ if ( all_coherence_zero == 0 ) { @@ -945,11 +1044,9 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( } } - /* Decode quantized directions frame-wise */ ivas_qmetadata_raw_decode_dir_512( q_direction, bitstream, index, nbands, start_band, sph_grid16 ); - #ifdef DEBUG_MODE_QMETADATA fprintf( pF, "frame %d: diff %d surcoh %d ", frame, bits_diff_sum, bits_sur_coherence ); @@ -959,7 +1056,6 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( fprintf( pF_spcoh, "frame %d/dir %d: ", frame, d ); fprintf( pF_ratio, "frame %d/dir %d: ", frame, d ); - for ( b = start_band; b < nbands; b++ ) { for ( m = 0; m < q_direction->cfg.nblocks; m++ ) @@ -1019,6 +1115,7 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( } } } + /* Scale energy ratios that sum to over one */ for ( b = 0; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) { @@ -1036,7 +1133,6 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( } } - #ifdef DEBUG_MODE_QMETADATA for ( d = 0; d < hQMetaData->no_directions; d++ ) { @@ -1079,6 +1175,13 @@ int16_t ivas_qmetadata_dec_decode_hr_384_512( hQMetaData->dir_comp_ratio = 1.0f; } +#ifdef FIX_HBR_MASAMETA + hQMetaData->q_direction[0].cfg.nbands = sf_nbands0; + if ( hQMetaData->no_directions == 2 ) + { + hQMetaData->q_direction[1].cfg.nbands = sf_nbands1; + } +#endif return ( start_index_0 - *index ); } @@ -1352,6 +1455,12 @@ static int16_t ivas_diffuseness_huff_ec_decode( } +/*-------------------------------------------------------------------* + * ivas_qmetadata_entropy_decode_diffuseness() + * + * + *-------------------------------------------------------------------*/ + static int16_t ivas_qmetadata_entropy_decode_diffuseness( uint16_t *bitstream, /* i : bitstream */ int16_t *index, @@ -1449,6 +1558,12 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness( #ifdef HR_METADATA +/*-------------------------------------------------------------------* + * ivas_qmetadata_entropy_decode_diffuseness_hr() + * + * + *-------------------------------------------------------------------*/ + static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( uint16_t *bitstream, /* i : bitstream */ int16_t *index, @@ -1523,6 +1638,13 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( return ( index_start - *index ); } + +/*-------------------------------------------------------------------* + * ivas_qmetadata_entropy_decode_diffuseness_hr_512() + * + * + *-------------------------------------------------------------------*/ + static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( uint16_t *bitstream, /* i : bitstream */ int16_t *index, @@ -1552,7 +1674,6 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( return MASA_BITS_ER_HR; } - for ( b = start_band; b < nbands; b++ ) { for ( k = 0; k < nblocks; k++ ) @@ -1565,6 +1686,13 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( } #endif + +/*-------------------------------------------------------------------* + * ivas_qmetadata_entropy_decode_df_ratio() + * + * + *-------------------------------------------------------------------*/ + static int16_t ivas_qmetadata_entropy_decode_df_ratio( uint16_t *bitstream, int16_t *index, @@ -1693,7 +1821,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( const int16_t start_band #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding*/ #endif ) { @@ -1723,7 +1851,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( for ( b = start_band; b < nbands; b++ ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { diff_idx = 0; } @@ -1734,6 +1862,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( #ifdef HR_METADATA } #endif + diff_idx_min = min( diff_idx_min, diff_idx ); if ( q_direction->cfg.mc_ls_setup != MC_LS_SETUP_INVALID ) { @@ -1743,6 +1872,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( { elev_alph[b] = no_theta_masa[bits_direction_masa[diff_idx] - 3] * 2 - 1; } + #ifdef HR_METADATA if ( q_direction->band_data[b].energy_ratio_index_mod[0] > diffuseness_index_max_ec_frame ) #else @@ -1801,7 +1931,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( { int16_t tmp_index; #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { diff_idx = 0; } @@ -1820,6 +1950,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( else { avg_elevation_index_projected = ivas_dirac_project_elevation_index( avg_elevation_idx, avg_elevation_alphabet, elev_alph[b] ); + /*reorder elevation indexing*/ tmp_index = avg_elevation_index_projected - ( elev_alph[b] >> 1 ); if ( tmp_index < 0 ) @@ -1836,6 +1967,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( for ( m = 0; m < nblocks; m++ ) { q_direction->band_data[b].elevation_index[m] = avg_elevation_index_projected; + /*deduce aplhabet for azimuth*/ if ( q_direction->cfg.mc_ls_setup != MC_LS_SETUP_INVALID ) { @@ -1860,18 +1992,18 @@ static int16_t ivas_qmetadata_entropy_decode_dir( if ( bands_entropic[b] ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { diff_idx = 0; } else { - #endif diff_idx = q_direction->band_data[b].energy_ratio_index_mod[0]; #ifdef HR_METADATA } #endif + for ( m = 0; m < nblocks; m++ ) { int16_t tmp_index; @@ -1894,7 +2026,6 @@ static int16_t ivas_qmetadata_entropy_decode_dir( } else { - avg_elevation_index_projected = ivas_dirac_project_elevation_index( avg_elevation_idx, avg_elevation_alphabet, elev_alph[b] ); tmp_index = ivas_qmetadata_DecodeExtendedGR( bitstream, index, elev_alph[b], gr_param_elev ); @@ -1931,18 +2062,18 @@ static int16_t ivas_qmetadata_entropy_decode_dir( if ( bands_entropic[b] ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { diff_idx = 0; } else { - #endif diff_idx = q_direction->band_data[b].energy_ratio_index_mod[0]; #ifdef HR_METADATA } #endif + for ( m = 0; m < nblocks; m++ ) { q_direction->band_data[b].elevation_index[m] = 0; @@ -2002,6 +2133,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( set_zero( avg_direction_vector, 3 ); use_adapt_avg = 0; idx = 0; + for ( b = start_band; b < nbands; b++ ) { if ( bands_entropic[b] ) @@ -2060,6 +2192,7 @@ static int16_t ivas_qmetadata_entropy_decode_dir( return ( index_start - *index ); } + #ifdef HR_METADATA /*------------------------------------------------------------------------- * ivas_qmetadata_raw_decode_dir() @@ -2073,7 +2206,7 @@ static int16_t ivas_qmetadata_raw_decode_dir_512( int16_t *index, const int16_t nbands, const int16_t start_band, - SPHERICAL_GRID_DATA *sph_grid16 /* i: spherical grid for deindexing */ + const SPHERICAL_GRID_DATA *sph_grid16 /* i : spherical grid for deindexing */ ) { int16_t b, m, i; @@ -2094,6 +2227,7 @@ static int16_t ivas_qmetadata_raw_decode_dir_512( value = ( value << 1 ) + bitstream[( *index )--]; } q_direction->band_data[b].spherical_index[m] = value; + if ( q_direction->band_data[b].bits_sph_idx[m] == 16 ) { deindex_sph_idx( value, sph_grid16, &( q_direction->band_data[b].elevation[m] ), &( q_direction->band_data[b].azimuth[m] ) ); @@ -2107,11 +2241,11 @@ static int16_t ivas_qmetadata_raw_decode_dir_512( } } - return ( index_start - *index ); } #endif + /*------------------------------------------------------------------------- * ivas_qmetadata_raw_decode_dir() * @@ -2126,7 +2260,7 @@ static int16_t ivas_qmetadata_raw_decode_dir( const int16_t start_band #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding*/ #endif ) { @@ -2147,7 +2281,7 @@ static int16_t ivas_qmetadata_raw_decode_dir( else { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { diff_idx = 0; } @@ -2181,7 +2315,7 @@ static int16_t ivas_qmetadata_raw_decode_dir( * Read the bitstream following the encoding scheme of EncodeQuasiUniform *------------------------------------------------------------------------*/ -/* !r: Value read from the bitstream */ +/*! r: Value read from the bitstream */ static uint16_t ivas_qmetadata_DecodeQuasiUniform( const uint16_t *bitstream, /* i : pointer to the bitstream to read */ int16_t *index, /* i : position in the bitstream to start reading (gets updated with reading) */ @@ -2222,7 +2356,7 @@ static uint16_t ivas_qmetadata_DecodeQuasiUniform( * Reads the bitstream and decodes the value using the ExtendedGR algorithm *------------------------------------------------------------------------*/ -/* !r: Value decoded from the bitstream */ +/*! r: Value decoded from the bitstream */ static int16_t ivas_qmetadata_DecodeExtendedGR( uint16_t *bitstream, /* i : pointer to the bitstream to read */ int16_t *index, /* i/o: position in the bitstream to start reading (gets updated with reading) */ @@ -2281,7 +2415,7 @@ static int16_t ivas_qmetadata_DecodeExtendedGR( * Calculates the correct elevation index from the decoded data *------------------------------------------------------------------------*/ -/* !r: Elevation index as it will be read by the dequantizer */ +/*! r: Elevation index as it will be read by the dequantizer */ static int16_t ivas_qmetadata_ReorderElevationDecoded( const int16_t elev_dist, /* i : Distance to the average extracted from the bitstream */ const int16_t elev_avg, /* i : Average value over time-blocks extracted from the bitstream */ @@ -2311,7 +2445,7 @@ static int16_t ivas_qmetadata_ReorderElevationDecoded( * Local functions: requentizeEC3 *-----------------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t read_directions( IVAS_QDIRECTION *q_direction, /* i/o: quantized direction structure */ const uint8_t coding_subbands, /* i : number of directions */ @@ -2363,6 +2497,7 @@ static int16_t read_directions( max_nb_idx = k; } } + if ( q_direction->cfg.nblocks == 1 ) { byteBuffer = 0; @@ -2542,7 +2677,7 @@ static int16_t read_directions( * read and decode the azimuth indexes for one subband *-------------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t decode_azimuth( IVAS_QDIRECTION *q_direction, /* i/o: quantized metadata structure */ uint16_t *bitstream, /* i : bitstream to be read */ @@ -2711,7 +2846,7 @@ static int16_t decode_azimuth( * Reads the bitstream and decode the elevation index *-------------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t decode_elevation( IVAS_QDIRECTION *q_direction, /* i/o: quantized metadata structure */ uint16_t *bitstream, /* i : input bitstream */ @@ -2839,7 +2974,7 @@ static int16_t decode_elevation( * decoding in fixed rate case, i.e. when using the spherical indexes *-----------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t decode_fixed_rate( IVAS_QDIRECTION *q_direction, /* i/o: quantized metadata */ const uint16_t *bitstream, /* i : bitstream to be read */ @@ -2879,7 +3014,7 @@ static int16_t decode_fixed_rate( * Azimuth bitstream reading and decoding in 2D case *-------------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t decode_azimuth2D( IVAS_QDIRECTION *q_direction, /* i/o: quantized metadata structure */ uint16_t *bitstream, /* i : bitstream to be read */ @@ -3073,7 +3208,7 @@ static int16_t read_truncGR_azimuth( * *-------------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t read_common_direction( uint16_t *bitstream, /* i : bitstream to be read */ IVAS_QDIRECTION *q_direction, /* i/o: quantized direction structure */ @@ -3200,7 +3335,7 @@ static void decode_spread_coherence( const int16_t no_frames /* i : number of time subframes */ #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding*/ #endif ) { @@ -3214,6 +3349,7 @@ static void decode_spread_coherence( #ifdef HR_METADATA int16_t min_index; #endif + coding_subbands_0 = hQMetaData->q_direction[0].cfg.nbands; coding_subbands = hQMetaData->q_direction[idx_d].cfg.nbands; if ( coding_subbands_0 <= 5 ) @@ -3268,8 +3404,9 @@ static void decode_spread_coherence( for ( i = 0; i < coding_subbands; i++ ) { var_azi = var( q_direction->band_data[i].azimuth, no_frames ); + #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { minimum_s( (int16_t *) ( q_direction->band_data[i].energy_ratio_index ), q_direction->cfg.nblocks, &min_index ); min_index = min_index >> 1; @@ -3297,7 +3434,9 @@ static void decode_spread_coherence( idx_sub_cb = MASA_NO_CV_COH * ( q_direction->band_data[i].energy_ratio_index[0] + DIRAC_DIFFUSE_LEVELS ); /* NO_CV_COH = 8 */ } #endif + dct_coh[i][0] = coherence_cb0_masa[idx_sub_cb + q_direction->coherence_band_data[i].spread_coherence_dct0_index]; + if ( coding_subbands < coding_subbands_0 ) { assert( idx_d == 1 ); @@ -3326,7 +3465,7 @@ static void decode_spread_coherence( * Read Hufman code *-------------------------------------------------------------------*/ -/* !r: number of bits read */ +/*! r: number of bits read */ static ivas_error read_huf( int16_t *num_bits_read, const uint16_t *bitstream, /* i : bitstream to be read */ @@ -3554,14 +3693,21 @@ static int16_t decode_fixed_rate_composed_index_coherence( return nbits; } + #ifdef HR_METADATA -/* !r: number of bits read */ +/*-------------------------------------------------------------------* + * read_coherence_data_hr_512() + * + * + *-------------------------------------------------------------------*/ + +/*! r: number of bits read */ static int16_t read_coherence_data_hr_512( uint16_t *bitstream, /* i : bitstream */ int16_t *p_bit_pos, /* i : position in the bitstream */ IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata structure */ const int16_t idx_dir, /* i : direction index */ - int16_t nbits_coh ) + const int16_t nbits_coh ) { int16_t j, k, i; int16_t nbands, nblocks; @@ -3627,13 +3773,15 @@ static int16_t read_coherence_data_hr_512( return nbits; } #endif -/*------------------------------------------------------------------ - * + + +/*------------------------------------------------------------------- * * read_coherence_data() * * Read coherence data - *------------------------------------------------------------------ - */ + *------------------------------------------------------------------- */ -/* !r: number of bits read */ +/*! r: number of bits read */ static int16_t read_coherence_data( uint16_t *bitstream, /* i : bitstream */ int16_t *p_bit_pos, /* i : position in the bitstream */ @@ -3641,7 +3789,7 @@ static int16_t read_coherence_data( const int16_t idx_dir /* i : direction index */ #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding*/ #endif ) { @@ -3663,6 +3811,7 @@ static int16_t read_coherence_data( #ifdef HR_METADATA int16_t min_index; #endif + coding_subbands = hQMetaData->q_direction[idx_dir].cfg.nbands; q_direction = &( hQMetaData->q_direction[idx_dir] ); @@ -3674,7 +3823,7 @@ static int16_t read_coherence_data( for ( j = 0; j < coding_subbands; j++ ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { idx_ER = 7 - ( q_direction->band_data[j].energy_ratio_index_mod[0] >> 1 ) + coding_subbands / MASA_FACTOR_CV_COH; } @@ -3710,7 +3859,7 @@ static int16_t read_coherence_data( if ( no_cv_vec[j] > 1 ) { #ifdef HR_METADATA - q_direction->coherence_band_data[j].spread_coherence[0] = (uint8_t) roundf( decoded_idx[j] * ( 255.0f / (float) ( 7 - ( q_direction->band_data[j].energy_ratio_index_mod[0] >> ( is_hr ) ) + coding_subbands / MASA_FACTOR_CV_COH ) ) ); + q_direction->coherence_band_data[j].spread_coherence[0] = (uint8_t) roundf( decoded_idx[j] * ( 255.0f / (float) ( 7 - ( q_direction->band_data[j].energy_ratio_index_mod[0] >> ( hrmasa_flag ) ) + coding_subbands / MASA_FACTOR_CV_COH ) ) ); #else q_direction->coherence_band_data[j].spread_coherence[0] = (uint8_t) roundf( decoded_idx[j] * ( 255.0f / (float) ( 7 - q_direction->band_data[j].energy_ratio_index_mod[0] + coding_subbands / MASA_FACTOR_CV_COH ) ) ); #endif @@ -3731,7 +3880,7 @@ static int16_t read_coherence_data( if ( no_cv_vec[j] > 1 ) { #ifdef HR_METADATA - q_direction->coherence_band_data[j].spread_coherence[0] = (uint8_t) roundf( decoded_index[j] * ( 255.0f / (float) ( 7 - ( q_direction->band_data[j].energy_ratio_index_mod[0] >> ( is_hr ) ) + coding_subbands / MASA_FACTOR_CV_COH ) ) ); + q_direction->coherence_band_data[j].spread_coherence[0] = (uint8_t) roundf( decoded_index[j] * ( 255.0f / (float) ( 7 - ( q_direction->band_data[j].energy_ratio_index_mod[0] >> ( hrmasa_flag ) ) + coding_subbands / MASA_FACTOR_CV_COH ) ) ); #else q_direction->coherence_band_data[j].spread_coherence[0] = (uint8_t) roundf( decoded_index[j] * ( 255.0f / (float) ( 7 - q_direction->band_data[j].energy_ratio_index_mod[0] + coding_subbands / MASA_FACTOR_CV_COH ) ) ); #endif @@ -3748,7 +3897,7 @@ static int16_t read_coherence_data( for ( j = 0; j < coding_subbands; j++ ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { minimum_s( (int16_t *) ( q_direction->band_data[j].energy_ratio_index ), q_direction->cfg.nblocks, &min_index ); no_cv_vec[j] = len_cb_dct0_masa[min_index >> 1]; /* spread coherence DCT0*/ @@ -4043,7 +4192,15 @@ static int16_t read_surround_coherence( return bits_sur_coherence; } + + #ifdef HR_METADATA +/*-------------------------------------------------------------------* + * read_surround_coherence_hr() + * + * + *-------------------------------------------------------------------*/ + static int16_t read_surround_coherence_hr( uint16_t *bitstream, /* i : bitstream */ int16_t *p_bit_pos, /* i : position in the bitstream */ @@ -4115,7 +4272,6 @@ static int16_t read_surround_coherence_hr( } else { - /* read how the surround coherence is encoded */ byteBuffer = bitstream[bit_pos--]; bits_sur_coherence += 1; diff --git a/lib_dec/ivas_rom_dec.c b/lib_dec/ivas_rom_dec.c index 66a2bc56639d6ca0a27c77bbc83050c4dfabc9d1..6a33a36aaa072eb8fb15cf98c29159072bd55bcd 100644 --- a/lib_dec/ivas_rom_dec.c +++ b/lib_dec/ivas_rom_dec.c @@ -226,11 +226,7 @@ const float dft_win_8k[70] = * stereo CNA tables *------------------------------------------------------------------------*/ -#ifdef FIX_I414_OOA_CNA const int16_t cna_init_bands[CNA_INIT_NBANDS + 1] = -#else -const int16_t cna_init_bands[MAX_CNA_NBANDS + 1] = -#endif { 1, 4, 14, 33, 67, 171, 320 }; @@ -524,9 +520,13 @@ const float ap_split_frequencies[DIRAC_DECORR_NUM_SPLIT_BANDS + 1] = 0.0f, 0.125f, 0.375f, 1.0f }; -const int16_t sba_map_tc[8] = +const int16_t sba_map_tc[11] = +{ + 0, 1, 2, 3, 4, 8, 9, 15, 5, 6, 7 +}; +const int16_t sba_map_tc_512[11] = { - 0, 1, 2, 3, 4, 8, 9, 15 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 15 }; @@ -542,3 +542,290 @@ const float dmxmtx_table[BINAURAL_CHANNELS][11] = /* clang-format on */ + + +const int16_t huff_nodes_first_band_alpha[32][2] = { /* Alpha Fine Huffman table df0 */ + { -17, 1 }, + { 3, 2 }, + { -16, -18 }, + { 5, 4 }, + { -15, 6 }, + { -19, 7 }, + { 9, 8 }, + { 11, 10 }, + { -14, -20 }, + { 13, 12 }, + { -21, 14 }, + { -13, 15 }, + { 17, 16 }, + { -22, 18 }, + { -12, 19 }, + { -9, -10 }, + { -11, 20 }, + { -23, 21 }, + { -8, 22 }, + { -24, 23 }, + { -25, 24 }, + { -7, 25 }, + { -26, 26 }, + { 28, 27 }, + { -6, -27 }, + { -33, 29 }, + { -1, -28 }, + { -5, 30 }, + { -29, -30 }, + { -4, 31 }, + { -3, -31 }, + { -2, -32 } +}; +const int16_t huff_nodes_first_band_alpha_coarse[16][2] = { /* Alpha Coarse Huffman table df0 */ + { -9, 1 }, + { -8, 2 }, + { -10, 3 }, + { 5, 4 }, + { -7, 6 }, + { -11, 7 }, + { -5, 8 }, + { -6, 9 }, + { -12, 10 }, + { -13, 11 }, + { -4, 12 }, + { -14, 13 }, + { -3, 14 }, + { -15, 15 }, + { -2, -16 }, + { -1, -17 } +}; + + +const int16_t huff_nodes_alpha_1D_DF[64][2] = { /* Alpha Fine Huffman table df */ + { -33, 1 }, + { 3, 2 }, + { -32, -34 }, + { 5, 4 }, + { -31, -35 }, + { 7, 6 }, + { -30, 8 }, + { -36, 9 }, + { 11, 10 }, + { -37, 12 }, + { -29, 13 }, + { -28, 14 }, + { -38, 15 }, + { 17, 16 }, + { -27, -39 }, + { 19, 18 }, + { -26, 20 }, + { -40, 21 }, + { 23, 22 }, + { -41, 24 }, + { -25, 25 }, + { -24, 26 }, + { -42, 27 }, + { -43, 28 }, + { -23, 29 }, + { -44, 30 }, + { -22, 31 }, + { -45, 32 }, + { -21, 33 }, + { -20, 34 }, + { -46, 35 }, + { -19, 36 }, + { -47, 37 }, + { -18, -48 }, + { 39, 38 }, + { -17, -49 }, + { 41, 40 }, + { -16, 42 }, + { -1, -50 }, + { -65, 43 }, + { 45, 44 }, + { -51, 46 }, + { -15, 47 }, + { 49, 48 }, + { -52, 50 }, + { -14, 51 }, + { 53, 52 }, + { -13, 54 }, + { -53, 55 }, + { 57, 56 }, + { -12, 58 }, + { -54, 59 }, + { 61, 60 }, + { -55, 62 }, + { -11, 63 }, + { -10, -61 }, + { -5, -57 }, + { -58, -60 }, + { -56, -59 }, + { -4, -6 }, + { -7, -64 }, + { -9, -63 }, + { -3, -8 }, + { -2, -62 } +}; +const int16_t huff_nodes_alpha_1D_DF_coarse[32][2] = { /* Alpha Coarse Huffman table df */ + { -17, 1 }, + { -18, 2 }, + { -16, 3 }, + { -15, 4 }, + { -19, 5 }, + { 7, 6 }, + { -14, -20 }, + { 9, 8 }, + { -13, -21 }, + { 11, 10 }, + { -22, 12 }, + { -12, 13 }, + { -23, 14 }, + { -11, 15 }, + { -10, 16 }, + { -24, 17 }, + { -9, -25 }, + { 19, 18 }, + { -26, 20 }, + { -8, 21 }, + { 23, 22 }, + { 25, 24 }, + { -27, 26 }, + { -7, 27 }, + { -1, -33 }, + { -6, 28 }, + { -28, 29 }, + { -29, 30 }, + { -5, -31 }, + { -30, 31 }, + { -3, -4 }, + { -2, -32 } +}; + +const int16_t huff_nodes_alpha_1D_DT[64][2] = { /* Alpha Fine Huffman table dt */ + { -33, 1 }, + { -34, 2 }, + { -32, 3 }, + { 5, 4 }, + { -31, -35 }, + { 7, 6 }, + { -36, 8 }, + { -30, 9 }, + { 11, 10 }, + { -29, -37 }, + { 13, 12 }, + { 15, 14 }, + { -28, -38 }, + { 17, 16 }, + { -27, -39 }, + { 19, 18 }, + { -40, 20 }, + { -26, 21 }, + { 23, 22 }, + { -25, -41 }, + { 25, 24 }, + { -24, -42 }, + { 27, 26 }, + { -23, -43 }, + { 29, 28 }, + { -22, -44 }, + { 31, 30 }, + { -45, 32 }, + { -21, 33 }, + { -20, 34 }, + { -46, 35 }, + { -47, 36 }, + { -19, 37 }, + { -48, 38 }, + { -18, 39 }, + { 41, 40 }, + { -17, -49 }, + { 43, 42 }, + { -50, 44 }, + { -16, 45 }, + { 47, 46 }, + { -51, 48 }, + { -15, 49 }, + { 51, 50 }, + { -52, -65 }, + { -1, -14 }, + { 53, 52 }, + { -53, 54 }, + { -13, 55 }, + { 57, 56 }, + { -12, 58 }, + { -54, 59 }, + { 61, 60 }, + { -11, -55 }, + { -56, 62 }, + { -10, 63 }, + { -9, -57 }, + { -5, -6 }, + { -58, -61 }, + { -7, -59 }, + { -8, -62 }, + { -4, -60 }, + { -3, -64 }, + { -2, -63 } +}; +const int16_t huff_nodes_alpha_1D_DT_coarse[32][2] = { /* Alpha Coarse Huffman table dt */ + { -17, 1 }, + { -18, 2 }, + { -16, 3 }, + { -19, 4 }, + { -15, 5 }, + { 7, 6 }, + { -14, -20 }, + { 9, 8 }, + { -21, 10 }, + { -13, 11 }, + { 13, 12 }, + { -12, -22 }, + { 15, 14 }, + { -11, -23 }, + { 17, 16 }, + { -24, 18 }, + { -10, 19 }, + { -25, 20 }, + { -9, 21 }, + { 23, 22 }, + { -26, 24 }, + { -8, 25 }, + { 27, 26 }, + { -1, -33 }, + { -7, -27 }, + { 29, 28 }, + { -28, 30 }, + { -6, 31 }, + { -5, -29 }, + { -3, -31 }, + { -4, -30 }, + { -2, -32 } +}; + +const int16_t huff_nodes_first_band_beta[8][2] = /* Beta Fine Huffman table df0 */ + { { -1, 1 }, { -2, 2 }, { -3, 3 }, { -4, 4 }, { -5, 5 }, { -6, 6 }, { -7, 7 }, { -8, -9 } }; +const int16_t huff_nodes_first_band_beta_coarse[4][2] = /* Beta Coarse Huffman table df0 */ + { { -1, 1 }, { -2, 2 }, { -3, 3 }, { -4, -5 } }; + +const int16_t huff_nodes_beta_1D_DF[16][2] = /* Beta Fine Huffman table df */ + { { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { 9, 8 }, { -5, -13 }, { 11, 10 }, { -4, -14 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; +const int16_t huff_nodes_beta_1D_DF_coarse[8][2] = /* Beta Coarse Huffman table df */ + { { -5, 1 }, { -6, 2 }, { -4, 3 }, { -3, 4 }, { -7, 5 }, { -2, 6 }, { -8, 7 }, { -1, -9 } }; + +const int16_t huff_nodes_beta_1D_DT[16][2] = /* Beta Fine Huffman table dt */ + { { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { -13, 8 }, { -5, 9 }, { -14, 10 }, { -4, 11 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; +const int16_t huff_nodes_beta_1D_DT_coarse[8][2] = /* Beta Coarse Huffman table dt */ + { { -5, 1 }, { -6, 2 }, { -4, 3 }, { -7, 4 }, { -3, 5 }, { -8, 6 }, { -2, 7 }, { -1, -9 } }; + +HUFF_NODE_TABLE huff_nodes_df0 = { + { huff_nodes_first_band_alpha, huff_nodes_first_band_alpha_coarse }, + { huff_nodes_first_band_beta, huff_nodes_first_band_beta_coarse } +}; + +HUFF_NODE_TABLE huff_nodes_df = { + { huff_nodes_alpha_1D_DF, huff_nodes_alpha_1D_DF_coarse }, + { huff_nodes_beta_1D_DF, huff_nodes_beta_1D_DF_coarse } +}; + +HUFF_NODE_TABLE huff_nodes_dt = { + { huff_nodes_alpha_1D_DT, huff_nodes_alpha_1D_DT_coarse }, + { huff_nodes_beta_1D_DT, huff_nodes_beta_1D_DT_coarse } +}; diff --git a/lib_dec/ivas_rom_dec.h b/lib_dec/ivas_rom_dec.h index 95612634b03e2dd582e1c1f8bce209bb120c9732..7a19f170c0b00f12d5050d4224dcd05cc7960b98 100644 --- a/lib_dec/ivas_rom_dec.h +++ b/lib_dec/ivas_rom_dec.h @@ -68,11 +68,7 @@ extern const float dft_win232ms_48k[450]; extern const float dft_win_8k[70]; -#ifdef FIX_I414_OOA_CNA extern const int16_t cna_init_bands[CNA_INIT_NBANDS + 1]; -#else -extern const int16_t cna_init_bands[MAX_CNA_NBANDS + 1]; -#endif extern const float min_smooth_gains1[SBA_DIRAC_STEREO_NUM_BANDS]; extern const float max_smooth_gains1[SBA_DIRAC_STEREO_NUM_BANDS]; @@ -115,8 +111,8 @@ extern const float ap_lattice_coeffs_3[DIRAC_DECORR_FILTER_LEN_3 * DIRAC_MAX_NUM extern const float *const ap_lattice_coeffs[DIRAC_DECORR_NUM_SPLIT_BANDS]; extern const float ap_split_frequencies[DIRAC_DECORR_NUM_SPLIT_BANDS + 1]; -extern const int16_t sba_map_tc[8]; - +extern const int16_t sba_map_tc[11]; +extern const int16_t sba_map_tc_512[11]; /*----------------------------------------------------------------------------------* * FASTCONV and PARAMETRIC binaural renderer ROM tables @@ -125,4 +121,26 @@ extern const int16_t sba_map_tc[8]; extern const float dmxmtx_table[BINAURAL_CHANNELS][11]; +extern const int16_t huff_nodes_first_band_alpha[32][2]; +extern const int16_t huff_nodes_first_band_alpha_coarse[16][2]; + + +extern const int16_t huff_nodes_alpha_1D_DF[64][2]; +extern const int16_t huff_nodes_alpha_1D_DF_coarse[32][2]; + +extern const int16_t huff_nodes_alpha_1D_DT[64][2]; +extern const int16_t huff_nodes_alpha_1D_DT_coarse[32][2]; + +extern const int16_t huff_nodes_first_band_beta[8][2]; +extern const int16_t huff_nodes_first_band_beta_coarse[4][2]; + +extern const int16_t huff_nodes_beta_1D_DF[16][2]; +extern const int16_t huff_nodes_beta_1D_DF_coarse[8][2]; + +extern const int16_t huff_nodes_beta_1D_DT[16][2]; +extern const int16_t huff_nodes_beta_1D_DT_coarse[8][2]; +extern const HUFF_NODE_TABLE huff_nodes_df0; +extern const HUFF_NODE_TABLE huff_nodes_df; +extern const HUFF_NODE_TABLE huff_nodes_dt; + #endif diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index ec47273c64dab60414b5bbc9028af72b87581a10..ac8bb23541e85f11e8a6d506396d3f512ab4ef98 100644 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -109,18 +109,22 @@ ivas_error ivas_sba_dec_reconfigure( int16_t numCldfbAnalyses_old, numCldfbSyntheses_old; int16_t sba_dirac_stereo_flag_old; int32_t ivas_total_brate; + int32_t last_ivas_total_brate; + RENDERER_TYPE old_renderer_type; + DECODER_CONFIG_HANDLE hDecoderConfig; ivas_error error; error = IVAS_ERR_OK; hDecoderConfig = st_ivas->hDecoderConfig; ivas_total_brate = hDecoderConfig->ivas_total_brate; + last_ivas_total_brate = st_ivas->last_active_ivas_total_brate; + /*-----------------------------------------------------------------* * Set SBA high-level parameters * Save old SBA high-level parameters *-----------------------------------------------------------------*/ - ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old ); nchan_hp20_old = getNumChanSynthesis( st_ivas ); nSCE_old = st_ivas->nSCE; @@ -129,6 +133,26 @@ ivas_error ivas_sba_dec_reconfigure( sba_dirac_stereo_flag_old = st_ivas->sba_dirac_stereo_flag; st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); +#ifdef JBM_TSM_ON_TCS + /* save old */ + if ( st_ivas->hDirAC == NULL && st_ivas->hSpar != NULL ) + { + st_ivas->hTcBuffer->num_slots = st_ivas->hSpar->num_slots; + st_ivas->hTcBuffer->nb_subframes = st_ivas->hSpar->nb_subframes; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hSpar->slots_rendered; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hSpar->subframes_rendered; + mvs2s( st_ivas->hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } + else if ( st_ivas->hDirAC != NULL ) + { + st_ivas->hTcBuffer->num_slots = st_ivas->hDirAC->num_slots; + st_ivas->hTcBuffer->nb_subframes = st_ivas->hDirAC->nb_subframes; + st_ivas->hTcBuffer->slots_rendered = st_ivas->hDirAC->slots_rendered; + st_ivas->hTcBuffer->subframes_rendered = st_ivas->hDirAC->subframes_rendered; + mvs2s( st_ivas->hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); + } +#endif + /*-----------------------------------------------------------------* * Allocate, initialize, and configure SBA handles *-----------------------------------------------------------------*/ @@ -146,7 +170,7 @@ ivas_error ivas_sba_dec_reconfigure( hSpar->hPCA = NULL; } - if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) ) + if ( nchan_transport_old != ivas_get_sba_num_TCs( ivas_total_brate, sba_order_internal ) || ( last_ivas_total_brate >= IVAS_512k && ivas_total_brate < IVAS_512k ) || ( last_ivas_total_brate < IVAS_512k && ivas_total_brate >= IVAS_512k ) ) { ivas_spar_dec_close( &( st_ivas->hSpar ), hDecoderConfig->output_Fs, 1 ); @@ -169,6 +193,14 @@ ivas_error ivas_sba_dec_reconfigure( hSpar = st_ivas->hSpar; st_ivas->sba_dirac_stereo_flag = ivas_get_sba_dirac_stereo_flag( st_ivas ); +#ifdef JBM_TSM_ON_TCS + /* synchronize subframe info */ + st_ivas->hSpar->num_slots = st_ivas->hTcBuffer->num_slots; + st_ivas->hSpar->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hSpar->slots_rendered = st_ivas->hTcBuffer->slots_rendered; + st_ivas->hSpar->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpar->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); +#endif if ( st_ivas->nchan_transport == 1 ) { st_ivas->element_mode_init = IVAS_SCE; @@ -232,7 +264,8 @@ ivas_error ivas_sba_dec_reconfigure( { ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin ); } - if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) ) + + if ( ( ( st_ivas->renderer_type != RENDERER_DISABLE ) && ( st_ivas->renderer_type != RENDERER_SBA_LINEAR_DEC ) ) || ( ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) ) || ( last_ivas_total_brate > IVAS_256k && ivas_total_brate <= IVAS_256k ) || ( last_ivas_total_brate <= IVAS_256k && ivas_total_brate > IVAS_256k ) ) { DIRAC_CONFIG_FLAG flag_config; @@ -246,17 +279,39 @@ ivas_error ivas_sba_dec_reconfigure( { return error; } +#ifdef JBM_TSM_ON_TCS + /* synchronize subframe info */ + st_ivas->hDirAC->num_slots = st_ivas->hTcBuffer->num_slots; + st_ivas->hDirAC->nb_subframes = st_ivas->hTcBuffer->nb_subframes; + st_ivas->hDirAC->slots_rendered = st_ivas->hTcBuffer->slots_rendered; + st_ivas->hDirAC->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered; + mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hDirAC->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); +#endif } - if ( ( error = ivas_dirac_sba_config( st_ivas->hQMetaData, &st_ivas->nchan_transport, &st_ivas->nSCE, &st_ivas->nCPE, &st_ivas->element_mode_init, ivas_total_brate, st_ivas->sba_analysis_order, st_ivas->sba_mode, IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) ) != IVAS_ERR_OK ) + + if ( ( error = ivas_dirac_sba_config( + st_ivas->hQMetaData, + &st_ivas->nchan_transport, + &st_ivas->nSCE, + &st_ivas->nCPE, + &st_ivas->element_mode_init, + ivas_total_brate, + st_ivas->sba_analysis_order, + st_ivas->sba_mode, + ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ? IVAS_MAX_NUM_BANDS : ( IVAS_MAX_NUM_BANDS - SPAR_DIRAC_SPLIT_START_BAND ) + + ) ) != IVAS_ERR_OK ) { return error; } + if ( st_ivas->renderer_type == RENDERER_DISABLE ) { ivas_dirac_dec_close( &( st_ivas->hDirAC ) ); vbap_free_data( &( st_ivas->hVBAPdata ) ); } + if ( st_ivas->hDirAC != NULL ) { mvs2s( st_ivas->hDirAC->dirac_to_spar_md_bands, st_ivas->hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); @@ -281,7 +336,6 @@ ivas_error ivas_sba_dec_reconfigure( return error; } -#ifdef FIX_417_TD_DECORR_BRATE_SW /*-----------------------------------------------------------------* * TD Decorrelator *-----------------------------------------------------------------*/ @@ -293,7 +347,6 @@ ivas_error ivas_sba_dec_reconfigure( return error; } } -#endif /*-----------------------------------------------------------------* * CLDFB instances @@ -304,5 +357,175 @@ ivas_error ivas_sba_dec_reconfigure( return error; } +#ifdef JBM_TSM_ON_TCS + /*-----------------------------------------------------------------* + * TC buffer + *-----------------------------------------------------------------*/ + if ( st_ivas->hDecoderConfig->voip_active == 1 ) + { + int16_t tc_nchan_to_allocate; + int16_t tc_nchan_tc; + TC_BUFFER_MODE tc_buffer_mode; + + tc_buffer_mode = TC_BUFFER_MODE_RENDERER; + tc_nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + tc_nchan_to_allocate = tc_nchan_tc; + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) + { + tc_buffer_mode = TC_BUFFER_MODE_BUFFER; + tc_nchan_tc = st_ivas->hDecoderConfig->nchan_out; + tc_nchan_to_allocate = tc_nchan_tc; + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS; + } + else if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + tc_nchan_to_allocate = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); + } + else + { + if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) ) + { + tc_nchan_to_allocate++; /* we need a channel for the CNG in this case*/ + } + } + + if ( tc_nchan_tc != st_ivas->hTcBuffer->nchan_transport_jbm || tc_nchan_to_allocate != st_ivas->hTcBuffer->nchan_transport_internal || tc_buffer_mode != st_ivas->hTcBuffer->tc_buffer_mode ) + { + if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas, tc_buffer_mode, tc_nchan_tc, tc_nchan_to_allocate, tc_nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } +#endif return error; } + +#ifdef JBM_TSM_ON_TCS +ivas_error ivas_sba_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nCldfbSlots, /* i : number of CLDFB slots */ + const int16_t nSamplesForRendering /* i : number of samples provided */ +) +{ + + int16_t ch_idx; + ivas_error error; + + error = IVAS_ERR_OK; + + /* set the md map */ + if ( st_ivas->hDirAC && !( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC && st_ivas->sba_mode == SBA_MODE_DIRAC ) ) + { + ivas_dirac_dec_set_md_map( st_ivas, nCldfbSlots ); + } + if ( st_ivas->sba_mode == SBA_MODE_SPAR ) + { + ivas_spar_dec_digest_tc( st_ivas, st_ivas->nchan_transport, nCldfbSlots, nSamplesForRendering ); + } + if ( st_ivas->hDiracDecBin != NULL && ( st_ivas->hDiracDecBin->useTdDecorr ) ) + { + int16_t nSamplesLeftForTD, default_frame; + float *decorr_signal[BINAURAL_CHANNELS]; + float *p_tc[2 * BINAURAL_CHANNELS]; + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + nSamplesLeftForTD = nSamplesForRendering; + for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) + { + decorr_signal[ch_idx] = st_ivas->hTcBuffer->tc[ch_idx + BINAURAL_CHANNELS]; + p_tc[ch_idx] = st_ivas->hTcBuffer->tc[ch_idx]; + } + while ( nSamplesLeftForTD ) + { + int16_t nSamplesToDecorr = min( nSamplesLeftForTD, default_frame ); + ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, p_tc, decorr_signal, nSamplesToDecorr ); + for ( ch_idx = 0; ch_idx < BINAURAL_CHANNELS; ch_idx++ ) + { + decorr_signal[ch_idx] += nSamplesToDecorr; + p_tc[ch_idx] += nSamplesToDecorr; + } + nSamplesLeftForTD -= nSamplesToDecorr; + } + } + /* if we have a late CNG generation, do it here */ + if ( st_ivas->nchan_transport == 1 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->sba_mode != SBA_MODE_SPAR ) + { + Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0]; + generate_masking_noise_lb_dirac( st->hFdCngDec->hFdCngCom, st_ivas->hTcBuffer->tc[1], nCldfbSlots, st->cna_dirac_flag && st->flag_cna ); + } + return error; +} + +void ivas_sba_dec_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + float *output_f[] /* o : rendered time signal */ +) +{ + int16_t slots_to_render, first_sf, last_sf, subframe_idx; + uint16_t slot_size, ch; + uint16_t nchan_internal, nchan_out; + SPAR_DEC_HANDLE hSpar; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + + hSpar = st_ivas->hSpar; + nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); + nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; +#ifdef DEBUGGING + assert( hSpar ); +#endif + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] = output_f[ch]; + } + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( hSpar->num_slots - hSpar->slots_rendered, nSamplesAsked / slot_size ); + *nSamplesRendered = slots_to_render * slot_size; + first_sf = hSpar->subframes_rendered; + last_sf = first_sf; + while ( slots_to_render > 0 ) + { + slots_to_render -= hSpar->subframe_nbslots[last_sf]; + last_sf++; + } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + int16_t n_samples_sf = slot_size * hSpar->subframe_nbslots[subframe_idx]; + ivas_spar_dec_upmixer_sf( st_ivas, output_f_local, nchan_internal ); + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] += n_samples_sf; + } + } + + if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) + { + ivas_sba_linear_renderer( output_f, *nSamplesRendered, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); + } + if ( st_ivas->hDirAC != NULL && hSpar->slots_rendered == hSpar->num_slots ) + { + if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_CLDFB_TIMESLOTS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + else + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_SUBFRAMES_5MS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + } + *nSamplesAvailable = ( hSpar->num_slots - hSpar->slots_rendered ) * slot_size; + + return; +} +#endif diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index 089492048021527ec3d025ab1d6d3b96e25383df..3ae546193244df0d048fa8579a0048aabf2ef25b 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -693,6 +693,10 @@ void ivas_sba_dirac_stereo_smooth_parameters( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD handle for upmixing */ const int16_t cross_fade_start_offset, /* i : SPAR mixer delay compensation */ const int32_t output_Fs /* i : Fs for delay calculation */ +#ifdef FIX_STEREO_474 + , + const int16_t num_md_sub_frames /* i : number of subframes in mixing matrix */ +#endif ) { int16_t i, j, k, i_sf; @@ -732,6 +736,9 @@ void ivas_sba_dirac_stereo_smooth_parameters( float xfade_start_ns; int16_t xfade_delay_subframes; int16_t i_hist; +#ifdef FIX_STEREO_474 + int16_t md_sf; +#endif xfade_start_ns = cross_fade_start_offset / (float) output_Fs * 1000000000.f - IVAS_FB_ENC_DELAY_NS; xfade_delay_subframes = (int16_t) ( xfade_start_ns / ( FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ) ); @@ -742,6 +749,11 @@ void ivas_sba_dirac_stereo_smooth_parameters( { for ( i_sf = k * 2; i_sf < ( k + 1 ) * 2; i_sf++ ) { + +#ifdef FIX_STEREO_474 + md_sf = ( num_md_sub_frames == MAX_PARAM_SPATIAL_SUBFRAMES ) ? i_sf : 0; +#endif + if ( hStereoDft->first_frame ) { for ( i = 0; i < 2; i++ ) @@ -786,7 +798,11 @@ void ivas_sba_dirac_stereo_smooth_parameters( { for ( b = 0; b < hStereoDft->nbands; b++ ) { +#ifdef FIX_STEREO_474 + hMdDec->mixer_mat_prev[4][i][j][b] = hMdDec->mixer_mat[i][j][b + md_sf * IVAS_MAX_NUM_BANDS]; +#else hMdDec->mixer_mat_prev[4][i][j][b] = hMdDec->mixer_mat[i][j][b + i_sf * IVAS_MAX_NUM_BANDS]; +#endif } } } @@ -881,7 +897,12 @@ void ivas_sba_dirac_stereo_dec( stereo_dft_dec( hStereoDft, hCPE->hCoreCoder[0], DFT, NULL, NULL, 1 /*st_ivas->sba_dirac_stereo_flag*/, sba_mono_flag, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : NULL, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0, - st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport ); + st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport +#ifdef FIX_STEREO_474 + , + ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate ) +#endif + ); /* DFT synthesis */ stereo_dft_dec_synthesize( hCPE, DFT, 0, output[0], output_frame ); diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index a80986b39e7a41caf4b8a0844ac63951e90517a0..71a5718436251a496db1f5644969f05c6c1a7c6c 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -65,7 +65,10 @@ void ivas_sba2mc_cldfb( float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: cldfb imag part */ const int16_t nb_channels_out, /* i : nb of output channels */ const int16_t nb_bands, /* i : nb of CLDFB bands to process */ - const float *hoa_dec_mtx /* i : HOA decoding mtx */ +#ifdef JBM_TSM_ON_TCS + const int16_t nb_timeslots, /* i : number of time slots to process */ +#endif + const float *hoa_dec_mtx /* i : HOA decoding mtx */ ) { int16_t iBlock, iBand, n, m; @@ -89,7 +92,11 @@ void ivas_sba2mc_cldfb( g = hoa_dec_mtx[SBA_NHARM_HOA3 * n + m]; p_realOut = realOut[n]; p_imagOut = imagOut[n]; +#ifdef JBM_TSM_ON_TCS + for ( iBlock = 0; iBlock < nb_timeslots; iBlock++ ) +#else for ( iBlock = 0; iBlock < MAX_PARAM_SPATIAL_SUBFRAMES; iBlock++ ) +#endif { p_real = RealBuffer[m][iBlock]; p_imag = ImagBuffer[m][iBlock]; @@ -108,7 +115,11 @@ void ivas_sba2mc_cldfb( { p_realOut = realOut[n]; p_imagOut = imagOut[n]; +#ifdef JBM_TSM_ON_TCS + for ( iBlock = 0; iBlock < nb_timeslots; iBlock++ ) +#else for ( iBlock = 0; iBlock < MAX_PARAM_SPATIAL_SUBFRAMES; iBlock++ ) +#endif { p_real = RealBuffer[n][iBlock]; p_imag = ImagBuffer[n][iBlock]; @@ -133,11 +144,16 @@ void ivas_sba2mc_cldfb( *-------------------------------------------------------------------------*/ void ivas_mc2sba( - IVAS_OUTPUT_SETUP hIntSetup, /* i : Format of decoder output */ + IVAS_OUTPUT_SETUP hIntSetup, /* i : Format of decoder output */ +#ifdef JBM_TSM_ON_TCS + float *in_buffer_td[], /* i : MC signals (on input) and the HOA3 (on output) */ + float *buffer_td[], /* i/o: MC signals (on input) and the HOA3 (on output) */ +#else float buffer_td[][L_FRAME48k], /* i/o: MC signals (on input) and the HOA3 (on output) */ - const int16_t output_frame, /* i : output frame length per channel */ - const int16_t sba_order, /* i : Ambisonic (SBA) order */ - const float gain_lfe /* i : gain for LFE, 0 = ignore LFE */ +#endif + const int16_t output_frame, /* i : output frame length per channel */ + const int16_t sba_order, /* i : Ambisonic (SBA) order */ + const float gain_lfe /* i : gain for LFE, 0 = ignore LFE */ ) { int16_t i, j, k; @@ -168,7 +184,11 @@ void ivas_mc2sba( /* Add LFE to omni W with gain*/ for ( k = 0; k < output_frame; k++ ) { +#ifdef JBM_TSM_ON_TCS + buffer_tmp[0][k] += gain_lfe * in_buffer_td[i][k]; +#else buffer_tmp[0][k] += gain_lfe * buffer_td[i][k]; +#endif } } @@ -194,7 +214,11 @@ void ivas_mc2sba( { for ( k = 0; k < output_frame; k++ ) { +#ifdef JBM_TSM_ON_TCS + buffer_tmp[j][k] += gains[j] * in_buffer_td[i][k]; +#else buffer_tmp[j][k] += gains[j] * buffer_td[i][k]; +#endif } } } @@ -279,7 +303,11 @@ int16_t ivas_sba_remapTCs( *-------------------------------------------------------------------------*/ void ivas_ism2sba( - float buffer_td[][L_FRAME48k], /* i/o: TD signal buffers */ +#ifdef JBM_TSM_ON_TCS + float *buffer_td[], /* i/o: TD signal buffers */ +#else + float buffer_td[][L_FRAME48k], /* i/o: TD signal buffers */ +#endif ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ const ISM_METADATA_HANDLE hIsmMetaData[], /* i : object metadata */ const int16_t nchan_ism, /* i : number of objects */ @@ -335,6 +363,59 @@ void ivas_ism2sba( return; } +#ifdef JBM_TSM_ON_TCS +/*-------------------------------------------------------------------------* + * ivas_ism2sba() + * + * ISM transformed into SBA in TD domain. + *-------------------------------------------------------------------------*/ + +void ivas_ism2sba_sf( + float *buffer_in[], /* i : TC buffer */ + float *buffer_out[], /* o : TD signal buffers */ + ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ + const int16_t num_objects, /* i : number of objects */ + const int16_t n_samples_to_render, /* i : output frame length per channel */ + const int16_t offset, /* i : offset for the interpolatr */ + const int16_t sba_order /* i : Ambisonic (SBA) order */ +) +{ + int16_t i, j, k; + float g1, *g2, *tc, *out, gain, prev_gain; + int16_t sba_num_chans; + + assert( ( sba_order <= 3 ) && "Only order up to 3 is supported!" ); + assert( hIsmRendererData != NULL && "hIsmRendererData not allocated!" ); + + + /* Init*/ + sba_num_chans = ( sba_order + 1 ) * ( sba_order + 1 ); + for ( j = 0; j < sba_num_chans; j++ ) + { + set_zero( buffer_out[j], n_samples_to_render ); + } + + for ( i = 0; i < num_objects; i++ ) + { + for ( j = 0; j < sba_num_chans; j++ ) + { + g2 = hIsmRendererData->interpolator + offset; + g1 = 1 - *g2; + tc = buffer_in[i] + offset; + out = buffer_out[j]; + gain = hIsmRendererData->gains[i][j]; + prev_gain = hIsmRendererData->prev_gains[i][j]; + for ( k = 0; k < n_samples_to_render; k++ ) + { + *( out++ ) += ( ( *( g2++ ) ) * gain + g1 * prev_gain ) * ( *( tc++ ) ); + g1 = 1.0f - *g2; + } + } + } + + return; +} +#endif /*-------------------------------------------------------------------* * ivas_sba_upmixer_renderer() @@ -348,13 +429,19 @@ void ivas_sba_upmixer_renderer( const int16_t output_frame /* i : output frame length */ ) { - int16_t i, nchan_internal; + + int16_t nchan_internal; +#ifndef JBM_TSM_ON_TCS + int16_t i; float temp; +#endif push_wmops( "ivas_sba_upmixer_renderer" ); - nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); + nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); +#ifndef JBM_TSM_ON_TCS if ( st_ivas->nchan_transport >= 3 ) { /*convert WYZX downmix to WYXZ*/ @@ -365,15 +452,25 @@ void ivas_sba_upmixer_renderer( output[3][i] = temp; } } +#endif /* Upmixer + Renderer */ ivas_spar_dec_upmixer( st_ivas, output, nchan_internal, output_frame ); if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_DEC ) { +#ifdef JBM_TSM_ON_TCS + float *output_f[MAX_OUTPUT_CHANNELS]; + int16_t ch; + for ( ch = 0; ch < MAX_OUTPUT_CHANNELS; ch++ ) + { + output_f[ch] = output[ch]; + } + ivas_sba_linear_renderer( output_f, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); +#else ivas_sba_linear_renderer( output, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); +#endif } - pop_wmops(); return; @@ -387,7 +484,11 @@ void ivas_sba_upmixer_renderer( *-------------------------------------------------------------------*/ static void ivas_sba_mtx_mult( - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: synthesized core-corder transport channels/DirAC output */ +#else + float output_f[][L_FRAME48k], /* i/o: synthesized core-corder transport channels/DirAC output */ +#endif const int16_t output_frame, /* i : output frame length per channel */ const int16_t nchan_in, /* i : Number of ambisonic channels */ const IVAS_OUTPUT_SETUP output_setup, /* i : Output configuration */ @@ -447,7 +548,11 @@ static void ivas_sba_mtx_mult( *-------------------------------------------------------------------*/ ivas_error ivas_sba_linear_renderer( - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#ifdef JBM_TSM_ON_TCS + float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ +#else + float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ +#endif const int16_t output_frame, /* i : output frame length per channel */ const int16_t nchan_in, /* i : number of input ambisonics channels */ const AUDIO_CONFIG output_config, /* i : output audio configuration */ @@ -581,7 +686,8 @@ void ivas_sba_mix_matrix_determiner( /* Mixing matrix determiner */ num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; - ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, bfi ); + ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, bfi, + MAX_PARAM_SPATIAL_SUBFRAMES ); return; } diff --git a/lib_dec/ivas_sce_dec.c b/lib_dec/ivas_sce_dec.c index 9a940b9b6da17e326145e2d9ba39c49e63931ff1..97a9b8189561c02b52568353f64d4d0cde103382 100755 --- a/lib_dec/ivas_sce_dec.c +++ b/lib_dec/ivas_sce_dec.c @@ -92,18 +92,12 @@ ivas_error ivas_sce_dec( st->total_brate = ivas_total_brate - nb_bits_metadata * FRAMES_PER_SEC; assert( st->total_brate == SID_2k40 && "SCE SID must be 2.4kbps!" ); -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->hISMDTX.sce_id_dtx != sce_id ) { st->total_brate = FRAME_NO_DATA; } -#endif } -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT else if ( !st_ivas->bfi && ivas_total_brate == FRAME_NO_DATA ) -#else - else if ( !st_ivas->bfi && ivas_total_brate <= SID_2k40 ) -#endif { st->total_brate = FRAME_NO_DATA; } @@ -181,18 +175,12 @@ ivas_error ivas_sce_dec( { st->total_brate = ivas_total_brate - nb_bits_metadata * FRAMES_PER_SEC; -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT if ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->hISMDTX.sce_id_dtx != sce_id ) { st->total_brate = FRAME_NO_DATA; } -#endif } -#ifdef FIX_ISM_DTX_CNG_BWIDTH_ALT else if ( !st_ivas->bfi && ivas_total_brate == FRAME_NO_DATA ) -#else - else if ( !st_ivas->bfi && ivas_total_brate <= SID_2k40 ) -#endif { st->total_brate = ivas_total_brate; } diff --git a/lib_dec/ivas_sns_dec.c b/lib_dec/ivas_sns_dec.c index 4812091ecc5aff53331660c12bb35f2d2f38b112..e11551d2a603439892d7d0589a20ffebe908d8d7 100644 --- a/lib_dec/ivas_sns_dec.c +++ b/lib_dec/ivas_sns_dec.c @@ -35,13 +35,9 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#ifdef SNS_MSVQ #include "ivas_rom_com.h" #include "ivas_cnst.h" -#endif -#ifdef FIX_445_SNS_BUGFIXES #include -#endif #include "wmc_auto.h" /*------------------------------------------------------------------- @@ -52,15 +48,12 @@ static void sns_1st_dec( const int16_t index, /* i : codebook index */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t core, const int16_t L_frame, -#endif float *snsq /* i/o: i:prediction o:quantized sns */ ) { int16_t i; -#ifdef FIX_445_SNS_BUGFIXES const int16_t *p_dico, *means; const float cdbk_fix2float = 1.f / powf( 2, SNS_CDBKS_BITS_4_FRAC ); const float means_fix2float = 1.f / powf( 2, SNS_MEANS_BITS_4_FRAC ); @@ -81,38 +74,19 @@ static void sns_1st_dec( assert( !"illegal frame length in sns_1st_cod" ); } -#else - const float *p_dico; -#endif -#ifdef FIX_445_SNS_BUGFIXES p_dico = &sns_1st_cdbk[0][core - 1][0] + ( index % 32 ) * ( M / 2 ); -#else - p_dico = &sns_vq_cdk1[( index % 32 ) * ( M / 2 )]; -#endif for ( i = 0; i < M / 2; i++ ) { -#ifdef FIX_445_SNS_BUGFIXES snsq[i] = ( *p_dico++ ) * cdbk_fix2float + means[i] * means_fix2float; -#else - snsq[i] = *p_dico++; -#endif } -#ifdef FIX_445_SNS_BUGFIXES p_dico = &sns_1st_cdbk[1][core - 1][0] + ( index >> 5 ) * ( M / 2 ); -#else - p_dico = &sns_vq_cdk2[( index >> 5 ) * ( M / 2 )]; -#endif for ( i = M / 2; i < M; i++ ) { -#ifdef FIX_445_SNS_BUGFIXES snsq[i] = ( *p_dico++ ) * cdbk_fix2float + means[i] * means_fix2float; -#else - snsq[i] = *p_dico++; -#endif } return; @@ -153,54 +127,23 @@ static void sns_2st_dec( *-------------------------------------------------------------------*/ void sns_avq_dec( - int16_t *index, /* i : Quantization indices */ -#ifdef SNS_MSVQ + int16_t *index, /* i : Quantization indices */ float SNS_Q[NB_DIV][M], /* o : Quantized SNS vectors */ -#else - float *SNS_Q, /* o : Quantized SNS vectors */ -#endif -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif const int16_t numlpc /* i : Number of sets of lpc */ ) { int16_t i, nbi, last; int16_t q_type; -#ifdef SNS_MSVQ /* go from one-based indexing to zero-based indexing */ last = numlpc - 1; -#else - /* Last LPC index */ - if ( numlpc == 1 ) - { - last = 0; - } - else - { - last = M; - } -#endif index++; /* Decode last LPC */ -#ifdef SNS_MSVQ -#ifdef FIX_445_SNS_BUGFIXES sns_1st_dec( *index++, numlpc, L_frame, SNS_Q[last] ); -#else - sns_1st_dec( *index++, SNS_Q[last] ); -#endif sns_2st_dec( SNS_Q[last], index ); -#else -#ifdef FIX_445_SNS_BUGFIXES - sns_1st_dec( *index++, numplc, L_Frame & SNS_Q[last] ); -#else - sns_1st_dec( *index++, &SNS_Q[last] ); -#endif - sns_2st_dec( &SNS_Q[last], index ); -#endif nbi = 2 + index[0] + index[1]; index += nbi; @@ -211,37 +154,16 @@ void sns_avq_dec( if ( q_type == 0 ) { -#ifdef SNS_MSVQ -#ifdef FIX_445_SNS_BUGFIXES sns_1st_dec( *index++, numlpc, L_frame, SNS_Q[0] ); -#else - sns_1st_dec( *index++, SNS_Q[0] ); -#endif sns_2st_dec( SNS_Q[0], index ); -#else -#ifdef FIX_445_SNS_BUGFIXES - sns_1st_dec( *index++, numlpc, L_frame, &SNS_Q[0] ); -#else - sns_1st_dec( *index++, &SNS_Q[0] ); -#endif - sns_2st_dec( &SNS_Q[0], index ); -#endif } else if ( q_type == 1 ) { for ( i = 0; i < M; i++ ) { -#ifdef SNS_MSVQ SNS_Q[0][i] = SNS_Q[0][M + i]; -#else - SNS_Q[i] = SNS_Q[M + i]; -#endif } -#ifdef SNS_MSVQ sns_2st_dec( SNS_Q[0], index ); -#else - sns_2st_dec( &SNS_Q[0], index ); -#endif } } @@ -258,9 +180,7 @@ void sns_avq_dec( void sns_avq_dec_stereo( int16_t *indexl, /* i : Quantization indices (left channel) */ int16_t *indexr, /* i : Quantization indices (right channe) */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif float *SNS_Ql, /* o : Quantized SNS vectors (left channel) */ float *SNS_Qr /* o : Quantized SNS vectors (right channe) */ ) @@ -275,11 +195,7 @@ void sns_avq_dec_stereo( { /* MS coding */ -#ifdef FIX_445_SNS_BUGFIXES sns_1st_dec( *indexl++, TCX_20_CORE, L_frame, mid_q ); -#else - sns_1st_dec( *indexl++, mid_q ); -#endif sns_2st_dec( mid_q, indexl ); for ( i = 0; i < M; i++ ) @@ -302,34 +218,22 @@ void sns_avq_dec_stereo( { /* LR decoding */ -#ifdef FIX_445_SNS_BUGFIXES sns_1st_dec( *indexl++, TCX_20_CORE, L_frame, SNS_Ql ); -#else - sns_1st_dec( *indexl++, SNS_Ql ); -#endif sns_2st_dec( SNS_Ql, indexl ); -#ifdef FIX_445_SNS_BUGFIXES sns_1st_dec( *indexr++, TCX_20_CORE, L_frame, SNS_Qr ); -#else - sns_1st_dec( *indexr++, SNS_Qr ); -#endif sns_2st_dec( SNS_Qr, indexr ); } return; } -#ifdef SNS_MSVQ void dequantize_sns( int16_t indices[CPE_CHANNELS][NPRM_LPC_NEW], float snsQ_out[CPE_CHANNELS][NB_DIV][M], Decoder_State **sts ) { int16_t nSubframes, k, ch; -#ifndef FIX_445_SNS_BUGFIXES - const float *means; -#endif int16_t sns_stereo_mode[NB_DIV]; int16_t zero_side_flag[NB_DIV]; Decoder_State *st; @@ -364,14 +268,7 @@ void dequantize_sns( } nStages = SNS_MSVQ_NSTAGES_SIDE; -#ifndef FIX_445_SNS_BUGFIXES - means = ( st->core == TCX_20_CORE ) ? ivas_sns_means_side_tcx20 : ivas_sns_means_side_tcx10; -#endif msvq_dec( side_cdbks, NULL, NULL, nStages, M, M, &indices[ch][idxIndices + SNS_STEREO_MODE_OFFSET_INDICES], 0, NULL, snsQ, NULL ); - -#ifndef FIX_445_SNS_BUGFIXES - v_add( snsQ, means, snsQ, M ); -#endif } else { @@ -392,19 +289,4 @@ void dequantize_sns( } } } -#ifndef FIX_445_SNS_BUGFIXES - - /* add means back */ - for ( ch = 0; ch < CPE_CHANNELS; ++ch ) - { - st = sts[ch]; - nSubframes = ( st->core == TCX_20_CORE ) ? 1 : NB_DIV; - means = ( st->core == TCX_20_CORE ) ? ivas_sns_means_tcx20 : ivas_sns_means_tcx10; - for ( k = 0; k < nSubframes; ++k ) - { - v_add( snsQ_out[ch][k], means, snsQ_out[ch][k], M ); - } - } -#endif } -#endif // SNS_MSVQ diff --git a/lib_dec/ivas_spar_decoder.c b/lib_dec/ivas_spar_decoder.c index f0588ae30311554f1ff41efb8ceebba678bb02b1..0c1948a56cda70b7043e12ba6e72f8f1297f3afc 100644 --- a/lib_dec/ivas_spar_decoder.c +++ b/lib_dec/ivas_spar_decoder.c @@ -72,10 +72,13 @@ ivas_error ivas_spar_dec_open( IVAS_FB_CFG *fb_cfg; int16_t i, j, b, active_w_mixing; int32_t output_Fs; + int16_t num_decor_chs; error = IVAS_ERR_OK; sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); - num_channels_internal = ivas_sba_get_nchan_metadata( sba_order_internal ); + + num_channels_internal = ivas_sba_get_nchan_metadata( sba_order_internal, st_ivas->hDecoderConfig->ivas_total_brate ); + hSpar = st_ivas->hSpar; if ( !spar_reconfig_flag ) @@ -88,9 +91,17 @@ ivas_error ivas_spar_dec_open( } output_Fs = st_ivas->hDecoderConfig->output_Fs; + if ( num_channels_internal > ( SBA_HOA2_ORDER + 1 ) * ( SBA_HOA2_ORDER + 1 ) ) + { + num_decor_chs = IVAS_HBR_MAX_DECOR_CHS; + } + else + { + num_decor_chs = num_channels_internal - 1; + } /* TD decorr. */ - if ( ( error = ivas_td_decorr_dec_open( &hSpar->hTdDecorr, output_Fs, num_channels_internal, 1 ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_td_decorr_dec_open( &hSpar->hTdDecorr, output_Fs, num_decor_chs + 1, 1 ) ) != IVAS_ERR_OK ) { return error; } @@ -105,7 +116,8 @@ ivas_error ivas_spar_dec_open( /* set FB config. */ active_w_mixing = -1; - if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, num_channels_internal, num_channels_internal, active_w_mixing, output_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, num_channels_internal, num_channels_internal, active_w_mixing, output_Fs, + 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -174,6 +186,49 @@ ivas_error ivas_spar_dec_open( ivas_output_init( &( st_ivas->hTransSetup ), st_ivas->transport_config ); +#ifdef JBM_TSM_ON_TCS + set_s( hSpar->subframe_nbslots, 0, MAX_JBM_SUBFRAMES_5MS ); + set_s( hSpar->subframe_nbslots, JBM_CLDFB_SLOTS_IN_SUBFRAME, DEFAULT_JBM_SUBFRAMES_5MS ); + hSpar->nb_subframes = DEFAULT_JBM_SUBFRAMES_5MS; + hSpar->subframes_rendered = 0; + hSpar->slots_rendered = 0; + hSpar->num_slots = DEFAULT_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME; + /* init render timeslot mapping */ + { + int16_t map_idx; + set_s( hSpar->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); + for ( map_idx = 0; map_idx < DEFAULT_JBM_CLDFB_TIMESLOTS; map_idx++ ) + { + hSpar->render_to_md_map[map_idx] = map_idx; + } + } + /* allocate transport channels*/ + if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) + { + int16_t nchan_to_allocate; + int16_t nchan_tc; + TC_BUFFER_MODE buffer_mode; + + buffer_mode = TC_BUFFER_MODE_RENDERER; + nchan_tc = ivas_jbm_dec_get_num_tc_channels( st_ivas ); + nchan_to_allocate = num_channels_internal; + if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) + { + buffer_mode = TC_BUFFER_MODE_BUFFER; + nchan_tc = st_ivas->hDecoderConfig->nchan_out; + nchan_to_allocate = nchan_tc; + } + else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) + { + nchan_to_allocate = 2 * BINAURAL_CHANNELS; + } + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) + { + return error; + } + } +#endif + st_ivas->hSpar = hSpar; return error; @@ -599,7 +654,7 @@ void ivas_spar_get_cldfb_gains( * determines if an FOA input channel is transmitted as residual channel. *---------------------------------------------------------------------*/ -/* !r: 1 if prediction residual channel */ +/*! r: 1 if prediction residual channel */ int16_t ivas_is_res_channel( const int16_t ch, /* i : ch index in WYZX ordering */ const int16_t nchan_transport /* i : number of transport channels (1-4) */ @@ -636,6 +691,7 @@ static void ivas_spar_dec_MD( { int16_t num_channels, table_idx, num_bands_out, bfi, sba_order; int32_t ivas_total_brate; + int16_t num_md_sub_frames; DECODER_CONFIG_HANDLE hDecoderConfig = st_ivas->hDecoderConfig; SPAR_DEC_HANDLE hSpar = st_ivas->hSpar; @@ -648,7 +704,11 @@ static void ivas_spar_dec_MD( sba_order = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); bfi = st_ivas->bfi; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; - num_channels = ivas_sba_get_nchan_metadata( sba_order ); + num_channels = ivas_sba_get_nchan_metadata( sba_order, + ivas_total_brate ); + + num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, st_ivas->hDecoderConfig->ivas_total_brate ); + num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; if ( ivas_total_brate > FRAME_NO_DATA && !bfi ) @@ -707,7 +767,10 @@ static void ivas_spar_dec_MD( if ( st0->m_old_frame_type == ZERO_FRAME && ivas_total_brate == IVAS_SID_5k2 && st0->prev_bfi == 0 && hSpar->hMdDec->spar_md_cfg.nchan_transport == 1 ) { - ivas_spar_setup_md_smoothing( hSpar->hMdDec, num_bands_out ); + ivas_spar_setup_md_smoothing( hSpar->hMdDec, num_bands_out + + , + num_md_sub_frames ); } else { @@ -718,7 +781,8 @@ static void ivas_spar_dec_MD( { if ( !bfi ) { - ivas_spar_smooth_md_dtx( hSpar->hMdDec, num_bands_out ); + ivas_spar_smooth_md_dtx( hSpar->hMdDec, num_bands_out, + num_md_sub_frames ); } set_s( hSpar->hMdDec->valid_bands, 0, IVAS_MAX_NUM_BANDS ); @@ -857,7 +921,8 @@ static void ivas_spar_get_skip_mat( const int16_t num_ch_out, const int16_t num_ch_in, const int16_t num_spar_bands, - int16_t skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ) + int16_t skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], + const int16_t num_md_sub_frames ) { int16_t spar_band, out_ch, in_ch; int16_t i_ts, skip_flag; @@ -868,12 +933,11 @@ static void ivas_spar_get_skip_mat( { skip_mat[out_ch][in_ch] = 1; skip_flag = 1; - for ( i_ts = 0; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) { for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) { - if ( hSpar->hMdDec->mixer_mat_prev[1 + i_ts][out_ch][in_ch][spar_band] != 0.0f || hSpar->hMdDec->mixer_mat[out_ch][in_ch][spar_band + i_ts * MAX_PARAM_SPATIAL_SUBFRAMES] != 0.0f ) + if ( hSpar->hMdDec->mixer_mat_prev[1 + i_ts][out_ch][in_ch][spar_band] != 0.0f ) { skip_flag = 0; break; @@ -886,6 +950,26 @@ static void ivas_spar_get_skip_mat( break; } } + if ( skip_mat[out_ch][in_ch] == 1 ) + { + for ( i_ts = 0; i_ts < num_md_sub_frames; i_ts++ ) + { + for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) + { + if ( hSpar->hMdDec->mixer_mat[out_ch][in_ch][spar_band + i_ts * MAX_PARAM_SPATIAL_SUBFRAMES] != 0.0f ) + { + skip_flag = 0; + break; + } + } + + if ( skip_flag == 0 ) + { + skip_mat[out_ch][in_ch] = 0; + break; + } + } + } } } @@ -971,45 +1055,352 @@ static void ivas_spar_calc_smooth_facs( return; } +#ifdef JBM_TSM_ON_TCS +void ivas_spar_dec_agc_pca( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float output[][L_FRAME48k], /* i/o: input/output audio channels */ + const int16_t output_frame /* i : output frame length */ +) +{ + + int16_t nchan_transport; + int16_t num_in_ingest; + DECODER_CONFIG_HANDLE hDecoderConfig; + SPAR_DEC_HANDLE hSpar; + + push_wmops( "ivas_spar_dec_agc_pca" ); + + hSpar = st_ivas->hSpar; + hDecoderConfig = st_ivas->hDecoderConfig; + nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; + + if ( st_ivas->nchan_transport >= 3 ) + { + float temp; + int16_t i; + /*convert WYZX downmix to WYXZ*/ + for ( i = 0; i < output_frame; i++ ) + { + temp = output[2][i]; + output[2][i] = output[3][i]; + output[3][i] = temp; + } + } + + if ( hSpar->hMdDec->td_decorr_flag ) + { + num_in_ingest = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); + } + else + { + num_in_ingest = nchan_transport; + } + /*---------------------------------------------------------------------* + * AGC + *---------------------------------------------------------------------*/ + + ivas_agc_dec_process( hSpar->hAgcDec, output, output, nchan_transport, output_frame ); +#ifdef DEBUG_SBA_AUDIO_DUMP + /* Dump audio signal after ivas_agc_dec_process */ + ivas_spar_dump_signal_wav( output_frame, NULL, output, st_ivas->nchan_transport, spar_foa_dec_wav[1], "ivas_agc_dec_process()" ); +#endif + + if ( hSpar->hPCA != NULL ) + { + ivas_pca_dec( hSpar->hPCA, output_frame, num_in_ingest, hDecoderConfig->ivas_total_brate, hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, output ); +#ifdef DEBUG_SBA_AUDIO_DUMP + /* Dump audio signal after ivas_pca_dec */ + ivas_spar_dump_signal_wav( output_frame, NULL, output, num_in_ingest, spar_foa_dec_wav[2], "ivas_pca_dec()" ); +#endif + } + pop_wmops(); + return; +} + +void ivas_spar_dec_set_render_map( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + int16_t nCldfbTs ) +{ + SPAR_DEC_HANDLE hSpar; + + hSpar = st_ivas->hSpar; +#ifdef DEBUGGING + assert( hSpar ); +#endif + /* adapt subframes */ + hSpar->num_slots = nCldfbTs; + hSpar->slots_rendered = 0; + hSpar->subframes_rendered = 0; + set_s( hSpar->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME ); + ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpar->subframe_nbslots, &hSpar->nb_subframes ); + ivas_jbm_dec_get_md_map( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbTs, 1, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hSpar->render_to_md_map ); + + return; +} /*-------------------------------------------------------------------* * ivas_spar_dec_upmixer() * * IVAS SPAR upmixer *-------------------------------------------------------------------*/ +void ivas_spar_dec_set_render_params( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t n_cldfb_slots /* i : number of cldfb slots in this frame */ +) +{ + SPAR_DEC_HANDLE hSpar; + int16_t nchan_transport; + int16_t num_bands_out; + + hSpar = st_ivas->hSpar; + /*---------------------------------------------------------------------* + * Gen umx mat + *---------------------------------------------------------------------*/ + nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; + num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; + ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi, + ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, st_ivas->hDecoderConfig->ivas_total_brate ) ); + + ivas_spar_dec_set_render_map( st_ivas, n_cldfb_slots ); + + return; +} + +void ivas_spar_dec_digest_tc( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const int16_t nchan_transport, /* i : number of transport channels */ + const int16_t nCldfbSlots, /* i : number of CLDFB slots */ + const int16_t nSamplesForRendering /* i : number of samples provided */ +) +{ + SPAR_DEC_HANDLE hSpar; + + hSpar = st_ivas->hSpar; + if ( hSpar->hMdDec->td_decorr_flag && !( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + float Pcm_tmp[MAX_SPAR_INTERNAL_CHANNELS][L_FRAME48k]; + float *pPcm_tmp[MAX_SPAR_INTERNAL_CHANNELS]; + float *p_tc[MAX_SPAR_INTERNAL_CHANNELS]; + int16_t nchan_internal, ch; + int16_t nSamplesLeftForTD, default_frame; + /* TD decorrelator */ + default_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + nSamplesLeftForTD = nSamplesForRendering; + nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, + st_ivas->hDecoderConfig->ivas_total_brate ); + for ( ch = 0; ch < nchan_internal; ch++ ) + { + pPcm_tmp[ch] = Pcm_tmp[ch]; + p_tc[ch] = st_ivas->hTcBuffer->tc[ch]; + } + + while ( nSamplesLeftForTD ) + { + int16_t nSamplesToDecorr = min( nSamplesLeftForTD, default_frame ); + ivas_td_decorr_process( hSpar->hTdDecorr, p_tc, pPcm_tmp, nSamplesToDecorr ); + if ( hSpar->hTdDecorr->num_apd_outputs >= ( nchan_internal - nchan_transport ) ) + { + for ( ch = 0; ch < nchan_internal - nchan_transport; ch++ ) + { + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - ch], p_tc[nchan_internal - 1 - ch], nSamplesToDecorr ); + } + } + else + { + for ( ch = 0; ch < nchan_internal - nchan_transport; ch++ ) + { + set_zero( p_tc[nchan_internal - 1 - ch], nSamplesToDecorr ); + } + for ( ch = 0; ch < hSpar->hTdDecorr->num_apd_outputs; ch++ ) + { + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - ch], p_tc[nchan_internal - 1 - ch], nSamplesToDecorr ); + } + } + for ( ch = 0; ch < nchan_internal; ch++ ) + { + p_tc[ch] += nSamplesToDecorr; + } + nSamplesLeftForTD -= nSamplesToDecorr; + } + } + + ivas_spar_dec_set_render_params( st_ivas, nCldfbSlots ); + + + return; +} + void ivas_spar_dec_upmixer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float output[][L_FRAME48k], /* i/o: input/output audio channels */ const int16_t nchan_internal, /* i : number of internal channels */ const int16_t output_frame /* i : output frame length */ ) +{ + SPAR_DEC_HANDLE hSpar; + int16_t nchan_transport, nchan_out; + int16_t subframe_idx, n, i; + int16_t n_samples_sf; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + float Pcm_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; + float *pPcm_tmp[MAX_OUTPUT_CHANNELS]; + + hSpar = st_ivas->hSpar; + nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; + nchan_out = st_ivas->hIntSetup.nchan_out_woLFE + st_ivas->hIntSetup.num_lfe; + n_samples_sf = JBM_CLDFB_SLOTS_IN_SUBFRAME * NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + for ( n = 0; n < MAX_OUTPUT_CHANNELS; n++ ) + { + output_f_local[n] = &output[n][0]; + } + for ( n = 0; n < nchan_internal; n++ ) + { + st_ivas->hTcBuffer->tc[n] = output[n]; + } + + /*---------------------------------------------------------------------* + * TD decorrelation + *---------------------------------------------------------------------*/ + for ( i = 0; i < nchan_internal; i++ ) + { + pPcm_tmp[i] = Pcm_tmp[i]; + } + if ( hSpar->hMdDec->td_decorr_flag ) + { + ivas_td_decorr_process( hSpar->hTdDecorr, st_ivas->hTcBuffer->tc, pPcm_tmp, output_frame ); + if ( hSpar->hTdDecorr->num_apd_outputs >= ( nchan_internal - nchan_transport ) ) + { + for ( i = 0; i < nchan_internal - nchan_transport; i++ ) + { + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); + } + } + else + { + for ( i = 0; i < nchan_internal - nchan_transport; i++ ) + { + set_zero( st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); + } + for ( i = 0; i < hSpar->hTdDecorr->num_apd_outputs; i++ ) + { + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], st_ivas->hTcBuffer->tc[nchan_internal - 1 - i], output_frame ); + } + } + } + + + ivas_spar_dec_set_render_params( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); + + if ( st_ivas->hDirAC != 0 ) + { + ivas_dirac_dec_set_md_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); + } + + for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) + { + ivas_spar_dec_upmixer_sf( st_ivas, output_f_local, nchan_internal ); + for ( n = 0; n < nchan_out; n++ ) + { + output_f_local[n] += n_samples_sf; + } + } + for ( n = 0; n < nchan_internal; n++ ) + { + st_ivas->hTcBuffer->tc[n] = NULL; + } + if ( st_ivas->hDirAC != 0 ) + { + if ( st_ivas->hDirAC->hConfig->dec_param_estim == 1 ) + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_CLDFB_TIMESLOTS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + else + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_SUBFRAMES_5MS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + } + return; +} +#endif + + +#ifdef JBM_TSM_ON_TCS +/*-------------------------------------------------------------------* + * ivas_spar_dec_upmixer_sf() + * + * IVAS SPAR upmixer + *-------------------------------------------------------------------*/ +void ivas_spar_dec_upmixer_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float *output[], /* o : output audio channels */ + const int16_t nchan_internal /* i : number of internal channels */ +) +#else +void ivas_spar_dec_upmixer( + + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float output[][L_FRAME48k], /* i/o: input/output audio channels */ + const int16_t nchan_internal, /* i : number of internal channels */ + const int16_t output_frame /* i : output frame length */ +) +#endif { int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out; float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX]; int16_t i, b, ts, out_ch, in_ch; int16_t num_spar_bands, spar_band, nchan_transport; - int16_t num_in_ingest, num_bands_out, split_band; + int16_t num_in_ingest, split_band; +#ifdef JBM_TSM_ON_TCS + int16_t slot_size, slot_idx_start; + float *p_tc[MAX_OUTPUT_CHANNELS]; + int16_t md_idx; +#endif float Pcm_tmp[MAX_OUTPUT_CHANNELS][L_FRAME48k]; int16_t numch_out_dirac; +#ifndef JBM_TSM_ON_TCS float *pPcm_tmp[MAX_OUTPUT_CHANNELS]; + int16_t num_bands_out; +#endif float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; int16_t b_skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; DECODER_CONFIG_HANDLE hDecoderConfig; SPAR_DEC_HANDLE hSpar; + int16_t num_md_sub_frames; +#ifndef JBM_TSM_ON_TCS + int16_t md_sf_idx; +#endif +#ifdef JBM_TSM_ON_TCS + push_wmops( "ivas_spar_dec_upmixer_sf" ); +#else push_wmops( "ivas_spar_dec_upmixer" ); +#endif hSpar = st_ivas->hSpar; hDecoderConfig = st_ivas->hDecoderConfig; +#ifndef JBM_TSM_ON_TCS num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; +#endif nchan_transport = hSpar->hMdDec->spar_md_cfg.nchan_transport; num_cldfb_bands = hSpar->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; numch_in = hSpar->hFbMixer->fb_cfg->num_in_chans; numch_out = hSpar->hFbMixer->fb_cfg->num_out_chans; + num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( st_ivas->sba_order, hDecoderConfig->ivas_total_brate ); + +#ifdef JBM_TSM_ON_TCS + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + slot_idx_start = hSpar->slots_rendered; + for ( i = 0; i < nchan_internal; i++ ) + { + p_tc[i] = st_ivas->hTcBuffer->tc[i] + slot_idx_start * slot_size; + } +#endif + #ifdef DEBUG_SPAR_BYPASS_EVS_CODEC /* by-pass core-coder */ /*write the core coder output to a file for debugging*/ @@ -1047,17 +1438,19 @@ void ivas_spar_dec_upmixer( } #endif +#ifndef JBM_TSM_ON_TCS /*---------------------------------------------------------------------* * AGC *---------------------------------------------------------------------*/ ivas_agc_dec_process( hSpar->hAgcDec, output, output, nchan_transport, output_frame ); + #ifdef DEBUG_SBA_AUDIO_DUMP /* Dump audio signal after ivas_agc_dec_process */ ivas_spar_dump_signal_wav( output_frame, NULL, output, st_ivas->nchan_transport, spar_foa_dec_wav[1], "ivas_agc_dec_process()" ); #endif - +#endif /*---------------------------------------------------------------------* * TD Decorr and pcm ingest *---------------------------------------------------------------------*/ @@ -1071,11 +1464,12 @@ void ivas_spar_dec_upmixer( num_in_ingest = nchan_transport; } +#ifndef JBM_TSM_ON_TCS for ( i = 0; i < nchan_internal; i++ ) { pPcm_tmp[i] = Pcm_tmp[i]; } - +#endif /*---------------------------------------------------------------------* * PCA decoder *---------------------------------------------------------------------*/ @@ -1083,6 +1477,7 @@ void ivas_spar_dec_upmixer( hSpar->pca_ingest_channels = num_in_ingest; #endif +#ifndef JBM_TSM_ON_TCS /* will already happen in the TC decoding */ if ( hSpar->hPCA != NULL ) { ivas_pca_dec( hSpar->hPCA, output_frame, num_in_ingest, hDecoderConfig->ivas_total_brate, hDecoderConfig->last_ivas_total_brate, st_ivas->bfi, output ); @@ -1091,22 +1486,37 @@ void ivas_spar_dec_upmixer( ivas_spar_dump_signal_wav( output_frame, NULL, output, num_in_ingest, spar_foa_dec_wav[2], "ivas_pca_dec()" ); #endif } +#endif - +#ifndef JBM_TSM_ON_TCS /*---------------------------------------------------------------------* * TD decorrelation *---------------------------------------------------------------------*/ if ( hSpar->hMdDec->td_decorr_flag ) { - ivas_td_decorr_process( hSpar->hTdDecorr, output, pPcm_tmp, output_frame ); - for ( i = 0; i < nchan_internal - nchan_transport; i++ ) + ivas_td_decorr_process( hSpar->hTdDecorr, output, pPcm_tmp, output_frame ); + if ( hSpar->hTdDecorr->num_apd_outputs >= ( nchan_internal - nchan_transport ) ) + { + for ( i = 0; i < nchan_internal - nchan_transport; i++ ) + { + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], output[nchan_internal - 1 - i], output_frame ); + } + } + else { - mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], output[nchan_internal - 1 - i], output_frame ); + for ( i = 0; i < nchan_internal - nchan_transport; i++ ) + { + set_zero( output[nchan_internal - 1 - i], output_frame ); + } + for ( i = 0; i < hSpar->hTdDecorr->num_apd_outputs; i++ ) + { + mvr2r( pPcm_tmp[hSpar->hTdDecorr->num_apd_outputs - 1 - i], output[nchan_internal - 1 - i], output_frame ); + } } } - +#endif hSpar->hFbMixer->fb_cfg->num_in_chans = num_in_ingest; @@ -1139,12 +1549,14 @@ void ivas_spar_dec_upmixer( } } +#ifndef JBM_TSM_ON_TCS /*---------------------------------------------------------------------* * Gen umx mat *---------------------------------------------------------------------*/ - ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); - + ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi, + num_md_sub_frames ); +#endif /*---------------------------------------------------------------------* * CLDFB Processing and Synthesis @@ -1154,19 +1566,39 @@ void ivas_spar_dec_upmixer( /* apply parameters */ /* determine if we can skip certain data */ - ivas_spar_get_skip_mat( hSpar, numch_out, numch_in, num_spar_bands, b_skip_mat ); /* this can be precomputed based on bitrate and format*/ + ivas_spar_get_skip_mat( hSpar, numch_out, numch_in, num_spar_bands, b_skip_mat, + num_md_sub_frames ); /* this can be precomputed based on bitrate and format*/ numch_out_dirac = hDecoderConfig->nchan_out; +#ifdef DEBUG_SBA_AUDIO_DUMP + /* Dump audio signal after ivas_agc_dec_process */ +#ifdef JBM_TSM_ON_TCS + ivas_spar_dump_signal_wav( output_frame, p_tc, NULL, numch_in, spar_foa_dec_wav[4], "ivas_spar_upmixer()" ); +#else + ivas_spar_dump_signal_wav( output_frame, NULL, output, numch_in, spar_foa_dec_wav[4], "ivas_spar_upmixer()" ); +#endif +#endif + +#ifndef JBM_TSM_ON_TCS for ( int16_t i_sf = 0; i_sf < MAX_PARAM_SPATIAL_SUBFRAMES; i_sf++ ) { +#endif /* CLDFB analysis of incoming frame */ for ( in_ch = 0; in_ch < numch_in; in_ch++ ) { - for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#ifdef JBM_TSM_ON_TCS + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) +#else + for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#endif { cldfbAnalysis_ts( - &output[in_ch][( ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES ) * num_cldfb_bands], +#ifdef JBM_TSM_ON_TCS + &p_tc[in_ch][ts * num_cldfb_bands], +#else + &output[in_ch][( ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES ) * num_cldfb_bands], +#endif cldfb_in_ts_re[in_ch][ts], cldfb_in_ts_im[in_ch][ts], num_cldfb_bands, @@ -1176,17 +1608,22 @@ void ivas_spar_dec_upmixer( if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA3 ) ) ) { - for ( in_ch = 0; in_ch < numch_in; in_ch++ ) - { - ivas_spar_calc_smooth_facs( cldfb_in_ts_re[in_ch], cldfb_in_ts_im[in_ch], num_spar_bands, &hSpar->hFbMixer->pFb->fb_bin_to_band, hSpar->hMdDec->smooth_fac[in_ch], hSpar->hMdDec->smooth_buf[in_ch] ); - } + ivas_spar_calc_smooth_facs( cldfb_in_ts_re[0], cldfb_in_ts_im[0], num_spar_bands, &hSpar->hFbMixer->pFb->fb_bin_to_band, hSpar->hMdDec->smooth_fac, hSpar->hMdDec->smooth_buf ); } - for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#ifdef JBM_TSM_ON_TCS + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) +#else + for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#endif { - /* determine SPAR parameters for this time slots */ - ivas_spar_get_parameters( hSpar, hDecoderConfig, ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES, numch_out, numch_in, num_spar_bands, mixer_mat ); - +#ifdef JBM_TSM_ON_TCS + md_idx = hSpar->render_to_md_map[ts + slot_idx_start]; + ivas_spar_get_parameters( hSpar, hDecoderConfig, md_idx, numch_out, numch_in, num_spar_bands, mixer_mat ); +#else + /* determine SPAR parameters for this time slots */ + ivas_spar_get_parameters( hSpar, hDecoderConfig, ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES, numch_out, numch_in, num_spar_bands, mixer_mat ); +#endif if ( ( hDecoderConfig->ivas_total_brate < IVAS_24k4 ) && ( ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA2 ) || ( hDecoderConfig->output_config == AUDIO_CONFIG_HOA3 ) ) ) { for ( spar_band = 0; spar_band < num_spar_bands; spar_band++ ) @@ -1195,7 +1632,7 @@ void ivas_spar_dec_upmixer( { for ( in_ch = 0; in_ch < numch_in; in_ch++ ) { - mixer_mat[out_ch][in_ch][spar_band] = ( 1 - hSpar->hMdDec->smooth_fac[in_ch][spar_band] ) * mixer_mat[out_ch][in_ch][spar_band] + hSpar->hMdDec->smooth_fac[in_ch][spar_band] * hSpar->hMdDec->mixer_mat_prev2[out_ch][in_ch][spar_band]; + mixer_mat[out_ch][in_ch][spar_band] = ( 1 - hSpar->hMdDec->smooth_fac[spar_band] ) * mixer_mat[out_ch][in_ch][spar_band] + hSpar->hMdDec->smooth_fac[spar_band] * hSpar->hMdDec->mixer_mat_prev2[out_ch][in_ch][spar_band]; hSpar->hMdDec->mixer_mat_prev2[out_ch][in_ch][spar_band] = mixer_mat[out_ch][in_ch][spar_band]; } } @@ -1216,27 +1653,26 @@ void ivas_spar_dec_upmixer( for ( in_ch = 0; in_ch < numch_in; in_ch++ ) { - if ( b_skip_mat[out_ch][in_ch] ) - { - continue; - } - else if ( cldfb_band < CLDFB_PAR_WEIGHT_START_BAND ) /* tuning parameter, depends on how much SPAR Filters overlap for the CLDFB bands */ - { - spar_band = bin2band->p_cldfb_map_to_spar_band[cldfb_band]; - cldfb_par = mixer_mat[out_ch][in_ch][spar_band]; - } - else + if ( b_skip_mat[out_ch][in_ch] == 0 ) { - cldfb_par = 0.0f; - for ( spar_band = bin2band->p_spar_start_bands[cldfb_band]; spar_band < num_spar_bands; spar_band++ ) + if ( cldfb_band < CLDFB_PAR_WEIGHT_START_BAND ) /* tuning parameter, depends on how much SPAR Filters overlap for the CLDFB bands */ { - /* accumulate contributions from all SPAR bands */ - cldfb_par += mixer_mat[out_ch][in_ch][spar_band] * bin2band->pp_cldfb_weights_per_spar_band[cldfb_band][spar_band]; + spar_band = bin2band->p_cldfb_map_to_spar_band[cldfb_band]; + cldfb_par = mixer_mat[out_ch][in_ch][spar_band]; + } + else + { + cldfb_par = 0.0f; + for ( spar_band = bin2band->p_spar_start_bands[cldfb_band]; spar_band < num_spar_bands; spar_band++ ) + { + /* accumulate contributions from all SPAR bands */ + cldfb_par += mixer_mat[out_ch][in_ch][spar_band] * bin2band->pp_cldfb_weights_per_spar_band[cldfb_band][spar_band]; + } } - } - out_re[out_ch] += cldfb_in_ts_re[in_ch][ts][cldfb_band] * cldfb_par; - out_im[out_ch] += cldfb_in_ts_im[in_ch][ts][cldfb_band] * cldfb_par; + out_re[out_ch] += cldfb_in_ts_re[in_ch][ts][cldfb_band] * cldfb_par; + out_im[out_ch] += cldfb_in_ts_im[in_ch][ts][cldfb_band] * cldfb_par; + } } } @@ -1247,11 +1683,44 @@ void ivas_spar_dec_upmixer( cldfb_in_ts_im[out_ch][ts][cldfb_band] = out_im[out_ch]; } } +#ifdef JBM_TSM_ON_TCS + if ( ( ( slot_idx_start + ts + 1 ) == hSpar->num_slots ) || ( ( md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME ) != ( hSpar->render_to_md_map[ts + slot_idx_start + 1] / JBM_CLDFB_SLOTS_IN_SUBFRAME ) ) ) + { + /* we have crossed an unadapted parameter sf border, update previous mixing matrices */ + int16_t md_sf = md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME; + split_band = SPAR_DIRAC_SPLIT_START_BAND; + md_sf = ( num_md_sub_frames == MAX_PARAM_SPATIAL_SUBFRAMES ) ? md_sf : 0; + if ( split_band < IVAS_MAX_NUM_BANDS ) + { + mvr2r( hSpar->hMdDec->mixer_mat_prev[1][0][0], hSpar->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[2][0][0], hSpar->hMdDec->mixer_mat_prev[1][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[3][0][0], hSpar->hMdDec->mixer_mat_prev[2][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[4][0][0], hSpar->hMdDec->mixer_mat_prev[3][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + + for ( out_ch = 0; out_ch < numch_out; out_ch++ ) + { + for ( in_ch = 0; in_ch < numch_in; in_ch++ ) + { + for ( b = 0; b < num_spar_bands; b++ ) + { + hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + md_sf * IVAS_MAX_NUM_BANDS]; + } + } + } + hSpar->i_subframe++; + hSpar->i_subframe = min( hSpar->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); + } + } +#endif } if ( hDecoderConfig->output_config != AUDIO_CONFIG_FOA && hDecoderConfig->output_config != AUDIO_CONFIG_STEREO && hDecoderConfig->output_config != AUDIO_CONFIG_MONO ) { - ivas_dirac_dec( st_ivas, output, nchan_internal, cldfb_in_ts_re, cldfb_in_ts_im, i_sf ); +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec_render_sf( st_ivas, output, nchan_internal, cldfb_in_ts_re, cldfb_in_ts_im ); +#else + ivas_dirac_dec( st_ivas, output, nchan_internal, cldfb_in_ts_re, cldfb_in_ts_im, i_sf ); +#endif } if ( st_ivas->hDirAC != NULL ) @@ -1265,8 +1734,11 @@ void ivas_spar_dec_upmixer( { if ( ( st_ivas->hOutSetup.num_lfe > 0 ) && ( st_ivas->hOutSetup.index_lfe[idx_lfe] == ch ) ) { - set_zero( &( output[ch][i_sf * MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands] ), MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands ); - +#ifdef JBM_TSM_ON_TCS + set_zero( output[ch], hSpar->subframe_nbslots[hSpar->subframes_rendered] * num_cldfb_bands ); +#else + set_zero( &( output[ch][i_sf * MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands] ), MAX_PARAM_SPATIAL_SUBFRAMES * num_cldfb_bands ); +#endif if ( idx_lfe < ( st_ivas->hDirAC->hOutSetup.num_lfe - 1 ) ) { idx_lfe++; @@ -1276,12 +1748,20 @@ void ivas_spar_dec_upmixer( { if ( hDecoderConfig->output_config == AUDIO_CONFIG_FOA || !( st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == AUDIO_CONFIG_BINAURAL_ROOM ) ) { - for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#ifdef JBM_TSM_ON_TCS + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) +#else + for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#endif { cldfbSynthesis( &cldfb_in_ts_re[idx_in][ts], &cldfb_in_ts_im[idx_in][ts], - &output[ch][( ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES ) * num_cldfb_bands], +#ifdef JBM_TSM_ON_TCS + &output[ch][ts * num_cldfb_bands], +#else + &output[ch][( ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES ) * num_cldfb_bands], +#endif num_cldfb_bands, st_ivas->cldfbSynDec[idx_in] ); } @@ -1298,12 +1778,20 @@ void ivas_spar_dec_upmixer( /* CLDFB to time synthesis (overwrite mixer output) */ for ( out_ch = 0; out_ch < numch_out_dirac; out_ch++ ) { - for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#ifdef JBM_TSM_ON_TCS + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) +#else + for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) +#endif { cldfbSynthesis( &cldfb_in_ts_re[out_ch][ts], &cldfb_in_ts_im[out_ch][ts], - &output[out_ch][( ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES ) * num_cldfb_bands], +#ifdef JBM_TSM_ON_TCS + &output[out_ch][ts * num_cldfb_bands], +#else + &output[out_ch][( ts + i_sf * MAX_PARAM_SPATIAL_SUBFRAMES ) * num_cldfb_bands], +#endif num_cldfb_bands, st_ivas->cldfbSynDec[out_ch] ); } @@ -1317,6 +1805,9 @@ void ivas_spar_dec_upmixer( ivas_spar_dump_signal_wav( output_frame, NULL, output, hSpar->numOutChannels, spar_foa_dec_wav[3], "cldfbSynthesis()" ); #endif + +#ifndef JBM_TSM_ON_TCS + md_sf_idx = ( num_md_sub_frames == MAX_PARAM_SPATIAL_SUBFRAMES ) ? i_sf : 0; split_band = SPAR_DIRAC_SPLIT_START_BAND; if ( split_band < IVAS_MAX_NUM_BANDS ) { @@ -1333,13 +1824,19 @@ void ivas_spar_dec_upmixer( { for ( b = 0; b < num_spar_bands; b++ ) { - hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + i_sf * IVAS_MAX_NUM_BANDS]; + hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + md_sf_idx * IVAS_MAX_NUM_BANDS]; } } } } +#endif +#ifndef JBM_TSM_ON_TCS } - +#endif +#ifdef JBM_TSM_ON_TCS + hSpar->slots_rendered += hSpar->subframe_nbslots[hSpar->subframes_rendered]; + hSpar->subframes_rendered++; +#endif pop_wmops(); return; diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index 1552734434d0da8cd218315ed3c92fb59ddd855e..5945023010770b783c78e70e8ffefe96fb6670e8 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -63,7 +63,7 @@ static const int16_t ivas_spar_dec_plc_spatial_target[IVAS_SPAR_MAX_CH] = { 1, 0 * Static functions declaration *------------------------------------------------------------------------------------------*/ -static void ivas_get_spar_matrices( ivas_spar_md_dec_state_t *hMdDec, const int16_t num_bands_out, const int16_t n_ts, const int16_t bw, const int16_t dtx_vad, const int16_t nB, const int16_t sba_order, const int16_t active_w_vlbr ); +static void ivas_get_spar_matrices( ivas_spar_md_dec_state_t *hMdDec, const int16_t num_bands_out, const int16_t n_ts, const int16_t bw, const int16_t dtx_vad, const int16_t nB, const int16_t numch_out, const int16_t active_w_vlbr ); static void ivas_decode_arith_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, const uint16_t qsi, const int16_t nB, const int16_t bands_bw, int16_t *pDo_diff, const int16_t freq_diff, const int16_t planarCP, const int16_t strat, const int32_t ivas_total_brate ); @@ -75,9 +75,9 @@ static void ivas_get_band_idx_from_differential( ivas_spar_md_t *pSpar_md, const static void ivas_mat_col_rearrange( float in_re[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], const int16_t order[IVAS_SPAR_MAX_CH], const int16_t i_ts, float ***mixer_mat, const int16_t bands, const int16_t num_ch ); -static void ivas_spar_dec_compute_ramp_down_post_matrix( ivas_spar_md_dec_state_t *hMdDec, const int16_t num_bands, const int16_t bfi ); +static void ivas_spar_dec_compute_ramp_down_post_matrix( ivas_spar_md_dec_state_t *hMdDec, const int16_t num_bands, const int16_t bfi, const int16_t num_md_sub_frames ); -static void ivas_spar_md_fill_invalid_bands( ivas_spar_dec_matrices_t *pSpar_coeffs, ivas_spar_dec_matrices_t *pSpar_coeffs_prev, const int16_t *valid_bands, int16_t *base_band_age, const int16_t num_bands, const int16_t sba_order ); +static void ivas_spar_md_fill_invalid_bands( ivas_spar_dec_matrices_t *pSpar_coeffs, ivas_spar_dec_matrices_t *pSpar_coeffs_prev, const int16_t *valid_bands, int16_t *base_band_age, const int16_t num_bands, const int16_t numch_out, const int16_t num_md_sub_frames ); static ivas_error ivas_spar_set_dec_config( ivas_spar_md_dec_state_t *hMdDec, const int16_t nchan_transport, float *pFC ); @@ -97,11 +97,12 @@ static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder static ivas_error ivas_spar_md_dec_matrix_open( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_channels /* i : number of internal channels */ -) + , + const int16_t num_md_sub_frames ) { int16_t i, j; - if ( ( hMdDec->spar_md.band_coeffs = (ivas_band_coeffs_t *) malloc( IVAS_MAX_NUM_BANDS * MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) + if ( ( hMdDec->spar_md.band_coeffs = (ivas_band_coeffs_t *) malloc( IVAS_MAX_NUM_BANDS * num_md_sub_frames * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for band_coeffs in SPAR MD" ); } @@ -117,7 +118,7 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->mixer_mat[i][j] = (float *) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->mixer_mat[i][j] = (float *) malloc( num_md_sub_frames * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } @@ -136,7 +137,7 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs.C_re[i][j] = (float *) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.C_re[i][j] = (float *) malloc( num_md_sub_frames * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } @@ -155,7 +156,7 @@ static ivas_error ivas_spar_md_dec_matrix_open( } for ( j = 0; j < num_channels; j++ ) { - if ( ( hMdDec->spar_coeffs.P_re[i][j] = (float *) malloc( MAX_PARAM_SPATIAL_SUBFRAMES * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + if ( ( hMdDec->spar_coeffs.P_re[i][j] = (float *) malloc( num_md_sub_frames * IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD matrix" ); } @@ -241,6 +242,21 @@ static ivas_error ivas_spar_md_dec_matrix_open( return IVAS_ERR_OK; } +int16_t ivas_get_spar_dec_md_num_subframes( + const int16_t sba_order, /* i : Ambisonic (SBA) order */ + const int32_t ivas_total_brate ) +{ + int16_t num_subframes; + num_subframes = MAX_PARAM_SPATIAL_SUBFRAMES; + if ( sba_order > SBA_FOA_ORDER ) + { + if ( ivas_total_brate >= IVAS_512k ) + { + num_subframes = 1; + } + } + return ( num_subframes ); +} /*------------------------------------------------------------------------- * ivas_spar_md_dec_open() @@ -258,6 +274,7 @@ ivas_error ivas_spar_md_dec_open( { ivas_spar_md_dec_state_t *hMdDec; ivas_error error; + int16_t num_md_sub_frames; error = IVAS_ERR_OK; @@ -266,7 +283,9 @@ ivas_error ivas_spar_md_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD decoder" ); } - if ( ( error = ivas_spar_md_dec_matrix_open( hMdDec, num_channels ) ) != IVAS_ERR_OK ) + num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, hDecoderConfig->ivas_total_brate ); + if ( ( error = ivas_spar_md_dec_matrix_open( hMdDec, num_channels, + num_md_sub_frames ) ) != IVAS_ERR_OK ) { return error; } @@ -443,7 +462,10 @@ ivas_error ivas_spar_md_dec_init( int16_t nchan_transport; float pFC[IVAS_MAX_NUM_BANDS], PR_minmax[2]; - hMdDec->spar_hoa_md_flag = ivas_sba_get_spar_hoa_md_flag( sba_order, hDecoderConfig->ivas_total_brate ); + ivas_sba_get_spar_hoa_md_flag( sba_order, hDecoderConfig->ivas_total_brate, &hMdDec->spar_hoa_md_flag, &hMdDec->spar_hoa_dirac2spar_md_flag ); + + ivas_sba_get_spar_hoa_ch_ind( num_channels, hDecoderConfig->ivas_total_brate, hMdDec->HOA_md_ind ); + hMdDec->spar_md.num_bands = ( hMdDec->spar_hoa_md_flag ) ? IVAS_MAX_NUM_BANDS : min( IVAS_MAX_NUM_BANDS, SPAR_DIRAC_SPLIT_START_BAND ); ivas_spar_set_bitrate_config( &hMdDec->spar_md_cfg, hMdDec->table_idx, hMdDec->spar_md.num_bands ); @@ -536,16 +558,10 @@ ivas_error ivas_spar_md_dec_init( set_f( hMdDec->spar_md.en_ratio_slow, 0.0f, IVAS_MAX_NUM_BANDS ); set_f( hMdDec->spar_md.ref_pow_slow, 0.0f, IVAS_MAX_NUM_BANDS ); - for ( i = 0; i < IVAS_SPAR_MAX_CH; i++ ) - { - set_zero( hMdDec->smooth_fac[i], IVAS_MAX_NUM_BANDS ); - } - for ( i = 0; i < IVAS_SPAR_MAX_CH; i++ ) + set_zero( hMdDec->smooth_fac, IVAS_MAX_NUM_BANDS ); + for ( i = 0; i < IVAS_MAX_NUM_BANDS; i++ ) { - for ( j = 0; j < IVAS_MAX_NUM_BANDS; j++ ) - { - set_zero( hMdDec->smooth_buf[i][j], 2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1 ); - } + set_zero( hMdDec->smooth_buf[i], 2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1 ); } for ( i = 0; i < IVAS_SPAR_MAX_CH; i++ ) { @@ -577,7 +593,8 @@ static ivas_error ivas_spar_set_dec_config( hMdDec->spar_md_cfg.max_freq_per_chan[i] = ivas_spar_br_table_consts[hMdDec->table_idx].fpcs; } - nchan = ivas_sba_get_nchan_metadata( ivas_spar_br_table_consts[hMdDec->table_idx].sba_order ); + nchan = ivas_sba_get_nchan_metadata( ivas_spar_br_table_consts[hMdDec->table_idx].sba_order, + ivas_spar_br_table_consts[hMdDec->table_idx].ivas_total_brate ); switch ( nchan ) { @@ -637,10 +654,18 @@ void ivas_spar_md_dec_process( { int16_t j, k, b, bw, dtx_vad, nB, i_ts; ivas_spar_md_dec_state_t *hMdDec; + int16_t num_md_chs; + int16_t num_md_sub_frames; hMdDec = st_ivas->hSpar->hMdDec; + int16_t active_w_vlbr; active_w_vlbr = ( st_ivas->hDecoderConfig->ivas_total_brate < IVAS_24k4 ) ? 1 : 0; + + num_md_chs = ivas_sba_get_nchan_metadata( sba_order, st_ivas->hDecoderConfig->ivas_total_brate ); + num_md_sub_frames = ivas_get_spar_dec_md_num_subframes( sba_order, st_ivas->hDecoderConfig->ivas_total_brate ); + + ivas_spar_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate, ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode ); @@ -649,7 +674,10 @@ void ivas_spar_md_dec_process( char f_name[100]; int16_t num_bands = nB; int16_t num_subframes = 1, num_block_groups = 1, num_elements = 1, byte_size = sizeof( float ); - int16_t num_ch = ivas_sba_get_nchan_metadata( sba_order ); + int16_t num_ch = ivas_sba_get_nchan_metadata( sba_order + , + st_ivas->hDecoderConfig->ivas_total_brate + ); for ( b = 0; b < num_bands; b++ ) { sprintf( f_name, "spar_band_pred_coeffs_dec.bin" ); @@ -782,8 +810,10 @@ void ivas_spar_md_dec_process( }*/ #endif /* SPAR to DirAC conversion */ - ivas_spar_to_dirac( st_ivas, hMdDec, dtx_vad, num_bands_out, - bw ); + if ( hMdDec->spar_hoa_dirac2spar_md_flag == 1 ) + { + ivas_spar_to_dirac( st_ivas, hMdDec, dtx_vad, num_bands_out, bw ); + } /* set correct number of bands*/ nB = IVAS_MAX_NUM_BANDS; @@ -915,7 +945,7 @@ void ivas_spar_md_dec_process( }*/ #endif /* expand DirAC MD to all time slots */ - for ( i_ts = 1; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) + for ( i_ts = 1; i_ts < num_md_sub_frames; i_ts++ ) { for ( b = 0; b < hMdDec->spar_md.num_bands; b++ ) { @@ -939,8 +969,11 @@ void ivas_spar_md_dec_process( } } - ivas_get_spar_matrices( hMdDec, num_bands_out, MAX_PARAM_SPATIAL_SUBFRAMES, bw, dtx_vad, nB, sba_order, - active_w_vlbr ); + ivas_get_spar_matrices( hMdDec, num_bands_out, num_md_sub_frames, bw, dtx_vad, nB, + num_md_chs, + active_w_vlbr + + ); #ifdef DEBUG_SPAR_DIRAC_WRITE_OUT_PRED_PARS { @@ -962,7 +995,9 @@ void ivas_spar_md_dec_process( hMdDec->valid_bands[b] = 1; } - ivas_spar_md_fill_invalid_bands( &hMdDec->spar_coeffs, &hMdDec->spar_coeffs_prev, &hMdDec->valid_bands[0], &hMdDec->base_band_age[0], num_bands_out, sba_order ); + ivas_spar_md_fill_invalid_bands( &hMdDec->spar_coeffs, &hMdDec->spar_coeffs_prev, &hMdDec->valid_bands[0], &hMdDec->base_band_age[0], num_bands_out, + num_md_chs, + num_md_sub_frames ); hMdDec->dtx_md_smoothing_cntr = 1; @@ -982,6 +1017,8 @@ void ivas_spar_md_dec_process( void ivas_spar_smooth_md_dtx( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_bands_out /* i : number of output bands */ + , + const int16_t num_md_sub_frames /* i : number of metadata subframes */ ) { int16_t j, k, b, dmx_ch; @@ -1017,7 +1054,7 @@ void ivas_spar_smooth_md_dtx( } /* expand MD to all time slots */ - for ( int16_t i_ts = 1; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) + for ( int16_t i_ts = 1; i_ts < num_md_sub_frames; i_ts++ ) { for ( b = 0; b < num_bands_out; b++ ) { @@ -1057,6 +1094,8 @@ void ivas_spar_smooth_md_dtx( void ivas_spar_setup_md_smoothing( ivas_spar_md_dec_state_t *hMdDec, /* i/o: SPAR MD decoder handle */ const int16_t num_bands_out /* i : number of output bands */ + , + const int16_t num_md_sub_frames /* i : number of metadata subframes */ ) { /* copy the coeffs */ @@ -1108,7 +1147,8 @@ void ivas_spar_setup_md_smoothing( } } - ivas_spar_smooth_md_dtx( hMdDec, num_bands_out ); + ivas_spar_smooth_md_dtx( hMdDec, num_bands_out, + num_md_sub_frames ); return; } @@ -1188,15 +1228,14 @@ static void ivas_get_spar_matrices( const int16_t bw, const int16_t dtx_vad, const int16_t nB, - const int16_t sba_order, + const int16_t numch_out, const int16_t active_w_vlbr ) { - int16_t numch_out, num_bands, dmx_ch, split_band; + int16_t num_bands, dmx_ch, split_band; int16_t i, j, k, m, b, i_ts, active_w; const int16_t *order; float active_w_dm_fac, re; - numch_out = ivas_sba_get_nchan_metadata( sba_order ); num_bands = num_bands_out; order = remix_order_set[hMdDec->spar_md_cfg.remix_unmix_order]; @@ -1575,13 +1614,14 @@ void ivas_spar_dec_gen_umx_mat( const int16_t nchan_transport, /* i : number of transport channels */ const int16_t num_bands_out, /* i : number of output bands */ const int16_t bfi /* i : bad frame indicator */ -) + , + const int16_t num_md_sub_frames ) { int16_t i, j, b, i_ts, num_out_ch; num_out_ch = hMdDec->spar_md_cfg.num_umx_chs; - for ( i_ts = 0; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) + for ( i_ts = 0; i_ts < num_md_sub_frames; i_ts++ ) { if ( hMdDec->td_decorr_flag == 1 ) { @@ -1642,7 +1682,8 @@ void ivas_spar_dec_gen_umx_mat( #endif } - ivas_spar_dec_compute_ramp_down_post_matrix( hMdDec, num_bands_out, bfi ); + ivas_spar_dec_compute_ramp_down_post_matrix( hMdDec, num_bands_out, bfi, + num_md_sub_frames ); return; } @@ -1992,7 +2033,8 @@ static void ivas_decode_arith_bs( const int16_t strat, const int32_t ivas_total_brate ) { - int16_t i, j, ndm, ndec; + int16_t i, ndm, ndec; + int16_t j; ivas_cell_dim_t pred_cell_dims[IVAS_MAX_NUM_BANDS]; ivas_cell_dim_t drct_cell_dims[IVAS_MAX_NUM_BANDS]; ivas_cell_dim_t decd_cell_dims[IVAS_MAX_NUM_BANDS]; @@ -2019,7 +2061,7 @@ static void ivas_decode_arith_bs( else { pred_cell_dims[i].dim1 = ndm + ndec - 1; - if ( hMdDec->spar_hoa_md_flag ) + if ( hMdDec->spar_hoa_md_flag && hMdDec->spar_hoa_dirac2spar_md_flag ) { if ( i >= SPAR_DIRAC_SPLIT_START_BAND ) { @@ -2048,7 +2090,7 @@ static void ivas_decode_arith_bs( if ( any_diff == 1 ) { - if ( hMdDec->spar_hoa_md_flag ) + if ( hMdDec->spar_hoa_md_flag && hMdDec->spar_hoa_dirac2spar_md_flag ) { for ( i = 0; i < nB; i++ ) { @@ -2070,7 +2112,7 @@ static void ivas_decode_arith_bs( ivas_fill_band_coeffs_idx( hMdDec->spar_md.band_coeffs_idx, nB, symbol_arr_re, pred_cell_dims, PRED_COEFF, planarCP ); - if ( hMdDec->spar_hoa_md_flag ) + if ( hMdDec->spar_hoa_md_flag && hMdDec->spar_hoa_dirac2spar_md_flag ) { for ( i = 0; i < nB; i++ ) { @@ -2335,7 +2377,7 @@ static void ivas_decode_huffman_bs( drct_dim = ndec * ( ndm - 1 ); decd_dim = ndec; pred_offset = 0; - if ( hMdDec->spar_hoa_md_flag ) + if ( hMdDec->spar_hoa_md_flag && hMdDec->spar_hoa_dirac2spar_md_flag ) { if ( i >= SPAR_DIRAC_SPLIT_START_BAND ) { @@ -2349,7 +2391,7 @@ static void ivas_decode_huffman_bs( &hMdDec->spar_md.band_coeffs_idx[i].pred_index_re[j] ); } - if ( hMdDec->spar_hoa_md_flag ) + if ( hMdDec->spar_hoa_md_flag && hMdDec->spar_hoa_dirac2spar_md_flag ) { if ( i >= SPAR_DIRAC_SPLIT_START_BAND ) { @@ -2402,16 +2444,13 @@ static void ivas_spar_md_fill_invalid_bands( const int16_t *valid_bands, int16_t *base_band_age, const int16_t num_bands, - const int16_t sba_order /* i : SBA order */ -) + const int16_t num_channels, + const int16_t num_md_sub_frames ) { int16_t i, j, b, all_valid; int16_t valid_band_idx[IVAS_MAX_NUM_BANDS], idx = -1; int16_t last_valid_band_idx[IVAS_MAX_NUM_BANDS]; float w = 0; - int16_t num_channels; - - num_channels = ivas_sba_get_nchan_metadata( sba_order ); set_s( valid_band_idx, 0, IVAS_MAX_NUM_BANDS ); set_s( last_valid_band_idx, 0, IVAS_MAX_NUM_BANDS ); @@ -2498,7 +2537,7 @@ static void ivas_spar_md_fill_invalid_bands( { for ( j = 0; j < num_channels; j++ ) { - for ( i_ts = 1; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) + for ( i_ts = 1; i_ts < num_md_sub_frames; i_ts++ ) { pSpar_coeffs->C_re[i][j][b + i_ts * IVAS_MAX_NUM_BANDS] = pSpar_coeffs->C_re[i][j][b]; pSpar_coeffs->P_re[i][j][b + i_ts * IVAS_MAX_NUM_BANDS] = pSpar_coeffs->P_re[i][j][b]; @@ -2522,7 +2561,8 @@ static void ivas_spar_md_fill_invalid_bands( static void ivas_spar_dec_compute_ramp_down_post_matrix( ivas_spar_md_dec_state_t *hMdDec, const int16_t num_bands_out, - const int16_t bfi ) + const int16_t bfi, + const int16_t num_md_sub_frames ) { int16_t num_in_ch, num_out_ch, i, j, b; @@ -2561,7 +2601,7 @@ static void ivas_spar_dec_compute_ramp_down_post_matrix( } /* apply the post matrix */ - for ( int16_t i_ts = 0; i_ts < MAX_PARAM_SPATIAL_SUBFRAMES; i_ts++ ) + for ( int16_t i_ts = 0; i_ts < num_md_sub_frames; i_ts++ ) { for ( i = 0; i < num_out_ch; i++ ) { @@ -2825,6 +2865,7 @@ void ivas_spar_to_dirac( int16_t pred_idx; int16_t *dirac_to_spar_md_bands; int16_t enc_param_start_band; + int16_t active_w_vlbr; sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); start_band = 0; @@ -2833,9 +2874,9 @@ void ivas_spar_to_dirac( hDirAC = st_ivas->hDirAC; dirac_to_spar_md_bands = st_ivas->hSpar->dirac_to_spar_md_bands; enc_param_start_band = st_ivas->hSpar->enc_param_start_band / bw; - int16_t active_w_vlbr; active_w_vlbr = ( st_ivas->hDecoderConfig->ivas_total_brate < IVAS_24k4 ) ? 1 : 0; - if ( hDirAC != NULL ) + + if ( hDirAC != NULL && ivas_get_hodirac_flag( st_ivas->hDecoderConfig->ivas_total_brate, st_ivas->sba_analysis_order ) == 0 ) { band_grouping = hDirAC->band_grouping; #ifdef ENABLE_DITHER @@ -2931,7 +2972,11 @@ void ivas_spar_to_dirac( qmf_band_start = band_grouping[band]; qmf_band_end = band_grouping[band + 1]; +#ifdef JBM_TSM_ON_TCS + for ( block = 0; block < MAX_PARAM_SPATIAL_SUBFRAMES; block++ ) +#else for ( block = 0; block < hDirAC->nb_subframes; block++ ) +#endif { int16_t ts_start, ts_end, ts; @@ -2953,6 +2998,7 @@ void ivas_spar_to_dirac( hDirAC->energy_ratio1[block][b] = en_ratio; tmp_write_idx_band = tmp_write_idx_param_band; + if ( hDirAC->hConfig->dec_param_estim == FALSE ) { hDirAC->elevation[tmp_write_idx_band][b] = ele_dith; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index ad453cd5bdf92aed36d256cbe7482f39cf1a0d27..af9d5da5f4f7fe0dd5d67026fff4ac1f3ad6ceb9 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -435,7 +435,11 @@ typedef struct param_ism_rendering float *proto_matrix; float *interpolator; float mixing_matrix_lin_old[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX]; - +#ifdef JBM_TSM_ON_TCS + float mixing_matrix_lin[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_CHAN * PARAM_ISM_MAX_DMX]; + float *Cldfb_RealBuffer_tc; + float *Cldfb_ImagBuffer_tc; +#endif } PARAM_ISM_RENDERING_DATA, *PARAM_ISM_RENDERING_HANDLE; @@ -571,6 +575,10 @@ typedef struct dirac_output_synthesis_cov_state_structure float *cy_old[CLDFB_NO_CHANNELS_MAX]; float *mixing_matrix_old[CLDFB_NO_CHANNELS_MAX]; float *mixing_matrix_res_old[CLDFB_NO_CHANNELS_MAX]; +#ifdef JBM_TSM_ON_TCS + float *mixing_matrix[CLDFB_NO_CHANNELS_MAX]; + float *mixing_matrix_res[CLDFB_NO_CHANNELS_MAX]; +#endif } DIRAC_OUTPUT_SYNTHESIS_COV_STATE; @@ -611,9 +619,15 @@ typedef struct /* Diffuse sound directional distribution data structure */ typedef struct ivas_diffuse_distribution_data_structure { +#ifdef JBM_TSM_ON_TCS + float diffuseRatioX[CLDFB_NO_CHANNELS_MAX]; + float diffuseRatioY[CLDFB_NO_CHANNELS_MAX]; + float diffuseRatioZ[CLDFB_NO_CHANNELS_MAX]; +#else float diffuseRatioX[MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float diffuseRatioY[MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; float diffuseRatioZ[MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX]; +#endif } DIFFUSE_DISTRIBUTION_DATA, *DIFFUSE_DISTRIBUTION_HANDLE; @@ -625,7 +639,15 @@ typedef struct ivas_dirac_dec_data_structure IVAS_OUTPUT_SETUP hOutSetup; int16_t slot_size; +#ifdef JBM_TSM_ON_TCS + int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; + int16_t subframes_rendered; + int16_t slots_rendered; + int16_t num_slots; + int16_t render_to_md_map[MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME]; +#else int16_t subframe_nbslots; +#endif int16_t nb_subframes; int16_t num_freq_bands; @@ -710,6 +732,7 @@ typedef struct ivas_dirac_dec_data_structure PARAM_ISM_RENDERING_HANDLE hParamIsmRendering; IVAS_FB_MIXER_HANDLE hFbMdft; int16_t dirac_to_spar_md_bands[DIRAC_MAX_NBANDS]; + const int16_t *sba_map_tc; } DIRAC_DEC_DATA, *DIRAC_DEC_HANDLE; @@ -733,7 +756,17 @@ typedef struct ivas_param_mc_dec_data_structure { int16_t slot_size; +#ifdef JBM_TSM_ON_TCS + float *Cldfb_RealBuffer_tc; + float *Cldfb_ImagBuffer_tc; + int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; + int16_t nb_subframes; + int16_t subframes_rendered; + int16_t slots_rendered; + int16_t num_slots; +#else int16_t subframe_nbslots; +#endif int16_t num_freq_bands; int16_t num_param_bands_synth; @@ -770,7 +803,25 @@ typedef struct ivas_param_mc_dec_data_structure } PARAM_MC_DEC_DATA, *PARAM_MC_DEC_HANDLE; +/*----------------------------------------------------------------------------------* + * MC Param-Upmix Mode structures + *----------------------------------------------------------------------------------*/ +/* ===== MC Param-Upmix Mode main structure ===== */ +typedef struct ivas_mc_paramupmix_dec_data_structure +{ + int16_t num_freq_bands; + ivas_td_decorr_state_t *hTdDecorr[MC_PARAMUPMIX_COMBINATIONS]; + float alphas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + float betas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + float alpha_prev[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + float beta_prev[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + int32_t alpha_quant[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + int32_t beta_quant[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + bool first_frame; + float *pcm_delay[MC_PARAMUPMIX_MAX_TRANSPORT_CHANS]; + +} MC_PARAMUPMIX_DEC_DATA, *MC_PARAMUPMIX_DEC_HANDLE; /*------------------------------------------------------------------------------------------* * SPAR decoder structures *------------------------------------------------------------------------------------------*/ @@ -806,8 +857,10 @@ typedef struct ivas_spar_md_dec_state_t int16_t table_idx; int16_t dtx_vad; int16_t spar_hoa_md_flag; - float smooth_buf[IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS][2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1]; - float smooth_fac[IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; + int16_t spar_hoa_dirac2spar_md_flag; + int16_t HOA_md_ind[IVAS_SPAR_MAX_CH]; + float smooth_buf[IVAS_MAX_NUM_BANDS][2 * SBA_DIRAC_NRG_SMOOTH_LONG + 1]; + float smooth_fac[IVAS_MAX_NUM_BANDS]; float mixer_mat_prev2[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; } ivas_spar_md_dec_state_t; @@ -860,6 +913,14 @@ typedef struct ivas_spar_dec_lib_t int16_t numOutChannels; int16_t pca_ingest_channels; #endif +#ifdef JBM_TSM_ON_TCS + int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; + int16_t render_to_md_map[MAX_JBM_CLDFB_TIMESLOTS]; + int16_t nb_subframes; + int16_t subframes_rendered; + int16_t slots_rendered; + int16_t num_slots; +#endif } SPAR_DEC_DATA, *SPAR_DEC_HANDLE; @@ -1029,7 +1090,12 @@ typedef struct vbap_data_structure typedef struct renderer_struct { float prev_gains[MAX_CICP_CHANNELS - 1][MAX_OUTPUT_CHANNELS]; +#ifdef JBM_TSM_ON_TCS + float *interpolator; + float gains[MAX_CICP_CHANNELS - 1][MAX_OUTPUT_CHANNELS]; +#else float interpolator[L_FRAME48k]; +#endif } ISM_RENDERER_DATA, *ISM_RENDERER_HANDLE; @@ -1142,17 +1208,48 @@ typedef struct decoder_config_structure int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ int16_t Opt_Headrotation; /* indicates whether head-rotation is used */ int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ - int16_t orientation_tracking; /* indicates orientation tracking type */ - float no_diegetic_pan; - int16_t Opt_AMR_WB; /* flag indicating AMR-WB IO mode */ +#ifdef FIX_439_OTR_PARAMS + HEAD_ORIENT_TRK_T orientation_tracking; /* indicates orientation tracking type */ +#else + int16_t orientation_tracking; /* indicates orientation tracking type */ +#endif + int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */ + float non_diegetic_pan_gain; /* non diegetic panning gain*/ + int16_t Opt_AMR_WB; /* flag indicating AMR-WB IO mode */ /* temp. development parameters */ #ifdef DEBUGGING int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */ #endif +#ifdef JBM_TSM_ON_TCS + int16_t voip_active; +#endif } DECODER_CONFIG, *DECODER_CONFIG_HANDLE; + +#ifdef JBM_TSM_ON_TCS +typedef struct decoder_tc_buffer_structure +{ + float *tc_buffer; /* the buffer itself */ + float *tc[MAX_TRANSPORT_CHANNELS]; /* pointers into the buffer to the beginning of each tc */ + TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ + int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ + int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ + int16_t nchan_buffer_full; /* number of channels to be fully buffered */ + int16_t n_samples_available; /* samples still available for rendering in the current frame */ + int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ + int16_t n_samples_rendered; /* samples already rendered in the current frame */ + int16_t n_samples_granularity; /* render granularity */ + int16_t n_samples_flushed; + int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; + int16_t nb_subframes; + int16_t subframes_rendered; + int16_t slots_rendered; + int16_t num_slots; + int16_t n_samples_discard; /* number of samples to discard from the beginning of the output */ +} DECODER_TC_BUFFER, *DECODER_TC_BUFFER_HANDLE; +#endif /*----------------------------------------------------------------------------------* * * Main IVAS decoder structure @@ -1204,6 +1301,7 @@ typedef struct Decoder_Struct IVAS_QMETADATA_HANDLE hQMetaData; /* q_metadata handle */ MCT_DEC_HANDLE hMCT; /* MCT handle */ PARAM_MC_DEC_HANDLE hParamMC; /* Parametric MC handle */ + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; /* MC Param-Upmix handle */ MASA_DECODER_HANDLE hMasa; /* MASA handle */ LFE_DEC_HANDLE hLFE; /* LFE handle */ @@ -1246,6 +1344,10 @@ typedef struct Decoder_Struct int16_t ism_extmeta_active; /* Extended metadata active in decoder */ int16_t ism_extmeta_cnt; /* Change frame counter for extended metadata */ + +#ifdef JBM_TSM_ON_TCS + DECODER_TC_BUFFER_HANDLE hTcBuffer; +#endif } Decoder_Struct; /* clang-format on */ diff --git a/lib_dec/ivas_stereo_cng_dec.c b/lib_dec/ivas_stereo_cng_dec.c index 2e31375996857b5ea68e38c8d90cb5b41793cfd8..c12498c015e6a9d54b79278ec89f36c8bacbf6c7 100644 --- a/lib_dec/ivas_stereo_cng_dec.c +++ b/lib_dec/ivas_stereo_cng_dec.c @@ -90,12 +90,7 @@ void stereo_dft_dec_sid_coh( int16_t bits_tmp; int16_t b; -#ifdef FIX_418_SID_BITRATE nr_of_sid_stereo_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; -#else - /* TODO: still use old number of bits to keep bitexactness in output */ - nr_of_sid_stereo_bits = ( 4400 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; -#endif /* If the coherence is not encoded due to lack of bits set alpha to zero which leads to that the coherence */ /* from the previous frame is used. */ @@ -178,9 +173,6 @@ void stereo_dft_dec_sid_coh( ( *nb_bits )++; } -#ifndef FIX_418_SID_BITRATE - dtx_read_padding_bits( st, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC ); -#endif return; } diff --git a/lib_dec/ivas_stereo_dft_dec.c b/lib_dec/ivas_stereo_dft_dec.c index 08ca989f3d4a4f4a82ae02805682b96132513da3..02fd3a41d309f7237c43b7b07fbdc7b71ca36838 100644 --- a/lib_dec/ivas_stereo_dft_dec.c +++ b/lib_dec/ivas_stereo_dft_dec.c @@ -1131,6 +1131,10 @@ void stereo_dft_dec( const int16_t cross_fade_start_offset, /* i : SPAR mixer delay compensation */ const int32_t output_Fs, /* i : Fs for delay calculation */ const int16_t nchan_transport /* i : number of transpor channels */ +#ifdef FIX_STEREO_474 + , + const int16_t num_md_sub_frames /* i: number of MD subframes */ +#endif ) { int16_t i, k, b, N_div, stop; @@ -1208,7 +1212,12 @@ void stereo_dft_dec( ivas_sba_dirac_stereo_smooth_parameters( hStereoDft, hMdDec, cross_fade_start_offset, - output_Fs ); + output_Fs +#ifdef FIX_STEREO_474 + , + num_md_sub_frames +#endif + ); } else { @@ -1596,11 +1605,7 @@ void stereo_dft_dec( if ( hStereoDft->frame_sid_nodata || st0->VAD == 0 ) { -#ifdef FIX_I414_OOA_CNA hFdCngDec->cna_band_limits[hFdCngDec->cna_nbands] = hStereoDft->band_limits[hFdCngDec->cna_nbands]; -#else - hFdCngDec->cna_band_limits[b] = hStereoDft->band_limits[hFdCngDec->cna_nbands]; -#endif } if ( hStereoDft->frame_sid_nodata && !sba_dirac_stereo_flag ) diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c index 0e788a0821103ce0b6b3e1c8a3891fb9579e3f29..efc9ebe845d7fffafea2ff96565a9f82de09aa64 100644 --- a/lib_dec/ivas_stereo_mdct_stereo_dec.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c @@ -468,14 +468,7 @@ ivas_error initMdctStereoDtxData( /* Init FD-CNG */ initFdCngDec( st ); -#ifndef FIX_413_SBA_DTX - if ( ch == 1 && st->cng_sba_flag ) - { - st->hFdCngDec->hFdCngCom->seed += 3; - } -#endif } -#ifdef FIX_413_SBA_DTX if ( st->first_CNG == 0 ) { if ( ch == 1 && st->cng_sba_flag ) @@ -483,7 +476,6 @@ ivas_error initMdctStereoDtxData( st->hFdCngDec->hFdCngCom->seed += 3; } } -#endif if ( st->cldfbAna == NULL ) { diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c index 0a436ec0d28eec23fc6ba6d080122ca92bbbed81..88d82ac17b8d7732c94bd2260191d40e91185d3b 100644 --- a/lib_dec/ivas_stereo_switching_dec.c +++ b/lib_dec/ivas_stereo_switching_dec.c @@ -963,7 +963,7 @@ ivas_error stereo_memory_dec( if ( ivas_format == MC_FORMAT && hCPE->element_mode == IVAS_CPE_MDCT ) { - if ( mc_mode == MC_MODE_MCT ) + if ( mc_mode == MC_MODE_MCT || mc_mode == MC_MODE_PARAMUPMIX ) { /* deallocate the FdCNG handle */ for ( i = 0; i < CPE_CHANNELS; ++i ) diff --git a/lib_dec/jbm_jb4sb.h b/lib_dec/jbm_jb4sb.h index 54b873b006b1c9532794cae661a7f3c2aea031ad..7954358595a32c3dceff516f4a04a87c73b09648 100644 --- a/lib_dec/jbm_jb4sb.h +++ b/lib_dec/jbm_jb4sb.h @@ -78,6 +78,14 @@ struct JB4_DATAUNIT int16_t nextCoderType; }; +#ifdef JBM_TSM_ON_TCS +typedef enum +{ + JBM_RENDERER_NONE, + JBM_RENDERER_IVAS, +} JBM_RENDERER_TYPE; +#endif + typedef struct JB4_DATAUNIT *JB4_DATAUNIT_HANDLE; diff --git a/lib_dec/jbm_pcmdsp_apa.c b/lib_dec/jbm_pcmdsp_apa.c index c816a9d9c8b4fadbea3da7e1ccb7061dbc4cd677..c224b4cfbf011792e21bb1e621f096553d11dbbb 100644 --- a/lib_dec/jbm_pcmdsp_apa.c +++ b/lib_dec/jbm_pcmdsp_apa.c @@ -66,7 +66,12 @@ struct apa_state_t { /* output buffer */ +#ifdef JBM_TSM_ON_TCS + bool evs_compat_mode; + float *buf_out; +#else int16_t *buf_out; +#endif uint16_t buf_out_capacity; uint16_t l_buf_out; @@ -86,6 +91,14 @@ struct apa_state_t /* total number of processed input samples since apa_reset() */ uint32_t l_in_total; +#ifdef JBM_TSM_ON_TCS + /* time resolution in samples of the IVAS renderer*/ + uint16_t l_ts; + + /* samples already available in the renderer buffer */ + uint16_t l_r_buf; +#endif + /* sum of inserted/removed samples since last apa_set_scale() */ int32_t diffSinceSetScale; /* number of input frames since last apa_set_scale() */ @@ -123,6 +136,17 @@ static float apa_corrEnergy2dB( float energy, uint16_t corr_len ); static float apa_getQualityIncreaseForLowEnergy( float energydB ); +#ifdef JBM_TSM_ON_TCS +static bool logarithmic_search( const apa_state_t *ps, const float *signal, int16_t s_start, uint16_t inlen, uint16_t offset, uint16_t fixed_pos, uint16_t corr_len, uint16_t wss, uint16_t css, int16_t *synchpos ); + +static bool find_synch( apa_state_t *ps, const float *in, uint16_t l_in, int16_t s_start, uint16_t s_len, int16_t fixed_pos, uint16_t corr_len, uint16_t offset, float *energy, float *quality, int16_t *synch_pos ); + +static bool copy_frm( apa_state_t *ps, const float frm_in[], float frm_out[], uint16_t *l_frm_out ); + +static bool shrink_frm( apa_state_t *ps, const float frm_in[], uint16_t maxScaling, float frm_out[], uint16_t *l_frm_out ); + +static bool extend_frm( apa_state_t *ps, const float frm_in[], float frm_out[], uint16_t *l_frm_out ); +#else static bool logarithmic_search( const apa_state_t *ps, const int16_t *signal, int16_t s_start, uint16_t inlen, uint16_t offset, uint16_t fixed_pos, uint16_t corr_len, uint16_t wss, uint16_t css, int16_t *synchpos ); static bool find_synch( apa_state_t *ps, const int16_t *in, uint16_t l_in, int16_t s_start, uint16_t s_len, int16_t fixed_pos, uint16_t corr_len, uint16_t offset, float *energy, float *quality, int16_t *synch_pos ); @@ -132,7 +156,7 @@ static bool copy_frm( apa_state_t *ps, const int16_t frm_in[], int16_t frm_out[] static bool shrink_frm( apa_state_t *ps, const int16_t frm_in[], uint16_t maxScaling, int16_t frm_out[], uint16_t *l_frm_out ); static bool extend_frm( apa_state_t *ps, const int16_t frm_in[], int16_t frm_out[], uint16_t *l_frm_out ); - +#endif /*---------------------------------------------------------------------* * Public functions @@ -164,6 +188,10 @@ ivas_error apa_init( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM\n" ) ); } +#ifdef JBM_TSM_ON_TCS + ps->evs_compat_mode = false; +#endif + apa_reset( ps ); *pps = ps; @@ -196,9 +224,58 @@ void apa_reset( ps->bad_frame_count = 0; ps->good_frame_count = 0; +#ifdef JBM_TSM_ON_TCS + ps->l_ts = 1; + ps->l_r_buf = 0; +#endif return; } +#ifdef JBM_TSM_ON_TCS +uint8_t apa_reconfigure( + apa_state_t *ps, + uint16_t num_channels, + uint16_t l_ts ) +{ + + /* realloc buffer */ + free( ps->buf_out ); + ps->num_channels = (uint16_t) num_channels; + ps->buf_out_capacity = (uint16_t) ( APA_BUF_PER_CHANNEL * num_channels ); + ps->buf_out = (float *) malloc( sizeof( float ) * ps->buf_out_capacity ); + if ( !ps->buf_out ) + { + return 2; + } + ps->l_buf_out = 0; + ps->l_in_total = 0; + ps->l_ts = ps->num_channels * l_ts; + + /* set everything else dependent on the number of channels */ + /* set segment size */ + /* in the order of a pitch, set to 160 samples at 16 kHz */ + /* used for windowing and as the correlation length, i.e., */ + /* the size of the template segment. */ + ps->l_seg = ( ps->rate / 100 ) * ps->num_channels; + + /* set frame size */ + /* set to 320 samples at 16 kHz */ + ps->l_frm = ( ps->rate / FRAMES_PER_SEC ) * ps->num_channels; + + /* set minimum pitch */ + /* set to 40 samples at 16 kHz */ + /* (defines min change in number of samples, i.e., abs(l_in-l_out) >= p_min) */ + ps->p_min = ( ps->rate / 400 ) * ps->num_channels; + + /* set search length */ + /* must cover one pitch, set to 200 samples at 16 kHz */ + /* (the resulting maximum pitch is then p_min+l_search = 240 samples at 16 kHz) */ + ps->l_search = ( ps->rate / 80 ) * ps->num_channels; + + return 0; +} + +#endif /* Sets the audio configuration. */ bool apa_set_rate( @@ -302,6 +379,52 @@ bool apa_set_scale( return 0; } +#ifdef JBM_TSM_ON_TCS +bool apa_set_renderer_granularity( + apa_state_t *ps, + uint16_t l_ts ) +{ + /* make sure pointer is valid */ + if ( ps == NULL ) + { + return 1; + } + + + /* copy to state struct */ + ps->l_ts = l_ts * ps->num_channels; + return 0; +} + +bool apa_set_renderer_residual_samples( + apa_state_t *ps, + uint16_t l_r_buf ) +{ + /* make sure pointer is valid */ + if ( ps == NULL ) + { + return 1; + } + + + /* copy to state struct */ + ps->l_r_buf = l_r_buf * ps->num_channels; + return 0; +} + +bool apa_set_evs_compat_mode( apa_state_t *ps, bool mode ) +{ + /* make sure pointer is valid */ + if ( ps == NULL ) + { + return 1; + } + + ps->evs_compat_mode = mode; + + return 0; +} +#endif /* ******************************************************************************** @@ -454,16 +577,28 @@ bool apa_exit( ******************************************************************************** */ uint8_t apa_exec( - apa_state_t *ps, /* i/o: state struct */ - const int16_t a_in[], /* i : input samples */ - uint16_t l_in, /* i : number of input samples */ - uint16_t maxScaling, /* i : allowed number of inserted/removed samples */ - int16_t a_out[], /* o : output samples */ - uint16_t *l_out /* o : number of output samples */ + apa_state_t *ps, /* i/o: state struct */ +#ifdef JBM_TSM_ON_TCS + const float a_in[], /* i : input samples */ +#else + const int16_t a_in[], /* i : input samples */ +#endif + uint16_t l_in, /* i : number of input samples */ + uint16_t maxScaling, /* i : allowed number of inserted/removed samples */ +#ifdef JBM_TSM_ON_TCS + float a_out[], /* o : output samples */ +#else + int16_t a_out[], /* o : output samples */ +#endif + uint16_t *l_out /* o : number of output samples */ ) { uint16_t i; +#ifdef JBM_TSM_ON_TCS + float frm_in[APA_BUF]; /* TODO(mcjbm): this buffer could be smaller - always allocates space for 16 channels */ +#else int16_t frm_in[APA_BUF]; /* TODO(mcjbm): this buffer could be smaller - always allocates space for 16 channels */ +#endif uint16_t l_frm_out; int16_t l_rem; int32_t dl_scaled, dl_copied, l_frm_out_target; @@ -525,8 +660,13 @@ uint8_t apa_exec( } else { +#ifdef JBM_TSM_ON_TCS + float *buf_out_ptr = &( ps->buf_out[ps->l_buf_out - ps->l_frm] ); + float *frm_in_ptr = &( frm_in[ps->l_frm] ); +#else int16_t *buf_out_ptr = &( ps->buf_out[ps->l_buf_out - ps->l_frm] ); int16_t *frm_in_ptr = &( frm_in[ps->l_frm] ); +#endif /* fill input frame */ /* 1st input frame: previous output samples */ @@ -581,8 +721,13 @@ uint8_t apa_exec( /* discard old samples; always keep at least most recent l_frm samples */ if ( ( ps->l_buf_out + l_frm_out ) > ps->buf_out_capacity ) { +#ifdef JBM_TSM_ON_TCS + float *buf_out_ptr1 = ps->buf_out; + float *buf_out_ptr2; +#else int16_t *buf_out_ptr1 = ps->buf_out; int16_t *buf_out_ptr2; +#endif l_rem = ( ps->l_frm - l_frm_out ); if ( l_rem < 0 ) @@ -602,7 +747,11 @@ uint8_t apa_exec( return 5; } { +#ifdef JBM_TSM_ON_TCS + float *buf_out_ptr = &( ps->buf_out[ps->l_buf_out] ); +#else int16_t *buf_out_ptr = &( ps->buf_out[ps->l_buf_out] ); +#endif for ( i = 0; i < l_frm_out; i++ ) { buf_out_ptr[i] = a_out[i]; @@ -660,7 +809,11 @@ uint8_t apa_exec( */ static void get_scaling_quality( const apa_state_t *ps, +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else const int16_t *signal, +#endif uint16_t s_len, uint16_t offset, uint16_t corr_len, @@ -813,7 +966,11 @@ static float apa_getQualityIncreaseForLowEnergy( */ static bool logarithmic_search( const apa_state_t *ps, +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else const int16_t *signal, +#endif int16_t s_start, uint16_t inlen, uint16_t offset, @@ -926,7 +1083,11 @@ static bool logarithmic_search( */ static bool find_synch( apa_state_t *ps, +#ifdef JBM_TSM_ON_TCS + const float *in, +#else const int16_t *in, +#endif uint16_t l_in, int16_t s_start, uint16_t s_len, @@ -981,8 +1142,13 @@ static bool find_synch( */ static bool copy_frm( apa_state_t *ps, +#ifdef JBM_TSM_ON_TCS + const float frm_in[], + float frm_out[], +#else const int16_t frm_in[], int16_t frm_out[], +#endif uint16_t *l_frm_out ) { uint16_t i; @@ -1029,9 +1195,17 @@ static bool copy_frm( */ static bool shrink_frm( apa_state_t *ps, +#ifdef JBM_TSM_ON_TCS + const float frm_in[], +#else const int16_t frm_in[], +#endif uint16_t maxScaling, +#ifdef JBM_TSM_ON_TCS + float frm_out[], +#else int16_t frm_out[], +#endif uint16_t *l_frm_out ) { bool findSynchResult = 0; @@ -1062,7 +1236,28 @@ static bool shrink_frm( /* maximum scaling */ energy = -65; quality = 5; - if ( maxScaling != 0U && s_end > maxScaling + 1 ) +#ifdef JBM_TSM_ON_TCS + if ( ps->evs_compat_mode == false ) + { + + xtract = maxScaling; + /* take samples already in the renderer buf into account */ + xtract += ps->l_r_buf; + /* snap to renderer time slot borders */ + xtract -= ( ps->l_ts - ( l_frm - xtract + ps->l_r_buf ) % ps->l_ts ); + while ( xtract < 0 ) + { + xtract += ps->l_ts; + } + while ( xtract > ( s_end - ps->num_channels ) ) + { + /* exceeded the possible shrinking, go back one renderer ts*/ + xtract -= ps->l_ts; + } + } + else +#endif + if ( maxScaling != 0U && s_end > maxScaling + 1 ) { xtract = maxScaling; } @@ -1118,7 +1313,18 @@ static bool shrink_frm( { return 1; } - overlapAdd( frm_in, frm_in + xtract, frm_out, l_seg, ps->num_channels, ps->win + ps->l_halfwin, ps->win ); +#ifdef JBM_TSM_ON_TCS + if ( ps->evs_compat_mode == true ) + { + overlapAddEvs( frm_in, frm_in + xtract, frm_out, l_seg, ps->num_channels, ps->win + ps->l_halfwin, ps->win ); + } + else + { +#endif + overlapAdd( frm_in, frm_in + xtract, frm_out, l_seg, ps->num_channels, ps->win + ps->l_halfwin, ps->win ); +#ifdef JBM_TSM_ON_TCS + } +#endif } else { @@ -1165,8 +1371,13 @@ static bool shrink_frm( */ static bool extend_frm( apa_state_t *ps, +#ifdef JBM_TSM_ON_TCS + const float frm_in[], + float frm_out[], +#else const int16_t frm_in[], int16_t frm_out[], +#endif uint16_t *l_frm_out ) { bool findSynchResult = 0; @@ -1180,8 +1391,14 @@ static bool extend_frm( int16_t s_start = 0; float energy, quality = 0.0f; uint16_t l_frm, l_seg; +#ifdef JBM_TSM_ON_TCS + const float *fadeOut, *fadeIn; + float *out; +#else const int16_t *fadeOut, *fadeIn; int16_t *out; +#endif + l_frm = ps->l_frm; l_seg = ps->l_seg; @@ -1271,6 +1488,15 @@ static bool extend_frm( energy = -65; quality = 5; xtract[n] = s_start + ps->num_channels; +#ifdef JBM_TSM_ON_TCS + if ( ps->evs_compat_mode == false ) + { + /* take renderer buffer samples into accout */ + xtract[n] += ps->l_r_buf; + /* snap to next renderer time slot border to resynchronize */ + xtract[n] -= ( ( N - 1 ) * l_seg - xtract[n] + ps->l_r_buf ) % ps->l_ts; + } +#endif } else { @@ -1327,13 +1553,29 @@ static bool extend_frm( fadeOut = frm_in + l_frm + xtract[n - 1] + l_seg; fadeIn = frm_in + l_frm + xtract[n]; out = frm_out + ( n - 2 ) * l_seg; - overlapAdd( fadeOut, fadeIn, out, l_seg, ps->num_channels, ps->win + ps->l_halfwin, ps->win ); +#ifdef JBM_TSM_ON_TCS + if ( ps->evs_compat_mode == true ) + { + overlapAddEvs( fadeOut, fadeIn, out, l_seg, ps->num_channels, ps->win + ps->l_halfwin, ps->win ); + } + else + { +#endif + overlapAdd( fadeOut, fadeIn, out, l_seg, ps->num_channels, ps->win + ps->l_halfwin, ps->win ); +#ifdef JBM_TSM_ON_TCS + } +#endif } else { /* just copy down 1st half of current segment (= 2nd half of previous segment) */ +#ifdef JBM_TSM_ON_TCS + float *frm_out_ptr; + const float *frm_in_ptr; +#else int16_t *frm_out_ptr; const int16_t *frm_in_ptr; +#endif frm_out_ptr = &( frm_out[( n - 2 ) * l_seg] ); frm_in_ptr = &( frm_in[l_frm + xtract[n]] ); for ( i = 0; i < l_seg; i++ ) diff --git a/lib_dec/jbm_pcmdsp_apa.h b/lib_dec/jbm_pcmdsp_apa.h index 543042f53b4301789af0eabe9fddee082254c8fa..a5e7cb7d61ab0810bf36913fd761bc39946a8a00 100644 --- a/lib_dec/jbm_pcmdsp_apa.h +++ b/lib_dec/jbm_pcmdsp_apa.h @@ -114,12 +114,26 @@ bool apa_set_rate( apa_state_t *ps, const int32_t output_Fs ); * @return 0 on success, 1 on failure */ bool apa_set_scale( apa_state_t *s, uint16_t scale ); +#ifdef JBM_TSM_ON_TCS +bool apa_set_renderer_granularity( apa_state_t *ps, uint16_t l_ts ); + +bool apa_set_renderer_residual_samples( apa_state_t *ps, uint16_t l_r_buf ); + +bool apa_set_evs_compat_mode( apa_state_t *ps, bool mode ); + +uint8_t apa_reconfigure( apa_state_t *ps, uint16_t num_channels, uint16_t l_ts ); +#endif + bool apa_set_complexity_options( apa_state_t *s, uint16_t wss, uint16_t css ); bool apa_set_quality( apa_state_t *s, float quality, uint16_t qualityred, uint16_t qualityrise ); bool apa_exit( apa_state_t **s ); +#ifdef JBM_TSM_ON_TCS +uint8_t apa_exec( apa_state_t *s, const float a_in[], uint16_t l_in, uint16_t maxScaling, float a_out[], uint16_t *l_out ); +#else uint8_t apa_exec( apa_state_t *s, const int16_t a_in[], uint16_t l_in, uint16_t maxScaling, int16_t a_out[], uint16_t *l_out ); +#endif #endif /* JBM_PCMDSP_APA_H */ diff --git a/lib_dec/jbm_pcmdsp_fifo.c b/lib_dec/jbm_pcmdsp_fifo.c index 81e833e5e56fc3860b7045c6b97405e52b71ae15..fd0df04ca8efac158aade1d4d66085cd601da55c 100644 --- a/lib_dec/jbm_pcmdsp_fifo.c +++ b/lib_dec/jbm_pcmdsp_fifo.c @@ -116,6 +116,15 @@ ivas_error pcmdsp_fifo_init( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM\n" ) ); } +#ifdef DEBUGGING + { + uint32_t i; + for ( i = 0; i < nDataBytes; i++ ) + { + h->dataBegin[i] = 0; + } + } +#endif h->dataEnd = h->dataBegin + nDataBytes; h->dataWriteIterator = h->dataBegin; h->dataReadIterator = h->dataBegin; @@ -166,6 +175,49 @@ int16_t pcmdsp_fifo_write( return 0; } +#ifdef JBM_TSM_ON_TCS +/* Writes the given audio data to the FIFO. */ +int16_t pcmdsp_fifo_write_zero( + PCMDSP_FIFO_HANDLE h, + uint16_t nSamplesPerChannel ) +{ + uint16_t nBytesToWrite; + + /* check for empty input buffer */ + if ( nSamplesPerChannel == 0U ) + { + return 0; + } + + /* check, if enough space left */ + if ( nSamplesPerChannel > h->capacity - h->size ) + { + return -1; + } + + nBytesToWrite = nSamplesPerChannel * h->nBytesPerSampleSet; + if ( h->dataWriteIterator + nBytesToWrite > h->dataEnd ) + { + /* wrap around: writing two parts */ + uint16_t bytesOfFirstPart, secondSize; + bytesOfFirstPart = (uint16_t) ( h->dataEnd - h->dataWriteIterator ); + secondSize = nBytesToWrite - bytesOfFirstPart; + set_c( (int8_t *) h->dataWriteIterator, 0, bytesOfFirstPart ); + set_c( (int8_t *) h->dataBegin, 0, secondSize ); + h->dataWriteIterator = h->dataBegin + secondSize; + } + else + { + /* no wrap around: simple write */ + set_c( (int8_t *) h->dataWriteIterator, 0, nBytesToWrite ); + h->dataWriteIterator += nBytesToWrite; + } + h->size += nSamplesPerChannel; + + return 0; +} +#endif + /* Reads the given number of audio samples from the FIFO. */ int16_t pcmdsp_fifo_read( PCMDSP_FIFO_HANDLE h, diff --git a/lib_dec/jbm_pcmdsp_fifo.h b/lib_dec/jbm_pcmdsp_fifo.h index 13ffd146f871fb1b4d7c227b965a1931ba2f1e11..e6c64dc9e8e7b5cbeaa1c51f3f1ecda1cdc1f434 100644 --- a/lib_dec/jbm_pcmdsp_fifo.h +++ b/lib_dec/jbm_pcmdsp_fifo.h @@ -73,6 +73,9 @@ void pcmdsp_fifo_destroy( PCMDSP_FIFO_HANDLE *ph ); ivas_error pcmdsp_fifo_init( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel, uint16_t nChannels, uint16_t nBytesPerSample ); int16_t pcmdsp_fifo_write( PCMDSP_FIFO_HANDLE h, const uint8_t *samples, uint16_t nSamplesPerChannel ); +#ifdef JBM_TSM_ON_TCS +int16_t pcmdsp_fifo_write_zero( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel ); +#endif int16_t pcmdsp_fifo_read( PCMDSP_FIFO_HANDLE h, uint16_t nSamplesPerChannel, uint8_t *samples ); diff --git a/lib_dec/jbm_pcmdsp_similarityestimation.c b/lib_dec/jbm_pcmdsp_similarityestimation.c index f575acc7ad337f77ac81495ec36340ce1ce2ef49..e83d1f7c3769ff944fd751760a0b61bc1b301f70 100644 --- a/lib_dec/jbm_pcmdsp_similarityestimation.c +++ b/lib_dec/jbm_pcmdsp_similarityestimation.c @@ -52,7 +52,11 @@ /* Calculates cross correlation coefficient for template segment. */ float cross_correlation_self( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else const int16_t *signal, +#endif uint16_t x, uint16_t y, uint16_t corr_len ) @@ -63,7 +67,11 @@ float cross_correlation_self( c_c = 0.0f; for ( j = 0; j < corr_len; j++ ) { +#ifdef JBM_TSM_ON_TCS + c_c += ( signal[j + x] * signal[j + y] ); +#else c_c += ( (float) signal[j + x] * (float) signal[j + y] ); +#endif } return c_c; @@ -71,7 +79,11 @@ float cross_correlation_self( /* Calculates cross correlation coefficient for template segment. */ float cross_correlation_subsampled_self( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else const int16_t *signal, +#endif uint16_t x, uint16_t y, uint16_t corr_len, @@ -83,7 +95,11 @@ float cross_correlation_subsampled_self( c_c = 0.0f; for ( j = 0; j < corr_len; j += subsampling ) { +#ifdef JBM_TSM_ON_TCS + c_c += ( signal[j + x] * signal[j + y] ); +#else c_c += ( (float) signal[j + x] * (float) signal[j + y] ); +#endif } return c_c; @@ -92,7 +108,11 @@ float cross_correlation_subsampled_self( /* Calculates normalized cross correlation coefficient for template segment. */ float normalized_cross_correlation_self( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else const int16_t *signal, +#endif uint16_t x, uint16_t y, uint16_t corr_len, @@ -102,7 +122,11 @@ float normalized_cross_correlation_self( float c_c; float energy_xy, energy_x, energy_y; uint16_t j; +#ifdef JBM_TSM_ON_TCS + const float *signal_a, *signal_b; +#else const int16_t *signal_a, *signal_b; +#endif c_c = 0.0f; energy_x = 0.0f; @@ -111,11 +135,21 @@ float normalized_cross_correlation_self( signal_b = &signal[y]; for ( j = 0; j < corr_len; j += subsampling ) { +#ifdef JBM_TSM_ON_TCS + c_c += ( signal_a[j] * signal_b[j] ); + energy_x += ( signal_a[j] ) * ( signal_a[j] ); + energy_y += ( signal_b[j] ) * ( signal_b[j] ); +#else c_c += ( (float) signal_a[j] * (float) signal_b[j] ); energy_x += ( (float) signal_a[j] ) * ( (float) signal_a[j] ); energy_y += ( (float) signal_b[j] ) * ( (float) signal_b[j] ); +#endif } +#ifdef JBM_TSM_ON_TCS + energy_xy = sqrtf( energy_x * energy_y ); +#else energy_xy = (float) sqrt( (float) energy_x * (float) energy_y ); +#endif if ( energy_xy < 1.0f ) { energy_xy = 1.0f; /* conceal silent frames */ @@ -130,7 +164,11 @@ float normalized_cross_correlation_self( /* Splits the signal into segments and checks if all of them have very low energy. */ bool isSilence( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else const int16_t *signal, +#endif uint32_t len, uint32_t segments ) { @@ -145,7 +183,11 @@ bool isSilence( if ( ( i != 0U && i % samplesPerSegment == 0U ) || i + 1 == len ) { /* check energy of current segment */ +#ifdef JBM_TSM_ON_TCS + energy = 10 * log10f( energy / (float) samplesPerSegment ); +#else energy = 10 * (float) log10( energy / samplesPerSegment ); +#endif if ( energy > -65 ) { return false; diff --git a/lib_dec/jbm_pcmdsp_similarityestimation.h b/lib_dec/jbm_pcmdsp_similarityestimation.h index 4dc92f27b7cff9320280124d17733c6d6f7feabc..44b4fd246a4d9881550107196c374923284a15c7 100644 --- a/lib_dec/jbm_pcmdsp_similarityestimation.h +++ b/lib_dec/jbm_pcmdsp_similarityestimation.h @@ -67,7 +67,15 @@ * ******************************************************************************** */ -float cross_correlation_self( const int16_t *signal, uint16_t x, uint16_t y, uint16_t corr_len ); +float cross_correlation_self( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else + const int16_t *signal, +#endif + uint16_t x, + uint16_t y, + uint16_t corr_len ); /* ******************************************************************************** @@ -94,7 +102,16 @@ float cross_correlation_self( const int16_t *signal, uint16_t x, uint16_t y, uin * ******************************************************************************** */ -float cross_correlation_subsampled_self( const int16_t *signal, uint16_t x, uint16_t y, uint16_t corr_len, uint16_t subsampling ); +float cross_correlation_subsampled_self( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else + const int16_t *signal, +#endif + uint16_t x, + uint16_t y, + uint16_t corr_len, + uint16_t subsampling ); /* ******************************************************************************** @@ -132,9 +149,26 @@ float cross_correlation_subsampled_self( const int16_t *signal, uint16_t x, uint * ******************************************************************************** */ -float normalized_cross_correlation_self( const int16_t *signal, uint16_t x, uint16_t y, uint16_t corr_len, uint16_t subsampling, float *energy ); +float normalized_cross_correlation_self( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else + const int16_t *signal, +#endif + uint16_t x, + uint16_t y, + uint16_t corr_len, + uint16_t subsampling, + float *energy ); /* Splits the signal into segments and checks if all of them have very low energy. */ -bool isSilence( const int16_t *signal, uint32_t len, uint32_t segments ); +bool isSilence( +#ifdef JBM_TSM_ON_TCS + const float *signal, +#else + const int16_t *signal, +#endif + uint32_t len, + uint32_t segments ); #endif /* JBM_PCMDSP_SIMILARITYESTIMATION_H */ diff --git a/lib_dec/jbm_pcmdsp_window.c b/lib_dec/jbm_pcmdsp_window.c index f9f71ac802093d4a0b8dbfcab05d43895dae989d..a31d368c9119d1d35361c9657998fba14d24dff5 100644 --- a/lib_dec/jbm_pcmdsp_window.c +++ b/lib_dec/jbm_pcmdsp_window.c @@ -80,9 +80,15 @@ void hannWindow( *-----------------------------------------------------------------------*/ void overlapAdd( +#ifdef JBM_TSM_ON_TCS + const float *fadeOut, + const float *fadeIn, + float *out, +#else const int16_t *fadeOut, const int16_t *fadeIn, int16_t *out, +#endif uint16_t n, uint16_t nChannels, const float *fadeOutWin, @@ -90,7 +96,11 @@ void overlapAdd( { float fdOutVal, fdInVal; int16_t i, j, hannIter; +#ifdef JBM_TSM_ON_TCS + float combinedVal; +#else int32_t combinedVal; +#endif for ( j = 0; j < nChannels; j++ ) { @@ -101,8 +111,11 @@ void overlapAdd( fdOutVal = fadeOut[i] * fadeOutWin[hannIter]; fdInVal = fadeIn[i] * fadeInWin[hannIter]; /* round combinedVal value (taking care of sign) */ +#ifdef JBM_TSM_ON_TCS + combinedVal = fdInVal + fdOutVal; + out[i] = combinedVal; +#else combinedVal = (int32_t) ( ( fdInVal + fdOutVal ) + 0.5 ); - if ( fdInVal + fdOutVal < 0.0 ) { combinedVal = (int32_t) ( ( fdInVal + fdOutVal ) - 0.5 ); @@ -117,7 +130,57 @@ void overlapAdd( { combinedVal = MIN16B; } + out[i] = (int16_t) combinedVal; +#endif + hannIter++; + } + } + + return; +} + +void overlapAddEvs( + const float *fadeOut, + const float *fadeIn, + float *out, + uint16_t n, + uint16_t nChannels, + const float *fadeOutWin, + const float *fadeInWin ) +{ + float fdOutVal, fdInVal; + int16_t i, j, hannIter; + float combinedVal; + + for ( j = 0; j < nChannels; j++ ) + { + /* reset Hann window iterator to beginning (both channels use same window) */ + hannIter = 0; + for ( i = j; i < n; i += nChannels ) + { + fdOutVal = fadeOut[i] * fadeOutWin[hannIter]; + fdInVal = fadeIn[i] * fadeInWin[hannIter]; + /* round combinedVal value (taking care of sign) */ + + combinedVal = floorf( ( fdInVal + fdOutVal ) + 0.5f ); + if ( fdInVal + fdOutVal < 0.0 ) + { + combinedVal = ceilf( ( fdInVal + fdOutVal ) - 0.5f ); + } + + /* saturate value */ + if ( combinedVal > MAX16B_FLT ) + { + combinedVal = MAX16B_FLT; + } + else if ( combinedVal < MIN16B_FLT ) + { + combinedVal = MIN16B_FLT; + } + + out[i] = combinedVal; + hannIter++; } } diff --git a/lib_dec/jbm_pcmdsp_window.h b/lib_dec/jbm_pcmdsp_window.h index 67759e97384d759c2666f260eb2fd0754afe1326..8c1823867a8fa5d614b1d73c64a0ff6cb4c06cca 100644 --- a/lib_dec/jbm_pcmdsp_window.h +++ b/lib_dec/jbm_pcmdsp_window.h @@ -61,6 +61,10 @@ void hannWindow( uint16_t n, float *w ); * @param[in] nChannels number of channels * @param[in] fadeOutWin window for fade out * @param[in] fadeInWin window for fade in */ +#ifdef JBM_TSM_ON_TCS +void overlapAdd( const float *fadeOut, const float *fadeIn, float *out, uint16_t n, uint16_t nChannels, const float *fadeOutWin, const float *fadeInWin ); +void overlapAddEvs( const float *fadeOut, const float *fadeIn, float *out, uint16_t n, uint16_t nChannels, const float *fadeOutWin, const float *fadeInWin ); +#else void overlapAdd( const int16_t *fadeOut, const int16_t *fadeIn, int16_t *out, uint16_t n, uint16_t nChannels, const float *fadeOutWin, const float *fadeInWin ); - +#endif #endif /* JBM_PCMDSP_WINDOW_H */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index ee315bf399d5b22f8ed7716a4d41e6fbe988cdec..996e2afc19804702e956dcf1ed9a19172ef037a6 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -54,11 +54,27 @@ struct IVAS_DEC_VOIP uint16_t nSamplesFrame; /* Total number of samples in a frame (includes number of channels) */ JB4_HANDLE hJBM; PCMDSP_APA_HANDLE hTimeScaler; - PCMDSP_FIFO_HANDLE hFifoAfterTimeScaler; uint16_t lastDecodedWasActive; - int16_t *apaExecBuffer; /* Buffer for APA scaling */ +#ifdef JBM_TSM_ON_TCS + float *apaExecBuffer; /* Buffer for APA scaling */ +#else + int16_t *apaExecBuffer; /* Buffer for APA scaling */ +#endif JB4_DATAUNIT_HANDLE hCurrentDataUnit; /* Points to the currently processed data unit */ uint16_t *bs_conversion_buf; /* Buffer for bitstream conversion from packed to serial */ +#ifdef VARIABLE_SPEED_DECODING + uint8_t mode; + uint16_t speedFac; + bool needNewFrame; +#endif +#ifdef JBM_TSM_ON_TCS + JBM_RENDERER_TYPE rendererType; + PCMDSP_FIFO_HANDLE hFifoOut; + uint8_t nTransportChannelsOld; + uint16_t nSamplesAvailableNext; +#else + PCMDSP_FIFO_HANDLE hFifoAfterTimeScaler; +#endif #ifdef SUPPORT_JBM_TRACEFILE IVAS_JBM_TRACE_DATA JbmTraceData; #endif @@ -93,10 +109,26 @@ static void IVAS_DEC_Close_VoIP( IVAS_DEC_VOIP *hVoIP ); #ifdef SUPPORT_JBM_TRACEFILE static void store_JbmData( IVAS_DEC_VOIP *hVoIP, JB4_DATAUNIT_HANDLE dataUnit, const uint32_t systemTimestamp_ms, const uint16_t extBufferedSamples, const int32_t output_Fs ); #endif +#ifdef JBM_TSM_ON_TCS +static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, float *floatBuf, int16_t *pcmBuf ); +#else static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, int16_t *pcmBuf ); +#endif static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled ); -static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig, const int16_t orientation_tracking, const float no_diegetic_pan ); - +#ifdef FIX_439_OTR_PARAMS +static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig ); +#else +static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig, const int16_t orientation_tracking ); +#endif +#ifdef JBM_TSM_ON_TCS +static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ); +static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ); +static ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ); +static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, int16_t *data ); +static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples ); +static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *pcmBuf ); +static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext, int16_t *pcmBuf ); +#endif /*---------------------------------------------------------------------* * IVAS_DEC_Open() @@ -106,10 +138,13 @@ static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig, const int /* may return an error but may still have allocated memory - thus run Close also in case of error to release memory */ ivas_error IVAS_DEC_Open( - IVAS_DEC_HANDLE *phIvasDec, /* i/o: pointer to an IVAS decoder handle to be opened */ - const IVAS_DEC_MODE mode, /* i : compatibility mode (EVS or IVAS) */ - const int16_t orientation_tracking, /* i : orientation tracking type */ - float no_diegetic_pan ) + IVAS_DEC_HANDLE *phIvasDec, /* i/o: pointer to an IVAS decoder handle to be opened */ + const IVAS_DEC_MODE mode /* i : compatibility mode (EVS or IVAS) */ +#ifndef FIX_439_OTR_PARAMS + , + const int16_t orientation_tracking /* i : orientation tracking type */ +#endif +) { IVAS_DEC_HANDLE hIvasDec; Decoder_Struct *st_ivas; @@ -162,8 +197,11 @@ ivas_error IVAS_DEC_Open( st_ivas = hIvasDec->st_ivas; /* initialize Decoder Config. handle */ - init_decoder_config( hIvasDec->st_ivas->hDecoderConfig, orientation_tracking, no_diegetic_pan ); - +#ifdef FIX_439_OTR_PARAMS + init_decoder_config( hIvasDec->st_ivas->hDecoderConfig ); +#else + init_decoder_config( hIvasDec->st_ivas->hDecoderConfig, orientation_tracking ); +#endif /* initialize pointers to handles to NULL */ ivas_initialize_handles_dec( st_ivas ); @@ -213,9 +251,12 @@ ivas_error IVAS_DEC_Open( *---------------------------------------------------------------------*/ static void init_decoder_config( - DECODER_CONFIG_HANDLE hDecoderConfig, /* i/o: configuration structure */ - const int16_t orientation_tracking, - const float no_diegetic_pan ) + DECODER_CONFIG_HANDLE hDecoderConfig /* i/o: configuration structure */ +#ifndef FIX_439_OTR_PARAMS + , + const int16_t orientation_tracking +#endif +) { hDecoderConfig->Opt_AMR_WB = 0; hDecoderConfig->nchan_out = 1; @@ -224,9 +265,17 @@ static void init_decoder_config( hDecoderConfig->Opt_HRTF_binary = 0; hDecoderConfig->Opt_Headrotation = 0; hDecoderConfig->Opt_RendConfigCustom = 0; +#ifdef FIX_439_OTR_PARAMS + hDecoderConfig->orientation_tracking = HEAD_ORIENT_TRK_NONE; +#else hDecoderConfig->orientation_tracking = orientation_tracking; - hDecoderConfig->no_diegetic_pan = no_diegetic_pan; +#endif + hDecoderConfig->Opt_non_diegetic_pan = 0; + hDecoderConfig->non_diegetic_pan_gain = 0; +#ifdef JBM_TSM_ON_TCS + hDecoderConfig->voip_active = 0; +#endif return; } @@ -388,7 +437,12 @@ ivas_error IVAS_DEC_Configure( const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ - const int16_t renderConfigEnabled /* i : enable Renderer config. file for binaural output */ +#ifdef FIX_439_OTR_PARAMS + const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ +#endif + const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ + const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ + const float non_diegetic_pan_gain /* i : non diegetic panning gain */ ) { Decoder_Struct *st_ivas; @@ -406,7 +460,8 @@ ivas_error IVAS_DEC_Configure( return IVAS_ERR_WRONG_PARAMS; } - if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && outputFormat != IVAS_DEC_OUTPUT_MONO ) + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && !( ( outputFormat == IVAS_DEC_OUTPUT_MONO && Opt_non_diegetic_pan == 0 ) || + ( outputFormat == IVAS_DEC_OUTPUT_STEREO && Opt_non_diegetic_pan == 1 ) ) ) { return IVAS_ERR_WRONG_MODE; } @@ -436,8 +491,13 @@ ivas_error IVAS_DEC_Configure( hDecoderConfig->Opt_LsCustom = customLsOutputEnabled; hDecoderConfig->Opt_Headrotation = enableHeadRotation; +#ifdef FIX_439_OTR_PARAMS + hDecoderConfig->orientation_tracking = orientation_tracking; +#endif hDecoderConfig->Opt_HRTF_binary = hrtfReaderEnabled; hDecoderConfig->Opt_RendConfigCustom = renderConfigEnabled; + hDecoderConfig->Opt_non_diegetic_pan = Opt_non_diegetic_pan; + hDecoderConfig->non_diegetic_pan_gain = non_diegetic_pan_gain; /* Set decoder parameters to initial values */ if ( ( error = ivas_init_decoder_front( st_ivas ) ) != IVAS_ERR_OK ) @@ -463,7 +523,11 @@ ivas_error IVAS_DEC_Configure( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_EnableVoIP( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifdef VARIABLE_SPEED_DECODING + const IVAS_DEC_VOIP_MODE voipMode, /* i : VoIP or varable speed */ + const uint16_t speedFac, /* i : speed factor for varable speed */ +#endif const int16_t jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ ) @@ -473,8 +537,10 @@ ivas_error IVAS_DEC_EnableVoIP( error = IVAS_ERR_OK; +#ifndef JBM_TSM_ON_TCS /* initialize time scaler and FIFO after time scaler */ uint16_t wss, css; +#endif if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { @@ -486,8 +552,30 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->Opt_VOIP = 1; - hDecoderConfig->nchan_out = audioCfg2channels( hDecoderConfig->output_config ); +#ifdef JBM_TSM_ON_TCS + hDecoderConfig->voip_active = 1; +#endif + +#ifdef JBM_TSM_ON_TCS + if ( hDecoderConfig->output_config != AUDIO_CONFIG_EXTERNAL ) + { +#endif + hDecoderConfig->nchan_out = audioCfg2channels( hDecoderConfig->output_config ); + +#ifdef JBM_TSM_ON_TCS + } +#ifdef VARIABLE_SPEED_DECODING + else + { + hDecoderConfig->nchan_out = 1; + } +#endif +#endif + + +#ifndef JBM_TSM_ON_TCS assert( hDecoderConfig->nchan_out > 0 && "EXT output not yet supported in VoIP mode" ); +#endif if ( ( error = input_format_API_to_internal( inputFormat, &hIvasDec->bitstreamformat, &hIvasDec->sdp_hf_only, true ) ) != IVAS_ERR_OK ) { @@ -501,13 +589,31 @@ ivas_error IVAS_DEC_EnableVoIP( hIvasDec->hVoIP->lastDecodedWasActive = 0; hIvasDec->hVoIP->hCurrentDataUnit = NULL; +#ifdef VARIABLE_SPEED_DECODING + hIvasDec->hVoIP->mode = voipMode; + hIvasDec->hVoIP->speedFac = speedFac; + hIvasDec->hVoIP->needNewFrame = false; +#endif +#ifdef JBM_TSM_ON_TCS + hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + hIvasDec->hVoIP->nSamplesAvailableNext = 0; + hIvasDec->hVoIP->rendererType = JBM_RENDERER_NONE; + hIvasDec->hVoIP->hFifoOut = NULL; +#else hIvasDec->hVoIP->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs * hDecoderConfig->nchan_out / FRAMES_PER_SEC ); +#endif +#ifdef JBM_TSM_ON_TCS + /* postpone init of the buffers until we know the real number of TCs*/ + hIvasDec->hVoIP->apaExecBuffer = NULL; + hIvasDec->hVoIP->nTransportChannelsOld = 0; +#else hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( int16_t ) * APA_BUF_PER_CHANNEL * hDecoderConfig->nchan_out ); if ( hIvasDec->hVoIP->apaExecBuffer == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } +#endif #define WMC_TOOL_SKIP /* Bitstream conversion is not counted towards complexity and memory usage */ @@ -520,15 +626,23 @@ ivas_error IVAS_DEC_EnableVoIP( } /* initialize JBM */ - if ( ( error = JB4_Create( &hIvasDec->hVoIP->hJBM ) != IVAS_ERR_OK ) != IVAS_ERR_OK ) - { - return error; - } - if ( ( error = JB4_Init( hIvasDec->hVoIP->hJBM, jbmSafetyMargin ) ) != IVAS_ERR_OK ) +#ifdef VARIABLE_SPEED_DECODING + hIvasDec->hVoIP->hJBM = NULL; + if ( hIvasDec->hVoIP->mode == IVAS_DEC_VOIP_MODE_VOIP ) { - return error; +#endif + if ( ( error = JB4_Create( &hIvasDec->hVoIP->hJBM ) != IVAS_ERR_OK ) != IVAS_ERR_OK ) + { + return error; + } + if ( JB4_Init( hIvasDec->hVoIP->hJBM, jbmSafetyMargin ) != 0 ) + { + return IVAS_ERR_FAILED_ALLOC; + } +#ifdef VARIABLE_SPEED_DECODING } - +#endif +#ifndef JBM_TSM_ON_TCS if ( hDecoderConfig->output_Fs == 8000 ) { wss = 1; @@ -553,8 +667,40 @@ ivas_error IVAS_DEC_EnableVoIP( { return IVAS_ERR_INIT_ERROR; } +#endif - if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->nchan_out ) != IVAS_ERR_OK || +#ifdef JBM_TSM_ON_TCS + + /* postpone init of time scaler until we know the real number of TCs */ + hIvasDec->hVoIP->hTimeScaler = NULL; + /* create output pcm fifo*/ + /* :TODO: also provide CLDFB output FIFO if things work out */ +#ifdef VARIABLE_SPEED_DECODING + if ( hIvasDec->hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) + { + hIvasDec->hVoIP->needNewFrame = true; + } +#endif +#else +#ifdef VARIABLE_SPEED_DECODING + { + float startQuality = hIvasDec->hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ? -2.0f : 1.0f; + if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, + hDecoderConfig->nchan_out ) != IVAS_ERR_OK || + apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || + apa_set_complexity_options( hIvasDec->hVoIP->hTimeScaler, wss, css ) != 0 || + apa_set_quality( hIvasDec->hVoIP->hTimeScaler, startQuality, 4, 4 ) != 0 || + pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoAfterTimeScaler ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoAfterTimeScaler, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } + /* we instantly need a new frame */ + hIvasDec->hVoIP->needNewFrame = true; + } +#else + if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, + hDecoderConfig->nchan_out ) != IVAS_ERR_OK || apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || apa_set_complexity_options( hIvasDec->hVoIP->hTimeScaler, wss, css ) != 0 || apa_set_quality( hIvasDec->hVoIP->hTimeScaler, 1, 4, 4 ) != 0 || @@ -563,6 +709,8 @@ ivas_error IVAS_DEC_EnableVoIP( { return IVAS_ERR_INIT_ERROR; } +#endif +#endif return error; } @@ -651,6 +799,13 @@ ivas_error IVAS_DEC_FeedFrame_Serial( st->use_partial_copy = 1; } +#ifdef VARIABLE_SPEED_DECODING + if ( hIvasDec->hVoIP != NULL && hIvasDec->hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) + { + hIvasDec->hVoIP->needNewFrame = false; + } +#endif + return error; } @@ -683,7 +838,11 @@ ivas_error IVAS_DEC_GetSamples( if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = evs_dec_main( st_ivas, *nOutSamples, NULL, pcmBuf ) ) != IVAS_ERR_OK ) +#else if ( ( error = evs_dec_main( st_ivas, *nOutSamples, pcmBuf ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -708,6 +867,187 @@ ivas_error IVAS_DEC_GetSamples( } +#ifdef JBM_TSM_ON_TCS +/*---------------------------------------------------------------------* + * IVAS_DEC_Setup( ) + * + * Main function to decode to PCM data of the transport channels + *---------------------------------------------------------------------*/ + +static ivas_error IVAS_DEC_Setup( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint16_t *nTcBufferGranularity, /* o : granularity of the TC Buffer */ + uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ + uint8_t *nOutChannels, /* o : number of decoded out channels (PCM or CLDFB) */ + uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame */ + int16_t *data /* o : flushed samples */ +) +{ + ivas_error error; + + error = IVAS_ERR_OK; + + *nSamplesRendered = 0; + + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) + { + *nTransportChannels = 1; + *nOutChannels = 1; + } + else + { + Decoder_Struct *st_ivas; + + st_ivas = hIvasDec->st_ivas; + /*----------------------------------------------------------------* + * IVAS decoder setup + * - read IVAS format signaling + * - read IVAS format specific signaling + * - initialize decoder in the first frame based on IVAS format and number of transport channels + * - reconfigure the decoder when the number of TC or IVAS total bitrate change + *----------------------------------------------------------------*/ + + if ( st_ivas->bfi == 0 ) + { + if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + *nTransportChannels = (uint8_t) st_ivas->hTcBuffer->nchan_transport_jbm; + *nTcBufferGranularity = (uint16_t) st_ivas->hTcBuffer->n_samples_granularity; + *nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; + } + + return error; +} + +/*---------------------------------------------------------------------* + * IVAS_DEC_GetTcSamples( ) + * + * Main function to decode to PCM data of the transport channels + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_GetTcSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + float *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + int16_t *nOutSamples /* o : number of samples per channel written to output buffer */ +) +{ + Decoder_Struct *st_ivas; + ivas_error error; + + error = IVAS_ERR_OK; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + st_ivas = hIvasDec->st_ivas; + + *nOutSamples = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); + + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) + { + if ( ( error = evs_dec_main( st_ivas, *nOutSamples, pcmBuf, NULL ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else if ( hIvasDec->mode == IVAS_DEC_MODE_IVAS ) + { + /* run the main IVAS decoding routine */ + if ( ( error = ivas_jbm_dec_tc( st_ivas, pcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } + + hIvasDec->isInitialized = true; /* Initialization done in ivas_dec() */ + } + + if ( hIvasDec->hasBeenFedFirstGoodFrame ) + { + hIvasDec->hasDecodedFirstGoodFrame = true; + } + + return error; +} + +/*---------------------------------------------------------------------* + * IVAS_DEC_Rendered_FeedTcSamples( ) + * + * Main function to decode to PCM data of the transport channels + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_RendererFeedTcSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o : IVAS decoder handle */ + const int16_t nSamplesForRendering, /* i: : number of TC samples wanted from the renderer */ + int16_t *nSamplesResidual, /* o: : number of samples not fitting into the renderer grid and buffer for the next call*/ + float *pcmBuf /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +) +{ + Decoder_Struct *st_ivas; + + ivas_error error; + + error = IVAS_ERR_OK; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + st_ivas = hIvasDec->st_ivas; + + /* feed the TCs to the IVAS renderer */ + if ( ( error = ivas_jbm_dec_feed_tc_to_renderer( st_ivas, nSamplesForRendering, nSamplesResidual, pcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } + + return error; +} + +/*---------------------------------------------------------------------* + * IVAS_DEC_GetRenderedSamples( ) + * + * Main function to decode to PCM data of the transport channels + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_GetRenderedSamples( + IVAS_DEC_HANDLE hIvasDec, /* i/o : IVAS decoder handle */ + const uint16_t nSamplesForRendering, /* i: : number of TC samples wanted from the renderer */ + uint16_t *nSamplesRendered, /* o : number of samples rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the renerer pipeline */ + int16_t *pcmBuf /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ +) +{ + Decoder_Struct *st_ivas; + ivas_error error; + + error = IVAS_ERR_OK; + + if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } + + st_ivas = hIvasDec->st_ivas; + + /* run the main IVAS decoding routine */ + if ( ( error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext, pcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } + + + return error; +} +#endif + + /*---------------------------------------------------------------------* * IVAS_DEC_GetNumObjects( ) * @@ -830,6 +1170,7 @@ ivas_error IVAS_DEC_GetObjectMetadata( metadata->gainFactor = 1.f; metadata->yaw = 0.f; metadata->pitch = 0.f; + metadata->non_diegetic_flag = 0; } else { @@ -840,6 +1181,7 @@ ivas_error IVAS_DEC_GetObjectMetadata( metadata->pitch = hIsmMeta->pitch; metadata->spread = 0.f; metadata->gainFactor = 1.f; + metadata->non_diegetic_flag = hIsmMeta->non_diegetic_flag; } return IVAS_ERR_OK; @@ -1429,6 +1771,27 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( return IVAS_ERR_OK; } +#ifdef VARIABLE_SPEED_DECODING +/*---------------------------------------------------------------------* + * IVAS_DEC_VoIP_SetScale( ) + * + * Set the TSM scale + *---------------------------------------------------------------------*/ + +ivas_error IVAS_DEC_VoIP_SetScale( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t scale /* i : TSM scale to set */ +) +{ + ivas_error error; + + error = IVAS_ERR_OK; + + hIvasDec->hVoIP->speedFac = scale; + + return error; +} +#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) @@ -1441,11 +1804,16 @@ ivas_error IVAS_DEC_VoIP_GetSamples( uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) + , + uint16_t *sampleAvailableNext /* o : samples available for the next call */ +#endif #ifdef SUPPORT_JBM_TRACEFILE , JbmTraceFileWriterFn jbmWriterFn, void *jbmWriter #endif + ) { Decoder_Struct *st_ivas; @@ -1459,6 +1827,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples( int16_t timeScalingDone; int16_t result; ivas_error error; +#ifdef JBM_TSM_ON_TCS + int16_t nSamplesRendered; + uint16_t nSamplesTcsScaled; + uint8_t nTransportChannels; + uint8_t nOutChannels; +#endif error = IVAS_ERR_OK; @@ -1467,133 +1841,472 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hVoIP = hIvasDec->hVoIP; timeScalingDone = 0; +#ifdef JBM_TSM_ON_TCS + nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out; + nTransportChannels = 0; + nSamplesTcsScaled = hVoIP->nSamplesFrame; + nSamplesRendered = 0; +#endif +#ifdef VARIABLE_SPEED_DECODING + scale = hVoIP->speedFac; + maxScaling = hVoIP->speedFac; +#endif + /* TODO(mcjbm): ringbuffer capacity should be configurable by user */ +#ifdef JBM_TSM_ON_TCS + if ( ( hVoIP->hFifoOut != NULL && nSamplesPerChannel > hVoIP->hFifoOut->capacity ) || nSamplesPerChannel == 0 ) +#else if ( nSamplesPerChannel > hVoIP->hFifoAfterTimeScaler->capacity || nSamplesPerChannel == 0 ) +#endif { return IVAS_ERR_WRONG_PARAMS; } /* make sure that the FIFO after decoder/scaler contains at least one sound card frame (i.e. 20ms) */ +#ifdef JBM_TSM_ON_TCS + while ( ( hVoIP->hFifoOut != NULL && pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoOut ) < nSamplesPerChannel ) || ( hVoIP->hFifoOut == NULL && nSamplesRendered < nSamplesPerChannel ) ) +#else while ( pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ) < nSamplesPerChannel ) +#endif { - extBufferedSamples = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); - extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; - dataUnit = NULL; - /* pop one access unit from the jitter buffer */ - result = JB4_PopDataUnit( hVoIP->hJBM, systemTimestamp_ms, extBufferedTime_ms, &dataUnit, &scale, &maxScaling ); - if ( result != 0 ) +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED && hVoIP->needNewFrame ) { - return IVAS_ERR_UNKNOWN; + /* we need another bs frame fed into the decoder...*/ + *sampleAvailableNext = 0; + return IVAS_ERR_VS_FRAME_NEEDED; } - - maxScaling = maxScaling * hDecoderConfig->output_Fs / 1000; - /* avoid time scaling multiple times in one sound card slot */ - if ( scale != 100U ) +#endif +#ifdef JBM_TSM_ON_TCS + if ( hVoIP->nSamplesAvailableNext == 0 ) { - if ( timeScalingDone ) + if ( hVoIP->hFifoOut ) { - scale = 100; + extBufferedSamples = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoOut ); + nSamplesRendered = extBufferedSamples; } else { - timeScalingDone = 1; + extBufferedSamples = nSamplesRendered; /* TODO: JBM use renderer residual samples here */ } - } - - /* copy bitstream into decoder state */ - if ( dataUnit ) - { - hIvasDec->hVoIP->hCurrentDataUnit = dataUnit; - - bsCompactToSerial( dataUnit->data, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize ); - IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 ); - } - else if ( hIvasDec->hasDecodedFirstGoodFrame ) - { - /* Decoder has been initialized with first good frame - do PLC */ - IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 ); - } - - /* decode */ - if ( !hIvasDec->hasBeenFedFirstGoodFrame ) - { - /* codec mode to use not known yet - simply output silence */ - set_s( hVoIP->apaExecBuffer, 0, hVoIP->nSamplesFrame ); /* TODO(mcjbm): Could be optimized: just write directly to output buffer */ - } - else - { +#else + extBufferedSamples = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); +#endif + extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs; - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, hVoIP->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + dataUnit = NULL; +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VOIP ) { - return error; +#endif + /* pop one access unit from the jitter buffer */ + result = JB4_PopDataUnit( hVoIP->hJBM, systemTimestamp_ms, extBufferedTime_ms, &dataUnit, &scale, &maxScaling ); + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } +#ifdef VARIABLE_SPEED_DECODING } - } - - if ( dataUnit ) - { - if ( dataUnit->partial_frame != 0 ) + else if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { - hVoIP->lastDecodedWasActive = 1; + scale = hVoIP->speedFac; + maxScaling = hVoIP->speedFac; } +#ifdef DEBUGGING else { - hVoIP->lastDecodedWasActive = !dataUnit->silenceIndicator; + assert( "Wrong VoIP mode!\n" && 0 ); } - /* data unit memory is no longer used */ - JB4_FreeDataUnit( hVoIP->hJBM, dataUnit ); - } +#endif +#endif - /* limit scale to range supported by time scaler */ - if ( scale < APA_MIN_SCALE ) - { - scale = APA_MIN_SCALE; - } - else if ( scale > APA_MAX_SCALE ) - { - scale = APA_MAX_SCALE; - } + maxScaling = maxScaling * hDecoderConfig->output_Fs / 1000; + /* avoid time scaling multiple times in one sound card slot */ + if ( scale != 100U ) + { + if ( timeScalingDone ) + { + scale = 100; + } + else + { + timeScalingDone = 1; + } + } - /* apply time scaling on decoded/concealed samples */ - if ( apa_set_scale( hVoIP->hTimeScaler, (uint16_t) scale ) != 0 ) - { - return IVAS_ERR_UNKNOWN; - } +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VOIP ) + { +#endif + /* copy bitstream into decoder state */ + if ( dataUnit ) + { + hIvasDec->hVoIP->hCurrentDataUnit = dataUnit; + + bsCompactToSerial( dataUnit->data, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize ); + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 ); + } + else if ( hIvasDec->hasDecodedFirstGoodFrame ) + { + /* Decoder has been initialized with first good frame - do PLC */ + IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 ); + } +#ifdef VARIABLE_SPEED_DECODING + } +#endif + /* decode */ + if ( !hIvasDec->hasBeenFedFirstGoodFrame ) + { + /* codec mode to use not known yet - simply output silence */ +#ifdef JBM_TSM_ON_TCS + nSamplesTcsScaled = hVoIP->nSamplesFrame; + if ( hVoIP->hFifoOut != NULL ) + { + /* feed zeros to FIFO */ + if ( pcmdsp_fifo_write_zero( hVoIP->hFifoOut, nSamplesTcsScaled ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + } + else + { + /* directly set output zero */ + set_s( pcmBuf, 0, nSamplesPerChannel * nOutChannels ); + } + nSamplesRendered = nSamplesTcsScaled; +#else + set_s( hVoIP->apaExecBuffer, 0, hVoIP->nSamplesFrame ); /* TODO(mcjbm): Could be optimized: just write directly to output buffer */ +#endif + } + else + { + +#ifdef JBM_TSM_ON_TCS + uint16_t l_ts = 1; + uint16_t nSamplesRendered_loop; + /* setup ivas decoder and get the number of TCs */ + /* might render some remaining samples from the previous frame too if the renderer granularity changed */ + if ( hVoIP->hFifoOut ) + { + int16_t rendererPcmBuf[( MAX_OUTPUT_CHANNELS * L_FRAME_MAX * APA_MAX_SCALE ) / 100]; + if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, rendererPcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } + if ( pcmdsp_fifo_write( hVoIP->hFifoOut, (uint8_t *) rendererPcmBuf, nSamplesRendered_loop ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + } + else + { + if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + } + nSamplesRendered += nSamplesRendered_loop; + if ( nTransportChannels != hVoIP->nTransportChannelsOld ) + { + IVAS_DEC_VoIP_reconfigure( hIvasDec, nTransportChannels, l_ts ); + } + /* decode TCs only */ + if ( ( error = IVAS_DEC_GetTcSamples( hIvasDec, hVoIP->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + { + return error; + } + +#else + if ( ( error = IVAS_DEC_GetSamples( hIvasDec, hVoIP->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK ) + { + return error; + } +#endif + } + +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VOIP ) + { +#endif + if ( dataUnit ) + { + if ( dataUnit->partial_frame != 0 ) + { + hVoIP->lastDecodedWasActive = 1; + } + else + { + hVoIP->lastDecodedWasActive = !dataUnit->silenceIndicator; + } + /* data unit memory is no longer used */ + JB4_FreeDataUnit( hVoIP->hJBM, dataUnit ); + } +#ifdef VARIABLE_SPEED_DECODING + } + else + { + hVoIP->lastDecodedWasActive = 1; + } +#endif + /* limit scale to range supported by time scaler */ + if ( scale < APA_MIN_SCALE ) + { + scale = APA_MIN_SCALE; + } + else if ( scale > APA_MAX_SCALE ) + { + scale = APA_MAX_SCALE; + } + + /* apply time scaling on decoded/concealed samples */ +#ifdef JBM_TSM_ON_TCS + if ( hIvasDec->hasBeenFedFirstGoodFrame ) + { +#endif + if ( apa_set_scale( hVoIP->hTimeScaler, (uint16_t) scale ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } +#ifdef JBM_TSM_ON_TCS + result = apa_exec( hVoIP->hTimeScaler, hVoIP->apaExecBuffer, hVoIP->nSamplesFrame * nTransportChannels, (uint16_t) maxScaling, hVoIP->apaExecBuffer, &nTimeScalerOutSamples ); +#else result = apa_exec( hVoIP->hTimeScaler, hVoIP->apaExecBuffer, hVoIP->nSamplesFrame, (uint16_t) maxScaling, hVoIP->apaExecBuffer, &nTimeScalerOutSamples ); - if ( result != 0 ) - { - return IVAS_ERR_UNKNOWN; - } - assert( nTimeScalerOutSamples <= APA_BUF ); +#endif + if ( result != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + assert( nTimeScalerOutSamples <= APA_BUF ); +#ifdef JBM_TSM_ON_TCS + nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels; +#else /* append scaled samples to FIFO */ if ( pcmdsp_fifo_write( hVoIP->hFifoAfterTimeScaler, (uint8_t *) hVoIP->apaExecBuffer, (uint16_t) ( nTimeScalerOutSamples / hDecoderConfig->nchan_out ) ) != 0 ) { return IVAS_ERR_UNKNOWN; } +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) + { + int16_t nSamplesAvailable = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); + if ( nSamplesAvailable < nSamplesPerChannel ) + { + hVoIP->needNewFrame = true; + } + } +#endif +#endif +#ifdef JBM_TSM_ON_TCS + if ( hIvasDec->hasBeenFedFirstGoodFrame && hVoIP->rendererType != JBM_RENDERER_NONE ) + { + /* render IVAS frames */ + int16_t nResidualSamples; + if ( ( error = IVAS_DEC_RendererFeedTcSamples( hIvasDec, nSamplesTcsScaled, &nResidualSamples, hVoIP->apaExecBuffer ) ) != IVAS_ERR_OK ) + { + return error; + } + /* feed residual samples to TSM for the next call */ + if ( apa_set_renderer_residual_samples( hVoIP->hTimeScaler, (uint16_t) nResidualSamples ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + } + else + { + /* inplace float->int16_t conversion*/ +#ifdef DEBUGGING + st_ivas->noClipping += +#endif + syn_output( hVoIP->apaExecBuffer, nTimeScalerOutSamples, (int16_t *) hVoIP->apaExecBuffer ); + + if ( pcmdsp_fifo_write( hVoIP->hFifoOut, (uint8_t *) hVoIP->apaExecBuffer, nSamplesTcsScaled ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + nSamplesRendered = nSamplesTcsScaled; + } + } +#endif #ifdef SUPPORT_JBM_TRACEFILE - /* jbmWriterFn and jbmWriter may be NULL if tracefile writing was not requested on CLI */ - if ( jbmWriterFn != NULL && jbmWriter != NULL ) + /* jbmWriterFn and jbmWriter may be NULL if tracefile writing was not requested on CLI */ + if ( jbmWriterFn != NULL && jbmWriter != NULL ) + { + /* write JBM trace data entry */ + store_JbmData( hVoIP, dataUnit, systemTimestamp_ms, extBufferedSamples, hDecoderConfig->output_Fs ); + if ( ( jbmWriterFn( &hVoIP->JbmTraceData, jbmWriter ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError writing JBM Trace data to file\n" ); + return IVAS_ERR_UNKNOWN; + } + } +#endif +#ifdef JBM_TSM_ON_TCS + } + if ( hIvasDec->hasBeenFedFirstGoodFrame && hVoIP->rendererType != JBM_RENDERER_NONE ) { - /* write JBM trace data entry */ - store_JbmData( hVoIP, dataUnit, systemTimestamp_ms, extBufferedSamples, hDecoderConfig->output_Fs ); - if ( ( jbmWriterFn( &hVoIP->JbmTraceData, jbmWriter ) ) != IVAS_ERR_OK ) + uint16_t nSamplesRendered_loop; + int16_t nSamplesToRender; + if ( hVoIP->hFifoOut ) + { + int16_t rendererPcmBuf[( MAX_OUTPUT_CHANNELS * L_FRAME_MAX * APA_MAX_SCALE ) / 100]; + nSamplesToRender = nSamplesPerChannel - pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoOut ); + /* render IVAS frames */ + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hVoIP->nSamplesAvailableNext, rendererPcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } + if ( pcmdsp_fifo_write( hVoIP->hFifoOut, (uint8_t *) rendererPcmBuf, nSamplesRendered_loop ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + } + else + { + nSamplesToRender = nSamplesPerChannel - nSamplesRendered; + /* render IVAS frames directly to the output buffer */ + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hVoIP->nSamplesAvailableNext, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK ) + { + return error; + } + } + nSamplesRendered += nSamplesRendered_loop; +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED && hVoIP->nSamplesAvailableNext == 0 ) { - fprintf( stderr, "\nError writing JBM Trace data to file\n" ); - return IVAS_ERR_UNKNOWN; + hVoIP->needNewFrame = true; } +#endif + } + else if ( !hIvasDec->hasBeenFedFirstGoodFrame && hVoIP->hFifoOut == NULL ) + { + hVoIP->nSamplesAvailableNext = 0; + } + else + { + hVoIP->nSamplesAvailableNext = max( 0, pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoOut ) - nSamplesPerChannel ); +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED && hVoIP->nSamplesAvailableNext < nSamplesPerChannel ) + { + hVoIP->needNewFrame = true; + } +#endif + hVoIP->nSamplesAvailableNext = 0; } #endif } /* fetch a user-specified number of samples from FIFO */ +#if defined( JBM_TSM_ON_TCS ) + if ( hVoIP->hFifoOut ) + { + if ( pcmdsp_fifo_read( hVoIP->hFifoOut, nSamplesPerChannel, (uint8_t *) pcmBuf ) != 0 ) +#else if ( pcmdsp_fifo_read( hVoIP->hFifoAfterTimeScaler, nSamplesPerChannel, (uint8_t *) pcmBuf ) != 0 ) +#endif + { + return IVAS_ERR_UNKNOWN; + } +#ifdef JBM_TSM_ON_TCS + } +#endif + +#if defined( JBM_TSM_ON_TCS ) || defined( VARIABLE_SPEED_DECODING ) +#ifdef JBM_TSM_ON_TCS + *sampleAvailableNext = hVoIP->nSamplesAvailableNext; +#else + *sampleAvailableNext = max( 0, pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ) ); +#ifdef VARIABLE_SPEED_DECODING + if ( hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) { - return IVAS_ERR_UNKNOWN; + if ( *sampleAvailableNext < nSamplesPerChannel ) + { + hVoIP->needNewFrame = true; + } + } +#endif +#endif +#endif + + return error; +} + +/*---------------------------------------------------------------------* + * IVAS_DEC_VoIP_Flush( ) + * + * Function to flush remaining audio in VoIP + *---------------------------------------------------------------------*/ + +#if defined( VARIABLE_SPEED_DECODING ) || defined( JBM_TSM_ON_TCS ) +ivas_error IVAS_DEC_VoIP_Flush( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ + int16_t *nSamplesFlushed /* o : number of samples flushed */ +) +{ + ivas_error error; + IVAS_DEC_VOIP *hVoIP; +#ifdef JBM_TSM_ON_TCS + int16_t rendererPcmBuf[( MAX_OUTPUT_CHANNELS * L_FRAME_MAX * APA_MAX_SCALE ) / 100]; + uint16_t nSamplesToRender; + uint16_t nSamplesFlushedLocal; +#endif + error = IVAS_ERR_OK; + + hVoIP = hIvasDec->hVoIP; +#if defined( JBM_TSM_ON_TCS ) + *nSamplesFlushed = min( nSamplesPerChannel, hVoIP->nSamplesAvailableNext ); +#else + *nSamplesFlushed = min( nSamplesPerChannel, pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ) ); +#endif +#ifdef JBM_TSM_ON_TCS + if ( hVoIP->rendererType == JBM_RENDERER_NONE ) + { +#endif + /* fetch a user-specified number of samples from FIFO */ +#if defined( JBM_TSM_ON_TCS ) + if ( pcmdsp_fifo_read( hVoIP->hFifoOut, *nSamplesFlushed, (uint8_t *) pcmBuf ) != 0 ) +#else + if ( pcmdsp_fifo_read( hVoIP->hFifoAfterTimeScaler, *nSamplesFlushed, (uint8_t *) pcmBuf ) != 0 ) +#endif + { + return IVAS_ERR_UNKNOWN; + } +#if defined( JBM_TSM_ON_TCS ) + hVoIP->nSamplesAvailableNext -= *nSamplesFlushed; + *nSamplesAvailableNext = hVoIP->nSamplesAvailableNext; +#else + *nSamplesAvailableNext = pcmdsp_fifo_nReadableSamplesPerChannel( hVoIP->hFifoAfterTimeScaler ); +#endif +#ifdef JBM_TSM_ON_TCS } + else + { + nSamplesToRender = (uint16_t) *nSamplesFlushed; + /* render IVAS frames */ + if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hVoIP->nSamplesAvailableNext, rendererPcmBuf ) ) != IVAS_ERR_OK ) + { + return error; + } + if ( pcmdsp_fifo_write( hVoIP->hFifoOut, (uint8_t *) rendererPcmBuf, nSamplesFlushedLocal ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + if ( pcmdsp_fifo_read( hVoIP->hFifoOut, nSamplesFlushedLocal, (uint8_t *) pcmBuf ) != 0 ) + { + return IVAS_ERR_UNKNOWN; + } + *nSamplesAvailableNext = hVoIP->nSamplesAvailableNext; + *nSamplesFlushed = (int16_t) nSamplesFlushedLocal; + } +#endif return error; } +#endif /*---------------------------------------------------------------------* @@ -1604,9 +2317,17 @@ ivas_error IVAS_DEC_VoIP_GetSamples( bool IVAS_DEC_VoIP_IsEmpty( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ +#ifdef JBM_TSM_ON_TCS + , + int16_t nSamplesAsked +#endif ) { +#ifdef JBM_TSM_ON_TCS + return ( ( JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0 ) && ( hIvasDec->hVoIP->nSamplesAvailableNext < nSamplesAsked ) ); +#else return JB4_bufferedDataUnits( hIvasDec->hVoIP->hJBM ) == 0; +#endif } @@ -1647,8 +2368,11 @@ static void IVAS_DEC_Close_VoIP( apa_exit( &hVoIP->hTimeScaler ); +#ifdef JBM_TSM_ON_TCS + pcmdsp_fifo_destroy( &hVoIP->hFifoOut ); +#else pcmdsp_fifo_destroy( &hVoIP->hFifoAfterTimeScaler ); - +#endif if ( hVoIP->apaExecBuffer != NULL ) { free( hVoIP->apaExecBuffer ); @@ -1928,7 +2652,15 @@ static ivas_error printConfigInfo_dec( if ( st_ivas->ivas_format == MONO_FORMAT ) { - fprintf( stdout, "Output configuration: mono EVS bit-exact decoding\n" ); + if ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) + { + fprintf( stdout, "Output configuration: mono EVS bit-exact decoding to stereo\n" ); + fprintf( stdout, "Non-diegetic panning: %.2f\n", st_ivas->hDecoderConfig->non_diegetic_pan_gain * 90.f ); + } + else + { + fprintf( stdout, "Output configuration: mono EVS bit-exact decoding\n" ); + } } else { @@ -1967,6 +2699,7 @@ static ivas_error printConfigInfo_dec( fprintf( stdout, "Input configuration: %s\n", config_str ); } } + get_channel_config( st_ivas->hDecoderConfig->output_config, &config_str[0] ); fprintf( stdout, "Output configuration: %s\n", config_str ); @@ -1985,6 +2718,28 @@ static ivas_error printConfigInfo_dec( fprintf( stdout, "Head rotation: ON\n" ); } +#ifdef FIX_439_OTR_PARAMS + if ( st_ivas->hDecoderConfig->orientation_tracking != HEAD_ORIENT_TRK_NONE ) + { + switch ( st_ivas->hDecoderConfig->orientation_tracking ) + { + case HEAD_ORIENT_TRK_AVG: + fprintf( stdout, "Orientation tracking: AVG\n" ); + break; + case HEAD_ORIENT_TRK_REF: + fprintf( stdout, "Orientation tracking: REF\n" ); + break; + case HEAD_ORIENT_TRK_REF_VEC: + fprintf( stdout, "Orientation tracking: REF_VEC\n" ); + break; + case HEAD_ORIENT_TRK_REF_VEC_LEV: + fprintf( stdout, "Orientation tracking: REF_VEC_LEV\n" ); + break; + default: + break; + } + } +#else if ( st_ivas->hDecoderConfig->orientation_tracking != IVAS_ORIENT_TRK_NONE ) { switch ( st_ivas->hDecoderConfig->orientation_tracking ) @@ -2003,6 +2758,12 @@ static ivas_error printConfigInfo_dec( break; } } +#endif + + if ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) + { + fprintf( stdout, "Non-diegetic panning: %.2f\n", st_ivas->hDecoderConfig->non_diegetic_pan_gain * 90.f ); + } } return IVAS_ERR_OK; @@ -2103,10 +2864,18 @@ void IVAS_DEC_PrintDisclaimer( void ) static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, +#ifdef JBM_TSM_ON_TCS + float *floatBuf, +#endif int16_t *pcmBuf ) { DEC_CORE_HANDLE *hCoreCoder; - float output[L_FRAME48k]; + float output[MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN][L_FRAME48k]; + float mixer_left, mixer_rigth; +#ifdef JBM_TSM_ON_TCS + float *p_output[MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; + int16_t ch; +#endif ivas_error error; error = IVAS_ERR_OK; @@ -2116,19 +2885,26 @@ static ivas_error evs_dec_main( mdct_switching_dec( hCoreCoder[0] ); +#ifdef JBM_TSM_ON_TCS + for ( ch = 0; ch < MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; ch++ ) + { + p_output[ch] = output[ch]; + } +#endif + /* run the main EVS decoding routine */ if ( hCoreCoder[0]->codec_mode == MODE1 ) { if ( hCoreCoder[0]->Opt_AMR_WB ) { - if ( ( error = amr_wb_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output ) ) != IVAS_ERR_OK ) + if ( ( error = amr_wb_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output[0] ) ) != IVAS_ERR_OK ) { return error; } } else { - if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output, FRAMEMODE_NORMAL ) ) != IVAS_ERR_OK ) + if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output[0], FRAMEMODE_NORMAL ) ) != IVAS_ERR_OK ) { return error; } @@ -2138,21 +2914,21 @@ static ivas_error evs_dec_main( { if ( hCoreCoder[0]->bfi == 0 ) { - if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output, FRAMEMODE_NORMAL ) ) != IVAS_ERR_OK ) + if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output[0], FRAMEMODE_NORMAL ) ) != IVAS_ERR_OK ) { return error; } } else if ( hCoreCoder[0]->bfi == 2 ) { - if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output, FRAMEMODE_FUTURE ) ) != IVAS_ERR_OK ) + if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output[0], FRAMEMODE_FUTURE ) ) != IVAS_ERR_OK ) { return error; } } else { - if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output, FRAMEMODE_MISSING ) ) != IVAS_ERR_OK ) + if ( ( error = evs_dec( hCoreCoder[0], st_ivas->mem_hp20_out[0], output[0], FRAMEMODE_MISSING ) ) != IVAS_ERR_OK ) { return error; } @@ -2161,12 +2937,42 @@ static ivas_error evs_dec_main( st_ivas->BER_detect = hCoreCoder[0]->BER_detect; - /* convert 'float' output data to 'short' */ + if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) + { + mixer_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f; + mixer_rigth = 1.f - mixer_left; + v_multc( output[0], mixer_rigth, output[1], nOutSamples ); + v_multc( output[0], mixer_left, output[0], nOutSamples ); + } + +#ifdef JBM_TSM_ON_TCS + if ( floatBuf != NULL ) + { + /* BE workaround */ + int16_t pcm_buf_local[L_FRAME48k]; + + + /* convert 'float' output data to 'short' */ #ifdef DEBUGGING - st_ivas->noClipping += + st_ivas->noClipping += +#endif + ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcm_buf_local ); + mvs2r( pcm_buf_local, floatBuf, nOutSamples * st_ivas->hDecoderConfig->nchan_out ); + } + else + { +#endif +#ifdef DEBUGGING + st_ivas->noClipping += +#endif +#ifdef JBM_TSM_ON_TCS + ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcmBuf ); +#else + ivas_syn_output( output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcmBuf ); +#endif +#ifdef JBM_TSM_ON_TCS + } #endif - syn_output( output, nOutSamples, pcmBuf ); - return error; } @@ -2357,3 +3163,141 @@ static ivas_error input_format_API_to_internal( return IVAS_ERR_OK; } + +#ifdef JBM_TSM_ON_TCS +static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas ) +{ + + return st_ivas->hTcBuffer->n_samples_granularity; +} + +static JBM_RENDERER_TYPE IVAS_DEC_VoIP_GetRendererConfig( IVAS_DEC_HANDLE hIvasDec ) +{ + JBM_RENDERER_TYPE rendererType; + rendererType = JBM_RENDERER_NONE; + + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) + { + rendererType = JBM_RENDERER_NONE; + } + else + { + rendererType = JBM_RENDERER_IVAS; + } + + return rendererType; +} + +ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts ) +{ + + IVAS_DEC_VOIP *hVoIP; + ivas_error error; + + + hVoIP = hIvasDec->hVoIP; + + if ( hIvasDec->hVoIP->hTimeScaler == NULL ) + { + + uint16_t wss, css; + float startQuality; + DECODER_CONFIG_HANDLE hDecoderConfig; + +#ifdef VARIABLE_SPEED_DECODING + startQuality = hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ? -2.0f : 1.0f; +#else + startQuality = 1.0f; +#endif + /* get current renderer type*/ + hVoIP->rendererType = IVAS_DEC_VoIP_GetRendererConfig( hIvasDec ); + hDecoderConfig = hIvasDec->st_ivas->hDecoderConfig; + if ( hDecoderConfig->output_Fs == 8000 ) + { + wss = 1; + css = 1; + } + else if ( hDecoderConfig->output_Fs == 16000 ) + { + wss = 2; + css = 1; + } + else if ( hDecoderConfig->output_Fs == 32000 ) + { + wss = 4; + css = 2; + } + else if ( hDecoderConfig->output_Fs == 48000 ) + { + wss = 6; + css = 3; + } + else + { + return IVAS_ERR_INIT_ERROR; + } + hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ); + set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); + if ( hIvasDec->hVoIP->apaExecBuffer == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + if ( apa_init( &hIvasDec->hVoIP->hTimeScaler, + nTransportChannels ) != IVAS_ERR_OK || + apa_set_rate( hIvasDec->hVoIP->hTimeScaler, hDecoderConfig->output_Fs ) != 0 || + apa_set_complexity_options( hIvasDec->hVoIP->hTimeScaler, wss, css ) != 0 || + apa_set_quality( hIvasDec->hVoIP->hTimeScaler, startQuality, 4, 4 ) != 0 || + apa_set_renderer_granularity( hIvasDec->hVoIP->hTimeScaler, l_ts ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } + if ( hVoIP->hFifoOut == NULL && hVoIP->rendererType == JBM_RENDERER_NONE ) + { + /* we still need the FIFO out buffer */ + if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } + } +#ifdef VARIABLE_SPEED_DECODING + else if ( hIvasDec->hVoIP->mode == IVAS_DEC_VOIP_MODE_VARIABLE_SPEED ) + { + if ( pcmdsp_fifo_create( &hIvasDec->hVoIP->hFifoOut ) != 0 || + pcmdsp_fifo_init( hIvasDec->hVoIP->hFifoOut, (uint16_t) ( hDecoderConfig->output_Fs * 4 / FRAMES_PER_SEC ) /* 4 frames */, hDecoderConfig->nchan_out, sizeof( int16_t ) ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } + } +#endif + if ( hIvasDec->mode == IVAS_DEC_MODE_EVS ) + { + if ( apa_set_evs_compat_mode( hIvasDec->hVoIP->hTimeScaler, true ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } + } + } + else + { + if ( apa_reconfigure( hVoIP->hTimeScaler, nTransportChannels, l_ts ) != 0 ) + { + return IVAS_ERR_INIT_ERROR; + } + + /* realloc apa_exe_buffer */ + free( hIvasDec->hVoIP->apaExecBuffer ); + hIvasDec->hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ); + set_zero( hIvasDec->hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels ); + if ( hIvasDec->hVoIP->apaExecBuffer == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); + } + } + hIvasDec->hVoIP->nTransportChannelsOld = (uint8_t) nTransportChannels; + + error = IVAS_ERR_OK; + + return error; +} +#endif diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 17af564295cca7d3e47b3affc9f5df7ec90d6fa4..65e36b055ba91935b429c60c6cd4fd97eff99136 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -36,7 +36,6 @@ #include "common_api_types.h" #include - /*---------------------------------------------------------------------* * Decoder enums *---------------------------------------------------------------------*/ @@ -77,6 +76,22 @@ typedef enum IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF = 4, /* RTP payload: only Header-Full format without zero padding for size collision avoidance */ } IVAS_DEC_INPUT_FORMAT; +typedef enum _IVAS_DEC_COMPLEXITY_LEVEL +{ + IVAS_DEC_COMPLEXITY_LEVEL_ONE = 1, + IVAS_DEC_COMPLEXITY_LEVEL_TWO = 2, + IVAS_DEC_COMPLEXITY_LEVEL_THREE = 3 +} IVAS_DEC_COMPLEXITY_LEVEL; + + +#ifdef VARIABLE_SPEED_DECODING +typedef enum +{ + IVAS_DEC_VOIP_MODE_VOIP = 0, + IVAS_DEC_VOIP_MODE_VARIABLE_SPEED = 1 +} IVAS_DEC_VOIP_MODE; +#endif + #ifdef DEBUGGING typedef enum _IVAS_DEC_FORCED_REND_MODE { @@ -117,9 +132,11 @@ typedef ivas_error ( *JbmTraceFileWriterFn )( const void *data, void *writer ); /*! r: error code */ ivas_error IVAS_DEC_Open( IVAS_DEC_HANDLE *phIvasDec, /* i/o: pointer to an IVAS decoder handle to be opened */ - IVAS_DEC_MODE mode, /* i : compatibility mode (EVS or IVAS) */ - const int16_t orientation_tracking, /* i : orientation tracking type */ - float no_diegetic_pan + IVAS_DEC_MODE mode /* i : compatibility mode (EVS or IVAS) */ +#ifndef FIX_439_OTR_PARAMS + , + const int16_t orientation_tracking /* i : orientation tracking type */ +#endif ); /*! r: error code */ @@ -130,7 +147,12 @@ ivas_error IVAS_DEC_Configure( const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */ const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */ - const int16_t renderConfigEnabled /* i : enable Renderer config. file for binaural output */ +#ifdef FIX_439_OTR_PARAMS + const HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ +#endif + const int16_t renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ + const int16_t Opt_non_diegetic_pan, /* i : diegetic or not */ + const float non_diegetic_pan_gain /* i : non diegetic panning gain */ ); void IVAS_DEC_Close( @@ -199,23 +221,49 @@ ivas_error IVAS_DEC_VoIP_FeedFrame( const bool qBit /* i : Q bit for AMR-WB IO */ ); +#ifdef VARIABLE_SPEED_DECODING +/*! r: error code */ +ivas_error IVAS_DEC_VoIP_SetScale( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t scale /* i : TSM scale to set */ +); +#endif + /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ const uint32_t systemTimestamp_ms /* i : current system timestamp */ +#if defined( JBM_TSM_ON_TCS ) || defined(VARIABLE_SPEED_DECODING ) + , + uint16_t *sampleAvailableNext /* o : samples available for the next call */ +#endif #ifdef SUPPORT_JBM_TRACEFILE , JbmTraceFileWriterFn jbmWriterFn, void* jbmWriter #endif ); +#if defined( JBM_TSM_ON_TCS ) || defined(VARIABLE_SPEED_DECODING ) +ivas_error IVAS_DEC_VoIP_Flush( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available */ + int16_t *nSamplesFlushed /* o : number of samples flushed */ +); +#endif + /* Setter functions - apply changes to decoder configuration */ /*! r: error code */ ivas_error IVAS_DEC_EnableVoIP( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ +#ifdef VARIABLE_SPEED_DECODING + const IVAS_DEC_VOIP_MODE voipMode, /* i : VoIP or varable speed */ + const uint16_t speedFac, /* i : speed factor for varable speed */ +#endif const int16_t jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ ); @@ -331,6 +379,10 @@ ivas_error IVAS_DEC_GetPcmFrameSize( /*! r: true if decoder has no data in VoIP jitter buffer */ bool IVAS_DEC_VoIP_IsEmpty( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ +#ifdef JBM_TSM_ON_TCS + , + int16_t nSamplesAsked +#endif ); ivas_error IVAS_DEC_VoIP_Get_CA_offset( diff --git a/lib_dec/stat_dec.h b/lib_dec/stat_dec.h index 9d3adbb18193ce2fd2e544a82d52661eb4734214..c971cf0e21f1d08f3f3c0ca19c4d774e6f4ffc0f 100644 --- a/lib_dec/stat_dec.h +++ b/lib_dec/stat_dec.h @@ -105,23 +105,15 @@ typedef struct float cna_LR_LT; /* stereo CNA - long-term L/R correlation factor calculated on stereo upmix */ float cna_ILD_LT; /* stereo CNA - long-term ILD factor calculated on stereo upmix */ float cna_g_state[STEREO_DFT_BAND_MAX]; /* stereo CNA - side gains from the last inactive frame */ -#ifdef FIX_I414_OOA_CNA - float cna_cm[STEREO_DFT_BAND_MAX]; /* stereo CNA - coherence from the last inactive frame */ -#else - float cna_cm[STEREO_DFT_BAND_MAX + 1]; /* stereo CNA - coherence from the last inactive frame */ -#endif - int16_t first_cna_noise_updated; /* stereo CNA - flag indicating that comfort noise has been properly initialized during warmup */ - int16_t first_cna_noise_update_cnt; /* stereo CNA - counter of CN initialization frames */ - int16_t cna_nbands; /* stereo CNA - number of frequency bands used by the CNA in DFT stereo mode */ + float cna_cm[STEREO_DFT_BAND_MAX]; /* stereo CNA - coherence from the last inactive frame */ + int16_t first_cna_noise_updated; /* stereo CNA - flag indicating that comfort noise has been properly initialized during warmup */ + int16_t first_cna_noise_update_cnt; /* stereo CNA - counter of CN initialization frames */ + int16_t cna_nbands; /* stereo CNA - number of frequency bands used by the CNA in DFT stereo mode */ -#ifdef FIX_I414_OOA_CNA int16_t cna_band_limits[STEREO_DFT_BAND_MAX + 1]; /* stereo CNA - band limits used by the CNA in DFT stereo mode */ -#else - int16_t cna_band_limits[MAX_CNA_NBANDS + 1]; /* stereo CNA - band limits used by the CNA in DFT stereo mode */ -#endif - float cna_act_fact; /* stereo CNA - long-term signal activity factor (0-1) */ - float cna_rescale_fact; /* stereo CNA - CN energy re-scaling factor to maintain decoded energy */ - int16_t cna_seed; /* stereo CNA - seed for random CN generator */ + float cna_act_fact; /* stereo CNA - long-term signal activity factor (0-1) */ + float cna_rescale_fact; /* stereo CNA - CN energy re-scaling factor to maintain decoded energy */ + int16_t cna_seed; /* stereo CNA - seed for random CN generator */ int16_t flag_dtx_mode; float lp_speech; @@ -1354,10 +1346,7 @@ typedef struct Decoder_State /* MCT Channel mode indication: LFE, ignore channel? */ MCT_CHAN_MODE mct_chan_mode; - int16_t cng_ism_flag; /* CNG in ISM format flag */ -#ifndef FIX_ISM_DTX_CNG_BWIDTH_ALT - int16_t read_sid_info; /* For ParamISM, use the transmitted noise */ -#endif + int16_t cng_ism_flag; /* CNG in ISM format flag */ int16_t is_ism_format; /* Indication whether the codec operates in ISM format */ } Decoder_State, *DEC_CORE_HANDLE; diff --git a/lib_enc/acelp_core_switch_enc.c b/lib_enc/acelp_core_switch_enc.c index f573649d3ce1ef95580e7f1a0e438f49e093cd1e..0fa3ba313061ef4ef7b4df962e3a2f7d1f6f50f4 100644 --- a/lib_enc/acelp_core_switch_enc.c +++ b/lib_enc/acelp_core_switch_enc.c @@ -73,6 +73,10 @@ void acelp_core_switch_enc( const float *inp; int32_t cbrate; float Aq[2 * ( M + 1 )]; +#ifdef IND_LIST_DYN + uint16_t value; + int16_t nb_bits; +#endif BSTR_ENC_HANDLE hBstr = st->hBstr; /* initializations */ @@ -159,12 +163,25 @@ void acelp_core_switch_enc( * Manipulate ACELP subframe indices (move them to their proper place) *----------------------------------------------------------------*/ +#ifdef IND_LIST_DYN + i = find_indice( hBstr, TAG_ACELP_SUBFR_LOOP_START, &value, &nb_bits ); +#ifdef DEBUGGING + assert( i >= 0 && "Internal error in ACELP core switching - unable to find ACELP subframe indices!" ); +#endif + while ( hBstr->ind_list[i].id == TAG_ACELP_SUBFR_LOOP_START ) + { + push_indice( hBstr, IND_CORE_SWITCHING_CELP_SUBFRAME, hBstr->ind_list[i].value, hBstr->ind_list[i].nb_bits ); + i++; + } + delete_indice( hBstr, TAG_ACELP_SUBFR_LOOP_START ); +#else for ( i = 0; i < 20; i++ ) { hBstr->ind_list[IND_CORE_SWITCHING_CELP_SUBFRAME + i].value = hBstr->ind_list[TAG_ACELP_SUBFR_LOOP_START + i].value; hBstr->ind_list[IND_CORE_SWITCHING_CELP_SUBFRAME + i].nb_bits = hBstr->ind_list[TAG_ACELP_SUBFR_LOOP_START + i].nb_bits; hBstr->ind_list[TAG_ACELP_SUBFR_LOOP_START + i].nb_bits = -1; } +#endif /*----------------------------------------------------------------* * BWE encoding diff --git a/lib_enc/cng_enc.c b/lib_enc/cng_enc.c index 14eef260b465b5b7354e7bb06820257f4c2cd160..6d49d9c8863d9c98ded4ccaf0ffeffcd4e9e0c84 100644 --- a/lib_enc/cng_enc.c +++ b/lib_enc/cng_enc.c @@ -881,8 +881,12 @@ void swb_CNG_enc( else if ( st->element_mode == IVAS_CPE_DFT && st->core_brate == SID_2k40 ) { /* LF-boost not used in DFT-stereo, instead the bandwidth is transmitted */ +#ifdef IND_LIST_DYN + delete_indice( st->hBstr, IND_CNG_ENV1 ); +#else st->hBstr->nb_bits_tot = st->hBstr->nb_bits_tot - st->hBstr->ind_list[IND_CNG_ENV1].nb_bits; st->hBstr->ind_list[IND_CNG_ENV1].nb_bits = -1; +#endif push_indice( st->hBstr, IND_BWIDTH, st->bwidth, 2 ); push_indice( st->hBstr, IND_UNUSED, 0, 4 ); push_indice( st->hBstr, IND_SID_BW, 1, 1 ); @@ -958,8 +962,12 @@ static void shb_CNG_encod( push_indice( hBstr, IND_SHB_CNG_GAIN, idx_ener, 4 ); push_indice( hBstr, IND_SID_BW, 1, 1 ); +#ifdef IND_LIST_DYN + delete_indice( hBstr, IND_CNG_ENV1 ); +#else hBstr->nb_bits_tot = hBstr->nb_bits_tot - hBstr->ind_list[IND_CNG_ENV1].nb_bits; hBstr->ind_list[IND_CNG_ENV1].nb_bits = -1; +#endif if ( st->element_mode == IVAS_CPE_DFT ) { push_indice( st->hBstr, IND_BWIDTH, st->bwidth, 2 ); diff --git a/lib_enc/dtx.c b/lib_enc/dtx.c index 08d4316750868e4b72df31b8bf6ec6a11e393a84..8357dd3a82c2dedcf99d2b534d1ae36b5c7e12b8 100644 --- a/lib_enc/dtx.c +++ b/lib_enc/dtx.c @@ -63,12 +63,8 @@ #define LTE_VAR -4.0f -#define MAX_BRATE_DTX_EVS ACELP_24k40 /* maximum bitrate to which the default DTX is applied in EVS; otherwise DTX is applied only in silence */ -#ifndef FIX_368_SBA_MODE -#define MAX_BRATE_DTX_IVAS IVAS_64k /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */ -#else -#define MAX_BRATE_DTX_IVAS IVAS_80k /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */ -#endif +#define MAX_BRATE_DTX_EVS ACELP_24k40 /* maximum bitrate to which the default DTX is applied in EVS; otherwise DTX is applied only in silence */ +#define MAX_BRATE_DTX_IVAS IVAS_80k /* maximum bitrate to which the default DTX is applied in IVAS; otherwise DTX is applied only in silence */ /*-------------------------------------------------------------------* * Local function prototypes *-------------------------------------------------------------------*/ @@ -238,11 +234,7 @@ void dtx( } else { -#ifdef FIX_357_DTX_32K if ( ( st->cng_type == FD_CNG && ( st->total_brate <= MAX_BRATE_DTX_EVS || ( st->element_mode != EVS_MONO && ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ) ) || ( st->element_mode == IVAS_CPE_MDCT ) ) /* at highest bitrates, use exclusively LP_CNG */ -#else - if ( ( st->cng_type == FD_CNG && ( st->total_brate <= MAX_BRATE_DTX_EVS || ( st->element_mode == IVAS_SCE && ivas_total_brate <= MAX_BRATE_DTX_IVAS ) ) ) || ( st->element_mode == IVAS_CPE_MDCT ) ) /* at highest bitrates, use exclusively LP_CNG */ -#endif { if ( st->element_mode == EVS_MONO && ( st->total_brate == ACELP_9k60 || st->total_brate == ACELP_16k40 || st->total_brate == ACELP_24k40 ) ) { @@ -263,7 +255,13 @@ void dtx( /* reset the bitstream (IVAS format signaling was already written) */ if ( st->element_mode != IVAS_CPE_MDCT && st->hBstr != NULL ) { - reset_indices_enc( st->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( st->hBstr, +#ifdef IND_LIST_DYN + st->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } } diff --git a/lib_enc/enc_ppp.c b/lib_enc/enc_ppp.c index 823d6cf3cdb244a96f0f894df172f66aafbf0b7d..328c1d5b5215d500452fcb61e3e6a76f71597a95 100644 --- a/lib_enc/enc_ppp.c +++ b/lib_enc/enc_ppp.c @@ -169,7 +169,14 @@ ivas_error encod_ppp( } /* delete previous indices */ - reset_indices_enc( hBstr, MAX_NUM_INDICES ); + reset_indices_enc( hBstr, +#ifdef IND_LIST_DYN + hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); + /* signaling matrix (writing of signaling bits) */ signaling_enc( st ); diff --git a/lib_enc/eval_pit_contr.c b/lib_enc/eval_pit_contr.c index 5dd310177230d29c68fe414a5eaa9db3e7ce91cd..76bf54b0254641fe7d8ce3aa6c3761c991cd6835 100644 --- a/lib_enc/eval_pit_contr.c +++ b/lib_enc/eval_pit_contr.c @@ -326,18 +326,26 @@ int16_t Pit_exc_contribution_len( /* pitch contribution useless - delete all previously written indices belonging to pitch contribution */ for ( i = TAG_ACELP_SUBFR_LOOP_START; i < TAG_ACELP_SUBFR_LOOP_END; i++ ) { +#ifdef IND_LIST_DYN + delete_indice( hBstr, i ); +#else if ( hBstr->ind_list[i].nb_bits != -1 ) { hBstr->nb_bits_tot -= hBstr->ind_list[i].nb_bits; hBstr->ind_list[i].nb_bits = -1; } +#endif } +#ifdef IND_LIST_DYN + delete_indice( hBstr, IND_ES_PRED ); +#else if ( hBstr->ind_list[IND_ES_PRED].nb_bits != -1 ) { hBstr->nb_bits_tot -= hBstr->ind_list[IND_ES_PRED].nb_bits; hBstr->ind_list[IND_ES_PRED].nb_bits = -1; } +#endif } if ( st->core_brate < CFREQ_BITRATE ) diff --git a/lib_enc/evs_enc.c b/lib_enc/evs_enc.c index da0556dd7215497b3c2151a963a9b0569d306435..c45bb444f3aac3fd061469feb5ec6a3b816a3d43 100644 --- a/lib_enc/evs_enc.c +++ b/lib_enc/evs_enc.c @@ -103,6 +103,7 @@ ivas_error evs_enc( error = IVAS_ERR_OK; push_wmops( "evs_enc" ); + /*------------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ diff --git a/lib_enc/ext_sig_ana.c b/lib_enc/ext_sig_ana.c index 80e652cf07c987e48b36c93a601650838efc12a3..e76457e61c941f689e42359149bc27bfb3702a39 100644 --- a/lib_enc/ext_sig_ana.c +++ b/lib_enc/ext_sig_ana.c @@ -443,11 +443,13 @@ void core_signal_analysis_high_bitrate( { ProcessIGF( st, hTcxEnc->spectrum[frameno], hTcxEnc->spectrum[frameno], powerSpec, transform_type[frameno] == TCX_20, frameno, 0, vad_hover_flag ); } - - /* Copy memory */ - mvr2r( lsp_new, st->lspold_enc, M ); } } + if ( st->element_mode != IVAS_CPE_MDCT ) + { + /* Copy memory */ + mvr2r( lsp_new, st->lspold_enc, M ); + } return; } diff --git a/lib_enc/fd_cng_enc.c b/lib_enc/fd_cng_enc.c index d71c24d45c0c8a1d04170f0f884658ab2cccbbcf..3ac5b8d6908fc3756e7d4a403ad6fd118a65f726 100644 --- a/lib_enc/fd_cng_enc.c +++ b/lib_enc/fd_cng_enc.c @@ -923,8 +923,21 @@ void stereoFdCngCoherence( else if ( sts[0]->core_brate <= SID_2k40 && sts[1]->core_brate <= SID_2k40 ) { /* case: no VAD for both channels -> INACTIVE FRAME */ - reset_indices_enc( sts[0]->hBstr, MAX_NUM_INDICES ); - reset_indices_enc( sts[1]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( sts[0]->hBstr, +#ifdef IND_LIST_DYN + sts[0]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); + + reset_indices_enc( sts[1]->hBstr, +#ifdef IND_LIST_DYN + sts[1]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); /* synchronize SID sending for variable SID rate */ if ( sts[0]->core_brate != sts[1]->core_brate ) @@ -1174,12 +1187,14 @@ void FdCngEncodeMDCTStereoSID( /* ---- Write SID bitstream ---- */ +#ifndef IND_LIST_DYN /* side info */ push_indice( sts[0]->hBstr, IND_SID_TYPE, 1, 1 ); push_indice( sts[0]->hBstr, IND_BWIDTH, sts[0]->bwidth, 2 ); push_indice( sts[0]->hBstr, IND_ACELP_16KHZ, sts[0]->L_frame == L_FRAME16k ? 1 : 0, 1 ); push_indice( sts[1]->hBstr, IND_SID_TYPE, coh_idx, 4 ); push_indice( sts[1]->hBstr, IND_SID_TYPE, no_side_flag, 1 ); +#endif /* noise shapes and channel gains */ for ( ch = 0; ch < CPE_CHANNELS; ch++ ) @@ -1187,10 +1202,23 @@ void FdCngEncodeMDCTStereoSID( if ( ch ) { stages = FD_CNG_JOINT_stages_25bits; +#ifdef IND_LIST_DYN + sts[ch]->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + + /* side info */ + push_indice( sts[ch]->hBstr, IND_SID_TYPE, coh_idx, 4 ); + push_indice( sts[ch]->hBstr, IND_SID_TYPE, no_side_flag, 1 ); +#endif } else { stages = FD_CNG_stages_37bits; +#ifdef IND_LIST_DYN + /* side info */ + push_indice( sts[ch]->hBstr, IND_SID_TYPE, 1, 1 ); + push_indice( sts[ch]->hBstr, IND_BWIDTH, sts[0]->bwidth, 2 ); + push_indice( sts[ch]->hBstr, IND_ACELP_16KHZ, sts[0]->L_frame == L_FRAME16k ? 1 : 0, 1 ); +#endif } for ( int16_t i = 0; i < stages; i++ ) diff --git a/lib_enc/igf_enc.c b/lib_enc/igf_enc.c index 9c68e3fcc760981ad66e0da3ec77b7ebd427ce18..677bc1639e39dca3ff9e3686b0d156ab99eaa31f 100644 --- a/lib_enc/igf_enc.c +++ b/lib_enc/igf_enc.c @@ -1707,6 +1707,41 @@ void IGFEncSetMode( return; } +#ifdef IND_LIST_DYN + +/*-------------------------------------------------------------------* + * pack_bit() + * + * insert a bit into packed octet + *-------------------------------------------------------------------*/ + +static void pack_bit( + const int16_t bit, /* i : bit to be packed */ + uint8_t **pt, /* i/o: pointer to octet array into which bit will be placed */ + uint8_t *omask /* i/o: output mask to indicate where in the octet the bit is to be written */ +) +{ + if ( *omask == 0x80 ) + { + **pt = 0; + } + + if ( bit != 0 ) + { + **pt = **pt | *omask; + } + + *omask >>= 1; + if ( *omask == 0 ) + { + *omask = 0x80; + ( *pt )++; + } + + return; +} + +#endif /*-------------------------------------------------------------------* * IGFEncConcatenateBitstream() @@ -1722,10 +1757,56 @@ void IGFEncConcatenateBitstream( { int16_t i; IGF_ENC_PRIVATE_DATA_HANDLE hPrivateData; +#ifdef IND_LIST_DYN + Indice *ind_list; + uint8_t *pFrame; /* byte array with bit packet and byte aligned coded speech data */ + int16_t *pFrame_size; /* number of bits in the binary encoded access unit [bits] */ + int16_t k, nb_bits_written; + int32_t imask; + uint8_t omask; +#endif hPrivateData = &hIGFEnc->igfData; +#ifndef IND_LIST_DYN hBstr->next_ind -= bsBits; +#endif + +#ifdef IND_LIST_DYN + ind_list = &hBstr->ind_list[hBstr->nb_ind_tot - bsBits]; /* here, we assume that each bit has been written as a single indice */ + pFrame = hPrivateData->igfBitstream; + pFrame_size = &hPrivateData->igfBitstreamBits; + nb_bits_written = 0; + + omask = ( 0x80 >> ( *pFrame_size & 0x7 ) ); + pFrame += *pFrame_size >> 3; + + /* bitstream packing (conversion of individual indices into a serial stream) */ + for ( i = 0; i < bsBits; i++ ) + { + if ( ind_list[i].nb_bits > 0 ) + { + /* mask from MSB to LSB */ + imask = 1 << ( ind_list[i].nb_bits - 1 ); + /* write bit by bit */ + for ( k = 0; k < ind_list[i].nb_bits; k++ ) + { + pack_bit( ind_list[i].value & imask, &pFrame, &omask ); + imask >>= 1; + } + nb_bits_written += ind_list[i].nb_bits; + + /* delete the indice */ + ind_list[i].nb_bits = -1; + } + } + + *pFrame_size += nb_bits_written; + + /* update list of indices */ + hBstr->nb_ind_tot -= bsBits; + hBstr->nb_bits_tot -= nb_bits_written; +#else indices_to_serial_generic( &hBstr->ind_list[hBstr->next_ind], bsBits, hPrivateData->igfBitstream, &hPrivateData->igfBitstreamBits ); /* make sure there are no leftovers from the temporary bitstream writing */ @@ -1735,6 +1816,7 @@ void IGFEncConcatenateBitstream( } hBstr->nb_bits_tot -= hIGFEnc->infoTotalBitsPerFrameWritten; +#endif return; } diff --git a/lib_enc/init_enc.c b/lib_enc/init_enc.c index 9efd3c7f166be25a773de9962c4ace5d943ae60e..42b4e8957d92ab0290e02ad72d9101b03aca4e72 100644 --- a/lib_enc/init_enc.c +++ b/lib_enc/init_enc.c @@ -54,7 +54,10 @@ *-----------------------------------------------------------------------*/ ivas_error init_encoder( - Encoder_State *st, /* i/o: state structure */ + Encoder_State *st, /* i/o: state structure */ +#ifdef IND_LIST_DYN + Encoder_Struct *st_ivas, /* i/o: encoder state structure */ +#endif const int16_t idchan, /* i : channel ID */ const int16_t var_SID_rate_flag, /* i : flag for variable SID update rate */ const int16_t interval_SID, /* i : interval for SID update */ @@ -112,6 +115,15 @@ ivas_error init_encoder( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Bitstream structure\n" ) ); } + +#ifdef IND_LIST_DYN + /* set pointer to the buffer of indices */ + st->hBstr->ind_list = st_ivas->ind_list; + st->hBstr->ivas_ind_list_zero = &st_ivas->ind_list; + st->hBstr->ivas_max_num_indices = &st_ivas->ivas_max_num_indices; + st->hBstr->nb_ind_tot = 0; + st->hBstr->nb_bits_tot = 0; +#endif } else { diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index c2627b923bed0d309efd02e639da02d21a894147..6536ee333eb4f1b071af67c0fe64eac4b3124fc8 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -103,6 +103,9 @@ ivas_error ivas_core_enc( int16_t last_element_mode, tdm_Pitch_reuse_flag; int32_t element_brate, last_element_brate, input_Fs; ivas_error error; +#ifdef IND_LIST_DYN + int16_t max_num_indices_BWE; +#endif push_wmops( "ivas_core_enc" ); @@ -195,6 +198,23 @@ ivas_error ivas_core_enc( { st = sts[n]; +#ifdef IND_LIST_DYN + /* update pointer to the buffer of indices of the second channel */ + if ( n == 1 && st->element_mode == IVAS_CPE_TD ) + { + /* adjust the pointer to the buffer of indices of the secondary channel (make space for BWE indices) */ + max_num_indices_BWE = get_BWE_max_num_indices( sts[0]->extl_brate ); + st->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot + max_num_indices_BWE; + + /* write TD stereo spatial parameters */ + move_indices( hStereoTD->tdm_hBstr_tmp.ind_list, st->hBstr->ind_list, hStereoTD->tdm_hBstr_tmp.nb_ind_tot ); + st->hBstr->nb_ind_tot += hStereoTD->tdm_hBstr_tmp.nb_ind_tot; + st->hBstr->nb_bits_tot += hStereoTD->tdm_hBstr_tmp.nb_bits_tot; + + reset_indices_enc( &hStereoTD->tdm_hBstr_tmp, MAX_IND_TDM_TMP ); + } +#endif + /*---------------------------------------------------------------------* * Write signaling info into the bitstream *---------------------------------------------------------------------*/ @@ -406,7 +426,6 @@ ivas_error ivas_core_enc( } } - #ifdef DEBUG_MODE_INFO for ( n = 0; n < n_CoreChannels; n++ ) { diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index cf23ddef539f2e2f7ceeba7997129b0f07829b9c..5f775d2403a18af76b8b74fc1d1816dfdf7c314d 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -563,7 +563,14 @@ ivas_error pre_proc_front_ivas( if ( st->hFdCngEnc != NULL && ( st->ini_frame == 0 || last_element_brate != element_brate || st->last_bwidth != st->bwidth ) ) { +#ifdef FIX_443_FD_CNG_INIT + int32_t total_brate; + + total_brate = ( element_mode == IVAS_SCE ) ? st->total_brate : st->bits_frame_nominal * FRAMES_PER_SEC; + configureFdCngEnc( st->hFdCngEnc, max( st->input_bwidth, WB ), total_brate ); +#else configureFdCngEnc( st->hFdCngEnc, max( st->input_bwidth, WB ), st->bits_frame_nominal * FRAMES_PER_SEC ); +#endif if ( hCPE != NULL ) { st->hFdCngEnc->hFdCngCom->CngBitrate = hCPE->element_brate - 1; diff --git a/lib_enc/ivas_corecoder_enc_reconfig.c b/lib_enc/ivas_corecoder_enc_reconfig.c index fcafb7110cc0cade4a863816450425245c612022..439a0f6c63916f60cdb25a74be7b84768ea6c9bc 100644 --- a/lib_enc/ivas_corecoder_enc_reconfig.c +++ b/lib_enc/ivas_corecoder_enc_reconfig.c @@ -41,7 +41,6 @@ #endif #include "wmc_auto.h" - /*-------------------------------------------------------------------* * ivas_corecoder_enc_reconfig() * @@ -61,9 +60,24 @@ ivas_error ivas_corecoder_enc_reconfig( int16_t n, sce_id, cpe_id; int16_t len_inp_memory, n_CoreCoder_existing, nSCE_existing, nCPE_existing; float input_buff[MCT_MAX_BLOCKS][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )]; - BSTR_ENC_HANDLE hBstr, hMetaData; - Indice *ind_list, *ind_list_metadata; - int16_t nb_bits_tot, next_ind, last_ind; + BSTR_ENC_HANDLE hBstr; +#ifndef IND_LIST_DYN + Indice *ind_list; +#endif +#ifndef IND_LIST_DYN + Indice *ind_list_metadata; + BSTR_ENC_HANDLE hMetaData; +#endif +#ifdef IND_LIST_DYN + int16_t i, nb_bits; + Indice temp_ind_list[MAX_NUM_IND_TEMP_LIST]; +#endif + int16_t nb_bits_tot; +#ifndef IND_LIST_DYN + int16_t last_ind; + int16_t next_ind; +#endif + ENCODER_CONFIG_HANDLE hEncoderConfig; ivas_error error; @@ -133,21 +147,29 @@ ivas_error ivas_corecoder_enc_reconfig( } /* something in transport changes */ +#ifndef IND_LIST_DYN ind_list = NULL; ind_list_metadata = NULL; +#endif hBstr = NULL; +#ifndef IND_LIST_DYN hMetaData = NULL; +#endif /* get the index list pointers */ if ( nSCE_old ) { hBstr = st_ivas->hSCE[0]->hCoreCoder[0]->hBstr; +#ifndef IND_LIST_DYN hMetaData = st_ivas->hSCE[0]->hMetaData; +#endif } else if ( nCPE_old ) { hBstr = st_ivas->hCPE[0]->hCoreCoder[0]->hBstr; +#ifndef IND_LIST_DYN hMetaData = st_ivas->hCPE[nCPE_old - 1]->hMetaData; +#endif } #ifdef DEBUGGING else @@ -157,11 +179,45 @@ ivas_error ivas_corecoder_enc_reconfig( #endif /* save bitstream information */ - ind_list = hBstr->ind_list; /* pointer to the beginning of the global list */ nb_bits_tot = hBstr->nb_bits_tot; +#ifndef IND_LIST_DYN + ind_list = hBstr->ind_list; /* pointer to the beginning of the global list */ next_ind = hBstr->next_ind; last_ind = hBstr->last_ind; +#endif +#ifdef IND_LIST_DYN + i = 0; + nb_bits = 0; + while ( nb_bits < nb_bits_tot && i < MAX_NUM_IND_TEMP_LIST ) + { + if ( hBstr->ind_list[i].nb_bits > 0 ) + { + temp_ind_list[i].id = hBstr->ind_list[i].id; + temp_ind_list[i].value = hBstr->ind_list[i].value; + temp_ind_list[i].nb_bits = hBstr->ind_list[i].nb_bits; + hBstr->ind_list[i].nb_bits = -1; + } + + hBstr->nb_bits_tot = 0; + hBstr->nb_ind_tot = 0; + + nb_bits += temp_ind_list[i].nb_bits; + i++; + } + + for ( ; i < MAX_NUM_IND_TEMP_LIST; i++ ) + { + /* reset nb_bits of all other indices to -1 */ + temp_ind_list[i].nb_bits = -1; + } + +#ifdef DEBUGGING + assert( ( nb_bits == nb_bits_tot ) && "Error saving bitstream information during core-coder reconfiguration!\n" ); +#endif +#endif +#ifndef IND_LIST_DYN ind_list_metadata = hMetaData->ind_list; /* pointer to the beginning of the global list */ +#endif if ( hEncoderConfig->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA && st_ivas->mc_mode == MC_MODE_MCMASA ) { @@ -256,23 +312,35 @@ ivas_error ivas_corecoder_enc_reconfig( mvr2r( input_buff[sce_id], st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff, len_inp_memory ); } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* allocate buffer of indices */ st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->ind_list = ind_list + sce_id * MAX_NUM_INDICES; +#endif /* only reset indices if it is not the first index list, this already contains the IVAS format bits */ if ( sce_id > 0 ) { - reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, +#ifdef IND_LIST_DYN + st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } else { - st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->last_ind = last_ind; +#ifndef IND_LIST_DYN st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->nb_bits_tot = nb_bits_tot; + st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->last_ind = last_ind; st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->next_ind = next_ind; +#endif } +#ifndef IND_LIST_DYN st_ivas->hSCE[sce_id]->hMetaData->ind_list = ind_list_metadata + sce_id * MAX_BITS_METADATA; reset_indices_enc( st_ivas->hSCE[sce_id]->hMetaData, MAX_BITS_METADATA ); +#endif } } @@ -284,22 +352,32 @@ ivas_error ivas_corecoder_enc_reconfig( { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; - /* prepare bitstream buffers */ + /* allocate buffer of indices */ for ( n = 0; n < CPE_CHANNELS; n++ ) { copy_encoder_config( st_ivas, st_ivas->hCPE[cpe_id]->hCoreCoder[n], 0 ); st_ivas->hCPE[cpe_id]->hCoreCoder[n]->total_brate = st_ivas->hCPE[cpe_id]->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ +#ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n + st_ivas->nSCE ) * MAX_NUM_INDICES; +#endif if ( cpe_id * CPE_CHANNELS + n > 0 || ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->nSCE > 0 ) ) { - reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, +#ifdef IND_LIST_DYN + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } else { - st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->last_ind = last_ind; +#ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_bits_tot = nb_bits_tot; + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->last_ind = last_ind; st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->next_ind = next_ind; +#endif } } } @@ -321,27 +399,33 @@ ivas_error ivas_corecoder_enc_reconfig( { if ( n_CoreCoder_existing > cpe_id * CPE_CHANNELS + n ) { -#ifdef FIX_386_CORECODER_RECONFIG_2 mvr2r( input_buff[n], st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff, len_inp_memory ); -#else - mvr2r( input_buff[n], st_ivas->hCPE[cpe_id]->hCoreCoder[0]->input_buff, len_inp_memory ); /* TODO VoiceAge: Please check if this should be hCoreCoder[n] */ -#endif } } - /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { +#ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list + ( cpe_id * CPE_CHANNELS + n + st_ivas->nSCE ) * MAX_NUM_INDICES; +#endif + /* only reset indices if it is not the first index list, this already contains the IVAS format bits */ if ( cpe_id * CPE_CHANNELS + n > 0 || ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->nSCE > 0 ) ) { - reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, +#ifdef IND_LIST_DYN + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } else { - st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->last_ind = last_ind; +#ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_bits_tot = nb_bits_tot; + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->last_ind = last_ind; st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->next_ind = next_ind; +#endif } if ( hEncoderConfig->Opt_DTX_ON ) @@ -352,6 +436,51 @@ ivas_error ivas_corecoder_enc_reconfig( } } +#ifdef IND_LIST_DYN + /* restore bitstream - IVAS format bits should be written in the first core channel of the first SCE/CPE */ + i = 0; + nb_bits = 0; + if ( st_ivas->nSCE > 0 ) + { + while ( nb_bits < nb_bits_tot && i < MAX_NUM_IND_TEMP_LIST ) + { + if ( temp_ind_list[i].nb_bits > 0 ) + { + st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].id = temp_ind_list[i].id; + st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].value = temp_ind_list[i].value; + st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits; + } + + nb_bits += temp_ind_list[i].nb_bits; + i++; + } + st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->nb_ind_tot = i; + st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->nb_bits_tot = nb_bits_tot; + } + else if ( st_ivas->nCPE > 0 ) + { + while ( nb_bits < nb_bits_tot && i < MAX_NUM_IND_TEMP_LIST ) + { + if ( temp_ind_list[i].nb_bits > 0 ) + { + st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].id = temp_ind_list[i].id; + st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].value = temp_ind_list[i].value; + st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits; + } + + nb_bits += temp_ind_list[i].nb_bits; + i++; + } + st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->nb_ind_tot = i; + st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->nb_bits_tot = nb_bits_tot; + } + +#ifdef DEBUGGING + assert( ( nb_bits == nb_bits_tot ) && "Error restoring bitstream information during core-coder reconfiguration!\n" ); +#endif +#endif + + if ( last_mc_mode == MC_MODE_MCMASA && st_ivas->mc_mode == MC_MODE_MCMASA ) { /* restore modified transport signal */ @@ -376,7 +505,6 @@ ivas_error ivas_corecoder_enc_reconfig( for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[0]->hCoreCoder[n]->total_brate = st_ivas->hCPE[0]->element_brate; - st_ivas->hCPE[0]->hCoreCoder[n]->bits_frame_nominal = (int16_t) ( st_ivas->hCPE[0]->element_brate / FRAMES_PER_SEC ); st_ivas->hCPE[0]->hCoreCoder[n]->igf = getIgfPresent( st_ivas->hCPE[0]->hCoreCoder[n]->element_mode, st_ivas->hCPE[0]->hCoreCoder[n]->bits_frame_nominal * FRAMES_PER_SEC, @@ -407,7 +535,7 @@ ivas_error ivas_corecoder_enc_reconfig( } } - /* metadata handling for CPEs */ + /* alllocate buffer for metadata indices */ if ( st_ivas->nCPE > 0 ) { if ( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData == NULL ) @@ -416,10 +544,23 @@ ivas_error ivas_corecoder_enc_reconfig( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MetaData structure\n" ) ); } + +#ifdef IND_LIST_DYN + /* set pointer to the buffer of metadata indices */ + st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->ind_list = st_ivas->ind_list_metadata; + st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->ivas_ind_list_zero = &st_ivas->ind_list_metadata; + st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->ivas_max_num_indices = &st_ivas->ivas_max_num_indices_metadata; + st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->nb_ind_tot = 0; + st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->nb_bits_tot = 0; +#endif } +#ifdef IND_LIST_DYN + reset_indices_enc( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData, st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->nb_ind_tot ); +#else st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData->ind_list = ind_list_metadata + st_ivas->nSCE * MAX_NUM_INDICES; reset_indices_enc( st_ivas->hCPE[st_ivas->nCPE - 1]->hMetaData, MAX_BITS_METADATA ); +#endif for ( cpe_id = 0; cpe_id < st_ivas->nCPE - 1; cpe_id++ ) { @@ -443,7 +584,6 @@ ivas_error ivas_corecoder_enc_reconfig( for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[0]->hCoreCoder[n]->total_brate = st_ivas->hCPE[0]->element_brate; - st_ivas->hCPE[0]->hCoreCoder[n]->bits_frame_nominal = (int16_t) ( st_ivas->hCPE[0]->element_brate / FRAMES_PER_SEC ); st_ivas->hCPE[0]->hCoreCoder[n]->igf = getIgfPresent( st_ivas->hCPE[0]->hCoreCoder[n]->element_mode, st_ivas->hCPE[0]->hCoreCoder[n]->bits_frame_nominal * FRAMES_PER_SEC, diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index e5f6adc64116f31c849bf24c5d7668ac438b6ace..268ad20de785622e0927385a463cb151f01cce96 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -333,7 +333,12 @@ ivas_error ivas_cpe_enc( if ( hCPE->element_mode == IVAS_CPE_DFT ) { - stereo_dft_hybrid_ITD_flag( hCPE->hStereoDft->hConfig, input_Fs ); + stereo_dft_hybrid_ITD_flag( hCPE->hStereoDft->hConfig, input_Fs +#ifdef HYBRID_ITD_MAX + , + hCPE->hStereoDft->hItd->hybrid_itd_max +#endif + ); /* Time Domain ITD compensation using extrapolation */ #ifdef DEBUG_MODE_DFT @@ -815,6 +820,14 @@ ivas_error create_cpe_enc( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MetaData structure\n" ) ); } + +#ifdef IND_LIST_DYN + /* set pointer to the buffer of metadata indices */ + hCPE->hMetaData->ind_list = st_ivas->ind_list_metadata; + hCPE->hMetaData->ivas_ind_list_zero = &st_ivas->ind_list_metadata; + hCPE->hMetaData->ivas_max_num_indices = &st_ivas->ivas_max_num_indices_metadata; + reset_indices_enc( hCPE->hMetaData, st_ivas->ivas_max_num_indices_metadata ); +#endif } /*-----------------------------------------------------------------* @@ -831,7 +844,11 @@ ivas_error create_cpe_enc( copy_encoder_config( st_ivas, st, 1 ); st->total_brate = hCPE->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; - if ( ( error = init_encoder( st, n, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 0, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) + if ( ( error = init_encoder( st, +#ifdef IND_LIST_DYN + st_ivas, +#endif + n, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 0, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 45ce09bb151e929cce83036f28bfff8d0ca21dad..efeb322d8508eb51ca073b7342b83d3f0d33a927 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -99,7 +99,10 @@ ivas_error ivas_dirac_enc_open( } else { - if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_DIRAC, DIRAC_MAX_ANA_CHANS, 0, 0, input_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_DIRAC, + FOA_CHANNELS, + 0, 0, input_Fs, + FOA_CHANNELS ) ) != IVAS_ERR_OK ) { return error; } @@ -236,7 +239,15 @@ ivas_error ivas_dirac_enc_reconfigure( /* :TODO: if the number of parameter bands change, do a meaningful mapping of parameter buffers from old to new band setting */ - mvs2s( DirAC_block_grouping, hDirAC->block_grouping, MAX_PARAM_SPATIAL_SUBFRAMES + 1 ); + if ( st_ivas->hQMetaData->useLowerRes ) + { + hDirAC->block_grouping[0] = 0; + hDirAC->block_grouping[1] = MAX_PARAM_SPATIAL_SUBFRAMES; + } + else + { + mvs2s( DirAC_block_grouping_5ms_MDFT, hDirAC->block_grouping, MAX_PARAM_SPATIAL_SUBFRAMES + 1 ); + } return error; } @@ -364,7 +375,9 @@ void ivas_dirac_enc( set_zero( data_f[2], input_frame ); } - ivas_dirac_param_est_enc( hDirAC, &( hQMetaData->q_direction[0] ), hQMetaData->useLowerRes, data_f, NULL, NULL, input_frame, SBA_MODE_DIRAC ); + ivas_dirac_param_est_enc( hDirAC, &( hQMetaData->q_direction[0] ), hQMetaData->useLowerRes, data_f, NULL, NULL, input_frame, SBA_MODE_DIRAC, + 0, + FOA_CHANNELS ); /* encode parameters */ if ( sba_planar || hQMetaData->useLowerRes ) @@ -376,7 +389,8 @@ void ivas_dirac_enc( } } - ivas_qmetadata_enc_encode( hMetaData, hQMetaData ); + ivas_qmetadata_enc_encode( hMetaData, hQMetaData, + 0 ); *nb_bits_metadata = hMetaData->nb_bits_tot; @@ -540,6 +554,8 @@ void computeReferencePower_enc( const int16_t enc_param_start_band, /* i : first band to process */ const int16_t num_freq_bands, /* i : Number of frequency bands */ const SBA_MODE sba_mode /* i : SBA mode */ + , + const int16_t nchan_ana /* i : number of analysis channels */ ) { int16_t brange[2]; @@ -559,7 +575,8 @@ void computeReferencePower_enc( reference_power_W[i] += ( Cldfb_RealBuffer[0][j] * Cldfb_RealBuffer[0][j] ) + ( Cldfb_ImagBuffer[0][j] * Cldfb_ImagBuffer[0][j] ); } reference_power[i] += reference_power_W[i]; - for ( ch_idx = 1; ch_idx < DIRAC_MAX_ANA_CHANS; ch_idx++ ) + + for ( ch_idx = 1; ch_idx < nchan_ana; ch_idx++ ) { /* abs()^2 */ for ( j = brange[0]; j < brange[1]; j++ ) @@ -596,7 +613,9 @@ void ivas_dirac_param_est_enc( float **pp_fr_real, float **pp_fr_imag, const int16_t input_frame, - const SBA_MODE sba_mode ) + const SBA_MODE sba_mode, + const int16_t hodirac_flag, + const int16_t nchan_fb_in ) { int16_t i, d, ts, index, l_ts, num_freq_bands; int16_t band_m_idx, block_m_idx; @@ -617,8 +636,15 @@ void ivas_dirac_param_est_enc( float reference_power[CLDFB_NO_COL_MAX][DIRAC_NO_FB_BANDS_MAX]; + float azi_secs[2 * DIRAC_MAX_ANA_CHANS * DIRAC_MAX_NBANDS] = { 0 }; + float ele_secs[2 * DIRAC_MAX_ANA_CHANS * DIRAC_MAX_NBANDS] = { 0 }; + float diff_secs[2 * DIRAC_MAX_ANA_CHANS * DIRAC_MAX_NBANDS] = { 0 }; + float ene_secs[2 * DIRAC_MAX_ANA_CHANS * DIRAC_MAX_NBANDS] = { 0 }; + push_wmops( "dirac_enc_param_est" ); + num_freq_bands = hDirAC->hConfig->nbands; + /* Initialization */ l_ts = input_frame / MAX_PARAM_SPATIAL_SUBFRAMES; if ( useLowerRes ) @@ -640,7 +666,7 @@ void ivas_dirac_param_est_enc( } /* Copy current frame to memory for delay compensation */ - for ( i = 0; i < DIRAC_MAX_ANA_CHANS; i++ ) + for ( i = 0; i < nchan_fb_in; i++ ) { pcm_in[i] = &data_f[i][0]; p_Cldfb_RealBuffer[i] = &Cldfb_RealBuffer[i][0]; @@ -665,10 +691,12 @@ void ivas_dirac_param_est_enc( { if ( hDirAC->hFbMixer ) { - ivas_fb_mixer_get_windowed_fr( hDirAC->hFbMixer, pcm_in, p_Cldfb_RealBuffer, p_Cldfb_ImagBuffer, l_ts, l_ts ); - ivas_fb_mixer_update_prior_input( hDirAC->hFbMixer, pcm_in, l_ts ); + ivas_fb_mixer_get_windowed_fr( hDirAC->hFbMixer, pcm_in, p_Cldfb_RealBuffer, p_Cldfb_ImagBuffer, l_ts, l_ts, + hDirAC->hFbMixer->fb_cfg->num_in_chans ); + ivas_fb_mixer_update_prior_input( hDirAC->hFbMixer, pcm_in, l_ts, + hDirAC->hFbMixer->fb_cfg->num_in_chans ); - for ( i = 0; i < DIRAC_MAX_ANA_CHANS; i++ ) + for ( i = 0; i < nchan_fb_in; i++ ) { pcm_in[i] += l_ts; } @@ -679,15 +707,14 @@ void ivas_dirac_param_est_enc( assert( pp_fr_real ); assert( pp_fr_imag ); #endif - for ( i = 0; i < DIRAC_MAX_ANA_CHANS; i++ ) + + for ( i = 0; i < nchan_fb_in; i++ ) { - mvr2r( &pp_fr_real[i][block_m_idx * l_ts], Cldfb_RealBuffer[i], l_ts ); - mvr2r( &pp_fr_imag[i][block_m_idx * l_ts], Cldfb_ImagBuffer[i], l_ts ); + mvr2r( &pp_fr_real[i][ts * l_ts], Cldfb_RealBuffer[i], l_ts ); + mvr2r( &pp_fr_imag[i][ts * l_ts], Cldfb_ImagBuffer[i], l_ts ); } } - num_freq_bands = hDirAC->hConfig->nbands; - computeReferencePower_enc( hDirAC->band_grouping, Cldfb_RealBuffer, @@ -695,7 +722,8 @@ void ivas_dirac_param_est_enc( reference_power[ts], hDirAC->hConfig->enc_param_start_band, num_freq_bands, - sba_mode ); + hodirac_flag ? SBA_MODE_DIRAC : sba_mode, + FOA_CHANNELS ); computeIntensityVector_enc( hDirAC, @@ -705,15 +733,18 @@ void ivas_dirac_param_est_enc( num_freq_bands, intensity_real ); - computeDirectionVectors( - intensity_real[0], - intensity_real[1], - intensity_real[2], - hDirAC->hConfig->enc_param_start_band, - num_freq_bands, - direction_vector[0], - direction_vector[1], - direction_vector[2] ); + if ( !hodirac_flag ) + { + computeDirectionVectors( + intensity_real[0], + intensity_real[1], + intensity_real[2], + hDirAC->hConfig->enc_param_start_band, + num_freq_bands, + direction_vector[0], + direction_vector[1], + direction_vector[2] ); + } /* fill buffers of length "averaging_length" time slots for intensity and energy */ hDirAC->index_buffer_intensity = ( hDirAC->index_buffer_intensity % hDirAC->no_col_avg_diff ) + 1; /* averaging_length = 32 */ @@ -727,49 +758,89 @@ void ivas_dirac_param_est_enc( computeDiffuseness_mdft( hDirAC->buffer_intensity_real, hDirAC->buffer_energy, num_freq_bands, hDirAC->no_col_avg_diff, diffuseness_vector ); - for ( band_m_idx = 0; band_m_idx < hDirAC->hConfig->nbands; band_m_idx++ ) + if ( hodirac_flag ) { - norm_tmp = reference_power[ts][band_m_idx] * ( 1 - diffuseness_vector[band_m_idx] ); - - hDirAC->direction_vector_m[0][block_m_idx][band_m_idx] += norm_tmp * direction_vector[0][band_m_idx]; - hDirAC->direction_vector_m[1][block_m_idx][band_m_idx] += norm_tmp * direction_vector[1][band_m_idx]; - hDirAC->direction_vector_m[2][block_m_idx][band_m_idx] += norm_tmp * direction_vector[2][band_m_idx]; - renormalization_factor[band_m_idx] += norm_tmp; - - hDirAC->diffuseness_m[band_m_idx] += reference_power[ts][band_m_idx] * diffuseness_vector[band_m_idx]; - renormalization_factor_diff[band_m_idx] += reference_power[ts][band_m_idx]; - } - } - for ( band_m_idx = 0; band_m_idx < hDirAC->hConfig->nbands; band_m_idx++ ) - { - renormalization_factor[band_m_idx] = EPSILON; - for ( d = 0; d < DIRAC_NUM_DIMS; d++ ) - { - renormalization_factor[band_m_idx] += ( hDirAC->direction_vector_m[d][block_m_idx][band_m_idx] * hDirAC->direction_vector_m[d][block_m_idx][band_m_idx] ); + calculate_hodirac_sector_parameters( Cldfb_RealBuffer, Cldfb_ImagBuffer, l_ts, 0.20f, hDirAC->band_grouping, hDirAC->hConfig->nbands, hDirAC->hConfig->enc_param_start_band, azi_secs, ele_secs, diff_secs, ene_secs ); } - renormalization_factor[band_m_idx] = sqrtf( renormalization_factor[band_m_idx] ); - if ( renormalization_factor[band_m_idx] > EPSILON ) + if ( hodirac_flag ) { - hDirAC->direction_vector_m[0][block_m_idx][band_m_idx] /= renormalization_factor[band_m_idx]; - hDirAC->direction_vector_m[1][block_m_idx][band_m_idx] /= renormalization_factor[band_m_idx]; - hDirAC->direction_vector_m[2][block_m_idx][band_m_idx] /= renormalization_factor[band_m_idx]; + for ( band_m_idx = 0; band_m_idx < hDirAC->hConfig->nbands; band_m_idx++ ) + { + hDirAC->diffuseness_m[band_m_idx] += reference_power[ts][band_m_idx] * diffuseness_vector[band_m_idx]; + renormalization_factor_diff[band_m_idx] += reference_power[ts][band_m_idx]; + } } else { - hDirAC->direction_vector_m[0][block_m_idx][band_m_idx] = 1; - hDirAC->direction_vector_m[1][block_m_idx][band_m_idx] = 0; - hDirAC->direction_vector_m[2][block_m_idx][band_m_idx] = 0; + for ( band_m_idx = 0; band_m_idx < hDirAC->hConfig->nbands; band_m_idx++ ) + { + norm_tmp = reference_power[ts][band_m_idx] * ( 1 - diffuseness_vector[band_m_idx] ); + + hDirAC->direction_vector_m[0][block_m_idx][band_m_idx] += norm_tmp * direction_vector[0][band_m_idx]; + hDirAC->direction_vector_m[1][block_m_idx][band_m_idx] += norm_tmp * direction_vector[1][band_m_idx]; + hDirAC->direction_vector_m[2][block_m_idx][band_m_idx] += norm_tmp * direction_vector[2][band_m_idx]; + renormalization_factor[band_m_idx] += norm_tmp; + + hDirAC->diffuseness_m[band_m_idx] += reference_power[ts][band_m_idx] * diffuseness_vector[band_m_idx]; + renormalization_factor_diff[band_m_idx] += reference_power[ts][band_m_idx]; + } } + } - /* save the elevation and azimuth values to be used later by the ivas_dirac_QuantizeParameters function */ - for ( d = 0; d < DIRAC_NUM_DIMS; d++ ) + if ( !hodirac_flag ) + + { + + for ( band_m_idx = 0; band_m_idx < hDirAC->hConfig->nbands; band_m_idx++ ) { - dir_v[d] = hDirAC->direction_vector_m[d][block_m_idx][band_m_idx]; + renormalization_factor[band_m_idx] = EPSILON; + for ( d = 0; d < DIRAC_NUM_DIMS; d++ ) + { + renormalization_factor[band_m_idx] += ( hDirAC->direction_vector_m[d][block_m_idx][band_m_idx] * hDirAC->direction_vector_m[d][block_m_idx][band_m_idx] ); + } + renormalization_factor[band_m_idx] = sqrtf( renormalization_factor[band_m_idx] ); + + if ( renormalization_factor[band_m_idx] > EPSILON ) + { + hDirAC->direction_vector_m[0][block_m_idx][band_m_idx] /= renormalization_factor[band_m_idx]; + hDirAC->direction_vector_m[1][block_m_idx][band_m_idx] /= renormalization_factor[band_m_idx]; + hDirAC->direction_vector_m[2][block_m_idx][band_m_idx] /= renormalization_factor[band_m_idx]; + } + else + { + hDirAC->direction_vector_m[0][block_m_idx][band_m_idx] = 1; + hDirAC->direction_vector_m[1][block_m_idx][band_m_idx] = 0; + hDirAC->direction_vector_m[2][block_m_idx][band_m_idx] = 0; + } + + /* save the elevation and azimuth values to be used later by the ivas_dirac_QuantizeParameters function */ + for ( d = 0; d < DIRAC_NUM_DIMS; d++ ) + { + dir_v[d] = hDirAC->direction_vector_m[d][block_m_idx][band_m_idx]; + } + + ivas_qmetadata_direction_vector_to_azimuth_elevation( + dir_v, + &q_direction->band_data[band_m_idx].azimuth[block_m_idx], + &q_direction->band_data[band_m_idx].elevation[block_m_idx] ); } + } - ivas_qmetadata_direction_vector_to_azimuth_elevation( dir_v, &q_direction->band_data[band_m_idx].azimuth[block_m_idx], &q_direction->band_data[band_m_idx].elevation[block_m_idx] ); + /* Sectors */ + if ( hodirac_flag ) + { + for ( band_m_idx = 0; band_m_idx < hDirAC->hConfig->nbands; band_m_idx++ ) + { + q_direction->band_data[band_m_idx].azimuth[block_m_idx] = azi_secs[band_m_idx]; + q_direction->band_data[band_m_idx].elevation[block_m_idx] = ele_secs[band_m_idx]; + // q_direction->band_data[band_m_idx].energy_ratio[block_m_idx] = 1.f - diffuseness_vector[band_m_idx]; // set later + + q_direction[1].band_data[band_m_idx].azimuth[block_m_idx] = azi_secs[num_freq_bands + band_m_idx]; + q_direction[1].band_data[band_m_idx].elevation[block_m_idx] = ele_secs[num_freq_bands + band_m_idx]; + q_direction[1].band_data[band_m_idx].energy_ratio[block_m_idx] = ( 1.f - diff_secs[band_m_idx] ) / ( ( 1.f - diff_secs[band_m_idx] ) + ( 1.f - diff_secs[num_freq_bands + band_m_idx] ) + EPSILON ); + } } } diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index bc374f88e59c4cedddc78ceb8cf25ccbf98283d8..854f638491781ce15292d970f9c502099bbf196c 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -132,9 +132,9 @@ ivas_error ivas_enc( /* bypass EVS coding in float precision, emulating EVS encoder/decoder delay */ for ( i = 0; i < n; i++ ) { - if ( ( ivas_format == SBA_FORMAT ) && ( st_ivas->sba_mode == SBA_MODE_SPAR ) ) + if ( ( ivas_format == SBA_FORMAT ) && ( st_ivas->sba_mode == SBA_MODE_SPAR ) && !( st_ivas->sba_analysis_order > 1 ) ) { - hp20( data_f[HOA_keep_ind[i]], input_frame, st_ivas->mem_hp20_in[i], input_Fs ); + hp20( data_f[HOA_keep_ind[st_ivas->hSpar->hMdEnc->HOA_md_ind[i]]], input_frame, st_ivas->mem_hp20_in[i], input_Fs ); } else if ( !( ivas_format == MC_FORMAT && i == LFE_CHANNEL ) ) /*TODO: is the HPF needed for LFE channel? */ { @@ -289,6 +289,7 @@ ivas_error ivas_enc( if ( st_ivas->mc_mode == MC_MODE_MCT ) { st_ivas->hLFE->hBstr = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0]->hBstr : st_ivas->hCPE[0]->hCoreCoder[0]->hBstr; + ivas_lfe_enc( st_ivas->hLFE, data_f[LFE_CHANNEL], input_frame, st_ivas->hLFE->hBstr ); } @@ -299,6 +300,20 @@ ivas_error ivas_enc( return error; } } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + + /* encode MC ParamUpmix parameters and write bitstream */ + ivas_mc_paramupmix_enc( st_ivas, hMetaData, data_f, input_frame ); + + st_ivas->hLFE->hBstr = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0]->hBstr : st_ivas->hCPE[0]->hCoreCoder[0]->hBstr; + ivas_lfe_enc( st_ivas->hLFE, data_f[LFE_CHANNEL], input_frame, st_ivas->hLFE->hBstr ); + + if ( ( error = ivas_mct_enc( st_ivas, data_f, input_frame, hMetaData->nb_bits_tot ) ) != IVAS_ERR_OK ) + { + return error; + } + } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { /* encode Parametric MC parameters and write bitstream */ @@ -340,6 +355,10 @@ ivas_error ivas_enc( return error; } +#ifdef IND_LIST_DYN + st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list = st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list + st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->nb_ind_tot; +#endif + if ( ( error = ivas_cpe_enc( st_ivas, 0, data_f[0], data_f[1], input_frame, hMetaData->nb_bits_tot ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_enc/ivas_enc_cov_handler.c b/lib_enc/ivas_enc_cov_handler.c index 9524fb656fcdf1bcc789b49113b82bd67dd3f45a..2d1c5425bf37e061f1d25340ef70b0397c40e7e6 100644 --- a/lib_enc/ivas_enc_cov_handler.c +++ b/lib_enc/ivas_enc_cov_handler.c @@ -34,6 +34,7 @@ #include "options.h" #include "prot.h" #include "ivas_prot.h" +#include "ivas_rom_com.h" #ifdef DEBUGGING #include "debug.h" #endif @@ -53,7 +54,7 @@ * Local functions declarations *------------------------------------------------------------------------------------------*/ -static void ivas_band_cov( float **ppIn_FR_real, float **ppIn_FR_imag, const int16_t num_chans, const int16_t num_bins, int16_t stride, float **pFb_bin_to_band, const int16_t *pFb_start_bin_per_band, const int16_t *pFb_active_bins_per_band, const int16_t start_band, const int16_t end_band, float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ); +static void ivas_band_cov( float **ppIn_FR_real, float **ppIn_FR_imag, const int16_t num_chans, const int16_t num_bins, int16_t stride, float **pFb_bin_to_band, const int16_t *pFb_start_bin_per_band, const int16_t *pFb_active_bins_per_band, const int16_t start_band, const int16_t end_band, float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ); /*------------------------------------------------------------------------- * ivas_spar_covar_enc_open() @@ -84,6 +85,11 @@ ivas_error ivas_spar_covar_enc_open( cov_smooth_cfg.max_bands = IVAS_MAX_NUM_BANDS; cov_smooth_cfg.max_update_rate = MAX_UPDATE_RATE; cov_smooth_cfg.min_pool_size = MIN_POOL_SIZE; + if ( nchan_inp == 3 ) /* to discriminate between SPAR and mc there could be a better solution */ + { + cov_smooth_cfg.max_update_rate = 1.0f; + cov_smooth_cfg.min_pool_size = 20; + } if ( ( error = ivas_spar_covar_smooth_enc_open( &hCovState->pCov_state, &cov_smooth_cfg, pFb, nchan_inp, ivas_total_brate ) ) != IVAS_ERR_OK ) { @@ -154,7 +160,8 @@ void ivas_enc_cov_handler_process( const int16_t end_band, const int16_t num_ch, const int16_t dtx_vad, - const int16_t transient_det[2] ) + const int16_t transient_det[2], + const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ) { int16_t i, j; int16_t dtx_cov_flag; @@ -167,7 +174,8 @@ void ivas_enc_cov_handler_process( pFb->fb_bin_to_band.p_short_stride_start_bin_per_band, pFb->fb_bin_to_band.p_short_stride_num_bins_per_band, start_band, end_band, - cov_real ); + cov_real, + HOA_md_ind ); #ifdef DEBUG_SPAR_WRITE_OUT_COV { @@ -259,7 +267,8 @@ static void ivas_band_cov( const int16_t *pFb_active_bins_per_band, const int16_t start_band, const int16_t end_band, - float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH] ) + float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH], + const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] ) { int16_t i, j, k; float pV_re[L_FRAME48k]; @@ -269,9 +278,13 @@ static void ivas_band_cov( { for ( j = i; j < num_chans; j++ ) { + + int16_t i1 = HOA_md_ind[i]; + int16_t j1 = HOA_md_ind[j]; + for ( k = 0; k < num_bins; k++ ) { - pV_re[k] = ppIn_FR_real[i][k] * ppIn_FR_real[j][k] + ppIn_FR_imag[i][k] * ppIn_FR_imag[j][k]; + pV_re[k] = ppIn_FR_real[i1][k] * ppIn_FR_real[j1][k] + ppIn_FR_imag[i1][k] * ppIn_FR_imag[j1][k]; } for ( k = start_band; k < end_band; k++ ) diff --git a/lib_enc/ivas_init_enc.c b/lib_enc/ivas_init_enc.c index d617727be4bd4a5cddbd3b100b3ebd7441b2aa42..d96442835275a54e21750d0efe088cfbc99c62a6 100644 --- a/lib_enc/ivas_init_enc.c +++ b/lib_enc/ivas_init_enc.c @@ -57,11 +57,7 @@ void ivas_write_format( ind = 0; nBits = IVAS_FORMAT_SIGNALING_NBITS; -#ifdef COMBINED_FORMAT_SIGNALING extra_bits = ( IVAS_FORMAT_SIGNALING_NBITS_EXTENDED - IVAS_FORMAT_SIGNALING_NBITS ); -#else - extra_bits = ( IVAS_FORMAT_SIGNALING_NBITS_SBA - IVAS_FORMAT_SIGNALING_NBITS ); -#endif switch ( st_ivas->hEncoderConfig->ivas_format ) { @@ -70,13 +66,11 @@ void ivas_write_format( break; case ISM_FORMAT: ind = 2; -#ifdef COMBINED_FORMAT_SIGNALING if ( st_ivas->hEncoderConfig->ivas_total_brate >= IVAS_24k4 ) { ind = 4; nBits += extra_bits; } -#endif break; case MC_FORMAT: ind = 1; @@ -195,12 +189,16 @@ int16_t getNumChanAnalysis( n = st_ivas->nSCE + CPE_CHANNELS * st_ivas->nCPE; if ( st_ivas->hEncoderConfig->ivas_format == SBA_FORMAT ) { - n = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); + n = ( st_ivas->sba_analysis_order + 1 ) * ( st_ivas->sba_analysis_order + 1 ); } else if ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT && ( st_ivas->mc_mode == MC_MODE_PARAMMC || st_ivas->mc_mode == MC_MODE_MCMASA ) ) { n = st_ivas->hEncoderConfig->nchan_inp; } + else if ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + n = st_ivas->hEncoderConfig->nchan_inp; + } else if ( st_ivas->hEncoderConfig->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) { n = st_ivas->hEncoderConfig->nchan_inp; @@ -301,6 +299,9 @@ void ivas_initialize_handles_enc( /* MCT handle */ st_ivas->hMCT = NULL; + /* MC Param-Upmix handle */ + st_ivas->hMCParamUpmix = NULL; + /* Parametric MC handle */ st_ivas->hParamMC = NULL; @@ -324,9 +325,15 @@ void ivas_initialize_handles_enc( *-------------------------------------------------------------------*/ ivas_error ivas_init_encoder( - Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ - Indice ind_list[][MAX_NUM_INDICES], /* o : bitstream indices */ + Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ +#ifndef IND_LIST_DYN + , + Indice ind_list[][MAX_NUM_INDICES] /* o : bitstream indices */ +#endif +#ifndef IND_LIST_DYN + , Indice ind_list_metadata[][MAX_BITS_METADATA] /* o : bitstream indices metadata */ +#endif ) { int16_t i, n; @@ -356,6 +363,50 @@ ivas_error ivas_init_encoder( st_ivas->sba_mode = SBA_MODE_NONE; st_ivas->nchan_transport = -1; + +#ifdef IND_LIST_DYN + /*-----------------------------------------------------------------* + * Allocate and initialize buffer of indices + *-----------------------------------------------------------------*/ + + /* set the maximum allowed number of indices in the list */ + st_ivas->ivas_max_num_indices = get_ivas_max_num_indices( ivas_format, ivas_total_brate ); + + /* allocate buffer of indices */ + if ( ( st_ivas->ind_list = (INDICE_HANDLE) malloc( st_ivas->ivas_max_num_indices * sizeof( Indice ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for buffer of indices!\n" ) ); + } + + /* reset the list of indices */ + for ( i = 0; i < st_ivas->ivas_max_num_indices; i++ ) + { + st_ivas->ind_list[i].nb_bits = -1; + } + + /* set the maximum allowed number of metadata indices in the list */ + st_ivas->ivas_max_num_indices_metadata = get_ivas_max_num_indices_metadata( st_ivas->hEncoderConfig->ivas_format, st_ivas->hEncoderConfig->ivas_total_brate ); + + /* allocate buffer of metadata indices */ + if ( st_ivas->ivas_max_num_indices_metadata > 0 ) + { + if ( ( st_ivas->ind_list_metadata = (INDICE_HANDLE) malloc( st_ivas->ivas_max_num_indices_metadata * sizeof( Indice ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for buffer of metadata indices!\n" ) ); + } + + /* reset the list of metadata indices */ + for ( i = 0; i < st_ivas->ivas_max_num_indices_metadata; i++ ) + { + st_ivas->ind_list_metadata[i].nb_bits = -1; + } + } + else + { + st_ivas->ind_list_metadata = NULL; + } +#endif + /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles *-----------------------------------------------------------------*/ @@ -372,9 +423,10 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->ind_list = ind_list[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); +#endif /* prepare stereo downmix for EVS */ if ( hEncoderConfig->stereo_dmx_evs == 1 ) @@ -397,7 +449,8 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* allocate buffer of indices */ for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list[n]; @@ -407,6 +460,7 @@ ivas_error ivas_init_encoder( /* MetaData for DFT stereo */ st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[0]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); +#endif } else if ( ivas_format == ISM_FORMAT ) { @@ -426,12 +480,14 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* MetaData for ISMs */ st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->ind_list = ind_list[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); st_ivas->hSCE[sce_id]->hMetaData->ind_list = ind_list_metadata[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hMetaData, MAX_BITS_METADATA ); +#endif } if ( st_ivas->ism_mode == ISM_MODE_PARAM ) @@ -491,12 +547,14 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* MetaData for SBA */ st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->ind_list = ind_list[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); st_ivas->hSCE[sce_id]->hMetaData->ind_list = ind_list_metadata[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hMetaData, MAX_BITS_METADATA ); +#endif if ( st_ivas->sba_mode == SBA_MODE_SPAR && st_ivas->hEncoderConfig->Opt_DTX_ON ) { @@ -511,11 +569,12 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { +#ifndef IND_LIST_DYN st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list[cpe_id * CPE_CHANNELS + n]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); +#endif if ( hEncoderConfig->Opt_DTX_ON ) { @@ -523,12 +582,14 @@ ivas_error ivas_init_encoder( } } +#ifndef IND_LIST_DYN /* Metadata only initialized for the last CPE index */ if ( cpe_id == st_ivas->nCPE - 1 ) { st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[st_ivas->nSCE]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); } +#endif } if ( st_ivas->nCPE > 1 ) @@ -557,6 +618,8 @@ ivas_error ivas_init_encoder( return error; } +#ifndef IND_LIST_DYN + /* allocate buffer of indices */ for ( n = 0; n < CPE_CHANNELS; n++ ) { /* we need the correct bitstream also for the LFE channel since it might become a proper coded channel when @@ -571,6 +634,7 @@ ivas_error ivas_init_encoder( st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[st_ivas->nSCE]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); } +#endif } if ( ( error = create_mct_enc( st_ivas ) ) != IVAS_ERR_OK ) @@ -585,6 +649,51 @@ ivas_error ivas_init_encoder( st_ivas->nchan_transport = ivas_mc_ls_setup_get_num_channels( st_ivas->hEncoderConfig->mc_input_setup ); } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + st_ivas->nSCE = 0; + st_ivas->nCPE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS / 2; + st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; + + if ( ( error = ivas_mc_paramupmix_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) + { + if ( ( error = create_cpe_enc( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) + { + return error; + } + +#ifndef IND_LIST_DYN + for ( n = 0; n < CPE_CHANNELS; n++ ) + { + /* we need the correct bitstream also for the LFE channel since it might become a proper coded channel when + switching to ParamMC and ind_list is only visible here, can't be done later */ + st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list[cpe_id * CPE_CHANNELS + n]; + reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, MAX_NUM_INDICES ); + } + /* Metadata only initialized for the last CPE index*/ + if ( cpe_id == st_ivas->nCPE - 1 ) + { + st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[st_ivas->nSCE]; + reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); + } +#endif + } + + if ( ( error = create_mct_enc( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( ( error = ivas_create_lfe_enc( &st_ivas->hLFE, input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { if ( ( error = ivas_param_mc_enc_open( st_ivas ) ) != IVAS_ERR_OK ) @@ -599,7 +708,8 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* allocate buffer of indices */ for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list[cpe_id * CPE_CHANNELS + n]; @@ -612,6 +722,7 @@ ivas_error ivas_init_encoder( st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[st_ivas->nSCE]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); } +#endif } if ( st_ivas->nCPE > 1 ) @@ -652,12 +763,14 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* allocate buffer of indices */ st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->ind_list = ind_list[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); st_ivas->hSCE[sce_id]->hMetaData->ind_list = ind_list_metadata[sce_id]; reset_indices_enc( st_ivas->hSCE[sce_id]->hMetaData, MAX_BITS_METADATA ); +#endif } for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) @@ -669,7 +782,8 @@ ivas_error ivas_init_encoder( return error; } - /* prepare bitstream buffers */ +#ifndef IND_LIST_DYN + /* allocate buffer of indices */ for ( n = 0; n < CPE_CHANNELS; n++ ) { st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->ind_list = ind_list[cpe_id * CPE_CHANNELS + n + st_ivas->nSCE]; @@ -682,6 +796,7 @@ ivas_error ivas_init_encoder( st_ivas->hCPE[cpe_id]->hMetaData->ind_list = ind_list_metadata[st_ivas->nSCE]; reset_indices_enc( st_ivas->hCPE[cpe_id]->hMetaData, MAX_BITS_METADATA ); } +#endif } } } @@ -735,6 +850,10 @@ void destroy_core_enc( ENC_CORE_HANDLE hCoreCoder /* i/o: core encoder structure */ ) { +#ifdef IND_LIST_DYN + int16_t i; +#endif + destroy_cldfb_encoder( hCoreCoder ); if ( hCoreCoder->hSignalBuf != NULL ) @@ -745,6 +864,13 @@ void destroy_core_enc( if ( hCoreCoder->hBstr != NULL ) { +#ifdef IND_LIST_DYN + /* reset buffer of indices */ + for ( i = 0; i < hCoreCoder->hBstr->nb_ind_tot; i++ ) + { + hCoreCoder->hBstr->ind_list[i].nb_bits = -1; + } +#endif free( hCoreCoder->hBstr ); hCoreCoder->hBstr = NULL; } @@ -960,6 +1086,9 @@ void ivas_destroy_enc( /* LFE handle */ ivas_lfe_enc_close( &( st_ivas->hLFE ) ); + /* Param-Upmix MC handle */ + ivas_mc_paramupmix_enc_close( &( st_ivas->hMCParamUpmix ), st_ivas->hEncoderConfig->input_Fs ); + /* Parametric MC handle */ ivas_param_mc_enc_close( &( st_ivas->hParamMC ), st_ivas->hEncoderConfig->input_Fs ); @@ -976,6 +1105,19 @@ void ivas_destroy_enc( st_ivas->hEncoderConfig = NULL; } +#ifdef IND_LIST_DYN + /* Buffer of indices */ + if ( st_ivas->ind_list != NULL ) + { + free( st_ivas->ind_list ); + } + + if ( st_ivas->ind_list_metadata != NULL ) + { + free( st_ivas->ind_list_metadata ); + } +#endif + /* main IVAS handle */ free( st_ivas ); diff --git a/lib_enc/ivas_ism_dtx_enc.c b/lib_enc/ivas_ism_dtx_enc.c index 3a216b6164f2f335f41d921e73a4c80d9638584b..907997cf988a94f7ad4408080fbc2bd3fd0d27a7 100644 --- a/lib_enc/ivas_ism_dtx_enc.c +++ b/lib_enc/ivas_ism_dtx_enc.c @@ -167,7 +167,14 @@ int16_t ivas_ism_dtx_enc( if ( dtx_flag ) { /* reset the bitstream (IVAS format signaling was already written) */ - reset_indices_enc( hSCE[0]->hCoreCoder[0]->hBstr, MAX_NUM_INDICES ); + reset_indices_enc( hSCE[0]->hCoreCoder[0]->hBstr, + +#ifdef IND_LIST_DYN + hSCE[0]->hCoreCoder[0]->hBstr->nb_ind_tot +#else + MAX_NUM_INDICES +#endif + ); } /*------------------------------------------------------------------* @@ -250,7 +257,6 @@ int16_t ivas_ism_dtx_enc( /* IVAS format signaling was erased in dtx() */ if ( hSCE[0]->hCoreCoder[0]->hBstr->nb_bits_tot == 0 ) { -#ifdef COMBINED_FORMAT_SIGNALING /* replicate ivas_write_format() */ int16_t ind = 2; nBits = IVAS_FORMAT_SIGNALING_NBITS; @@ -261,9 +267,6 @@ int16_t ivas_ism_dtx_enc( } push_indice( hSCE[0]->hCoreCoder[0]->hBstr, IND_IVAS_FORMAT, ind, nBits ); -#else - push_indice( hSCE[0]->hCoreCoder[0]->hBstr, IND_IVAS_FORMAT, 2 /* == ISM format */, IVAS_FORMAT_SIGNALING_NBITS ); -#endif } } else /* ism_dtx_flag == 1 */ diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index 4a56252be876fa73e3a967c469b87caf11f2bd36..8780573773897d6fefa66e19af82cff6919f80d1 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -87,6 +87,9 @@ ivas_error ivas_ism_enc( int16_t localVAD_HE_SAD[1]; /* local HE VAD */ int16_t nchan_ism, dtx_flag, sid_flag, flag_noisy_speech; int16_t md_diff_flag[MAX_NUM_OBJECTS]; +#ifdef IND_LIST_DYN + Encoder_State *prev_st = NULL; +#endif ivas_error error; push_wmops( "ivas_ism_enc" ); @@ -256,6 +259,14 @@ ivas_error ivas_ism_enc( hSCE = st_ivas->hSCE[sce_id]; st = hSCE->hCoreCoder[0]; +#ifdef IND_LIST_DYN + /* update pointer to the buffer of indices of the next channel */ + if ( sce_id > 0 ) + { + st->hBstr->ind_list = prev_st->hBstr->ind_list + prev_st->hBstr->nb_ind_tot; + } +#endif + if ( st->low_rate_mode ) { st->bwidth = WB; @@ -303,6 +314,10 @@ ivas_error ivas_ism_enc( /* Store previous attack detection flag */ st->hTranDet->transientDetector.prev_bIsAttackPresent = st->hTranDet->transientDetector.bIsAttackPresent; + +#ifdef IND_LIST_DYN + prev_st = st; +#endif } if ( dtx_flag ) @@ -402,7 +417,7 @@ ivas_error ivas_ism_enc_config( st_ivas->nSCE = st_ivas->nchan_transport; st_ivas->nCPE = 0; - if ( ( error = ivas_ism_config( st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_inp, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_config( st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->nchan_transport, st_ivas->hEncoderConfig->nchan_inp, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_enc/ivas_ism_metadata_enc.c b/lib_enc/ivas_ism_metadata_enc.c index a4678d6bbb1dcba739f6876f2e81f806d778c94b..a8c4982e4b39bb22a706951690e3d69be4caef77 100644 --- a/lib_enc/ivas_ism_metadata_enc.c +++ b/lib_enc/ivas_ism_metadata_enc.c @@ -55,15 +55,11 @@ #define ISM_MAX_ELEVATION_DIFF_IDX ( ISM_ELEVATION_NBITS - 1 /*zero*/ - 1 /*sign*/ ) #define ISM_MAX_RADIUS_DIFF_IDX ( ISM_RADIUS_NBITS - 1 /*zero*/ - 1 /*sign*/ ) -#define ISM_FEC_MAX 10 -#ifdef FIX_387_ISM_MD_FEC -#define ISM_MD_FEC_DIFF 10 -#define ISM_MD_INC_DIFF_CNT_MAX 6 -#define ISM_MD_FEC_CNT_MAX 25 -#endif -#ifdef FIX_435_ISM_MERGE_BUG -#define ISM_MD_RAD_FEC_DIFF 1 -#endif +#define ISM_FEC_MAX 10 +#define ISM_MD_FEC_DIFF 10 +#define ISM_MD_INC_DIFF_CNT_MAX 6 +#define ISM_MD_FEC_CNT_MAX 25 +#define ISM_MD_RAD_FEC_DIFF 1 #define INTER_OBJECT_PARAM_CHECK ( ( ISM_FEC_MAX / 2 ) - 2 ) /* note: constant must be less than (ISM_FEC_MAX / number of coded parameters) */ @@ -83,12 +79,13 @@ static void encode_radius( BSTR_ENC_HANDLE hBstr, int16_t *last_radius_idx, int1 *-------------------------------------------------------------------------*/ ivas_error ivas_set_ism_metadata( - ISM_METADATA_HANDLE hIsmMeta, /* o : ISM metadata handle */ - const float azimuth, /* i : azimuth value */ - const float elevation, /* i : elevation */ - const float radius_meta, /* i : radius */ - const float yaw, /* i : yaw */ - const float pitch /* i : pitch */ + ISM_METADATA_HANDLE hIsmMeta, /* o : ISM metadata handle */ + const float azimuth, /* i : azimuth value */ + const float elevation, /* i : elevation */ + const float radius_meta, /* i : radius */ + const float yaw, /* i : yaw */ + const float pitch, /* i : pitch */ + const int16_t non_diegetic_flag /* i : non-diegetic object flag*/ ) { if ( hIsmMeta == NULL ) @@ -104,6 +101,7 @@ ivas_error ivas_set_ism_metadata( hIsmMeta->radius = radius_meta; hIsmMeta->yaw = yaw; hIsmMeta->pitch = pitch; + hIsmMeta->non_diegetic_flag = non_diegetic_flag; return IVAS_ERR_OK; } @@ -194,6 +192,7 @@ ivas_error ivas_ism_metadata_enc( ISM_METADATA_HANDLE hIsmMetaData; int32_t element_brate[MAX_NUM_OBJECTS], total_brate[MAX_NUM_OBJECTS]; int16_t ism_metadata_flag_global; + int16_t non_diegetic_flag_global; int16_t ism_imp[MAX_NUM_OBJECTS]; int16_t nbands, nblocks; ivas_error error; @@ -204,6 +203,7 @@ ivas_error ivas_ism_metadata_enc( /* initialization */ ism_metadata_flag_global = 0; + non_diegetic_flag_global = 0; set_s( nb_bits_metadata, 0, nchan_transport ); set_s( flag_abs_azimuth, 0, nchan_ism ); set_s( flag_abs_elevation, 0, nchan_ism ); @@ -223,24 +223,15 @@ ivas_error ivas_ism_metadata_enc( } else if ( ism_mode == ISM_MODE_DISC ) { -#ifdef FIX_435_ISM_MERGE_BUG if ( hIsmMeta[ch]->ism_metadata_flag == 1 ) { /* In case of low level noise for low bitrate inactive frames, do not sent metadata */ hIsmMeta[ch]->ism_metadata_flag = localVAD[ch] || hSCE[ch]->hCoreCoder[0]->lp_noise > 10 || hSCE[ch]->hCoreCoder[0]->tcxonly; -#else - hIsmMeta[ch]->ism_metadata_flag = localVAD[ch] || hSCE[ch]->hCoreCoder[0]->lp_noise > 10; -#endif -#ifdef FIX_387_ISM_MD_FEC /* in inactive frames, send MD 1) in ISM_MD_INC_DIFF_CNT_MAX consecutive frames when MD significantly change, 2) at least every ISM_MD_FEC_DIFF frames */ if ( hIsmMeta[ch]->ism_metadata_flag == 0 ) { if ( ( fabsf( hIsmMeta[ch]->azimuth - hIsmMeta[ch]->last_true_azimuth ) > ISM_MD_FEC_DIFF ) || - ( fabsf( hIsmMeta[ch]->elevation - hIsmMeta[ch]->last_true_elevation ) > ISM_MD_FEC_DIFF ) -#ifdef FIX_435_ISM_MERGE_BUG - || ( fabsf( hIsmMeta[ch]->radius - hIsmMeta[ch]->last_true_radius ) > ISM_MD_RAD_FEC_DIFF ) -#endif - ) + ( fabsf( hIsmMeta[ch]->elevation - hIsmMeta[ch]->last_true_elevation ) > ISM_MD_FEC_DIFF ) || ( fabsf( hIsmMeta[ch]->radius - hIsmMeta[ch]->last_true_radius ) > ISM_MD_RAD_FEC_DIFF ) ) { hIsmMeta[ch]->ism_metadata_flag = 1; hIsmMeta[ch]->ism_md_inc_diff_cnt = 0; @@ -264,10 +255,7 @@ ivas_error ivas_ism_metadata_enc( hIsmMeta[ch]->position_angle.angle1_diff_cnt = ISM_FEC_MAX; } } -#endif -#ifdef FIX_435_ISM_MERGE_BUG } -#endif } } @@ -289,10 +277,22 @@ ivas_error ivas_ism_metadata_enc( } push_indice( hBstr, IND_ISM_NUM_OBJECTS, 0, 1 ); + for ( ch = 0; ch < nchan_ism; ch++ ) + { + ism_metadata_flag_global |= hIsmMeta[ch]->ism_metadata_flag; + non_diegetic_flag_global |= hIsmMeta[ch]->non_diegetic_flag; + } + /* write extended metadata presence flag */ if ( ism_total_brate >= ISM_EXTENDED_METADATA_BRATE ) { push_indice( hBstr, IND_ISM_EXTENDED_FLAG, ism_extended_metadata_flag, ISM_EXTENDED_METADATA_BITS ); + + /* Write global non-diegetic object flag */ + if ( ism_extended_metadata_flag ) + { + push_indice( hBstr, IND_ISM_EXTENDED_NDP_FLAG, non_diegetic_flag_global, ISM_EXTENDED_METADATA_BITS ); + } } /* write ISM metadata flag (one per object) */ @@ -301,11 +301,6 @@ ivas_error ivas_ism_metadata_enc( push_indice( hBstr, IND_ISM_METADATA_FLAG, ism_imp[ch], ISM_METADATA_FLAG_BITS ); } - for ( ch = 0; ch < nchan_ism; ch++ ) - { - ism_metadata_flag_global |= hIsmMeta[ch]->ism_metadata_flag; - } - if ( ism_mode == ISM_MODE_DISC ) { /* write VAD flag */ @@ -347,31 +342,56 @@ ivas_error ivas_ism_metadata_enc( * Quantize and encode azimuth and elevation *----------------------------------------------------------------*/ - if ( ism_mode == ISM_MODE_DISC ) + if ( ism_extended_metadata_flag && non_diegetic_flag_global ) { - idx_angle1_abs = ism_quant_meta( hIsmMetaData->azimuth, &valQ, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); - idx_angle2_abs = ism_quant_meta( hIsmMetaData->elevation, &valQ, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); + /* Write non-diegetic flag for each object */ + push_indice( hBstr, IND_ISM_NDP_FLAG, hIsmMeta[ch]->non_diegetic_flag, ISM_METADATA_IS_NDP_BITS ); } - else /* ISM_MODE_PARAM */ + + if ( hIsmMeta[ch]->non_diegetic_flag ) { - idx_angle1_abs = hParamIsm->azi_index[ch]; - idx_angle2_abs = hParamIsm->ele_index[ch]; + /* Map azimuth to panning range [-90:90] */ + if ( hIsmMetaData->azimuth > 90.0f ) + { + hIsmMetaData->azimuth = 180.0f - hIsmMetaData->azimuth; + } + + if ( hIsmMetaData->azimuth < -90.0f ) + { + hIsmMetaData->azimuth = -180.0f - hIsmMetaData->azimuth; + } + + idx_angle1_abs = ism_quant_meta( hIsmMetaData->azimuth, &valQ, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); + encode_angle_indices( hBstr, &( hIsmMetaData->position_angle ), hIsmMetaData->last_ism_metadata_flag, hSCE[0]->hCoreCoder[0]->ini_frame, idx_angle1_abs, 0, &flag_abs_azimuth[ch], NULL ); } + else + { + if ( ism_mode == ISM_MODE_DISC ) + { + idx_angle1_abs = ism_quant_meta( hIsmMetaData->azimuth, &valQ, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); + idx_angle2_abs = ism_quant_meta( hIsmMetaData->elevation, &valQ, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); + } + else /* ISM_MODE_PARAM */ + { + idx_angle1_abs = hParamIsm->azi_index[ch]; + idx_angle2_abs = hParamIsm->ele_index[ch]; + } - encode_angle_indices( hBstr, &( hIsmMetaData->position_angle ), hIsmMetaData->last_ism_metadata_flag, hSCE[0]->hCoreCoder[0]->ini_frame, idx_angle1_abs, idx_angle2_abs, &flag_abs_azimuth[ch], &flag_abs_elevation[ch] ); + encode_angle_indices( hBstr, &( hIsmMetaData->position_angle ), hIsmMetaData->last_ism_metadata_flag, hSCE[0]->hCoreCoder[0]->ini_frame, idx_angle1_abs, idx_angle2_abs, &flag_abs_azimuth[ch], &flag_abs_elevation[ch] ); - /*----------------------------------------------------------------* - * Quantize and encode radius, yaw, and pitch - *----------------------------------------------------------------*/ + /*----------------------------------------------------------------* + * Quantize and encode radius, yaw, and pitch + *----------------------------------------------------------------*/ - if ( ism_mode == ISM_MODE_DISC && ism_extended_metadata_flag ) - { - idx_angle1_abs = ism_quant_meta( hIsmMetaData->yaw, &valQ, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); - idx_angle2_abs = ism_quant_meta( hIsmMetaData->pitch, &valQ, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); - idx_radius_abs = usquant( hIsmMetaData->radius, &valQ, ISM_RADIUS_MIN, ISM_RADIUS_DELTA, 1 << ISM_RADIUS_NBITS ); + if ( ism_mode == ISM_MODE_DISC && ism_extended_metadata_flag ) + { + idx_angle1_abs = ism_quant_meta( hIsmMetaData->yaw, &valQ, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS ); + idx_angle2_abs = ism_quant_meta( hIsmMetaData->pitch, &valQ, ism_elevation_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_ELEVATION_NBITS ); + idx_radius_abs = usquant( hIsmMetaData->radius, &valQ, ISM_RADIUS_MIN, ISM_RADIUS_DELTA, 1 << ISM_RADIUS_NBITS ); - encode_angle_indices( hBstr, &( hIsmMetaData->orientation_angle ), hIsmMetaData->last_ism_metadata_flag, hSCE[0]->hCoreCoder[0]->ini_frame, idx_angle1_abs, idx_angle2_abs, &flag_abs_yaw[ch], &flag_abs_pitch[ch] ); - encode_radius( hBstr, &hIsmMetaData->last_radius_idx, &hIsmMetaData->radius_diff_cnt, hIsmMetaData->last_ism_metadata_flag, idx_radius_abs, &flag_abs_radius[ch] ); + encode_angle_indices( hBstr, &( hIsmMetaData->orientation_angle ), hIsmMetaData->last_ism_metadata_flag, hSCE[0]->hCoreCoder[0]->ini_frame, idx_angle1_abs, idx_angle2_abs, &flag_abs_yaw[ch], &flag_abs_pitch[ch] ); + encode_radius( hBstr, &hIsmMetaData->last_radius_idx, &hIsmMetaData->radius_diff_cnt, hIsmMetaData->last_ism_metadata_flag, idx_radius_abs, &flag_abs_radius[ch] ); + } } /* save number of metadata bits written */ @@ -380,14 +400,10 @@ ivas_error ivas_ism_metadata_enc( nb_bits_metadata[ch] = hBstr->nb_bits_tot - nb_bits_start; } -#ifdef FIX_387_ISM_MD_FEC /* Updates */ hIsmMeta[ch]->last_true_azimuth = hIsmMeta[ch]->azimuth; hIsmMeta[ch]->last_true_elevation = hIsmMeta[ch]->elevation; -#endif -#ifdef FIX_435_ISM_MERGE_BUG hIsmMeta[ch]->last_true_radius = hIsmMeta[ch]->radius; -#endif } } @@ -516,7 +532,7 @@ ivas_error ivas_ism_metadata_enc( * Configuration and decision about bitrates per channel *----------------------------------------------------------------*/ - if ( ( error = ivas_ism_config( ism_total_brate, nchan_transport, nchan_ism, hIsmMeta, localVAD, ism_imp, element_brate, total_brate, nb_bits_metadata ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_config( ism_total_brate, nchan_transport, nchan_ism, hIsmMeta, ism_extended_metadata_flag, localVAD, ism_imp, element_brate, total_brate, nb_bits_metadata ) ) != IVAS_ERR_OK ) { return error; } @@ -525,7 +541,6 @@ ivas_error ivas_ism_metadata_enc( { hIsmMeta[ch]->last_ism_metadata_flag = hIsmMeta[ch]->ism_metadata_flag; -#ifdef FIX_387_ISM_MD_FEC if ( hIsmMeta[ch]->ism_metadata_flag == 0 ) { hIsmMeta[ch]->ism_md_fec_cnt_enc++; @@ -536,19 +551,13 @@ ivas_error ivas_ism_metadata_enc( } hIsmMeta[ch]->ism_md_inc_diff_cnt++; hIsmMeta[ch]->ism_md_inc_diff_cnt = min( hIsmMeta[ch]->ism_md_inc_diff_cnt, ISM_MD_INC_DIFF_CNT_MAX ); -#endif } for ( ch = 0; ch < nchan_transport; ch++ ) { -#ifdef FIX_419_ISM_BRATE_SW_DTX hSCE[ch]->hCoreCoder[0]->low_rate_mode = 0; -#endif if ( ism_mode == ISM_MODE_DISC ) { -#ifndef FIX_419_ISM_BRATE_SW_DTX - hSCE[ch]->hCoreCoder[0]->low_rate_mode = 0; -#endif if ( hIsmMeta[ch]->ism_metadata_flag == 0 && localVAD[ch] == 0 && ism_metadata_flag_global ) { hSCE[ch]->hCoreCoder[0]->low_rate_mode = 1; @@ -561,7 +570,11 @@ ivas_error ivas_ism_metadata_enc( /* write metadata only in active frames */ if ( hSCE[0]->hCoreCoder[0]->core_brate > SID_2k40 ) { +#ifdef IND_LIST_DYN + reset_indices_enc( hSCE[ch]->hMetaData, hSCE[ch]->hMetaData->nb_ind_tot ); +#else reset_indices_enc( hSCE[ch]->hMetaData, MAX_BITS_METADATA ); +#endif } } @@ -623,18 +636,14 @@ ivas_error ivas_ism_metadata_enc_create( st_ivas->hIsmMetaData[ch]->last_azimuth = 0.0f; st_ivas->hIsmMetaData[ch]->last_elevation = 0.0f; -#ifdef FIX_387_ISM_MD_FEC st_ivas->hIsmMetaData[ch]->last_true_azimuth = 0.0f; st_ivas->hIsmMetaData[ch]->last_true_elevation = 0.0f; st_ivas->hIsmMetaData[ch]->ism_md_fec_cnt_enc = 0; st_ivas->hIsmMetaData[ch]->ism_md_inc_diff_cnt = ISM_MD_INC_DIFF_CNT_MAX; -#endif -#ifdef FIX_435_ISM_MERGE_BUG st_ivas->hIsmMetaData[ch]->last_true_radius = 1.0f; -#endif } - if ( ( error = ivas_ism_config( st_ivas->hEncoderConfig->ivas_total_brate, nchan_transport, n_ISms, NULL, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_ism_config( st_ivas->hEncoderConfig->ivas_total_brate, nchan_transport, n_ISms, NULL, 0, NULL, NULL, element_brate_tmp, NULL, NULL ) ) != IVAS_ERR_OK ) { return error; } @@ -843,11 +852,7 @@ static void encode_angle_indices( if ( *flag_abs_angle1 == 0 ) { angle->angle1_diff_cnt++; -#ifdef FIX_419_ISM_MD_FIX angle->angle1_diff_cnt = min( angle->angle1_diff_cnt, ISM_FEC_MAX ); -#else - angle->angle2_diff_cnt = min( angle->angle2_diff_cnt, ISM_FEC_MAX ); -#endif } else { @@ -870,115 +875,118 @@ static void encode_angle_indices( * Elevation/pitch index encoding *----------------------------------------------------------------*/ - idx_angle2 = idx_angle2_abs; - nbits_diff_angle2 = 0; - *flag_abs_angle2 = 0; /* differential coding by default */ - if ( angle->angle2_diff_cnt == ISM_FEC_MAX /* make differential encoding in ISM_FEC_MAX consecutive frames at maximum (in order to control the decoding in FEC) */ - || last_ism_metadata_flag == 0 /* If last frame had no metadata coded, do not use differential coding */ - ) - { - *flag_abs_angle2 = 1; - } - - /* note: elevation/pitch is coded starting from the second frame only (it is meaningless in the init_frame) */ - if ( ini_frame == 0 ) + if ( flag_abs_angle2 ) { - *flag_abs_angle2 = 1; - angle->last_angle2_idx = idx_angle2_abs; - } - - diff = idx_angle2_abs - angle->last_angle2_idx; - - /* avoid absolute coding of elevation/pitch if absolute coding was already used for azimuth/yaw */ - if ( *flag_abs_angle1 == 1 ) - { - int16_t diff_orig = diff; - - *flag_abs_angle2 = 0; - - - if ( diff >= 0 ) + idx_angle2 = idx_angle2_abs; + nbits_diff_angle2 = 0; + *flag_abs_angle2 = 0; /* differential coding by default */ + if ( angle->angle2_diff_cnt == ISM_FEC_MAX /* make differential encoding in ISM_FEC_MAX consecutive frames at maximum (in order to control the decoding in FEC) */ + || last_ism_metadata_flag == 0 /* If last frame had no metadata coded, do not use differential coding */ + ) { - diff = min( diff, ISM_MAX_ELEVATION_DIFF_IDX ); - } - else - { - diff = -1 * min( -diff, ISM_MAX_ELEVATION_DIFF_IDX ); + *flag_abs_angle2 = 1; } - if ( last_ism_metadata_flag == 0 || abs( diff_orig - diff ) > ISM_MAX_ELEVATION_DIFF_IDX ) + /* note: elevation/pitch is coded starting from the second frame only (it is meaningless in the init_frame) */ + if ( ini_frame == 0 ) { - angle->angle2_diff_cnt = ISM_FEC_MAX - 1; + *flag_abs_angle2 = 1; + angle->last_angle2_idx = idx_angle2_abs; } - } - /* try differential coding */ - if ( *flag_abs_angle2 == 0 ) - { - if ( diff == 0 ) - { - idx_angle2 = 0; - nbits_diff_angle2 = 1; - } - else if ( ABSVAL( diff ) <= ISM_MAX_ELEVATION_DIFF_IDX ) + diff = idx_angle2_abs - angle->last_angle2_idx; + + /* avoid absolute coding of elevation/pitch if absolute coding was already used for azimuth/yaw */ + if ( *flag_abs_angle1 == 1 ) { - idx_angle2 = 1 << 1; - nbits_diff_angle2 = 1; + int16_t diff_orig = diff; - if ( diff < 0 ) + *flag_abs_angle2 = 0; + + + if ( diff >= 0 ) { - idx_angle2 += 1; /* negative sign */ - diff *= -1; + diff = min( diff, ISM_MAX_ELEVATION_DIFF_IDX ); } else { - idx_angle2 += 0; /* positive sign */ + diff = -1 * min( -diff, ISM_MAX_ELEVATION_DIFF_IDX ); } - idx_angle2 = idx_angle2 << diff; - nbits_diff_angle2++; - - /* unary coding of "diff */ - idx_angle2 += ( ( 1 << diff ) - 1 ); - nbits_diff_angle2 += diff; + if ( last_ism_metadata_flag == 0 || abs( diff_orig - diff ) > ISM_MAX_ELEVATION_DIFF_IDX ) + { + angle->angle2_diff_cnt = ISM_FEC_MAX - 1; + } + } - if ( nbits_diff_angle2 < ISM_ELEVATION_NBITS ) + /* try differential coding */ + if ( *flag_abs_angle2 == 0 ) + { + if ( diff == 0 ) { - /* add stop bit */ - idx_angle2 = idx_angle2 << 1; + idx_angle2 = 0; + nbits_diff_angle2 = 1; + } + else if ( ABSVAL( diff ) <= ISM_MAX_ELEVATION_DIFF_IDX ) + { + idx_angle2 = 1 << 1; + nbits_diff_angle2 = 1; + + if ( diff < 0 ) + { + idx_angle2 += 1; /* negative sign */ + diff *= -1; + } + else + { + idx_angle2 += 0; /* positive sign */ + } + + idx_angle2 = idx_angle2 << diff; nbits_diff_angle2++; + + /* unary coding of "diff */ + idx_angle2 += ( ( 1 << diff ) - 1 ); + nbits_diff_angle2 += diff; + + if ( nbits_diff_angle2 < ISM_ELEVATION_NBITS ) + { + /* add stop bit */ + idx_angle2 = idx_angle2 << 1; + nbits_diff_angle2++; + } + } + else + { + *flag_abs_angle2 = 1; } } + + /* update counter */ + if ( *flag_abs_angle2 == 0 ) + { + angle->angle2_diff_cnt++; + angle->angle2_diff_cnt = min( angle->angle2_diff_cnt, ISM_FEC_MAX ); + } else { - *flag_abs_angle2 = 1; + angle->angle2_diff_cnt = 0; } - } - - /* update counter */ - if ( *flag_abs_angle2 == 0 ) - { - angle->angle2_diff_cnt++; - angle->angle2_diff_cnt = min( angle->angle2_diff_cnt, ISM_FEC_MAX ); - } - else - { - angle->angle2_diff_cnt = 0; - } - /* Write elevation */ - if ( *flag_abs_angle1 == 0 ) /* do not write "flag_abs_elevation/pitch" if "flag_abs_azimuth/yaw == 1" */ - { - push_indice( hBstr, IND_ISM_ELEVATION_DIFF_FLAG, *flag_abs_angle2, 1 ); - } + /* Write elevation */ + if ( *flag_abs_angle1 == 0 ) /* do not write "flag_abs_elevation/pitch" if "flag_abs_azimuth/yaw == 1" */ + { + push_indice( hBstr, IND_ISM_ELEVATION_DIFF_FLAG, *flag_abs_angle2, 1 ); + } - if ( *flag_abs_angle2 ) - { - push_indice( hBstr, IND_ISM_ELEVATION, idx_angle2, ISM_ELEVATION_NBITS ); - } - else - { - push_indice( hBstr, IND_ISM_ELEVATION, idx_angle2, nbits_diff_angle2 ); + if ( *flag_abs_angle2 ) + { + push_indice( hBstr, IND_ISM_ELEVATION, idx_angle2, ISM_ELEVATION_NBITS ); + } + else + { + push_indice( hBstr, IND_ISM_ELEVATION, idx_angle2, nbits_diff_angle2 ); + } } /*----------------------------------------------------------------* @@ -1118,10 +1126,8 @@ void ivas_ism_metadata_sid_enc( hIsmMetaData->position_angle.last_angle2_idx = idx_elevation << ( ISM_ELEVATION_NBITS - nBits_elevation ); } -#ifdef FIX_387_ISM_MD_FEC hIsmMetaData->ism_md_fec_cnt_enc = 0; hIsmMeta[ch]->ism_md_inc_diff_cnt = ISM_MD_INC_DIFF_CNT_MAX; -#endif } } diff --git a/lib_enc/ivas_ism_param_enc.c b/lib_enc/ivas_ism_param_enc.c index 6534d215a5a8ea09fe7d5d533287c88bf3072f9d..6afb57c1557831c6c65c8060a68a2b92d7edd410 100644 --- a/lib_enc/ivas_ism_param_enc.c +++ b/lib_enc/ivas_ism_param_enc.c @@ -55,12 +55,10 @@ static void ivas_param_ism_compute_obj_parameters( int16_t i, b, m, br, mr; int16_t brange_start, brange_end, mrange_start, mrange_end, time_merge_fac; float power_ratios_m[MAX_PARAM_ISM_NBANDS][MAX_PARAM_ISM_NBLOCKS]; -#ifdef FIX_440_PARAM_ISM_DIR_NOISE float ref_power_local_frame[MAX_NUM_OBJECTS]; float tmp_ratio; set_f( ref_power_local_frame, 0, MAX_NUM_OBJECTS ); -#endif assert( nchan_ism == 3 || nchan_ism == 4 ); @@ -96,10 +94,8 @@ static void ivas_param_ism_compute_obj_parameters( ref_power_local[i] += reference_power_obj[i][mr][br]; } } -#ifdef FIX_440_PARAM_ISM_DIR_NOISE /* Sum up T/F tiles per object */ ref_power_local_frame[i] += ref_power_local[i]; -#endif } /* find two dominant objects and derive object indices for current T/F tile */ @@ -155,7 +151,6 @@ static void ivas_param_ism_compute_obj_parameters( } } -#ifdef FIX_440_PARAM_ISM_DIR_NOISE /* Check if objects have roughly equal power by comparing reference power of first object against all others*/ hParamIsm->flag_equal_energy = 1; for ( i = 1; i < nchan_ism; i++ ) @@ -175,7 +170,6 @@ static void ivas_param_ism_compute_obj_parameters( } } } -#endif return; } @@ -305,7 +299,8 @@ ivas_error ivas_param_ism_enc_open( /* set FB config. */ - if ( ( error = ivas_fb_set_cfg( &fb_cfg, ISM_FORMAT, SBA_MODE_NONE, st_ivas->hEncoderConfig->nchan_inp, 0, 0, input_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_fb_set_cfg( &fb_cfg, ISM_FORMAT, SBA_MODE_NONE, st_ivas->hEncoderConfig->nchan_inp, 0, 0, input_Fs, + 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -415,9 +410,11 @@ void ivas_param_ism_enc( for ( ts = 0; ts < num_time_slots; ts++ ) { - ivas_fb_mixer_get_windowed_fr( hDirAC->hFbMixer, pcm_in, p_fb_RealBuffer, p_fb_ImagBuffer, l_ts, l_ts ); + ivas_fb_mixer_get_windowed_fr( hDirAC->hFbMixer, pcm_in, p_fb_RealBuffer, p_fb_ImagBuffer, l_ts, l_ts, + hDirAC->hFbMixer->fb_cfg->num_in_chans ); - ivas_fb_mixer_update_prior_input( hDirAC->hFbMixer, pcm_in, l_ts ); + ivas_fb_mixer_update_prior_input( hDirAC->hFbMixer, pcm_in, l_ts, + hDirAC->hFbMixer->fb_cfg->num_in_chans ); for ( i = 0; i < nchan_ism; i++ ) { @@ -458,36 +455,6 @@ void ivas_param_ism_compute_noisy_speech_flag( st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i] = st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i + 1]; } -#ifndef FIX_440_PARAM_ISM_DIR_NOISE - /* For the current frame, make a decision based on some core-coder flags */ - if ( st_ivas->hSCE[0]->hCoreCoder[0]->flag_noisy_speech_snr && st_ivas->hSCE[1]->hCoreCoder[0]->flag_noisy_speech_snr ) - { -#ifdef FIX_422 - if ( st_ivas->hSCE[0]->hCoreCoder[0]->vad_flag || st_ivas->hSCE[1]->hCoreCoder[0]->vad_flag ) -#else - if ( st_ivas->hSCE[0]->hCoreCoder[0]->vad_flag && st_ivas->hSCE[1]->hCoreCoder[0]->vad_flag ) -#endif - { - st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i] = 0; - } - else - { - st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i] = 1; - } - } - else - { - - st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i] = 0; - } - - /* Do a decision based on hysterisis */ - st_ivas->hDirAC->hParamIsm->flag_noisy_speech = 1; - for ( i = 0; i < PARAM_ISM_HYS_BUF_SIZE; i++ ) - { - st_ivas->hDirAC->hParamIsm->flag_noisy_speech = st_ivas->hDirAC->hParamIsm->flag_noisy_speech && st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i]; - } -#else /* Set flag_noisy_speech to 0 for cases where object energies are not roughly equal */ if ( !st_ivas->hDirAC->hParamIsm->flag_equal_energy ) { @@ -499,11 +466,7 @@ void ivas_param_ism_compute_noisy_speech_flag( /* For the current frame, make a decision based on some core-coder flags */ if ( st_ivas->hSCE[0]->hCoreCoder[0]->flag_noisy_speech_snr && st_ivas->hSCE[1]->hCoreCoder[0]->flag_noisy_speech_snr ) { -#ifdef FIX_422 if ( st_ivas->hSCE[0]->hCoreCoder[0]->vad_flag || st_ivas->hSCE[1]->hCoreCoder[0]->vad_flag ) -#else - if ( st_ivas->hSCE[0]->hCoreCoder[0]->vad_flag && st_ivas->hSCE[1]->hCoreCoder[0]->vad_flag ) -#endif { st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i] = 0; } @@ -524,7 +487,6 @@ void ivas_param_ism_compute_noisy_speech_flag( st_ivas->hDirAC->hParamIsm->flag_noisy_speech = st_ivas->hDirAC->hParamIsm->flag_noisy_speech && st_ivas->hDirAC->hParamIsm->noisy_speech_buffer[i]; } } -#endif return; } diff --git a/lib_enc/ivas_lfe_enc.c b/lib_enc/ivas_lfe_enc.c index a14424774ffec7ed5270d26f8d46926c9568e53e..9a5b7549420355b92f1219f695e7f9205e2831b0 100644 --- a/lib_enc/ivas_lfe_enc.c +++ b/lib_enc/ivas_lfe_enc.c @@ -98,7 +98,11 @@ static void ivas_lfe_enc_quant( BSTR_ENC_HANDLE hBstr ) { int16_t bits_written; +#ifdef IND_LIST_DYN + int16_t nb_ind_tot; +#else int16_t next_ind_pos; +#endif uint16_t quant_strategy, write_bit; int16_t num_quant_strategies; int16_t shift_bits; @@ -117,7 +121,11 @@ static void ivas_lfe_enc_quant( num_quant_strategies = IVAS_MAX_NUM_QUANT_STRATS; shift_bits = IVAS_LFE_SHIFT_BITS; bits_written = hBstr->nb_bits_tot; +#ifdef IND_LIST_DYN + nb_ind_tot = hBstr->nb_ind_tot; +#else next_ind_pos = hBstr->next_ind; +#endif for ( quant_strategy = 0; quant_strategy < num_quant_strategies; quant_strategy++ ) @@ -243,7 +251,11 @@ static void ivas_lfe_enc_quant( } bits_written_arith_enc = hBstr->nb_bits_tot; +#ifdef IND_LIST_DYN + next_ind_pos_arith_enc = hBstr->nb_ind_tot; +#else next_ind_pos_arith_enc = hBstr->next_ind; +#endif push_next_indice( hBstr, coding_strategy, 1 ); base2_num_bits_tot = hBstr->nb_bits_tot - bits_written; @@ -259,13 +271,24 @@ static void ivas_lfe_enc_quant( { if ( quant_strategy == ( num_quant_strategies - 1 ) || ( ( target_bits + IVAS_LFE_ID_BITS ) >= base2_num_bits_tot ) ) { +#ifdef IND_LIST_DYN + /* reset bits buffer and code the indices with base 2 coding */ + for ( j = hBstr->nb_ind_tot - 1; j >= next_ind_pos_arith_enc; j-- ) + { + hBstr->ind_list[j].nb_bits = -1; + } + hBstr->nb_ind_tot = next_ind_pos_arith_enc; +#else /* reset bits buffer and code the indices with base 2 coding */ for ( j = hBstr->next_ind - 1; j >= next_ind_pos_arith_enc; j-- ) { hBstr->ind_list[j].nb_bits = -1; } +#endif hBstr->nb_bits_tot = bits_written_arith_enc; +#ifndef IND_LIST_DYN hBstr->next_ind = next_ind_pos_arith_enc; +#endif coding_strategy = 1; push_next_indice( hBstr, coding_strategy, 1 ); @@ -298,13 +321,21 @@ static void ivas_lfe_enc_quant( if ( quant_strategy < ( num_quant_strategies - 1 ) ) { /* reset all indices that were already written - TODO: maybe better store them temporarily first and write at the very end? */ +#ifdef IND_LIST_DYN + for ( j = hBstr->nb_ind_tot - 1; j >= nb_ind_tot; j-- ) +#else for ( j = hBstr->next_ind - 1; j >= next_ind_pos; j-- ) +#endif { hBstr->ind_list[j].nb_bits = -1; } hBstr->nb_bits_tot = bits_written; +#ifdef IND_LIST_DYN + hBstr->nb_ind_tot = nb_ind_tot; +#else hBstr->next_ind = next_ind_pos; +#endif } } } diff --git a/lib_enc/ivas_masa_enc.c b/lib_enc/ivas_masa_enc.c index 5b5363efb3eda26af319e9559d085bfcc877d7b5..0c768f1a176107342df11f6df965acaa24998ab2 100644 --- a/lib_enc/ivas_masa_enc.c +++ b/lib_enc/ivas_masa_enc.c @@ -64,7 +64,7 @@ static void reduce_metadata_further( MASA_ENCODER_HANDLE hMasa, IVAS_QMETADATA_H static void average_masa_metadata( MASA_METADATA_FRAME *masaMetadata, float energy[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] #ifdef HR_METADATA , - SPHERICAL_GRID_DATA *sphGrid + const SPHERICAL_GRID_DATA *sphGrid #endif ); @@ -76,9 +76,7 @@ static uint8_t are_masa_subframes_similar( const MASA_METADATA_HANDLE frame1, co static void detect_framing_async( MASA_ENCODER_HANDLE hMasa ); -#ifdef FIX_398_MASA_DIRECTION_ALIGNMENT static void masa_metadata_direction_alignment( MASA_ENCODER_HANDLE hMasa ); -#endif /*-----------------------------------------------------------------------* * Local constants @@ -150,12 +148,10 @@ ivas_error ivas_masa_enc_open( hMasa->data.sync_state.prev_offset = 0; hMasa->data.sync_state.frame_mode = MASA_FRAME_4SF; -#ifdef FIX_398_MASA_DIRECTION_ALIGNMENT set_zero( hMasa->data.dir_align_state.previous_azi_dir1, MASA_FREQUENCY_BANDS ); set_zero( hMasa->data.dir_align_state.previous_ele_dir1, MASA_FREQUENCY_BANDS ); set_zero( hMasa->data.dir_align_state.previous_azi_dir2, MASA_FREQUENCY_BANDS ); set_zero( hMasa->data.dir_align_state.previous_ele_dir2, MASA_FREQUENCY_BANDS ); -#endif st_ivas->hMasa = hMasa; @@ -256,12 +252,14 @@ ivas_error ivas_masa_encode( } } } + #ifdef HR_METADATA if ( ivas_format == MASA_FORMAT && ivas_total_brate >= IVAS_384k ) { hMasa->config.mergeRatiosOverSubframes = 0; } #endif + /* Combine frequency bands and sub-frames */ combine_freqbands_and_subframes( hMasa ); } @@ -340,7 +338,8 @@ ivas_error ivas_masa_encode( else { #endif - ivas_qmetadata_enc_encode( hMetaData, hQMetaData ); + ivas_qmetadata_enc_encode( hMetaData, hQMetaData, + 0 ); #ifdef HR_METADATA } #endif @@ -500,6 +499,10 @@ ivas_error ivas_masa_enc_config( uint8_t coherencePresent; uint8_t isActualTwoDir; /* Flag to tell that when there are two directions present in metadata, they both contain meaningful information. */ int32_t ivas_total_brate; +#ifdef FIX_HBR_MASAMETA + uint8_t maxBand; + int16_t maxBin, sf; +#endif ivas_error error; #ifdef HR_METADATA SPHERICAL_GRID_DATA *sphGrid; @@ -518,9 +521,7 @@ ivas_error ivas_masa_enc_config( if ( ivas_format == MASA_FORMAT ) { -#ifdef FIX_398_MASA_DIRECTION_ALIGNMENT masa_metadata_direction_alignment( hMasa ); -#endif detect_framing_async( hMasa ); /* detect the offset, set 1sf/4sf mode based on this. potentially also shift the metadata using a history buffer */ @@ -531,6 +532,7 @@ ivas_error ivas_masa_enc_config( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MASA spherical grid\n" ) ); } + if ( ivas_total_brate == IVAS_512k ) { generate_gridEq( sphGrid ); @@ -540,6 +542,7 @@ ivas_error ivas_masa_enc_config( sphGrid->no_theta = 0; } #endif + /* average over sub-frames */ average_masa_metadata( &( hMasa->masaMetadata ), hMasa->data.energy #ifdef HR_METADATA @@ -638,7 +641,57 @@ ivas_error ivas_masa_enc_config( ivas_set_qmetadata_maxbit_req( hQMetaData, ivas_format ); +#ifdef FIX_HBR_MASAMETA + /* Find maximum band usable */ + maxBin = (int16_t) ( st_ivas->hEncoderConfig->input_Fs * INV_CLDFB_BANDWIDTH ); + maxBand = 0; + while ( maxBand <= MASA_FREQUENCY_BANDS && MASA_band_grouping_24[maxBand] <= maxBin ) + { + maxBand++; + } + maxBand--; + + if ( ivas_total_brate > IVAS_256k ) + { + int16_t continueLoop; + continueLoop = 1; + while ( maxBand > 5 && continueLoop ) + { + for ( sf = 0; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) + { + if ( hMasa->data.energy[sf][maxBand - 1] > 100000 ) + { + continueLoop = 0; + break; + } + } + if ( continueLoop ) + { + maxBand--; + } + } + + if ( maxBand < MASA_MAXIMUM_CODING_SUBBANDS ) + { + st_ivas->hQMetaData->q_direction->cfg.inactiveBands = MASA_MAXIMUM_CODING_SUBBANDS - maxBand; + } + else + { + st_ivas->hQMetaData->q_direction->cfg.inactiveBands = 0; + } + } + + masa_sample_rate_band_correction( &( hMasa->config ), hMasa->data.band_mapping, hQMetaData, maxBand, ivas_total_brate > IVAS_256k, NULL ); + + if ( hMasa->config.numTwoDirBands >= hMasa->config.numCodingBands ) + { + hMasa->config.numTwoDirBands = hMasa->config.numCodingBands; + set_c( (int8_t *) hMasa->data.twoDirBands, 1, hMasa->config.numCodingBands ); + } + +#else masa_sample_rate_band_correction( &( hMasa->config ), hMasa->data.band_mapping, hQMetaData, st_ivas->hEncoderConfig->input_Fs, NULL ); +#endif /* Transmit stereo signals using a mono downmix at lowest bitrates */ if ( ivas_format == MASA_FORMAT && st_ivas->nCPE == 1 && st_ivas->hCPE[0]->hStereoDft != NULL && st_ivas->hCPE[0]->hStereoDft->hConfig != NULL ) @@ -745,8 +798,11 @@ static void combine_freqbands_and_subframes( } } } - +#ifdef FIX_HBR_MASAMETA + if ( numCodingBands <= MAX_REDUCED_NBANDS ) +#else if ( numCodingBands < MASA_FREQUENCY_BANDS ) +#endif { /* reduce metadata *frequency* resolution. time resolution is not touched */ for ( i = 0; i < numDirections; i++ ) @@ -1769,7 +1825,7 @@ static void average_masa_metadata( float energy[MAX_PARAM_SPATIAL_SUBFRAMES][MASA_FREQUENCY_BANDS] #ifdef HR_METADATA , - SPHERICAL_GRID_DATA *Sph_Grid16 + const SPHERICAL_GRID_DATA *Sph_Grid16 #endif ) { @@ -2168,7 +2224,6 @@ static void detect_framing_async( } -#ifdef FIX_398_MASA_DIRECTION_ALIGNMENT /*-------------------------------------------------------------------* * masa_metadata_direction_alignment() * @@ -2283,6 +2338,9 @@ static void masa_metadata_direction_alignment( { /* swap the metadata of the two directions in this TF-tile */ float tmp_val; +#ifdef FIX_HBR_MASAMETA + uint16_t tmp_int_val; +#endif tmp_val = hMeta->directional_meta[0].azimuth[sf][band]; hMeta->directional_meta[0].azimuth[sf][band] = hMeta->directional_meta[1].azimuth[sf][band]; hMeta->directional_meta[1].azimuth[sf][band] = tmp_val; @@ -2290,7 +2348,11 @@ static void masa_metadata_direction_alignment( tmp_val = hMeta->directional_meta[0].elevation[sf][band]; hMeta->directional_meta[0].elevation[sf][band] = hMeta->directional_meta[1].elevation[sf][band]; hMeta->directional_meta[1].elevation[sf][band] = tmp_val; - +#ifdef FIX_HBR_MASAMETA + tmp_int_val = hMeta->directional_meta[0].spherical_index[sf][band]; + hMeta->directional_meta[0].spherical_index[sf][band] = hMeta->directional_meta[1].spherical_index[sf][band]; + hMeta->directional_meta[1].spherical_index[sf][band] = tmp_int_val; +#endif tmp_val = hMeta->directional_meta[0].energy_ratio[sf][band]; hMeta->directional_meta[0].energy_ratio[sf][band] = hMeta->directional_meta[1].energy_ratio[sf][band]; hMeta->directional_meta[1].energy_ratio[sf][band] = tmp_val; @@ -2330,4 +2392,3 @@ static void masa_metadata_direction_alignment( return; } -#endif diff --git a/lib_enc/ivas_mc_param_enc.c b/lib_enc/ivas_mc_param_enc.c index 14eca6afee59ee3596c7c08a743aeb8eade52846..ff01bd3aa19dfd28470ea75a06a3094efb165f8d 100644 --- a/lib_enc/ivas_mc_param_enc.c +++ b/lib_enc/ivas_mc_param_enc.c @@ -140,7 +140,8 @@ ivas_error ivas_param_mc_enc_open( hParamMC->dmx_factors = ivas_param_mc_conf[config_index].dmx_fac; /* set FB config. */ - if ( ( error = ivas_fb_set_cfg( &fb_cfg, MC_FORMAT, SBA_MODE_DIRAC, nchan_inp, 0, 0, input_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_fb_set_cfg( &fb_cfg, MC_FORMAT, SBA_MODE_DIRAC, nchan_inp, 0, 0, input_Fs, + 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -199,11 +200,7 @@ ivas_error ivas_param_mc_enc_open( /* parameter band grouping: 60 band CLDFB to 240 band MDFT resolution */ for ( i = 0; i < hParamMC->hMetadataPMC.num_parameter_bands + 1; i++ ) { -#ifdef PARAMMC_SHORT_ENC_MDFT hParamMC->band_grouping[i] *= PARAM_MC_CLDFB_TO_MDFT_FAC; -#else - hParamMC->band_grouping[i] *= CLDFB_TO_MDFT_FAC; -#endif } /* set correct coded band width */ @@ -339,11 +336,7 @@ ivas_error ivas_param_mc_enc_reconfig( /* parameter band grouping: 60 band CLDFB to 240 band MDFT resolution */ for ( i = 0; i < hParamMC->hMetadataPMC.num_parameter_bands + 1; i++ ) { -#ifdef PARAMMC_SHORT_ENC_MDFT hParamMC->band_grouping[i] *= PARAM_MC_CLDFB_TO_MDFT_FAC; -#else - hParamMC->band_grouping[i] *= CLDFB_TO_MDFT_FAC; -#endif } /* set correct coded band width */ @@ -681,7 +674,8 @@ static void ivas_param_mc_param_est_enc( for ( ts = 0; ts < start_ts; ts++ ) { - ivas_fb_mixer_update_prior_input( hParamMC->hFbMixer, pcm_in, l_ts ); + ivas_fb_mixer_update_prior_input( hParamMC->hFbMixer, pcm_in, l_ts, + hParamMC->hFbMixer->fb_cfg->num_in_chans ); for ( i = 0; i < nchan_input; i++ ) { pcm_in[i] += l_ts; @@ -690,12 +684,11 @@ static void ivas_param_mc_param_est_enc( for ( ts = start_ts; ts < num_time_slots; ts++ ) { -#ifdef PARAMMC_SHORT_ENC_MDFT - ivas_fb_mixer_get_windowed_fr( hParamMC->hFbMixer, pcm_in, p_slot_frame_f_real, p_slot_frame_f_imag, l_ts, l_ts ); -#else - ivas_fb_mixer_get_windowed_fr( hParamMC->hFbMixer, pcm_in, p_slot_frame_f_real, p_slot_frame_f_imag, l_ts, 2 * l_ts ); -#endif - ivas_fb_mixer_update_prior_input( hParamMC->hFbMixer, pcm_in, l_ts ); + ivas_fb_mixer_get_windowed_fr( hParamMC->hFbMixer, pcm_in, p_slot_frame_f_real, p_slot_frame_f_imag, l_ts, l_ts, + hParamMC->hFbMixer->fb_cfg->num_in_chans ); + ivas_fb_mixer_update_prior_input( hParamMC->hFbMixer, pcm_in, l_ts, + hParamMC->hFbMixer->fb_cfg->num_in_chans ); + for ( i = 0; i < nchan_input; i++ ) { pcm_in[i] += l_ts; diff --git a/lib_enc/ivas_mc_paramupmix_enc.c b/lib_enc/ivas_mc_paramupmix_enc.c new file mode 100644 index 0000000000000000000000000000000000000000..fc093c3f59644e9a5538fbe5a389a8ed126fab8d --- /dev/null +++ b/lib_enc/ivas_mc_paramupmix_enc.c @@ -0,0 +1,827 @@ +/****************************************************************************************************** + + (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. + +*******************************************************************************************************/ + +#include +#include +#include "options.h" +#include "cnst.h" +#include "rom_enc.h" +#include "rom_com.h" +#include "prot.h" +#include "ivas_prot.h" +#include "ivas_cnst.h" +#include "ivas_rom_com.h" +#include "ivas_rom_enc.h" +#ifdef DEBUGGING +#include "debug.h" +#endif +#ifdef DEBUG_PLOT +#include "deb_out.h" +#endif +#include "wmc_auto.h" + +/*------------------------------------------------------------------------- + * Local function prototypes + *------------------------------------------------------------------------*/ + +static void ivas_mc_paramupmix_dmx( MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, float data_f[][L_FRAME48k], const int16_t input_frame ); + +static void ivas_mc_paramupmix_param_est_enc( MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, float input_frame_t[][L_FRAME48k], const int16_t input_frame, float alphas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS], float betas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS] ); + +static void get_huff_table( PAR_TYPE par_type, QUANT_TYPE quant_type, HUFF_TAB *df0, HUFF_TAB *df, HUFF_TAB *dt ); + +static void write_huff_bits( int32_t value, uint16_t length, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos ); + +static void huffman_encode( int16_t bdfOnly, int16_t bdtAllowed, int16_t nv, int16_t ivStart, int32_t *vqPrev, int32_t *vq, PAR_TYPE parType, QUANT_TYPE quant_type, int16_t nq, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos ); + +static void put_ec_data( MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, int16_t ch, float pars[IVAS_MAX_NUM_BANDS], float alphas[IVAS_MAX_NUM_BANDS], PAR_TYPE parType, uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], int16_t *bit_pos ); + +static void quantize_alpha( int16_t nv, const float *alpha, QUANT_TYPE quant_type, int16_t *pnq, int32_t aq[IVAS_MAX_NUM_BANDS], float *adeq ); + +static void quantize_pars( int16_t nv, const float *v, int16_t nq, const float *data, int32_t vq[IVAS_MAX_NUM_BANDS], float *vdeq ); + +static void quantize_pars( int16_t nv, const float *v, int16_t nq, const float *data, int32_t vq[IVAS_MAX_NUM_BANDS], float *vdeq ); + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_enc() + * + * MC ParamUpmix Encoder main encoding function + *------------------------------------------------------------------------*/ + +void ivas_mc_paramupmix_enc( + Encoder_Struct *st_ivas, /* i/o: IVAS Encoder handle */ + BSTR_ENC_HANDLE hBStr, /* i/o: IVAS Metadata bitstream handle */ + float data_f[][L_FRAME48k], /* i/o: input: CICP6, CICP12, CICP14, CICP16 or CICP19 MC data */ + const int16_t input_frame /* i : input frame length */ +) +{ + MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix; + int16_t i; + float alphas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + float betas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS]; + int16_t bit_pos; + + push_wmops( "mc_paramupmix_enc" ); + + hMCParamUpmix = st_ivas->hMCParamUpmix; + bit_pos = 0; + + /* Parameter estimation */ + ivas_mc_paramupmix_param_est_enc( hMCParamUpmix, data_f, input_frame, alphas, betas ); + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + put_ec_data( hMCParamUpmix, i, alphas[i], NULL, ALPHA, bit_buffer, &bit_pos ); + put_ec_data( hMCParamUpmix, i, betas[i], alphas[i], BETA, bit_buffer, &bit_pos ); + } + + /* push the PARAM UPMIX MC side info from the temporary buffer into the medatdata bitstream*/ + push_next_bits( hBStr, bit_buffer, bit_pos ); + + /* DMX generation*/ + ivas_mc_paramupmix_dmx( hMCParamUpmix, data_f, input_frame ); + + pop_wmops(); + + return; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_enc_open() + * + * Initialize MC ParamUpmix encoder handle + *------------------------------------------------------------------------*/ + +ivas_error ivas_mc_paramupmix_enc_open( + Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ +) +{ + IVAS_FB_CFG *fb_cfg; + MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix; + int32_t input_Fs; + int32_t input_frame; + int16_t i, k, b, j; + ivas_error error; + + error = IVAS_ERR_OK; + input_Fs = st_ivas->hEncoderConfig->input_Fs; + input_frame = (int32_t) st_ivas->hEncoderConfig->input_Fs / FRAMES_PER_SEC; + + /* Sanity Checks */ + if ( ( hMCParamUpmix = (MC_PARAMUPMIX_ENC_HANDLE) malloc( sizeof( MC_PARAMUPMIX_ENC_DATA ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MC_MODE_PARAMUPMIX\n" ) ); + } + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + for ( k = 0; k < MC_PARAMUPMIX_NCH; k++ ) + { + if ( ( hMCParamUpmix->midside[i][k] = (float *) malloc( sizeof( float ) * input_frame ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MC_MODE_PARAMUPMIX\n" ) ); + } + set_zero( hMCParamUpmix->midside[i][k], (int16_t) input_frame ); + } + } + hMCParamUpmix->first_frame = 1; + + /* MC_LS_SETUP_5_1_2 is the only current configuration */ + st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; + + /* set core coder dependent on the number of transport channels */ + switch ( st_ivas->nchan_transport ) + { + case 8: + st_ivas->nCPE = 4; + st_ivas->nSCE = 0; + st_ivas->hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; + break; +#ifdef DEBUGGING + default: + assert( 0 && "Number of transport channels not supported by MC PARAM UPMIX MODE!\n" ); +#endif + } + + + /* Transient Detector handle */ + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH; i++ ) + { + if ( ( error = ivas_transient_det_open( &( hMCParamUpmix->hTranDet[i] ), input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + /* set FB config. */ + /* need to set num output channels to a value > 0 to get pFb != NULL */ + if ( ( error = ivas_fb_set_cfg( &fb_cfg, MC_FORMAT, SBA_MODE_SPAR, MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH, MC_PARAMUPMIX_COMBINATIONS, 0, input_Fs, + 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + fb_cfg->remix_order = mc_paramupmix_fb_remix_order; + /* override latency, could be moved to ivas_fb_set_cfg */ + /* assuming parameters are calculated at end of frame, compensate for MCT delay and half of decoder fb */ + /* still 1.5ms off, since MCT delay is not large enough */ + /* param at end of frame */ + fb_cfg->prior_input_length = (int16_t) ( NS2SA( input_Fs, 12000000L ) + NS2SA( input_Fs, DELAY_FB_4_NS / 2 ) - input_frame / 2 - NS2SA( input_Fs, DELAY_FB_1_NS / 2 ) ); + fb_cfg->prior_input_length = (int16_t) max( fb_cfg->prior_input_length, input_frame / MAX_PARAM_SPATIAL_SUBFRAMES ); + + /* Allocate and initialize FB mixer handle */ + if ( ( error = ivas_FB_mixer_open( &( hMCParamUpmix->hFbMixer ), input_Fs, fb_cfg, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + /* Covariance handle */ + if ( ( error = ivas_spar_covar_enc_open( &( hMCParamUpmix->hCovEnc[i] ), hMCParamUpmix->hFbMixer->pFb, input_Fs, MC_PARAMUPMIX_NCH + 1, st_ivas->hEncoderConfig->ivas_total_brate ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + + for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ ) + { + if ( ( hMCParamUpmix->cov_real[b] = (float ***) malloc( MC_PARAMUPMIX_NCH * sizeof( float ** ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov real matrix" ); + } + for ( i = 0; i < MC_PARAMUPMIX_NCH; i++ ) + { + if ( ( hMCParamUpmix->cov_real[b][i] = (float **) malloc( MC_PARAMUPMIX_NCH * sizeof( float * ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov real matrix" ); + } + for ( j = 0; j < MC_PARAMUPMIX_NCH; j++ ) + { + if ( ( hMCParamUpmix->cov_real[b][i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov real matrix" ); + } + } + } + + if ( ( hMCParamUpmix->cov_dtx_real[b] = (float ***) malloc( MC_PARAMUPMIX_NCH * sizeof( float ** ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov dtx real matrix" ); + } + for ( i = 0; i < MC_PARAMUPMIX_NCH; i++ ) + { + if ( ( hMCParamUpmix->cov_dtx_real[b][i] = (float **) malloc( MC_PARAMUPMIX_NCH * sizeof( float * ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov dtx real matrix" ); + } + for ( j = 0; j < MC_PARAMUPMIX_NCH; j++ ) + { + if ( ( hMCParamUpmix->cov_dtx_real[b][i][j] = (float *) malloc( IVAS_MAX_NUM_BANDS * sizeof( float ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR cov dtx real matrix" ); + } + } + } + } + + st_ivas->hMCParamUpmix = hMCParamUpmix; + + return error; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_enc_close() + * + * Close MC Param-Upmix encoder handle + *------------------------------------------------------------------------*/ + +void ivas_mc_paramupmix_enc_close( + MC_PARAMUPMIX_ENC_HANDLE *hMCParamUpmix, /* i/o: MC Param-Upmix encoder handle */ + const int32_t sampling_rate ) +{ + int16_t i, k; + int16_t b, j; + + if ( hMCParamUpmix == NULL || *hMCParamUpmix == NULL ) + { + return; + } + for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ ) + { + if ( ( *hMCParamUpmix )->cov_real[b] != NULL ) + { + for ( i = 0; i < MC_PARAMUPMIX_NCH; i++ ) + { + if ( ( *hMCParamUpmix )->cov_real[b][i] != NULL ) + { + for ( j = 0; j < MC_PARAMUPMIX_NCH; j++ ) + { + if ( ( *hMCParamUpmix )->cov_real[b][i][j] != NULL ) + { + free( ( *hMCParamUpmix )->cov_real[b][i][j] ); + } + } + free( ( *hMCParamUpmix )->cov_real[b][i] ); + } + } + free( ( *hMCParamUpmix )->cov_real[b] ); + } + if ( ( *hMCParamUpmix )->cov_dtx_real[b] != NULL ) + { + for ( i = 0; i < MC_PARAMUPMIX_NCH; i++ ) + { + if ( ( *hMCParamUpmix )->cov_dtx_real[b][i] != NULL ) + { + for ( j = 0; j < MC_PARAMUPMIX_NCH; j++ ) + { + if ( ( *hMCParamUpmix )->cov_dtx_real[b][i][j] != NULL ) + { + free( ( *hMCParamUpmix )->cov_dtx_real[b][i][j] ); + } + } + free( ( *hMCParamUpmix )->cov_dtx_real[b][i] ); + } + } + free( ( *hMCParamUpmix )->cov_dtx_real[b] ); + } + } + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + for ( k = 0; k < MC_PARAMUPMIX_NCH; k++ ) + { + free( ( *hMCParamUpmix )->midside[i][k] ); + } + } + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH; i++ ) + { + ivas_transient_det_close( &( *hMCParamUpmix )->hTranDet[i] ); + } + + if ( ( *hMCParamUpmix )->hFbMixer != NULL ) + { + ivas_FB_mixer_close( &( *hMCParamUpmix )->hFbMixer, sampling_rate, 0 ); + } + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + /* Covariance handle */ + if ( ( *hMCParamUpmix )->hCovEnc[i] != NULL ) + { + ivas_spar_covar_enc_close( &( *hMCParamUpmix )->hCovEnc[i], ( MC_PARAMUPMIX_NCH + 1 ) ); + } + } + + free( *hMCParamUpmix ); + *hMCParamUpmix = NULL; + return; +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_getNumTransportChannels() + * + * + *------------------------------------------------------------------------*/ + +/* r : number of IVAS transport channels */ +int16_t ivas_mc_paramupmix_getNumTransportChannels() +{ + int16_t nchan_transport; + + /* LFE not included */ + nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS - 1; /*5_1_2*/ + + return nchan_transport; +} + + +/*****************************************************************************************/ +/* local functions */ +/*****************************************************************************************/ +static void get_huff_table( + PAR_TYPE par_type, + QUANT_TYPE quant_type, + HUFF_TAB *df0, + HUFF_TAB *df, + HUFF_TAB *dt ) +{ + switch ( par_type ) + { + case ALPHA: + df0->value = huff_alpha_table[quant_type].df0.value; + df0->length = huff_alpha_table[quant_type].df0.length; + df->value = huff_alpha_table[quant_type].df.value; + df->length = huff_alpha_table[quant_type].df.length; + dt->value = huff_alpha_table[quant_type].dt.value; + dt->length = huff_alpha_table[quant_type].dt.length; + break; + case BETA: + df0->value = huff_beta_table[quant_type].df0.value; + df0->length = huff_beta_table[quant_type].df0.length; + df->value = huff_beta_table[quant_type].df.value; + df->length = huff_beta_table[quant_type].df.length; + dt->value = huff_beta_table[quant_type].dt.value; + dt->length = huff_beta_table[quant_type].dt.length; + break; + } +} + +static void write_huff_bits( + int32_t value, + uint16_t length, + uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], + int16_t *bit_pos ) +{ + int16_t k; + for ( k = length - 1; k >= 0; k-- ) + { + bit_buffer[( *bit_pos )++] = (uint16_t) ( ( value >> k ) & 1 ); + } +} + +static void huffman_encode( + int16_t bdfOnly, + int16_t bdtAllowed, + int16_t nv, + int16_t ivStart, + int32_t *vqPrev, + int32_t *vq, + PAR_TYPE parType, + QUANT_TYPE quant_type, + int16_t nq, + uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], + int16_t *bit_pos ) +{ + int16_t iv, ndf, ndt; + int32_t icode; + int16_t offset; + HUFF_TAB df0, df, dt; + + get_huff_table( parType, quant_type, &df0, &df, &dt ); + + offset = nq - 1; /* range [-(nquant - 1), nquant - 1] */ + + /* Get code length for time and freq diff coding */ + ndf = 0; + ndt = 0; + for ( iv = ivStart; iv < nv; iv++ ) + { + if ( iv == ivStart ) + { + icode = vq[iv]; + ndf += df0.length[icode]; + } + else + { + icode = vq[iv] - vq[iv - 1] + offset; + ndf += df.length[icode]; + } + + icode = vq[iv] - vqPrev[iv] + offset; + ndt += dt.length[icode]; + } + + if ( !bdtAllowed ) /* Time diff not allowed due to conformance or other reason even if bdfOnly = 0 */ + { + ndt = ndf + 1; + } + + /* Write the bitstream */ + if ( bdfOnly || ndf < ndt ) + { + bit_buffer[( *bit_pos )++] = (uint16_t) 0 & 1; + for ( iv = ivStart; iv < nv; iv++ ) + { + if ( iv == ivStart ) + { + icode = vq[iv]; + write_huff_bits( df0.value[icode], df0.length[icode], bit_buffer, bit_pos ); + } + else + { + icode = vq[iv] - vq[iv - 1] + offset; + write_huff_bits( df.value[icode], df.length[icode], bit_buffer, bit_pos ); + } + } + } + else + { + bit_buffer[( *bit_pos )++] = (uint16_t) 1 & 1; + for ( iv = ivStart; iv < nv; iv++ ) + { + icode = vq[iv] - vqPrev[iv] + offset; + if ( icode < 0 || icode >= 2 * nq - 1 ) + { + assert( 0 ); + } + write_huff_bits( dt.value[icode], dt.length[icode], bit_buffer, bit_pos ); + } + } +} + +static void quantize_pars( + int16_t nv, + const float *v, + int16_t nq, + const float *data, + int32_t vq[IVAS_MAX_NUM_BANDS], + float *vdeq ) +{ + int16_t iv, iq, iq0, iq1; + + for ( iv = 0; iv < nv; iv++ ) + { + iq0 = 0; + iq1 = nq - 1; + + while ( iq1 - iq0 > 1 ) + { + iq = ( iq0 + iq1 ) / 2; + if ( v[iv] < data[iq] ) + { + iq1 = iq; + } + else + { + iq0 = iq; + } + } + + if ( fabs( v[iv] - data[iq0] ) < fabs( v[iv] - data[iq1] ) ) + { + vq[iv] = iq0; + vdeq[iv] = data[iq0]; + } + else + { + vq[iv] = iq1; + vdeq[iv] = data[iq1]; + } + } +} + +static void quantize_alpha( + int16_t nv, + const float *alpha, + QUANT_TYPE quant_type, + int16_t *pnq, + int32_t aq[IVAS_MAX_NUM_BANDS], + float *adeq ) +{ + int16_t nq; + const float *data; + + nq = alpha_quant_table[quant_type].nquant; + data = alpha_quant_table[quant_type].data; + + quantize_pars( nv, alpha, nq, data, aq, adeq ); + + *pnq = nq; +} + +static void quantize_beta( + int16_t nv, + const float *beta, + const int32_t aq[IVAS_MAX_NUM_BANDS], + QUANT_TYPE quant_type, + int16_t *pnq, + int32_t bq[IVAS_MAX_NUM_BANDS], + float *bdeq ) +{ + int16_t iv, iq, iq0, iq1; + ACPL_QUANT_TABLE *tables = beta_quant_table[quant_type]; + ACPL_QUANT_TABLE quant_table; + const int16_t qmap[2][33] = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0 } }; + for ( iv = 0; iv < nv; iv++ ) + { + quant_table = tables[qmap[quant_type][aq[iv]]]; + + iq0 = 0; + iq1 = quant_table.nquant - 1; + + while ( iq1 - iq0 > 1 ) + { + iq = ( iq0 + iq1 ) / 2; + if ( beta[iv] < quant_table.data[iq] ) + { + iq1 = iq; + } + else + { + iq0 = iq; + } + } + + if ( fabs( beta[iv] - quant_table.data[iq0] ) < fabs( beta[iv] - quant_table.data[iq1] ) ) + { + bq[iv] = iq0; + bdeq[iv] = quant_table.data[iq0]; + } + else + { + bq[iv] = iq1; + bdeq[iv] = quant_table.data[iq1]; + } + } + + *pnq = beta_quant_table[quant_type][0].nquant; +} + +static void put_ec_data( + MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, + int16_t ch, + float pars[IVAS_MAX_NUM_BANDS], + float alphas[IVAS_MAX_NUM_BANDS], + PAR_TYPE parType, + uint16_t bit_buffer[MC_PARAMUPMIX_MAX_BITS], + int16_t *bit_pos ) +{ + int16_t npar = IVAS_MAX_NUM_BANDS; + int16_t onlyFreq = 1; + int16_t nq; + QUANT_TYPE quant_type = FINE; + int32_t alphaQuant[IVAS_MAX_NUM_BANDS]; + int32_t betaQuant[IVAS_MAX_NUM_BANDS]; + float alphaDequant[IVAS_MAX_NUM_BANDS]; + float betaDequant[IVAS_MAX_NUM_BANDS]; + + if ( parType == ALPHA ) + { + quantize_alpha( npar, pars, quant_type, &nq, alphaQuant, alphaDequant ); + } + else + { + quantize_alpha( npar, alphas, quant_type, &nq, alphaQuant, alphaDequant ); + quantize_beta( npar, pars, alphaQuant, quant_type, &nq, betaQuant, betaDequant ); + } + if ( hMCParamUpmix->first_frame ) + { + mvl2l( &( alphaQuant[0] ), &( hMCParamUpmix->alpha_quant_prev[ch][0] ), IVAS_MAX_NUM_BANDS ); + if ( parType == BETA ) + { + mvl2l( &( betaQuant[0] ), &( hMCParamUpmix->beta_quant_prev[ch][0] ), IVAS_MAX_NUM_BANDS ); + if ( ch == ( MC_PARAMUPMIX_COMBINATIONS - 1 ) ) + { + hMCParamUpmix->first_frame = 0; + } + } + } + + /* Always one parameter set per frame for transient frames. Original PS framing is used internally. */ + if ( parType == ALPHA ) + { + huffman_encode( onlyFreq, 1, npar, 0, hMCParamUpmix->alpha_quant_prev[ch], alphaQuant, ALPHA, quant_type, nq, bit_buffer, bit_pos ); + } + else + { + huffman_encode( onlyFreq, 1, npar, 0, hMCParamUpmix->beta_quant_prev[ch], betaQuant, BETA, quant_type, nq, bit_buffer, bit_pos ); + } + + if ( parType == ALPHA ) + { + mvl2l( alphaQuant, hMCParamUpmix->alpha_quant_prev[ch], IVAS_MAX_NUM_BANDS ); + } + else + { + mvl2l( betaQuant, hMCParamUpmix->beta_quant_prev[ch], IVAS_MAX_NUM_BANDS ); + } +} + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_dmx() + * + * Computes the time domain down mix signal + *------------------------------------------------------------------------*/ + +static void ivas_mc_paramupmix_dmx( + MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, /* i/o: MC ParamUpmix encoder handle */ + float data_f[][L_FRAME48k], /* i/o : Input, downmix out */ + const int16_t input_frame /* i : Input frame length */ +) +{ + int16_t i, l; + int16_t chan1s[4] = { 4, 5, 8, 9 }; + int16_t chan2s[4] = { 6, 7, 10, 11 }; + int16_t chanOut[4] = { 4, 5, 6, 7 }; + int16_t chanZero[4] = { 8, 9, 10, 11 }; + + /* boxes = { 0 1 2 3 [4 6] [5 7] [8 10] [9 11] }; */ + /* 9+11 -> 7 */ + /* 8+10 -> 6 */ + /* 5+7 -> 5 */ + /* 4+6 -> 4 */ + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + for ( l = 0; l < input_frame; l++ ) + { + /* mid */ + hMCParamUpmix->midside[i][0][l] = ( data_f[chan1s[i]][l] + data_f[chan2s[i]][l] ) * (float) 0.5; + /* side */ + hMCParamUpmix->midside[i][1][l] = ( data_f[chan1s[i]][l] - data_f[chan2s[i]][l] ) * (float) 0.5; + data_f[chanOut[i]][l] = hMCParamUpmix->midside[i][0][l]; + } + } + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + set_zero( data_f[chanZero[i]], input_frame ); + } + return; +} + + +/*------------------------------------------------------------------------- + * ivas_mc_paramupmix_param_est_enc() + * + * run the CLDFB analysis on the input signal + * estimate the input and down mix covariances + *------------------------------------------------------------------------*/ + +static void ivas_mc_paramupmix_param_est_enc( + MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix, /* i/o: MC Param-Upmix encoder handle */ + float input_frame_t[][L_FRAME48k], /* i : Input frame in the time domain */ + const int16_t input_frame, /* i : Input frame length */ + float alphas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS], + float betas[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS] ) +{ + float *pcm_in[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH]; + float fr_realbuffer[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH][L_FRAME48k]; + float fr_imagbuffer[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH][L_FRAME48k]; + float FR_Real_Mid[L_FRAME48k], FR_Imag_Mid[L_FRAME48k]; + float *p_fr_realbuffer[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH]; + float *p_fr_imagbuffer[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH]; + float *pp_in_fr_real[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH]; + float *pp_in_fr_imag[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH]; + float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; + float *cov_dtx_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; + float rxx, rxy, ryy, cmat, rxxest, drxx, wetaux; + + int16_t l_ts; + int16_t b, i, j, ts, bnd; + + int16_t transient_det[MC_PARAMUPMIX_COMBINATIONS][2]; + int16_t transient_det_l[2], transient_det_r[2]; + int16_t chan1s[4] = { 4, 5, 8, 9 }; + int16_t chan2s[4] = { 6, 7, 10, 11 }; + + const int16_t HOA_md_ind[IVAS_SPAR_MAX_CH] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + pcm_in[2 * i] = input_frame_t[chan1s[i]]; + pcm_in[2 * i + 1] = input_frame_t[chan2s[i]]; + } + + /*-----------------------------------------------------------------------------------------* + * Transient detector + *-----------------------------------------------------------------------------------------*/ + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS; i++ ) + { + ivas_transient_det_process( hMCParamUpmix->hTranDet[2 * i], pcm_in[2 * i], input_frame, transient_det_l ); + ivas_transient_det_process( hMCParamUpmix->hTranDet[2 * i + 1], pcm_in[2 * i + 1], input_frame, transient_det_r ); + transient_det[i][0] = transient_det_l[0] || transient_det_r[0]; + transient_det[i][1] = transient_det_l[0] || transient_det_r[0]; + /* should probably be transient_det_l[1] || transient_det_r[1] , but choosing 0 reproduces the before merge state */ + } + + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH; i++ ) + { + p_fr_realbuffer[i] = fr_realbuffer[i]; + p_fr_imagbuffer[i] = fr_imagbuffer[i]; + } + + /* prepare Parameter MDFT analysis */ + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH; i++ ) + { + pp_in_fr_real[i] = p_fr_realbuffer[i]; + pp_in_fr_imag[i] = p_fr_imagbuffer[i]; + } + + l_ts = input_frame / MAX_PARAM_SPATIAL_SUBFRAMES; + for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) + { + ivas_fb_mixer_get_windowed_fr( hMCParamUpmix->hFbMixer, pcm_in, pp_in_fr_real, pp_in_fr_imag, l_ts, l_ts, + hMCParamUpmix->hFbMixer->fb_cfg->num_in_chans ); + ivas_fb_mixer_update_prior_input( hMCParamUpmix->hFbMixer, pcm_in, l_ts, + hMCParamUpmix->hFbMixer->fb_cfg->num_in_chans ); + for ( i = 0; i < MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH; i++ ) + { + pcm_in[i] += l_ts; + pp_in_fr_real[i] += l_ts; + pp_in_fr_imag[i] += l_ts; + } + } + + /*-----------------------------------------------------------------------------------------* + * Covariance process + *-----------------------------------------------------------------------------------------*/ + for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ ) + { + pp_in_fr_real[0] = p_fr_realbuffer[2 * b]; + pp_in_fr_imag[0] = p_fr_imagbuffer[2 * b]; + pp_in_fr_real[1] = FR_Real_Mid; + pp_in_fr_imag[1] = FR_Imag_Mid; + v_add( pp_in_fr_real[0], p_fr_realbuffer[2 * b + 1], pp_in_fr_real[1], L_FRAME48k ); + v_add( pp_in_fr_imag[0], p_fr_imagbuffer[2 * b + 1], pp_in_fr_imag[1], L_FRAME48k ); + for ( i = 0; i < MC_PARAMUPMIX_NCH; i++ ) + { + for ( j = 0; j < MC_PARAMUPMIX_NCH; j++ ) + { + cov_real[i][j] = hMCParamUpmix->cov_real[b][i][j]; + cov_dtx_real[i][j] = hMCParamUpmix->cov_dtx_real[b][i][j]; + } + } + ivas_enc_cov_handler_process( hMCParamUpmix->hCovEnc[b], pp_in_fr_real, pp_in_fr_imag, cov_real, cov_dtx_real, hMCParamUpmix->hFbMixer->pFb, 0, hMCParamUpmix->hFbMixer->pFb->filterbank_num_bands, MC_PARAMUPMIX_NCH, 0 /*dtx_vad*/, transient_det[b], HOA_md_ind ); + } + + for ( b = 0; b < MC_PARAMUPMIX_COMBINATIONS; b++ ) + { + for ( bnd = 0; bnd < IVAS_MAX_NUM_BANDS; bnd++ ) + { + rxy = hMCParamUpmix->cov_real[b][1][0][bnd]; + ryy = hMCParamUpmix->cov_real[b][1][1][bnd]; + cmat = rxy / ( ryy + EPSILON ); + alphas[b][bnd] = (float) 2.0 * cmat - (float) 1.0; + + rxx = hMCParamUpmix->cov_real[b][0][0][bnd]; + rxxest = cmat * cmat * ryy; + drxx = rxx - rxxest; + drxx = (float) max( drxx, 0.0 ); + wetaux = (float) sqrt( drxx / ( ryy + EPSILON ) ); + betas[b][bnd] = (float) 2.0 * wetaux; + } + } + + return; +} diff --git a/lib_enc/ivas_mcmasa_enc.c b/lib_enc/ivas_mcmasa_enc.c index 8151b33c668ff1a2d382d1747b179bb81c147416..ec3a49956b727532e24dec28ba6a94314e8e6442 100644 --- a/lib_enc/ivas_mcmasa_enc.c +++ b/lib_enc/ivas_mcmasa_enc.c @@ -188,7 +188,8 @@ ivas_error ivas_mcmasa_enc_open( } /* set FB config. */ - if ( ( error = ivas_fb_set_cfg( &fb_cfg, MASA_FORMAT, SBA_MODE_NONE, numAnalysisChannels, 0, 0, input_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_fb_set_cfg( &fb_cfg, MASA_FORMAT, SBA_MODE_NONE, numAnalysisChannels, 0, 0, input_Fs, + 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -219,7 +220,8 @@ ivas_error ivas_mcmasa_enc_open( else { /* Allocate and initialize FB mixer handle for LFE channel */ - if ( ( error = ivas_fb_set_cfg( &fb_cfgLfe, MASA_FORMAT, SBA_MODE_NONE, 1, 0, 0, input_Fs ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_fb_set_cfg( &fb_cfgLfe, MASA_FORMAT, SBA_MODE_NONE, 1, 0, 0, input_Fs, + 0 ) ) != IVAS_ERR_OK ) { return error; } @@ -745,10 +747,10 @@ void ivas_mcmasa_param_est_enc( float Chnl_ImagBuffer[MCMASA_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX]; float *p_Chnl_RealBuffer[MCMASA_MAX_ANA_CHANS]; float *p_Chnl_ImagBuffer[MCMASA_MAX_ANA_CHANS]; - float Foa_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX]; - float Foa_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX]; - float FoaEven_RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX]; - float FoaEven_ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX]; + float Foa_RealBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX]; + float Foa_ImagBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX]; + float FoaEven_RealBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX]; + float FoaEven_ImagBuffer[FOA_CHANNELS][DIRAC_NO_FB_BANDS_MAX]; float intensity_real[DIRAC_NUM_DIMS][MASA_FREQUENCY_BANDS]; float intensity_even_real[DIRAC_NUM_DIMS][MASA_FREQUENCY_BANDS]; float direction_vector[DIRAC_NUM_DIMS][MASA_FREQUENCY_BANDS]; @@ -831,8 +833,10 @@ void ivas_mcmasa_param_est_enc( for ( ts = mrange[0]; ts < mrange[1]; ts++ ) { - ivas_fb_mixer_get_windowed_fr( hMcMasa->hFbMixer, pcm_in, p_Chnl_RealBuffer, p_Chnl_ImagBuffer, l_ts, l_ts ); - ivas_fb_mixer_update_prior_input( hMcMasa->hFbMixer, pcm_in, l_ts ); + ivas_fb_mixer_get_windowed_fr( hMcMasa->hFbMixer, pcm_in, p_Chnl_RealBuffer, p_Chnl_ImagBuffer, l_ts, l_ts, + hMcMasa->hFbMixer->fb_cfg->num_in_chans ); + ivas_fb_mixer_update_prior_input( hMcMasa->hFbMixer, pcm_in, l_ts, + hMcMasa->hFbMixer->fb_cfg->num_in_chans ); for ( i = 0; i < numAnalysisChannels; i++ ) { pcm_in[i] += l_ts; @@ -973,7 +977,8 @@ void ivas_mcmasa_param_est_enc( reference_power[ts], 0, num_freq_bands, - SBA_MODE_NONE ); + SBA_MODE_NONE, + FOA_CHANNELS ); /* Fill buffers of length "averaging_length" time slots for intensity and energy */ hMcMasa->index_buffer_intensity = ( hMcMasa->index_buffer_intensity % hMcMasa->no_col_avg_diff ) + 1; /* averaging_length = 32 */ @@ -1702,8 +1707,10 @@ static void computeLfeEnergy( for ( ts = mrange[0]; ts < mrange[1]; ts++ ) { - ivas_fb_mixer_get_windowed_fr( hMcMasa->hFbMixerLfe, pcm_in, p_Chnl_RealBuffer, p_Chnl_ImagBuffer, l_ts, l_ts ); - ivas_fb_mixer_update_prior_input( hMcMasa->hFbMixerLfe, pcm_in, l_ts ); + ivas_fb_mixer_get_windowed_fr( hMcMasa->hFbMixerLfe, pcm_in, p_Chnl_RealBuffer, p_Chnl_ImagBuffer, l_ts, l_ts, + hMcMasa->hFbMixerLfe->fb_cfg->num_in_chans ); + ivas_fb_mixer_update_prior_input( hMcMasa->hFbMixerLfe, pcm_in, l_ts, + hMcMasa->hFbMixerLfe->fb_cfg->num_in_chans ); pcm_in[0] += l_ts; /* Compute low frequency energy for LFE, for other channels it is computed in ivas_chnl_param_est_enc() */ diff --git a/lib_enc/ivas_mct_core_enc.c b/lib_enc/ivas_mct_core_enc.c index d1f47bcee301d0879caedf5377967cae0d38e021..3bd05fca9273da133393856ddd848a8829dd34a9 100644 --- a/lib_enc/ivas_mct_core_enc.c +++ b/lib_enc/ivas_mct_core_enc.c @@ -410,6 +410,14 @@ void ivas_mct_core_enc( for ( ch = 0; ch < nChannels; ch++ ) { st = sts[ch]; + +#ifdef IND_LIST_DYN + /* update the pointer to the buffer of indices of the second channel */ + if ( ch > 0 ) + { + st->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif if ( sts[ch]->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) { @@ -476,11 +484,7 @@ void ivas_mct_core_enc( } else if ( ivas_format == SBA_FORMAT ) { -#ifdef COMBINED_FORMAT_SIGNALING nAvailBits -= IVAS_FORMAT_SIGNALING_NBITS_EXTENDED; -#else - nAvailBits -= IVAS_FORMAT_SIGNALING_NBITS_SBA; -#endif nAvailBits -= SBA_ORDER_BITS + SBA_PLANAR_BITS; } @@ -555,11 +559,7 @@ void ivas_mct_core_enc( } #ifdef DEBUGGING -#ifdef COMBINED_FORMAT_SIGNALING format_bits = ( ivas_format == MC_FORMAT ? IVAS_FORMAT_SIGNALING_NBITS + MC_LS_SETUP_BITS : IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + SBA_ORDER_BITS + SBA_PLANAR_BITS ); -#else - format_bits = ( ivas_format == MC_FORMAT ? IVAS_FORMAT_SIGNALING_NBITS + MC_LS_SETUP_BITS : IVAS_FORMAT_SIGNALING_NBITS_SBA + SBA_ORDER_BITS + SBA_PLANAR_BITS ); -#endif mct_bits += hMCT->nBitsMCT + hMCT->nchan_out_woLFE; assert( ( total_brate + ( NBITS_BWIDTH + format_bits + mct_bits + sba_meta + lfe_bits ) * FRAMES_PER_SEC ) == ivas_total_brate ); #endif diff --git a/lib_enc/ivas_mct_enc.c b/lib_enc/ivas_mct_enc.c index f2f5d2346103c6856570ba8b5f66348e772720ef..af743deaa1c4c6d6f1827335d3df9b70f2c4ec09 100644 --- a/lib_enc/ivas_mct_enc.c +++ b/lib_enc/ivas_mct_enc.c @@ -116,8 +116,7 @@ static void map_input_to_cpe_channels( pdata[i] = data[n]; i++; } - - if ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT ) + if ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) { for ( n = LFE_CHANNEL + 1; n < st_ivas->nchan_transport; n++ ) { @@ -136,7 +135,7 @@ static void map_input_to_cpe_channels( } /* odd channel CPE*/ - if ( ( st_ivas->nchan_transport < st_ivas->nCPE * CPE_CHANNELS ) || ( st_ivas->mc_mode == MC_MODE_MCT && st_ivas->hMCT->nchan_out_woLFE < st_ivas->nCPE * CPE_CHANNELS ) ) + if ( ( st_ivas->nchan_transport < st_ivas->nCPE * CPE_CHANNELS ) || ( ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && st_ivas->hMCT->nchan_out_woLFE < st_ivas->nCPE * CPE_CHANNELS ) ) { pdata[st_ivas->nCPE * CPE_CHANNELS - 1] = NULL; } @@ -237,7 +236,7 @@ ivas_error ivas_mct_enc( ivas_mct_core_enc( ivas_format, hMCT, st_ivas->hCPE, hMCT->nchan_out_woLFE, ivas_total_brate, switch_bw, - ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT ) ? (int16_t) st_ivas->hLFE->lfe_bits : 0, + ( ivas_format == MC_FORMAT && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) ) ? (int16_t) st_ivas->hLFE->lfe_bits : 0, st_ivas->hEncoderConfig->sba_order ); /* Spectrum quantization and coding */ @@ -245,6 +244,12 @@ ivas_error ivas_mct_enc( { hCPE = st_ivas->hCPE[cpe_id]; +#ifdef IND_LIST_DYN + if ( cpe_id > 0 ) + { + hCPE->hCoreCoder[0]->hBstr->ind_list = st_ivas->hCPE[cpe_id - 1]->hCoreCoder[1]->hBstr->ind_list + st_ivas->hCPE[cpe_id - 1]->hCoreCoder[1]->hBstr->nb_ind_tot; + } +#endif ivas_mdct_quant_coder( hCPE, hMCT->tnsBits[cpe_id], hMCT->tnsSize[cpe_id], hMCT->p_param[cpe_id], 1 ); @@ -310,6 +315,10 @@ ivas_error create_mct_enc( { hMCT->nchan_out_woLFE = ivas_param_mc_getNumTransportChannels( ivas_total_brate, st_ivas->hEncoderConfig->mc_input_setup ); } + else if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + hMCT->nchan_out_woLFE = ivas_mc_paramupmix_getNumTransportChannels(); + } else if ( ivas_format == SBA_FORMAT ) { hMCT->nchan_out_woLFE = ivas_sba_get_nchan( st_ivas->sba_analysis_order, st_ivas->hEncoderConfig->sba_planar ); @@ -418,6 +427,10 @@ ivas_error mct_enc_reconfigure( { hMCT->nchan_out_woLFE = st_ivas->hEncoderConfig->nchan_inp - 1; /* LFE channel is coded separately */ } + else if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + hMCT->nchan_out_woLFE = ivas_mc_paramupmix_getNumTransportChannels(); + } else if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMMC ) { hMCT->nchan_out_woLFE = ivas_param_mc_getNumTransportChannels( ivas_total_brate, st_ivas->hEncoderConfig->mc_input_setup ); @@ -657,6 +670,11 @@ static ivas_error ivas_mc_enc_reconfig( if ( last_mc_mode != MC_MODE_MCT ) { + if ( st_ivas->hLFE != NULL ) + { + /* LFE handle */ + ivas_lfe_enc_close( &( st_ivas->hLFE ) ); + } /* create LFE handle */ if ( ( error = ivas_create_lfe_enc( &st_ivas->hLFE, st_ivas->hEncoderConfig->input_Fs ) ) != IVAS_ERR_OK ) { @@ -666,6 +684,7 @@ static ivas_error ivas_mc_enc_reconfig( /*De-allocate handles for other MC modes*/ ivas_param_mc_enc_close( &( st_ivas->hParamMC ), st_ivas->hEncoderConfig->input_Fs ); + ivas_mc_paramupmix_enc_close( &( st_ivas->hMCParamUpmix ), st_ivas->hEncoderConfig->input_Fs ); /* De-allocate McMasa-related handles */ ivas_mcmasa_enc_close( &( st_ivas->hMcMasa ), st_ivas->hEncoderConfig->input_Fs ); @@ -674,6 +693,50 @@ static ivas_error ivas_mc_enc_reconfig( ivas_qmetadata_close( &st_ivas->hQMetaData ); } } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + st_ivas->nSCE = 0; + st_ivas->nCPE = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS / 2; + st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; + + if ( last_mc_mode != MC_MODE_PARAMUPMIX ) + { + if ( st_ivas->hLFE != NULL ) + { + /* LFE handle */ + ivas_lfe_enc_close( &( st_ivas->hLFE ) ); + } + + /* create LFE handle */ + if ( ( error = ivas_create_lfe_enc( &st_ivas->hLFE, st_ivas->hEncoderConfig->input_Fs ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + if ( last_mc_mode != MC_MODE_PARAMUPMIX ) + /* This should always be the case, only supporting one bitrate currently */ + { + if ( ( error = ivas_mc_paramupmix_enc_open( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + else + { + assert( 0 ); + } + + /*De-allocate handles for other MC modes*/ + ivas_param_mc_enc_close( &st_ivas->hParamMC, st_ivas->hEncoderConfig->input_Fs ); + + /* De-allocate McMasa-related handles */ + ivas_mcmasa_enc_close( &( st_ivas->hMcMasa ), st_ivas->hEncoderConfig->input_Fs ); + + ivas_masa_enc_close( &( st_ivas->hMasa ) ); + + ivas_qmetadata_close( &st_ivas->hQMetaData ); + } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { if ( last_mc_mode != MC_MODE_PARAMMC ) @@ -699,6 +762,12 @@ static ivas_error ivas_mc_enc_reconfig( ivas_masa_enc_close( &( st_ivas->hMasa ) ); st_ivas->hMasa = NULL; } + ivas_mc_paramupmix_enc_close( &( st_ivas->hMCParamUpmix ), st_ivas->hEncoderConfig->input_Fs ); + if ( last_mc_mode == MC_MODE_PARAMUPMIX && st_ivas->hLFE != NULL ) + { + /* LFE handle */ + ivas_lfe_enc_close( &( st_ivas->hLFE ) ); + } ivas_qmetadata_close( &st_ivas->hQMetaData ); @@ -745,6 +814,12 @@ static ivas_error ivas_mc_enc_reconfig( } ivas_param_mc_enc_close( &( st_ivas->hParamMC ), st_ivas->hEncoderConfig->input_Fs ); + ivas_mc_paramupmix_enc_close( &( st_ivas->hMCParamUpmix ), st_ivas->hEncoderConfig->input_Fs ); + if ( last_mc_mode == MC_MODE_PARAMUPMIX && st_ivas->hLFE != NULL ) + { + /* LFE handle */ + ivas_lfe_enc_close( &( st_ivas->hLFE ) ); + } if ( last_mc_mode == MC_MODE_MCT ) { @@ -819,6 +894,11 @@ static ivas_error ivas_mc_enc_reconfig( new_brate_SCE = 0; new_brate_CPE = ( st_ivas->hEncoderConfig->ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS; } + else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) + { + new_brate_SCE = 0; + new_brate_CPE = ( st_ivas->hEncoderConfig->ivas_total_brate / ( st_ivas->nchan_transport - 1 ) ) * CPE_CHANNELS; + } else { new_brate_SCE = 0; /*st_ivas->hEncoderConfig->ivas_total_brate / st_ivas->nchan_transport;*/ diff --git a/lib_enc/ivas_mct_enc_mct.c b/lib_enc/ivas_mct_enc_mct.c index 7ab6206a29169407d4f8a3b2a6c57d7175684b36..228f48b305453884a1c4a8fef64abc9b2a22190b 100644 --- a/lib_enc/ivas_mct_enc_mct.c +++ b/lib_enc/ivas_mct_enc_mct.c @@ -851,6 +851,18 @@ void mctStereoIGF_enc( p_st[0] = sts[ch1]; p_st[1] = sts[ch2]; +#ifdef IND_LIST_DYN + if ( ch1 > 0 ) + { + sts[ch1]->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } + + if ( ch2 > 0 ) + { + sts[ch2]->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif + p_powerSpec[0] = powerSpec[ch1]; p_powerSpec[1] = powerSpec[ch2]; @@ -900,6 +912,13 @@ void mctStereoIGF_enc( continue; } +#ifdef IND_LIST_DYN + if ( ch > 0 ) + { + st->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif + nSubframes = st->hTcxEnc->tcxMode == TCX_20 ? 1 : NB_DIV; for ( n = 0; n < nSubframes; n++ ) { diff --git a/lib_enc/ivas_mdct_core_enc.c b/lib_enc/ivas_mdct_core_enc.c index 8135390f5a9006e9d9fe02039d0837689ac58e99..edc9ea1e504b954a8bffd936633c307a2fa0b0d8 100644 --- a/lib_enc/ivas_mdct_core_enc.c +++ b/lib_enc/ivas_mdct_core_enc.c @@ -39,9 +39,7 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#ifdef SNS_MSVQ #include "ivas_rom_com.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -582,12 +580,10 @@ void ivas_mdct_core_whitening_enc( { int16_t n, ch, nSubframes, L_subframe, L_subframeTCX, tcx_subframe_coded_lines; float A_q[CPE_CHANNELS][NB_DIV][M + 1]; -#ifdef SNS_MSVQ int16_t sns_vq_indices[CPE_CHANNELS * NB_DIV * SNS_MSVQ_NSTAGES_TCX10]; int16_t nbits_sns; int16_t sns_stereo_mode[NB_DIV]; int16_t idx; -#endif int16_t param_lpc[CPE_CHANNELS][NPRM_LPC_NEW]; int16_t param_core[CPE_CHANNELS][2 * NPRM_DIV]; int16_t ltpBits[CPE_CHANNELS]; @@ -606,9 +602,7 @@ void ivas_mdct_core_whitening_enc( int16_t nbits_start_sns; int16_t num_sns; int8_t skipped_first_channel; -#ifdef SNS_MSVQ int16_t zero_side_flag[NB_DIV]; -#endif push_wmops( "mdct_core_whitening" ); @@ -881,11 +875,7 @@ void ivas_mdct_core_whitening_enc( chE[n] = sum_f( powerSpec, L_subframeTCX ); } -#ifdef FIX_445_SNS_BUGFIXES sns_compute_scf( powerSpec, st->hTcxCfg->psychParamsCurrent, st->L_frame, scf[ch][n] ); -#else - sns_compute_scf( powerSpec, st->hTcxCfg->psychParamsCurrent, st->last_core == ACELP_CORE ? L_subframe : st->L_frame, scf[ch][n] ); -#endif } /* MCT: detect whether there are silent channels and set mct_chan_mode accordingly */ @@ -916,7 +906,6 @@ void ivas_mdct_core_whitening_enc( sns_low_br_mode = 0; } -#ifdef SNS_MSVQ if ( !mct_on && sts[0]->sr_core == 25600 && ( ( hCPE->element_brate == IVAS_48k || hCPE->element_brate == IVAS_64k ) ) ) { nbits_sns = quantize_sns( scf, scf_q, sts, sns_vq_indices, zero_side_flag, sns_stereo_mode ); @@ -926,11 +915,7 @@ void ivas_mdct_core_whitening_enc( if ( sts[0]->hTcxEnc->tcxMode == TCX_20 && sts[1]->hTcxEnc->tcxMode == TCX_20 && sts[0]->mct_chan_mode == MCT_CHAN_MODE_REGULAR && sts[1]->mct_chan_mode == MCT_CHAN_MODE_REGULAR ) { -#ifdef FIX_445_SNS_BUGFIXES sns_avq_cod_stereo( scf[0][0], scf[1][0], sts[0]->L_frame, scf_q[0][0], scf_q[1][0], param_lpc[0], param_lpc[1] ); -#else - sns_avq_cod_stereo( scf[0][0], scf[1][0], scf_q[0][0], scf_q[1][0], param_lpc[0], param_lpc[1] ); -#endif } else { @@ -953,71 +938,15 @@ void ivas_mdct_core_whitening_enc( if ( st->hTcxEnc->tcxMode == TCX_20 ) { -#ifdef FIX_445_SNS_BUGFIXES sns_avq_cod( scf[ch][0], NULL, scf_q[ch][0], NULL, ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, st->L_frame, sns_low_br_mode ); -#else - sns_avq_cod( scf[ch][0], NULL, scf_q[ch][0], NULL, ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, sns_low_br_mode ); -#endif } else { -#ifdef FIX_445_SNS_BUGFIXES sns_avq_cod( scf[ch][1], scf[ch][0], scf_q[ch][1], scf_q[ch][0], ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, st->L_frame, sns_low_br_mode ); -#else - sns_avq_cod( scf[ch][1], scf[ch][0], scf_q[ch][1], scf_q[ch][0], ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, sns_low_br_mode ); -#endif } } } } -#else // else of SNS_MSVQ - if ( sts[0]->hTcxEnc->tcxMode == TCX_20 && sts[1]->hTcxEnc->tcxMode == TCX_20 && - sts[0]->mct_chan_mode == MCT_CHAN_MODE_REGULAR && sts[1]->mct_chan_mode == MCT_CHAN_MODE_REGULAR ) - { -#ifdef FIX_445_SNS_BUGFIXES - sns_avq_cod_stereo( scf[0][0], scf[1][0], sts[0]->L_frame, scf_q[0][0], scf_q[1][0], param_lpc[0], param_lpc[1] ); -#else - sns_avq_cod_stereo( scf[0][0], scf[1][0], scf_q[0][0], scf_q[1][0], param_lpc[0], param_lpc[1] ); -#endif - } - else - { -#ifdef DEBUG_MODE_MDCT - { - float ener_side = 0; - float ener_mid = 0; - dbgwrite( &ener_side, sizeof( float ), 1, 1, "./res/ener_side" ); - dbgwrite( &ener_mid, sizeof( float ), 1, 1, "./res/ener_mid" ); - } -#endif - for ( ch = 0; ch < CPE_CHANNELS; ch++ ) - { - param_lpc[ch][0] = ch; - if ( sts[ch]->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) - { - continue; - } - st = sts[ch]; - - if ( st->hTcxEnc->tcxMode == TCX_20 ) - { -#ifdef FIX_445_SNS_BUGFIXES - sns_avq_cod( scf[ch][0], NULL, scf_q[ch][0], NULL, ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, st->L_frame, sns_low_br_mode ); -#else - sns_avq_cod( scf[ch][0], NULL, scf_q[ch][0], NULL, ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, sns_low_br_mode ); -#endif - } - else - { -#ifdef FIX_445_SNS_BUGFIXES - sns_avq_cod( scf[ch][1], scf[ch][0], scf_q[ch][1], scf_q[ch][0], ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, st->L_frame, sns_low_br_mode ); -#else - sns_avq_cod( scf[ch][1], scf[ch][0], scf_q[ch][1], scf_q[ch][0], ¶m_lpc[ch][1], st->hTcxEnc->tcxMode, sns_low_br_mode ); -#endif - } - } - } -#endif // SNS_AVQ4TCX20_MSVQ4TCX10 for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { @@ -1160,7 +1089,6 @@ void ivas_mdct_core_whitening_enc( /*--------------------------------------------------------------------------------* * SNS parameters *--------------------------------------------------------------------------------*/ -#ifdef SNS_MSVQ if ( !mct_on && sts[0]->sr_core == 25600 && ( ( hCPE->element_brate == IVAS_48k || hCPE->element_brate == IVAS_64k ) ) ) { nbits_sns = 0; @@ -1251,39 +1179,6 @@ void ivas_mdct_core_whitening_enc( st->side_bits_frame_channel += hBstr->nb_bits_tot - nbits_start_sns; } } -#else // else of SNS_MSVQ - /* write SNS parameter separately since at the decoder, both channels' cores need to be decoded before, so the joint SNS decoding can be done */ - skipped_first_channel = 0; - for ( ch = 0; ch < CPE_CHANNELS; ch++ ) - { - st = sts[ch]; - - if ( st->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) - { - skipped_first_channel = 1; - continue; - } - - nbits_start_sns = hBstr->nb_bits_tot; - - num_sns = ( st->core == TCX_20_CORE ) ? 1 : 2; - - if ( ch == 0 || skipped_first_channel ) - { - push_next_indice( hBstr, param_lpc[0][0] >> 1, 1 ); - - if ( st->element_brate == IVAS_48k && !( ( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) ) ) - { - /* write classifier decision to signal low br mode for SNS encoding, for all other configs, low_br mode is not possible */ - push_next_indice( hBstr, sns_low_br_mode, 1 ); - } - } - encode_lpc_avq( hBstr, num_sns, param_lpc[ch], st->core, st->element_mode ); - - st->side_bits_frame_channel += hBstr->nb_bits_tot - nbits_start_sns; - } - -#endif // MSVQ_SNS /*update pitch buffer*/ @@ -1422,6 +1317,13 @@ void ivas_mdct_quant_coder( { st = sts[ch]; +#ifdef IND_LIST_DYN + /* update the pointer to the buffer of indices of the second channel */ + if ( ch > 0 ) + { + st->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif if ( st->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) { /*Enable appropriate upadte of tcx_curr_overlap_mode even for uncoded channel index 1*/ diff --git a/lib_enc/ivas_qmetadata_enc.c b/lib_enc/ivas_qmetadata_enc.c index 3a947584e9f869707194d55857b7d1d2d3de40a0..40d5bff892bbe423454478a822e67b0cf968be98 100644 --- a/lib_enc/ivas_qmetadata_enc.c +++ b/lib_enc/ivas_qmetadata_enc.c @@ -52,7 +52,7 @@ static float direction_distance( float elevation[DIRAC_MAX_NBANDS][MAX_PARAM_SPA #endif -static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits ); +static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits, const int16_t hodirac_flag ); static int16_t ivas_qmetadata_entropy_encode_diffuseness( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); @@ -63,7 +63,7 @@ static int16_t ivas_qmetadata_entropy_encode_df_ratio( BSTR_ENC_HANDLE hMetaData static int16_t ivas_qmetadata_entropy_encode_dir( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, const uint16_t diffuseness_index_max_ec_frame, const int16_t nbands, const int16_t start_band, const int16_t direction_bits_raw, int16_t max_bits #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); @@ -96,7 +96,7 @@ static int16_t write_fixed_rate_direction( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRE static int16_t ivas_qmetadata_quantize_coherence( IVAS_QMETADATA *hQMetaData, const int16_t idx_d, const int16_t all_coherence_zero, BSTR_ENC_HANDLE hMetaData, const int16_t write_flag, int16_t *indice_coherence #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); @@ -105,11 +105,11 @@ static void dct4_transform( uint8_t *v, float *dct_v ); static float quantize_DCT_0_coh( const float x, const int16_t j, const float *coherence_cb, const float delta_var, const int16_t no_cb, IVAS_QDIRECTION *q_direction, uint16_t *idx_x, int16_t *p_no_cb #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ); -static int16_t encode_coherence_indexesDCT0( uint16_t *idx_dct, const int16_t len, int16_t *no_cb_vec, BSTR_ENC_HANDLE hMetaData, int16_t indice_coherence, const int16_t nbits, const int16_t nbits1 ); +static int16_t encode_coherence_indexesDCT0( uint16_t *idx_dct, const int16_t len, int16_t *no_cb_vec, BSTR_ENC_HANDLE hMetaData, const int16_t indice_coherence, const int16_t nbits, const int16_t nbits1 ); static int16_t encode_coherence_indexesDCT1( uint16_t *idx_dct, const int16_t len, BSTR_ENC_HANDLE hMetaData ); @@ -132,41 +132,22 @@ static int16_t write_2dir_info( BSTR_ENC_HANDLE hMetaData, uint8_t *twoDirBands, static void transform_azimuth_dir2( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *dir2_bands ); static int16_t calc_var_azi( const IVAS_QDIRECTION *q_direction, const int16_t diffuseness_index_max_ec_frame, const float avg_azimuth, float *avg_azimuth_out ); + #ifdef HR_METADATA -static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( - IVAS_QMETADATA_HANDLE hQMetaData, - int16_t *needed_bits, - int16_t *nbits_diff, - int16_t *dfRatioBits, - int16_t bits_dir_hr ); -static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( - BSTR_ENC_HANDLE hMetaData, - IVAS_QDIRECTION *q_direction, - uint16_t *diffuseness_index_max_ec_frame ); +static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits, const int16_t bits_dir_hr ); -static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( - IVAS_QMETADATA_HANDLE hQMetaData, - int16_t *needed_bits, - int16_t bits_dir_hr, - BSTR_ENC_HANDLE hMetaData ); +static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); -static int16_t encode_surround_coherence_hr( - IVAS_QMETADATA *hQMetaData, /* i : quantized metadata */ - BSTR_ENC_HANDLE hMetaData /* i/o: metadata bitstream handle */ -); +static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, const int16_t bits_dir_hr, BSTR_ENC_HANDLE hMetaData ); -static void ivas_qmetadata_reorder_2dir_bands_hr( - IVAS_QMETADATA_HANDLE hQMetaData ); +static int16_t encode_surround_coherence_hr( IVAS_QMETADATA *hQMetaData, BSTR_ENC_HANDLE hMetaData ); -static int16_t ivas_qmetadata_quantize_coherence_hr_512( - IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata */ - const int16_t idx_d, /* i : current direction index */ - const int16_t all_coherence_zero, /* i : all coherence is zero - flag */ - BSTR_ENC_HANDLE hMetaData, /* i : metadata handle */ - int16_t bits_coh ); +static void ivas_qmetadata_reorder_2dir_bands_hr( IVAS_QMETADATA_HANDLE hQMetaData ); +static int16_t ivas_qmetadata_quantize_coherence_hr_512( IVAS_QMETADATA *hQMetaData, const int16_t idx_d, const int16_t all_coherence_zero, BSTR_ENC_HANDLE hMetaData, const int16_t bits_coh ); #endif + /*-----------------------------------------------------------------------* * ivas_qmetadata_enc_encode() * @@ -174,12 +155,17 @@ static int16_t ivas_qmetadata_quantize_coherence_hr_512( *-----------------------------------------------------------------------*/ ivas_error ivas_qmetadata_enc_encode( - BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ - IVAS_QMETADATA *hQMetaData /* i/o: metadata handle */ + BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ + IVAS_QMETADATA *hQMetaData /* i/o: metadata handle */ + , + const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode*/ ) { int16_t i, bit_pos_start, bit_pos_start_coh; - int16_t next_ind_start, last_ind_start; + int16_t next_ind_start; +#ifndef IND_LIST_DYN + int16_t last_ind_start; +#endif uint16_t diffuseness_index_max_ec_frame; uint16_t diffuseness_index_max_ec_frame_pre[QMETADATA_MAX_NO_DIRECTIONS]; int16_t bits_dir_raw_pre[QMETADATA_MAX_NO_DIRECTIONS]; @@ -260,7 +246,10 @@ ivas_error ivas_qmetadata_enc_encode( assert( ndirections == 2 ); #endif /* Reorder 2dir bands for more efficient encoding. */ - ivas_qmetadata_reorder_2dir_bands( hQMetaData ); + if ( !hodirac_flag ) + { + ivas_qmetadata_reorder_2dir_bands( hQMetaData ); + } d = 0; for ( i = hQMetaData->q_direction[1].cfg.start_band; i < hQMetaData->q_direction[1].cfg.nbands; i++ ) { @@ -294,7 +283,8 @@ ivas_error ivas_qmetadata_enc_encode( } /*Quantization of the Diffuseness */ - ivas_qmetadata_quantize_diffuseness_nrg_ratios( hQMetaData, bits_dir_raw_pre, bits_diff, dfRatio_bits ); + ivas_qmetadata_quantize_diffuseness_nrg_ratios( hQMetaData, bits_dir_raw_pre, bits_diff, dfRatio_bits, + hodirac_flag ); bits_diff_sum = 0; bits_diff[0] = ivas_qmetadata_entropy_encode_diffuseness( hMetaData, &( hQMetaData->q_direction[0] ), &diffuseness_index_max_ec_frame_pre[0] ); @@ -464,8 +454,12 @@ ivas_error ivas_qmetadata_enc_encode( /* Save state of metadata bitstream buffer after writing energy ratios, number of dirs and save space for coherence*/ bit_pos_start = hMetaData->nb_bits_tot; +#ifdef IND_LIST_DYN + next_ind_start = hMetaData->nb_ind_tot; +#else next_ind_start = hMetaData->next_ind; last_ind_start = hMetaData->last_ind; +#endif /* Encode quantized directions with EC frame-wise*/ if ( total_bits_1dir + bits_surround_coh <= hQMetaData->qmetadata_max_bit_req ) @@ -474,7 +468,11 @@ ivas_error ivas_qmetadata_enc_encode( bits_signaling[d]++; } +#ifdef IND_LIST_DYN + next_ind_raw_flag = hMetaData->nb_ind_tot; +#else next_ind_raw_flag = hMetaData->next_ind; +#endif push_next_indice( hMetaData, 0, 1 ); /* Raw coding flag*/ bits_dir_bands[0] = ivas_qmetadata_raw_encode_dir( NULL, q_direction, q_direction->cfg.nbands, q_direction->cfg.start_band ); @@ -511,7 +509,11 @@ ivas_error ivas_qmetadata_enc_encode( /* Encode quantized directions with EC band-wise */ if ( ( total_bits_1dir + bits_surround_coh <= hQMetaData->qmetadata_max_bit_req ) && ( bits_dir[d] + bits_diff[d] + bits_coherence[d] + bits_signaling[d] > total_bits_1dir ) && q_direction->cfg.nblocks > 1 ) { - restore_metadata_buffer( hMetaData, next_ind_start, last_ind_start, bit_pos_start ); + restore_metadata_buffer( hMetaData, next_ind_start, +#ifndef IND_LIST_DYN + last_ind_start, +#endif + bit_pos_start ); /* Write signaling */ push_next_indice( hMetaData, 1, 1 ); /*Write 1 bit to signal no EC frame-wise (EC1)*/ @@ -519,7 +521,11 @@ ivas_error ivas_qmetadata_enc_encode( bits_signaling[d] = 3; /* Write raw flags */ +#ifdef IND_LIST_DYN + next_ind_raw_flag = hMetaData->nb_ind_tot; +#else next_ind_raw_flag = hMetaData->next_ind; +#endif for ( i = start_band; i < nbands; i++ ) { push_next_indice( hMetaData, 0, 1 ); /* Raw coding flag*/ @@ -593,7 +599,11 @@ ivas_error ivas_qmetadata_enc_encode( /*Bit budget exceeded, bit reduction strategy?*/ extra_bits = 0; - restore_metadata_buffer( hMetaData, next_ind_start, last_ind_start, bit_pos_start ); + restore_metadata_buffer( hMetaData, next_ind_start, +#ifndef IND_LIST_DYN + last_ind_start, +#endif + bit_pos_start ); push_next_indice( hMetaData, 1, 1 ); /*Write 1 bit to signal no EC frame-wise (EC1)*/ if ( nblocks > 1 ) @@ -729,16 +739,21 @@ ivas_error ivas_qmetadata_enc_encode( return error; } + #ifdef HR_METADATA +/*-----------------------------------------------------------------------* + * ivas_qmetadata_enc_encode_hr_384_512() + * + * Main function for quantizing and coding Spatial Metadata at HRs + *-----------------------------------------------------------------------*/ ivas_error ivas_qmetadata_enc_encode_hr_384_512( BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ IVAS_QMETADATA *hQMetaData, /* i/o: metadata handle */ - int16_t bits_sph_idx, - int16_t bits_sp_coh ) + const int16_t bits_sph_idx, + const int16_t bits_sp_coh ) { int16_t i, j; - int16_t bits_diff[QMETADATA_MAX_NO_DIRECTIONS]; IVAS_QDIRECTION *q_direction; int16_t nbands, nblocks, start_band; @@ -747,7 +762,6 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( int16_t bits_no_dirs_coh; int16_t bits_ec; float azimuth_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], elevation_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES]; - ivas_error error; error = IVAS_ERR_OK; @@ -780,17 +794,29 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( ndirections = hQMetaData->no_directions; - /* Check if coherence should be encoded */ all_coherence_zero = 1; bits_no_dirs_coh = 0; - +#ifdef FIX_HBR_MASAMETA + if ( hQMetaData->q_direction->cfg.inactiveBands > 0 ) + { + push_next_indice( hMetaData, 1, 1 ); + /* write the number of inactive higher bands */ + ivas_qmetadata_encode_extended_gr( hMetaData, hQMetaData->q_direction->cfg.inactiveBands - 1, MASA_MAXIMUM_CODING_SUBBANDS, 1 ); + } + else + { + /* no change */ + push_next_indice( hMetaData, 0, 1 ); + } +#endif if ( hQMetaData->coherence_flag ) { all_coherence_zero = hQMetaData->all_coherence_zero; push_next_indice( hMetaData, all_coherence_zero, 1 ); /* signal coherence */ bits_no_dirs_coh += 1; } + /* encode 2 direction subbands position */ if ( ndirections == 2 && bits_sph_idx == 11 ) { @@ -803,8 +829,8 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( hQMetaData->q_direction[1].cfg.nbands = hQMetaData->numTwoDirBands; } - /*Quantization and encoding of the Diffuseness */ + /*Quantization and encoding of the Diffuseness */ ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( hQMetaData, bits_diff, bits_sph_idx, hMetaData ); /* Encode surround coherence */ @@ -814,7 +840,6 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( } else { - for ( i = 0; i < hQMetaData->q_direction[0].cfg.nbands; i++ ) { if ( hQMetaData->surcoh_band_data != NULL ) @@ -824,7 +849,6 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( } } - /* Loop over number of directions*/ for ( d = 0; d < ndirections; d++ ) { @@ -834,7 +858,6 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( nblocks = q_direction->cfg.nblocks; start_band = q_direction->cfg.start_band; - #ifdef DEBUG_MODE_QMETADATA { int16_t k; @@ -856,7 +879,6 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( #endif /*Coherence */ - if ( all_coherence_zero == 0 ) { ivas_qmetadata_quantize_coherence_hr_512( hQMetaData, d, all_coherence_zero, hMetaData, bits_sp_coh ); @@ -956,7 +978,16 @@ ivas_error ivas_qmetadata_enc_encode_hr_384_512( } } } - +#ifdef FIX_HBR_MASAMETA + if ( hQMetaData->q_direction->cfg.inactiveBands > 0 ) + { + hQMetaData->q_direction[0].cfg.nbands += hQMetaData->q_direction->cfg.inactiveBands; + if ( ndirections > 1 ) + { + hQMetaData->q_direction[1].cfg.nbands += hQMetaData->q_direction->cfg.inactiveBands; + } + } +#endif return error; } #endif @@ -1216,15 +1247,19 @@ void ivas_qmetadata_enc_sid_encode( void reset_metadata_spatial( const IVAS_FORMAT ivas_format, /* i : IVAS format */ - BSTR_ENC_HANDLE hMetaData, /* i/o: Metadata bitstream handle */ + BSTR_ENC_HANDLE hMetaData, /* i/o: metadata bitstream handle */ const int32_t element_brate, /* i : element bitrate */ int32_t *total_brate, /* o : total bitrate */ const int32_t core_brate, /* i : core bitrate */ - const int16_t nb_bits_metadata, /* i : number of meatdata bits */ + const int16_t nb_bits_metadata, /* i : number of metadata bits */ const SBA_MODE sba_mode /* i : SBA mode */ ) { int16_t i, next_ind_sid, last_ind_sid; +#ifdef IND_LIST_DYN + int16_t j; +#endif + int16_t metadata_sid_bits; if ( core_brate == SID_2k40 || core_brate == FRAME_NO_DATA ) @@ -1233,7 +1268,9 @@ void reset_metadata_spatial( { if ( sba_mode == SBA_MODE_SPAR ) { +#ifdef DEBUGGING assert( hMetaData->ind_list[0].nb_bits == 1 ); +#endif hMetaData->ind_list[0].value = 1; metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; while ( hMetaData->nb_bits_tot < metadata_sid_bits ) @@ -1244,15 +1281,22 @@ void reset_metadata_spatial( else { /* Reset metadata and keep only SID metadata*/ +#ifdef IND_LIST_DYN + last_ind_sid = hMetaData->nb_ind_tot; + next_ind_sid = hMetaData->nb_ind_tot; +#else last_ind_sid = hMetaData->next_ind; next_ind_sid = hMetaData->next_ind; +#endif while ( hMetaData->nb_bits_tot > nb_bits_metadata ) { next_ind_sid--; hMetaData->nb_bits_tot -= hMetaData->ind_list[next_ind_sid].nb_bits; } +#ifndef IND_LIST_DYN hMetaData->next_ind = 0; +#endif hMetaData->nb_bits_tot = 0; for ( i = 0; i < next_ind_sid; i++ ) @@ -1260,6 +1304,17 @@ void reset_metadata_spatial( hMetaData->ind_list[i].nb_bits = -1; } +#ifdef IND_LIST_DYN + for ( j = 0, i = next_ind_sid; i < last_ind_sid; i++, j++ ) + { + hMetaData->ind_list[j].value = hMetaData->ind_list[i].value; + hMetaData->ind_list[j].nb_bits = hMetaData->ind_list[i].nb_bits; + hMetaData->nb_bits_tot += hMetaData->ind_list[j].nb_bits; + hMetaData->ind_list[i].nb_bits = -1; + } + + hMetaData->nb_ind_tot = j; +#else for ( i = next_ind_sid; i < last_ind_sid; i++ ) { hMetaData->ind_list[hMetaData->next_ind].value = hMetaData->ind_list[i].value; @@ -1268,13 +1323,20 @@ void reset_metadata_spatial( hMetaData->next_ind++; hMetaData->ind_list[i].nb_bits = -1; } + hMetaData->last_ind = hMetaData->next_ind; +#endif +#ifdef DEBUGGING assert( ( hMetaData->nb_bits_tot == ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS ) && "Problem of SID metadata in SCE" ); +#endif } } else { /*Reset metadata*/ +#ifdef IND_LIST_DYN + reset_indices_enc( hMetaData, hMetaData->nb_ind_tot ); +#else for ( i = 0; i < hMetaData->next_ind; i++ ) { hMetaData->ind_list[i].nb_bits = -1; @@ -1282,6 +1344,7 @@ void reset_metadata_spatial( hMetaData->nb_bits_tot = 0; hMetaData->next_ind = 0; hMetaData->last_ind = 0; +#endif } *total_brate = element_brate; @@ -1291,12 +1354,22 @@ void reset_metadata_spatial( /* Reset SID metadata bits*/ while ( hMetaData->nb_bits_tot > nb_bits_metadata ) { +#ifdef IND_LIST_DYN + hMetaData->nb_ind_tot--; + hMetaData->nb_bits_tot -= hMetaData->ind_list[hMetaData->nb_ind_tot].nb_bits; + hMetaData->ind_list[hMetaData->nb_ind_tot].nb_bits = -1; +#else hMetaData->next_ind--; hMetaData->nb_bits_tot -= hMetaData->ind_list[hMetaData->next_ind].nb_bits; hMetaData->ind_list[hMetaData->next_ind].nb_bits = -1; +#endif } +#ifdef DEBUGGING assert( hMetaData->nb_bits_tot == nb_bits_metadata && "Problem in metadata for SCE" ); +#endif +#ifndef IND_LIST_DYN hMetaData->last_ind = hMetaData->next_ind; +#endif } return; @@ -1309,13 +1382,13 @@ void reset_metadata_spatial( * *------------------------------------------------------------------------*/ -/* !r: quantized spherical index */ +/*! r: quantized spherical index */ int16_t quantize_direction2D( - float phi, /* i : input azimuth value */ - const int16_t no_cw, /* i : number of bits */ - float *phi_q, /* o : quantized azimuth value */ - uint16_t *index_phi, /* o : quantized azimuth index */ - const MC_LS_SETUP mc_format /* i : channel format if in MC-mode */ + float phi, /* i : input azimuth value */ + const int16_t no_cw, /* i : number of bits */ + float *phi_q, /* o : quantized azimuth value */ + uint16_t *index_phi, /* o : quantized azimuth index */ + const MC_LS_SETUP mc_format /* i : channel format if in MC-mode */ ) { int16_t idx_sph; @@ -1327,7 +1400,6 @@ int16_t quantize_direction2D( return 0; } - if ( mc_format != MC_LS_SETUP_INVALID ) { id_phi = quantize_phi_chan_compand( phi + 180, phi_q, no_cw, 0, mc_format ); @@ -1344,6 +1416,7 @@ int16_t quantize_direction2D( return idx_sph; } + #ifdef HR_METADATA /*------------------------------------------------------------------------- * ivas_qmetadata_quantize_diffuseness_nrg_ratios() @@ -1356,7 +1429,7 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits, - int16_t bits_dir_hr ) + const int16_t bits_dir_hr ) { int16_t j, k, dir2band; int16_t index_dirRatio1Inv, index_dirRatio2Inv, index_dirRatio1Inv_mod, index_dirRatio2Inv_mod; @@ -1423,7 +1496,8 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( * fact that with 2dir data, it is harder to achieve separate high direct-to-total ratio values * which are assumed by the direction quantization system. In practice, this improves direction * accuracy when it is perceptual meaningful. */ - masa_compensate_two_dir_energy_ratio_index( index_dirRatio1Inv, index_dirRatio2Inv, &index_dirRatio1Inv_mod, &index_dirRatio2Inv_mod ); + masa_compensate_two_dir_energy_ratio_index( index_dirRatio1Inv, index_dirRatio2Inv, &index_dirRatio1Inv_mod, &index_dirRatio2Inv_mod, + 0 ); for ( k = 0; k < hQMetaData->q_direction[0].cfg.nblocks; k++ ) { @@ -1493,17 +1567,15 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, - int16_t bits_dir_hr, + const int16_t bits_dir_hr, BSTR_ENC_HANDLE hMetaData ) { int16_t j, k; int16_t index; - needed_bits[0] = 0; needed_bits[1] = 0; - for ( j = hQMetaData->q_direction[0].cfg.start_band; j < hQMetaData->q_direction[0].cfg.nbands; ++j ) { for ( k = 0; k < hQMetaData->q_direction[0].cfg.nblocks; k++ ) @@ -1517,6 +1589,7 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( hQMetaData->q_direction[0].band_data[j].bits_sph_idx[k] = bits_dir_hr; } } + if ( hQMetaData->no_directions == 2 ) { for ( j = hQMetaData->q_direction[1].cfg.start_band; j < hQMetaData->q_direction[1].cfg.nbands; ++j ) @@ -1595,7 +1668,6 @@ static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( } } - /* Use similarity coding approach or raw coding when there is a low number of bands. */ /* one bit is used to indicate whether diffuseness values are entropy coded or coded raw */ if ( min_diffuseness_m_index == max_diffuseness_m_index ) /* all values are equal */ @@ -1625,7 +1697,6 @@ static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( } } - *diffuseness_index_max_ec_frame = 10; /* adaptively select the diffuseness_index_max_ec threshold */ if ( min_diffuseness_m_index > 10 ) @@ -1636,7 +1707,6 @@ static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( #ifdef DEBUGGING assert( ( hMetaData->nb_bits_tot - start_bit_pos ) <= 1 + diffuseness_bits_raw ); #endif - return ( hMetaData->nb_bits_tot - start_bit_pos ); } @@ -1652,7 +1722,8 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, - int16_t *dfRatioBits ) + int16_t *dfRatioBits, + const int16_t hodirac_flag ) { int16_t j, k, dir2band; int16_t index_dirRatio1Inv, index_dirRatio2Inv, index_dirRatio1Inv_mod, index_dirRatio2Inv_mod; @@ -1668,32 +1739,59 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( { if ( hQMetaData->no_directions == 2 && hQMetaData->twoDirBands[j] == 1 ) { - float dirRatio1, dirRatio2, diffRatio, sumRatio, dfRatio, dfRatioQ, diffRatioQ, dirRatio1Q, dirRatio2Q; + float diffRatio, dfRatio, dfRatioQ, diffRatioQ, dirRatio1Q, dirRatio2Q; + float dirRatio1, dirRatio2, sumRatio; int16_t dfRatio_index, dfRatio_qsteps, dfRatio_bits; /* With 2dir metadata, we quantize and transmit diffuse-to-total ratio (diffRatio) and * distribution factor of direct-to-total ratios (dFRatio). This is more efficient and * accurate than simple separate quantization of each direct-to-total ratio or their * separate inverses. */ - dirRatio1 = hQMetaData->q_direction[0].band_data[j].energy_ratio[0]; - dirRatio2 = hQMetaData->q_direction[1].band_data[dir2band].energy_ratio[0]; - sumRatio = dirRatio1 + dirRatio2; - diffRatio = 1.0f - sumRatio; - dfRatio = sumRatio < EPSILON ? 0.5f : dirRatio1 / sumRatio; + if ( hodirac_flag ) + { + /* already encoded as total and ratios in HO-DirAC */ + diffRatio = 1.f - hQMetaData->q_direction[0].band_data[j].energy_ratio[0]; + dfRatio = hQMetaData->q_direction[1].band_data[dir2band].energy_ratio[0]; + } + else + { + dirRatio1 = hQMetaData->q_direction[0].band_data[j].energy_ratio[0]; + dirRatio2 = hQMetaData->q_direction[1].band_data[dir2band].energy_ratio[0]; + sumRatio = dirRatio1 + dirRatio2; + diffRatio = 1.0f - sumRatio; + dfRatio = sumRatio < EPSILON ? 0.5f : dirRatio1 / sumRatio; + } + index_diff = masa_sq( diffRatio, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); diffRatioQ = diffuseness_reconstructions[index_diff]; - dfRatio_bits = ivas_get_df_ratio_bits( index_diff ); + if ( hodirac_flag ) + { + dfRatio_bits = ivas_get_df_ratio_bits_hodirac( index_diff ); + } + else + { + dfRatio_bits = ivas_get_df_ratio_bits( index_diff ); + } dfRatioBits[dir2band] = dfRatio_bits; dfRatio_qsteps = ( 1 << dfRatio_bits ); - dfRatio_index = usquant( dfRatio, &dfRatioQ, 0.5f, 0.5f / ( dfRatio_qsteps - 1 ), dfRatio_qsteps ); + if ( hodirac_flag ) + { + dfRatio_index = usquant( dfRatio, &dfRatioQ, 0.0f, 1.f / ( dfRatio_qsteps - 1 ), dfRatio_qsteps ); + dirRatio1Q = 1.f - diffRatioQ; + dirRatio2Q = dfRatioQ; + } + else + { + dfRatio_index = usquant( dfRatio, &dfRatioQ, 0.5f, 0.5f / ( dfRatio_qsteps - 1 ), dfRatio_qsteps ); - /* Direction quantization requires also separately quantized direct-to-total ratios. Thus, we calculate them. */ - dirRatio1Q = dfRatioQ * ( 1.0f - diffRatioQ ); - dirRatio2Q = ( 1.0f - diffRatioQ ) - dirRatio1Q; + /* Direction quantization requires also separately quantized direct-to-total ratios. Thus, we calculate them. */ + dirRatio1Q = dfRatioQ * ( 1.0f - diffRatioQ ); + dirRatio2Q = ( 1.0f - diffRatioQ ) - dirRatio1Q; + } index_dirRatio1Inv = masa_sq( 1.0f - dirRatio1Q, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); @@ -1707,7 +1805,16 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( } nbits_diff[0] += MASA_BITS_ER; - index_dirRatio2Inv = masa_sq( 1.0f - dirRatio2Q, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); + if ( hodirac_flag ) + { + float tmp; + index_dirRatio2Inv = usquant( dirRatio2Q, &tmp, 0.0f, 1.f / ( DIRAC_DIFFUSE_LEVELS - 1 ), DIRAC_DIFFUSE_LEVELS ); + } + else + { + index_dirRatio2Inv = masa_sq( 1.0f - dirRatio2Q, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); + } + for ( k = 0; k < hQMetaData->q_direction[1].cfg.nblocks; k++ ) { hQMetaData->q_direction[1].band_data[dir2band].energy_ratio_index[k] = dfRatio_index; @@ -1719,7 +1826,8 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( * fact that with 2dir data, it is harder to achieve separate high direct-to-total ratio values * which are assumed by the direction quantization system. In practice, this improves direction * accuracy when it is perceptual meaningful. */ - masa_compensate_two_dir_energy_ratio_index( index_dirRatio1Inv, index_dirRatio2Inv, &index_dirRatio1Inv_mod, &index_dirRatio2Inv_mod ); + masa_compensate_two_dir_energy_ratio_index( index_dirRatio1Inv, index_dirRatio2Inv, &index_dirRatio1Inv_mod, &index_dirRatio2Inv_mod, + hodirac_flag ); for ( k = 0; k < hQMetaData->q_direction[0].cfg.nblocks; k++ ) { @@ -2100,24 +2208,34 @@ static int16_t ivas_qmetadata_entropy_encode_df_ratio( /*------------------------------------------------------------------------- * restore_metadata_buffer() * - * Reset metadata buffer + * Restore metadata buffer *------------------------------------------------------------------------*/ void restore_metadata_buffer( BSTR_ENC_HANDLE hMetaData, const int16_t next_ind_start, +#ifndef IND_LIST_DYN const int16_t last_ind_start, +#endif const int16_t bit_pos_start ) { int16_t i; +#ifdef IND_LIST_DYN + for ( i = next_ind_start; i <= hMetaData->nb_ind_tot; i++ ) +#else for ( i = next_ind_start; i <= hMetaData->next_ind; i++ ) +#endif { hMetaData->ind_list[i].nb_bits = -1; } hMetaData->nb_bits_tot = bit_pos_start; +#ifdef IND_LIST_DYN + hMetaData->nb_ind_tot = next_ind_start; +#else hMetaData->next_ind = next_ind_start; hMetaData->last_ind = last_ind_start; +#endif return; } @@ -2166,7 +2284,7 @@ static void ivas_qmetadata_encode_quasi_uniform( * *------------------------------------------------------------------------*/ -/* !r: number of bits using Golomb Rice code */ +/*! r: number of bits using Golomb Rice code */ static int16_t GR_bits_new( uint16_t *data, /* i : data to encode with GR */ int16_t *no_symb, /* i : number of symbols for each component*/ @@ -2220,7 +2338,7 @@ static int16_t GR_bits_new( * Encoding azimuth indexes with GR code using context *------------------------------------------------------------------------*/ -/* !r: numer of bits used for coding */ +/*! r: numer of bits used for coding */ static int16_t GR_bits_azimuth_context( uint16_t *data_in, /* i : data to be encoded */ int16_t *no_symb, /* i : number of symbols for each component */ @@ -2318,7 +2436,7 @@ static int16_t GR_bits_azimuth_context( * Golomb Rice encoding with mean removing *------------------------------------------------------------------------*/ -/* !r: number of bits used */ +/*! r: number of bits used */ static int16_t mean_removed_GR_new( const uint16_t *idx, /* i : data to encode */ const int16_t max_no_symb, @@ -2408,7 +2526,7 @@ static int16_t ivas_qmetadata_entropy_encode_dir( int16_t max_bits #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag #endif ) { @@ -2454,10 +2572,11 @@ static int16_t ivas_qmetadata_entropy_encode_dir( idx = 0; dist_count = 0; set_zero( avg_direction_vector, 3 ); + for ( i = start_band; i < nbands; i++ ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { diff_idx_min = 0; // min( q_direction->band_data[i].energy_ratio_index_mod[0]>>1, diff_idx_min ); } @@ -2517,7 +2636,6 @@ static int16_t ivas_qmetadata_entropy_encode_dir( no_th = no_theta_masa[bits_direction_masa[diff_idx_min] - 3]; - for ( i = 0; i < no_th; i++ ) { theta_cb[i] = i * delta_theta_masa[bits_direction_masa[diff_idx_min] - 3]; @@ -2669,6 +2787,7 @@ static int16_t ivas_qmetadata_entropy_encode_dir( } } } + direction_bits_ec += elevation_bits_ec_best; } @@ -2841,6 +2960,7 @@ static int16_t ivas_qmetadata_entropy_encode_dir( } } } + /* encode the ExtendedGR part for azimuth */ ivas_qmetadata_encode_quasi_uniform( hMetaData, ivas_qmetadata_reorder_generic( avg_azimuth_index_best - ( avg_azimuth_alphabet >> 1 ) ), avg_azimuth_alphabet ); @@ -2874,6 +2994,7 @@ static int16_t ivas_qmetadata_entropy_encode_dir( ivas_qmetadata_encode_extended_gr( hMetaData, dist_azimuth_indexes_best[idx], dist_azimuth_alphabets[idx], gr_param_azimuth_best ); } } + if ( dist_count > nblocks ) { if ( ( q_direction->cfg.mc_ls_setup != MC_LS_SETUP_INVALID ) && ( nblocks > 1 ) ) @@ -2908,6 +3029,7 @@ static int16_t ivas_qmetadata_entropy_encode_dir( } } } + direction_bits_ec -= bits_gained; } else @@ -4061,7 +4183,7 @@ static ivas_error requantize_direction_EC_3( * writing of the spherical indexes *-------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static int16_t write_fixed_rate_direction( BSTR_ENC_HANDLE hMetaData, /* i : MASA metadata structure */ IVAS_QDIRECTION *qdirection, /* i/o: quantized directional parameters */ @@ -4323,7 +4445,7 @@ static void calculate_two_distances( * write metadata using entropy encoding *-------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static ivas_error write_ec_direction( int16_t *num_bits_written, /* o : Number of bits written */ BSTR_ENC_HANDLE hMetaData, /* i : MASA metadata structure */ @@ -4497,7 +4619,7 @@ static ivas_error write_ec_direction( * Local functions (coherence Q and coding) *-----------------------------------------------------------------------*/ -/* !r: index */ +/*! r: index */ static uint64_t create_combined_index( uint16_t *idx_dct, /* i : indexes to combine */ const int16_t len, /* i : number of indexes */ @@ -4523,13 +4645,13 @@ static uint64_t create_combined_index( * encoding DCT0 coeffs with joint index *-----------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static int16_t encode_coherence_indexesDCT0( uint16_t *idx_dct, /* i : indexes to be encoded */ const int16_t len, /* i : number of indexes */ int16_t *no_cb_vec, /* i : number of codewords for each position */ BSTR_ENC_HANDLE hMetaData, - int16_t indice_coherence, + const int16_t indice_coherence, const int16_t nbits, const int16_t nbits1 ) { @@ -4624,9 +4746,7 @@ static int16_t coherence_coding_length( if ( sum_s( no_cv, coding_subbands ) > MASA_COH_LIMIT_2IDX ) { -#ifdef DEBUGGING - assert( coding_subbands % 2 == 0 ); -#endif + no_cb = 1; half_coding_subbands = coding_subbands / 2; for ( j = 0; j < half_coding_subbands; j++ ) @@ -4672,14 +4792,14 @@ static int16_t coherence_coding_length( * Encoding spread coherence for 1 subframe bands *-------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static int16_t encode_spread_coherence_1sf( - IVAS_QMETADATA *q_metadata, /* i : quantized metadata */ - const int16_t idx_d, /* i : current direction index */ - BSTR_ENC_HANDLE hMasaMetaData /* i/o: metadata bitstream handle */ + IVAS_QMETADATA *q_metadata, /* i : quantized metadata */ + const int16_t idx_d, /* i : current direction index */ + BSTR_ENC_HANDLE hMasaMetaData /* i/o: metadata bitstream handle */ #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding */ #endif ) { @@ -4712,7 +4832,7 @@ static int16_t encode_spread_coherence_1sf( for ( j = 0; j < coding_subbands; j++ ) { #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { idx_ER = 7 - ( q_direction->band_data[j].energy_ratio_index_mod[0] >> 1 ) + extra_cv; } @@ -4723,6 +4843,7 @@ static int16_t encode_spread_coherence_1sf( #ifdef HR_METADATA } #endif + if ( idx_ER > 0 ) { idx_sp_coh[j] = (uint16_t) roundf( q_direction->coherence_band_data[j].spread_coherence[0] / ( 255.0f / (float) idx_ER ) ); @@ -4867,7 +4988,7 @@ static int16_t encode_spread_coherence_1sf( * encoding surround coherence *-------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static int16_t encode_surround_coherence( IVAS_QMETADATA *hQMetaData, /* i : quantized metadata */ BSTR_ENC_HANDLE hMetaData /* i/o: metadata bitstream handle */ @@ -5282,7 +5403,7 @@ static int16_t encode_surround_coherence_hr( * quanization of DCT component of order zero for transformed coherence vector *-------------------------------------------------------------------*/ -/* !r: quantized value */ +/*! r: quantized value */ static float quantize_DCT_0_coh( const float x, /* i : input value */ const int16_t j, /* i : subband index */ @@ -5294,7 +5415,7 @@ static float quantize_DCT_0_coh( int16_t *p_no_cb /* o : actual number of codewords dependent on energy ratio value */ #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding */ #endif ) { @@ -5305,8 +5426,9 @@ static float quantize_DCT_0_coh( #endif /* quantize first DCT component */ var_azi = var( q_direction->band_data[j].azimuth, q_direction->cfg.nblocks ); + #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { minimum_s( (int16_t *) ( q_direction->band_data[j].energy_ratio_index ), q_direction->cfg.nblocks, &min_index ); min_index = min_index >> 1; @@ -5315,6 +5437,7 @@ static float quantize_DCT_0_coh( { min_index = q_direction->band_data[j].energy_ratio_index[0]; } + if ( var_azi < delta_var ) { idx_sub_cb = no_cb * min_index; @@ -5353,7 +5476,7 @@ static float quantize_DCT_0_coh( * Encoding DCT1 coeffs with joint index or EC *-------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static int16_t encode_coherence_indexesDCT1( uint16_t *idx_dct, /* i : data to be encoded */ const int16_t len, /* i : number of data */ @@ -5408,13 +5531,20 @@ static void dct4_transform( return; } + #ifdef HR_METADATA +/*-------------------------------------------------------------------* + * ivas_qmetadata_quantize_coherence_hr_512() + * + * + *-------------------------------------------------------------------*/ + static int16_t ivas_qmetadata_quantize_coherence_hr_512( IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata */ const int16_t idx_d, /* i : current direction index */ const int16_t all_coherence_zero, /* i : all coherence is zero - flag */ BSTR_ENC_HANDLE hMetaData, /* i : metadata handle */ - int16_t bits_coh ) + const int16_t bits_coh ) { int16_t j, k; int16_t nbands, nblocks; @@ -5510,23 +5640,24 @@ static int16_t ivas_qmetadata_quantize_coherence_hr_512( } #endif + /*-------------------------------------------------------------------* * ivas_qmetadata_quantize_coherence() * * *-------------------------------------------------------------------*/ -/* !r: number of bits written */ +/*! r: number of bits written */ static int16_t ivas_qmetadata_quantize_coherence( - IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata */ - const int16_t idx_d, /* i : current direction index */ - const int16_t all_coherence_zero, /* i : all coherence is zero - flag */ - BSTR_ENC_HANDLE hMetaData, /* i : metadata handle */ - const int16_t write_flag, /* i : flag to actually write the data or not */ + IVAS_QMETADATA *hQMetaData, /* i/o: quantized metadata */ + const int16_t idx_d, /* i : current direction index */ + const int16_t all_coherence_zero, /* i : all coherence is zero - flag */ + BSTR_ENC_HANDLE hMetaData, /* i : metadata handle */ + const int16_t write_flag, /* i : flag to actually write the data or not */ int16_t *indice_coherence #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding */ #endif ) { @@ -5560,7 +5691,7 @@ static int16_t ivas_qmetadata_quantize_coherence( nbits = encode_spread_coherence_1sf( hQMetaData, idx_d, hMetaData #ifdef HR_METADATA , - is_hr + hrmasa_flag #endif ); @@ -5617,8 +5748,9 @@ static int16_t ivas_qmetadata_quantize_coherence( { /* DCT transform */ dct4_transform( hQMetaData->q_direction[idx_d].coherence_band_data[j].spread_coherence, dct_coh[j] ); + #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { minimum_s( (int16_t *) ( q_direction->band_data[j].energy_ratio_index ), q_direction->cfg.nblocks, &min_index ); no_cb_vec[j] = len_cb_dct0_masa[min_index >> 1]; @@ -5637,7 +5769,7 @@ static int16_t ivas_qmetadata_quantize_coherence( dct_coh[j][0] = quantize_DCT_0_coh( dct_coh[j][0], j, coherence_cb0_masa, MASA_DELTA_AZI_DCT0, MASA_NO_CV_COH, q_direction, &idx_dct[k], &no_cb_vec[j] #ifdef HR_METADATA , - is_hr + hrmasa_flag #endif ); } @@ -5704,7 +5836,11 @@ static int16_t ivas_qmetadata_quantize_coherence( else { /* write dummy data now and save the position */ +#ifdef IND_LIST_DYN + *indice_coherence = hMetaData->nb_ind_tot; +#else *indice_coherence = hMetaData->next_ind; +#endif k = nbits; while ( k > 0 ) { @@ -5778,14 +5914,19 @@ static void ivas_qmetadata_reorder_2dir_bands( hQMetaData->q_direction[0].band_data[band].distance[sf] = hQMetaData->q_direction[1].band_data[band].distance[sf]; hQMetaData->q_direction[1].band_data[band].distance[sf] = uint8_tmp; - uint8_tmp = hQMetaData->q_direction[0].coherence_band_data[band].spread_coherence[sf]; - hQMetaData->q_direction[0].coherence_band_data[band].spread_coherence[sf] = hQMetaData->q_direction[1].coherence_band_data[band].spread_coherence[sf]; - hQMetaData->q_direction[1].coherence_band_data[band].spread_coherence[sf] = uint8_tmp; + if ( hQMetaData->coherence_flag ) + { + uint8_tmp = hQMetaData->q_direction[0].coherence_band_data[band].spread_coherence[sf]; + hQMetaData->q_direction[0].coherence_band_data[band].spread_coherence[sf] = hQMetaData->q_direction[1].coherence_band_data[band].spread_coherence[sf]; + hQMetaData->q_direction[1].coherence_band_data[band].spread_coherence[sf] = uint8_tmp; + } + } + if ( hQMetaData->coherence_flag ) + { + flt_tmp = hQMetaData->q_direction[0].band_data[band].energy_ratio[0]; + hQMetaData->q_direction[0].band_data[band].energy_ratio[0] = hQMetaData->q_direction[1].band_data[band].energy_ratio[0]; + hQMetaData->q_direction[1].band_data[band].energy_ratio[0] = flt_tmp; } - - flt_tmp = hQMetaData->q_direction[0].band_data[band].energy_ratio[0]; - hQMetaData->q_direction[0].band_data[band].energy_ratio[0] = hQMetaData->q_direction[1].band_data[band].energy_ratio[0]; - hQMetaData->q_direction[1].band_data[band].energy_ratio[0] = flt_tmp; } } } @@ -5793,13 +5934,22 @@ static void ivas_qmetadata_reorder_2dir_bands( return; } + #ifdef HR_METADATA +/*-------------------------------------------------------------------* + * ivas_qmetadata_reorder_2dir_bands_hr() + * + * + *-------------------------------------------------------------------*/ + static void ivas_qmetadata_reorder_2dir_bands_hr( IVAS_QMETADATA_HANDLE hQMetaData ) { - int16_t nbands; - int16_t nsubframes; + int16_t nbands, nsubframes; int16_t band, sf; + uint16_t uint16_tmp; + float flt_tmp; + uint8_t uint8_tmp; nbands = hQMetaData->q_direction[0].cfg.nbands; nsubframes = hQMetaData->q_direction[0].cfg.nblocks; @@ -5808,14 +5958,10 @@ static void ivas_qmetadata_reorder_2dir_bands_hr( { if ( hQMetaData->twoDirBands[band] == 1 ) { - for ( sf = 0; sf < nsubframes; sf++ ) { if ( hQMetaData->q_direction[0].band_data[band].energy_ratio[sf] < hQMetaData->q_direction[1].band_data[band].energy_ratio[sf] ) { - uint16_t uint16_tmp = 0; - float flt_tmp = 0; - uint8_t uint8_tmp = 0; uint16_tmp = hQMetaData->q_direction[0].band_data[band].spherical_index[sf]; hQMetaData->q_direction[0].band_data[band].spherical_index[sf] = hQMetaData->q_direction[1].band_data[band].spherical_index[sf]; hQMetaData->q_direction[1].band_data[band].spherical_index[sf] = uint16_tmp; @@ -5849,6 +5995,7 @@ static void ivas_qmetadata_reorder_2dir_bands_hr( } #endif + /*-------------------------------------------------------------------* * write_2dir_info() * @@ -5865,6 +6012,7 @@ static int16_t write_2dir_info( int16_t p[MASA_MAXIMUM_CODING_SUBBANDS]; uint16_t dif_p[MASA_MAXIMUM_CODING_SUBBANDS]; int16_t i, j; + j = 0; p[0] = 0; for ( i = 0; i < n; i++ ) @@ -5875,6 +6023,7 @@ static int16_t write_2dir_info( j++; } } + dif_p[0] = p[0]; for ( i = 1; i < j; i++ ) { @@ -5895,6 +6044,12 @@ static int16_t write_2dir_info( } +/*-------------------------------------------------------------------* + * transform_azimuth_dir2() + * + * + *-------------------------------------------------------------------*/ + static void transform_azimuth_dir2( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *dir2_bands ) @@ -5917,6 +6072,14 @@ static void transform_azimuth_dir2( { hQMetaData->q_direction[1].band_data[i].azimuth[b] += 360; } + if ( hQMetaData->q_direction[1].band_data[i].azimuth[b] >= 180 ) + { + hQMetaData->q_direction[1].band_data[i].azimuth[b] -= 360; + } + if ( hQMetaData->q_direction[1].band_data[i].azimuth[b] < -180 ) + { + hQMetaData->q_direction[1].band_data[i].azimuth[b] += 360; + } #ifdef DEBUGGING assert( hQMetaData->q_direction[1].band_data[i].azimuth[b] < 180 && hQMetaData->q_direction[1].band_data[i].azimuth[b] >= -180 ); #endif diff --git a/lib_enc/ivas_qspherical_enc.c b/lib_enc/ivas_qspherical_enc.c index 3d2df98217deca34987173f49e7226e4ebe21427..4c79b875b7b1dfbc53971c0aec0e400cbabea077 100644 --- a/lib_enc/ivas_qspherical_enc.c +++ b/lib_enc/ivas_qspherical_enc.c @@ -62,7 +62,7 @@ void quantize_direction_frame( float elevation_orig[MASA_MAXIMUM_CODING_SUBBANDS][MAX_PARAM_SPATIAL_SUBFRAMES] #ifdef HR_METADATA , - int16_t is_hr + const int16_t hrmasa_flag /* i : flag indicating high-rate MASA MD coding*/ #endif ) { @@ -98,7 +98,7 @@ void quantize_direction_frame( q_direction->not_in_2D += q_direction->band_data[i].elevation_index[j]; #ifdef HR_METADATA - if ( is_hr ) + if ( hrmasa_flag ) { if ( q_direction->cfg.mc_ls_setup != MC_LS_SETUP_INVALID ) { @@ -127,6 +127,7 @@ void quantize_direction_frame( #ifdef HR_METADATA } #endif + if ( q_direction->band_data[i].azimuth_index[j] == MASA_NO_INDEX ) { q_direction->band_data[i].azimuth_index[j] = 0; @@ -162,6 +163,7 @@ void quantize_direction_frame( return; } + /*-------------------------------------------------------------------* * quantize_direction_frame2D() * @@ -270,6 +272,7 @@ void small_requantize_direction_frame( return; } + /*-------------------------------------------------------------------* * quantize_direction() * @@ -351,7 +354,6 @@ uint16_t quantize_direction( return idx_sph; } - no_th = no_theta_masa[no_bits - 3]; for ( i = 0; i < no_th; i++ ) @@ -497,20 +499,21 @@ uint16_t quantize_direction( return idx_sph; } + /*-------------------------------------------------------------------* * direction_distance_cp() * * quantization distortion calculated on the sphere *----------------------------------------------------------------------*/ -/* !r: distortion value */ +/*! r: distortion value */ static float direction_distance_cp( - float theta, /* i : elevation absolute value */ - float theta_hat, /* i : quantized elevation value in absolute value */ - float theta_hat1, /* i : quantized elevation value in absolute value */ - const float phi, /* i : azimuth value */ - const float phi_hat, /* i : quantized azimuth value */ - const float phi_hat1, /* i : quantized azimuth value */ + float theta, /* i : elevation absolute value */ + float theta_hat, /* i : quantized elevation value in absolute value */ + float theta_hat1, /* i : quantized elevation value in absolute value */ + const float phi, /* i : azimuth value */ + const float phi_hat, /* i : quantized azimuth value */ + const float phi_hat1, /* i : quantized azimuth value */ float *d1 ) { float d, ct, st, st1, st2; @@ -536,28 +539,27 @@ static float direction_distance_cp( * joint quantization of elevation and azimuth *----------------------------------------------------------------------*/ -/* !r: quantized elevation value */ +/*! r: quantized elevation value */ static float quantize_theta_phi( - float *theta_cb, /* i : elevation codebook */ - const int16_t no_th, /* i : elevation codebook size */ - const int16_t *no_phi_loc, /* i : number of azimuth values for each elevation codeword */ - const float abs_theta, /* i : absolute value of elevation to be quantized */ - int16_t *id_phi, /* o : azimuth index */ - int16_t *id_phi_remap, /* o : remapped azimuth index */ - float *phi_hat, /* o : quantized azimuth value */ - const float phi, /* i : input azimuth value; to be quantized */ - const int16_t no_bits, /* i : number of bits used for quantization */ - int16_t *id_theta, /* o : elevation index */ - float *phi_q, /* o : rotated quantized azimuth */ - const int16_t remap, /* i : flag for remapping */ - const MC_LS_SETUP mc_format /* i : channel format if in MC-mode */ + float *theta_cb, /* i : elevation codebook */ + const int16_t no_th, /* i : elevation codebook size */ + const int16_t *no_phi_loc, /* i : number of azimuth values for each elevation codeword*/ + const float abs_theta, /* i : absolute value of elevation to be quantized */ + int16_t *id_phi, /* o : azimuth index */ + int16_t *id_phi_remap, /* o : remapped azimuth index */ + float *phi_hat, /* o : quantized azimuth value */ + const float phi, /* i : input azimuth value; to be quantized */ + const int16_t no_bits, /* i : number of bits used for quantization */ + int16_t *id_theta, /* o : elevation index */ + float *phi_q, /* o : rotated quantized azimuth */ + const int16_t remap, /* i : flag for remapping */ + const MC_LS_SETUP mc_format /* i : channel format if in MC-mode */ ) { float theta_hat, theta_hat1, phi_hat1; int16_t id_th, id_th1, id_th2, id_ph, id_ph1; float d, d1; - id_th = (int16_t) ( abs_theta / delta_theta_masa[no_bits - 3] ); if ( id_th >= no_th ) { @@ -573,7 +575,6 @@ static float quantize_theta_phi( { if ( ( no_th < 6 ) && mc_format == MC_LS_SETUP_INVALID ) { - if ( id_th == 0 ) { id_th1 = 1; diff --git a/lib_enc/ivas_rom_enc.c b/lib_enc/ivas_rom_enc.c index ae7cd2ee1a6c29c3f1fdcb2ae51b93bf31803ce1..45651008836d2e2f33a52992d2cb3e9b77da220b 100644 --- a/lib_enc/ivas_rom_enc.c +++ b/lib_enc/ivas_rom_enc.c @@ -723,4 +723,119 @@ const float Stereo_dmx_wnd_coef_48k[L_FRAME48k] = { }; +const HUFF_TABLE huff_alpha_table[2] = +{ + { /* Alfa Fine */ + { /* df0 */ + { 0x0002ce, 0x000b5e, 0x0004fe, 0x0005ae, 0x00027e, 0x0002de, 0x00016a, 0x0000b2, 0x00004a, 0x00004b, + 0x0000b6, 0x00004e, 0x000024, 0x00002e, 0x00000a, 0x000006, 0x000000, 0x000007, 0x000008, 0x00002f, + 0x000026, 0x000058, 0x0000b4, 0x00009e, 0x00016e, 0x000166, 0x0002df, 0x0002cf, 0x00027c, 0x00027d, + 0x0004ff, 0x000b5f, 0x0002d6 }, + { 10, 12, 11, 11, 10, 10, 9, 8, 7, 7, + 8, 7, 6, 6, 4, 3, 1, 3, 4, 6, + 6, 7, 8, 8, 9, 9, 10, 10, 10, 10, + 11, 12, 10 } + }, + { /* df */ + { 0x0011de, 0x011ffe, 0x013dea, 0x013df6, 0x008eea, 0x013df7, 0x013dee, 0x013deb, 0x013dec, 0x008eee, + 0x008ffe, 0x009efe, 0x0047fe, 0x004f7c, 0x0023fe, 0x0011fe, 0x0013fe, 0x0008f6, 0x0009ee, 0x000476, + 0x00047a, 0x0004f6, 0x00023a, 0x00027a, 0x00027e, 0x00013e, 0x00009a, 0x00004c, 0x00004e, 0x000012, + 0x00000a, 0x000006, 0x000000, 0x000007, 0x00000b, 0x000010, 0x000022, 0x000046, 0x00009b, 0x00013c, + 0x00011c, 0x00023e, 0x00023c, 0x0004fe, 0x00047e, 0x0009fe, 0x0008fe, 0x0008f7, 0x0013ff, 0x0011df, + 0x0027bc, 0x004f7e, 0x004776, 0x009efa, 0x009ef4, 0x013dfe, 0x008eeb, 0x008ee8, 0x013dff, 0x008ee9, + 0x008eef, 0x011fff, 0x013ded, 0x013def, 0x0011dc }, + { 13, 17, 17, 17, 16, 17, 17, 17, 17, 16, + 16, 16, 15, 15, 14, 13, 13, 12, 12, 11, + 11, 11, 10, 10, 10, 9, 8, 7, 7, 5, + 4, 3, 1, 3, 4, 5, 6, 7, 8, 9, + 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, + 14, 15, 15, 16, 16, 17, 16, 16, 17, 16, + 16, 17, 17, 17, 13 } + }, + { /* dt */ + { 0x00eeee, 0x03b3ee, 0x03b3f6, 0x03b3fc, 0x01d9bc, 0x01d9bd, 0x01d9b2, 0x03b3fe, 0x01d9be, 0x01d9f6, + 0x01d9fc, 0x00ecda, 0x00ecfa, 0x00eeef, 0x00766e, 0x007776, 0x003b3a, 0x003bba, 0x001d9a, 0x001ddc, + 0x001dde, 0x000eec, 0x000764, 0x000772, 0x0003b0, 0x0003b8, 0x0001da, 0x0001de, 0x000072, 0x000038, + 0x00001e, 0x000006, 0x000000, 0x000002, 0x00001f, 0x00003a, 0x000073, 0x0001df, 0x0001db, 0x0003ba, + 0x0003b1, 0x000773, 0x000765, 0x000eed, 0x000ecc, 0x001d9e, 0x001d9c, 0x003bbe, 0x003b3b, 0x00777e, + 0x00767c, 0x00eefe, 0x00ecfc, 0x00ecd8, 0x01d9fd, 0x01d9fa, 0x01d9bf, 0x01d9b6, 0x01d9b3, 0x03b3fd, + 0x01d9b7, 0x03b3ff, 0x03b3ef, 0x03b3f7, 0x00eeff }, + { 16, 18, 18, 18, 17, 17, 17, 18, 17, 17, + 17, 16, 16, 16, 15, 15, 14, 14, 13, 13, + 13, 12, 11, 11, 10, 10, 9, 9, 7, 6, + 5, 3, 1, 2, 5, 6, 7, 9, 9, 10, + 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, + 15, 16, 16, 16, 17, 17, 17, 17, 17, 18, + 17, 18, 18, 18, 16 } + } + }, /* End Alfa Fine */ + { /* Alfa Coarse */ + { /* df0 */ + { 0x0003be, 0x0003fe, 0x0001fe, 0x0000fe, 0x00003e, 0x00003a, 0x00001e, 0x000002, 0x000000, 0x000006, + 0x00001c, 0x00007e, 0x000076, 0x0000ee, 0x0001de, 0x0003ff, 0x0003bf }, + { 10, 10, 9, 8, 6, 6, 5, 2, 1, 3, + 5, 7, 7, 8, 9, 10, 10 } + }, + { /* df */ + { 0x007c76, 0x03e3fe, 0x01f1f6, 0x01f1f7, 0x00f8ea, 0x007c74, 0x007c7c, 0x001f1c, 0x000f9e, 0x0007ce, + 0x0003e2, 0x0001f0, 0x0000fa, 0x00007e, 0x00000e, 0x000006, 0x000000, 0x000002, 0x00001e, 0x00007f, + 0x0000fb, 0x0001f2, 0x0003e6, 0x0007c6, 0x000f9f, 0x001f1e, 0x007c7e, 0x00f8fe, 0x00f8fa, 0x01f1fe, + 0x00f8eb, 0x03e3ff, 0x007c77 }, + { 15, 18, 17, 17, 16, 15, 15, 13, 12, 11, + 10, 9, 8, 7, 4, 3, 1, 2, 5, 7, + 8, 9, 10, 11, 12, 13, 15, 16, 16, 17, + 16, 18, 15 } + }, + { /* dt */ + { 0x003efc, 0x00fbfa, 0x007ddc, 0x00fbfe, 0x007dde, 0x007dfc, 0x003ef6, 0x001f76, 0x000fba, 0x000fbe, + 0x0003ec, 0x0001f2, 0x0000f8, 0x00007e, 0x00001e, 0x000006, 0x000000, 0x000002, 0x00000e, 0x00007f, + 0x0000fa, 0x0001f3, 0x0003ed, 0x0007dc, 0x000fbc, 0x001f7a, 0x003ef7, 0x007dfe, 0x007ddf, 0x00fbff, + 0x007ddd, 0x00fbfb, 0x003efd }, + { 14, 16, 15, 16, 15, 15, 14, 13, 12, 12, + 10, 9, 8, 7, 5, 3, 1, 2, 4, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 16, + 15, 16, 14 } + } + } /* End Alfa Coarse */ +}; + +const HUFF_TABLE huff_beta_table[2] = +{ + { /* Beta Fine */ + { /* df0 */ + { 0x000000, 0x000002, 0x000006, 0x00000e, 0x00001e, 0x00003e, 0x00007e, 0x0000fe, 0x0000ff }, + { 1, 2, 3, 4, 5, 6, 7, 8, 8 } + }, + { /* df */ + { 0x001f1e, 0x000f8e, 0x0003e2, 0x0001f2, 0x0000fa, 0x00007e, 0x00001e, 0x000006, 0x000000, 0x000002, + 0x00000e, 0x00007f, 0x0000fb, 0x0001f3, 0x0001f0, 0x0007c6, 0x001f1f }, + { 13, 12, 10, 9, 8, 7, 5, 3, 1, 2, + 4, 7, 8, 9, 9, 11, 13 } + }, + { /* dt */ + { 0x007dfe, 0x003efe, 0x000fbe, 0x0003ee, 0x0000fa, 0x00007e, 0x00001e, 0x000006, 0x000000, 0x000002, + 0x00000e, 0x00007f, 0x00007c, 0x0001f6, 0x0007de, 0x001f7e, 0x007dff }, + { 15, 14, 12, 10, 8, 7, 5, 3, 1, 2, + 4, 7, 7, 9, 11, 13, 15 } + } + }, /* End Beta Fine */ + { /* Beta Coarse */ + { /* df0 */ + { 0x000000, 0x000002, 0x000006, 0x00000e, 0x00000f }, + { 1, 2, 3, 4, 4 } + }, + { /* df */ + { 0x0000fe, 0x00003e, 0x00000e, 0x000006, 0x000000, 0x000002, 0x00001e, 0x00007e, 0x0000ff }, + { 8, 6, 4, 3, 1, 2, 5, 7, 8 } + }, + { /* dt */ + { 0x0000fe, 0x00007e, 0x00001e, 0x000006, 0x000000, 0x000002, 0x00000e, 0x00003e, 0x0000ff }, + { 8, 7, 5, 3, 1, 2, 4, 6, 8 } + } + } /* End Beta Coarse */ +}; + +const int16_t mc_paramupmix_fb_remix_order[4] = {0, 1, 2, 3}; + + /* clang-format on */ diff --git a/lib_enc/ivas_rom_enc.h b/lib_enc/ivas_rom_enc.h index d240fb69187fded50b89d4c3ae5056002b238f30..c208259ed6052b15f17bc946754c8fa311b5e395 100644 --- a/lib_enc/ivas_rom_enc.h +++ b/lib_enc/ivas_rom_enc.h @@ -126,5 +126,8 @@ extern const float Stereo_dmx_s_wnd_coef_48k[L_FRAME48k >> 4]; extern const float Stereo_dmx_wnd_coef_32k[L_FRAME32k]; extern const float Stereo_dmx_wnd_coef_48k[L_FRAME48k]; +extern const HUFF_TABLE huff_alpha_table[2]; +extern const HUFF_TABLE huff_beta_table[2]; +extern const int16_t mc_paramupmix_fb_remix_order[4]; #endif diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c index d9fb1fef8347bb3e63131e06481d48c927b1a050..3a2dd72820778d2af4230f2d0426aa54406e63cf 100644 --- a/lib_enc/ivas_sba_enc.c +++ b/lib_enc/ivas_sba_enc.c @@ -121,6 +121,10 @@ ivas_error ivas_sba_enc_reconfigure( SPAR_ENC_HANDLE hSpar; int16_t analysis_order_old; int16_t spar_reconfig_flag; +#ifdef FIX_DTX_428 + int16_t nbands_old; + int16_t ndir_old; +#endif spar_reconfig_flag = 0; nchan_transport_old = st_ivas->nchan_transport; @@ -128,14 +132,18 @@ ivas_error ivas_sba_enc_reconfigure( nSCE_old = st_ivas->nSCE; st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, hEncoderConfig->sba_order ); analysis_order_old = ivas_sba_get_analysis_order( hEncoderConfig->last_ivas_total_brate, hEncoderConfig->sba_order ); +#ifdef FIX_DTX_428 + nbands_old = st_ivas->hQMetaData->q_direction->cfg.nbands; + ndir_old = st_ivas->hQMetaData->no_directions; +#endif if ( analysis_order_old != st_ivas->sba_analysis_order ) { int16_t i, n_old; float **old_mem_hp20_in; - n_old = ivas_sba_get_nchan_metadata( analysis_order_old ); - n = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order ); + n_old = ( analysis_order_old + 1 ) * ( analysis_order_old + 1 ); + n = ( st_ivas->sba_analysis_order + 1 ) * ( st_ivas->sba_analysis_order + 1 ); if ( n > n_old ) { @@ -216,7 +224,7 @@ ivas_error ivas_sba_enc_reconfigure( { hEncoderConfig->element_mode_init = IVAS_CPE_MDCT; } - if ( nchan_transport_old != st_ivas->nchan_transport ) + if ( nchan_transport_old != st_ivas->nchan_transport || ( ivas_total_brate < IVAS_512k && hEncoderConfig->last_ivas_total_brate >= IVAS_512k ) || ( ivas_total_brate >= IVAS_512k && hEncoderConfig->last_ivas_total_brate < IVAS_512k ) ) { /* FB mixer handle */ if ( hDirAC->hFbMixer != NULL ) @@ -237,6 +245,24 @@ ivas_error ivas_sba_enc_reconfigure( { return error; } +#ifdef FIX_DTX_428 + if ( st_ivas->hQMetaData->q_direction->cfg.nbands != nbands_old || st_ivas->hQMetaData->no_directions != ndir_old ) + { + int16_t dir, j, i; + IVAS_QDIRECTION *q_direction = st_ivas->hQMetaData->q_direction; + for ( dir = 0; dir < st_ivas->hQMetaData->no_directions; dir++ ) + { + for ( j = 0; j < q_direction[dir].cfg.nbands; j++ ) + { + for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + q_direction[dir].band_data[j].energy_ratio_index[i] = 0; + q_direction[dir].band_data[j].energy_ratio_index_mod[i] = 0; + } + } + } + } +#endif mvs2s( hDirAC->dirac_to_spar_md_bands, hSpar->dirac_to_spar_md_bands, DIRAC_MAX_NBANDS ); hSpar->enc_param_start_band = hDirAC->hConfig->enc_param_start_band; /*-----------------------------------------------------------------* diff --git a/lib_enc/ivas_sce_enc.c b/lib_enc/ivas_sce_enc.c index c8577a85bae41f124907bdd60809cca4d529b7d6..1b3eac4f1af5e9203a536f9660c0c3b2c6141536 100644 --- a/lib_enc/ivas_sce_enc.c +++ b/lib_enc/ivas_sce_enc.c @@ -312,6 +312,14 @@ ivas_error create_sce_enc( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for MetaData structure\n" ) ); } + +#ifdef IND_LIST_DYN + /* set pointer to the buffer of metadata indices */ + hSCE->hMetaData->ind_list = st_ivas->ind_list_metadata; + hSCE->hMetaData->ivas_ind_list_zero = &st_ivas->ind_list_metadata; + hSCE->hMetaData->ivas_max_num_indices = &st_ivas->ivas_max_num_indices_metadata; + reset_indices_enc( hSCE->hMetaData, st_ivas->ivas_max_num_indices_metadata ); +#endif } else { @@ -332,7 +340,11 @@ ivas_error create_sce_enc( st->total_brate = hSCE->element_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ st->mct_chan_mode = MCT_CHAN_MODE_REGULAR; - if ( ( error = init_encoder( st, 0, st_ivas->hEncoderConfig->var_SID_rate_flag, st_ivas->hEncoderConfig->interval_SID, 0, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) + if ( ( error = init_encoder( st, +#ifdef IND_LIST_DYN + st_ivas, +#endif + 0, st_ivas->hEncoderConfig->var_SID_rate_flag, st_ivas->hEncoderConfig->interval_SID, 0, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_enc/ivas_sns_enc.c b/lib_enc/ivas_sns_enc.c index 7a93e335f21b775e1dda2463edc3391db354585f..5197a260b9ab0ad830176956a6c33a550cb8e522 100644 --- a/lib_enc/ivas_sns_enc.c +++ b/lib_enc/ivas_sns_enc.c @@ -38,10 +38,8 @@ #include "prot.h" #include "ivas_prot.h" #include "rom_com.h" -#ifdef SNS_MSVQ #include "ivas_rom_com.h" #include "ivas_cnst.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -55,7 +53,6 @@ *-------------------------------------------------------------------*/ /* r : codebook index */ -#ifdef FIX_445_SNS_BUGFIXES static int16_t sns_1st_cod( const float *sns, /* i : vector to quantize */ const int16_t L_frame, @@ -143,84 +140,6 @@ static int16_t sns_1st_cod( return index; } -#else -static int16_t sns_1st_cod( - const float *sns, /* i : vector to quantize */ - float *snsq /* i/o: i:prediction o:quantized sns */ -) -{ - int16_t i, j, index; - int16_t j0, j1, index0, index1; - float dist_min, dist, temp; - const float *p_dico; - - j0 = 0; - j1 = M / 2; - dist_min = 1.0e30f; - p_dico = sns_vq_cdk1; - index0 = 0; - - for ( i = 0; i < 32; i++ ) - { - dist = 0.0; - - for ( j = j0; j < j1; j++ ) - { - temp = sns[j] - *p_dico++; - dist += temp * temp; - } - - if ( dist < dist_min ) - { - dist_min = dist; - index0 = i; - } - } - - /* quantized vector */ - p_dico = &sns_vq_cdk1[index0 * ( M / 2 )]; - - for ( j = j0; j < j1; j++ ) - { - snsq[j] = *p_dico++; /* += cause it's differential */ - } - - j0 = M / 2; - j1 = M; - dist_min = 1.0e30f; - p_dico = sns_vq_cdk2; - index1 = 0; - - for ( i = 0; i < 32; i++ ) - { - dist = 0.0; - - for ( j = j0; j < j1; j++ ) - { - temp = sns[j] - *p_dico++; - dist += temp * temp; - } - - if ( dist < dist_min ) - { - dist_min = dist; - index1 = i; - } - } - - /* quantized vector */ - p_dico = &sns_vq_cdk2[index1 * ( M / 2 )]; - - for ( j = j0; j < j1; j++ ) - { - snsq[j] = *p_dico++; /* += cause it's differential */ - } - - index = index0 + ( index1 << 5 ); - - return index; -} -#endif /*------------------------------------------------------------------- @@ -293,9 +212,7 @@ void sns_avq_cod( float *snsmid_q, /* o : Quantized mid-LFS vectors */ int16_t *index, /* o : Quantization indices */ const int16_t core, /* i : core */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif const int16_t low_brate_mode /* i : flag low bit operating mode */ ) { @@ -303,11 +220,7 @@ void sns_avq_cod( float snsmid_q0[M]; int16_t indxt[256], nbits, nbt, nit; -#ifdef FIX_445_SNS_BUGFIXES index[0] = sns_1st_cod( sns, L_frame, core, sns_q ); -#else - index[0] = sns_1st_cod( sns, sns_q ); -#endif nit = 1 + 2; if ( !low_brate_mode ) { @@ -328,11 +241,7 @@ void sns_avq_cod( { index++; -#ifdef FIX_445_SNS_BUGFIXES index[0] = sns_1st_cod( snsmid, L_frame, core, snsmid_q ); -#else - index[0] = sns_1st_cod( snsmid, snsmid_q ); -#endif nit = 1 + 2; if ( !low_brate_mode ) { @@ -389,9 +298,7 @@ void sns_avq_cod( void sns_avq_cod_stereo( const float *snsl, /* i : Input sns vector (left channel) */ const float *snsr, /* i : Input sns vector (right channel) */ -#ifdef FIX_445_SNS_BUGFIXES const int16_t L_frame, -#endif float *snsl_q, /* o : Quantized sns vector (left channel) */ float *snsr_q, /* o : Quantized sns vector (right channel) */ int16_t *indexl, /* o : Quantization indices (left channel) */ @@ -435,11 +342,7 @@ void sns_avq_cod_stereo( } /* Quantize mid */ -#ifdef FIX_445_SNS_BUGFIXES indexl[0] = sns_1st_cod( mid, L_frame, TCX_20_CORE, mid_q ); -#else - indexl[0] = sns_1st_cod( mid, mid_q ); -#endif sns_2st_cod( mid, mid_q, &indexl[1] ); /* Quantize side */ @@ -479,26 +382,17 @@ void sns_avq_cod_stereo( *indexr++ = 1; /* Quantize left */ -#ifdef FIX_445_SNS_BUGFIXES indexl[0] = sns_1st_cod( snsl, L_frame, TCX_20_CORE, snsl_q ); -#else - indexl[0] = sns_1st_cod( snsl, snsl_q ); -#endif sns_2st_cod( snsl, snsl_q, &indexl[1] ); /* Quantize right */ -#ifdef FIX_445_SNS_BUGFIXES indexr[0] = sns_1st_cod( snsr, L_frame, TCX_20_CORE, snsr_q ); -#else - indexr[0] = sns_1st_cod( snsr, snsr_q ); -#endif sns_2st_cod( snsr, snsr_q, &indexr[1] ); } return; } -#ifdef SNS_MSVQ int16_t quantize_sns( float sns_in[CPE_CHANNELS][NB_DIV][M], float snsQ_out[CPE_CHANNELS][NB_DIV][M], @@ -511,9 +405,6 @@ int16_t quantize_sns( int16_t nbits, idxIndices; Encoder_State *st; float weights[M]; -#ifndef FIX_445_SNS_BUGFIXES - const float *means; -#endif nbits = 0; idxIndices = 0; @@ -525,7 +416,6 @@ int16_t quantize_sns( zero_side_flag[0] = 0; zero_side_flag[1] = 0; -#ifdef FIX_445_SNS_BUGFIXES /* use snsQ_out as buffer, move input vectors */ for ( ch = 0; ch < CPE_CHANNELS; ++ch ) { @@ -535,7 +425,6 @@ int16_t quantize_sns( mvr2r( sns_in[ch][k], snsQ_out[ch][k], M ); } } -#endif if ( sts[0]->core == sts[1]->core ) { @@ -543,50 +432,25 @@ int16_t quantize_sns( for ( k = 0; k < nSubframes; ++k ) { -#ifdef FIX_445_SNS_BUGFIXES float side[M]; -#else - float *side; -#endif float ener_side; -#ifdef FIX_445_SNS_BUGFIXES v_sub( snsQ_out[0][k], snsQ_out[1][k], side, M ); -#else - side = &snsQ_out[1][k][0]; - v_sub( sns_in[0][k], sns_in[1][k], side, M ); -#endif ener_side = dotp( side, side, M ); sns_stereo_mode[k] = ener_side < 12.f; zero_side_flag[k] = ener_side < 1.f; -#ifdef FIX_445_SNS_BUGFIXES if ( sns_stereo_mode[k] == SNS_STEREO_MODE_MS ) { convertToMS( M, snsQ_out[0][k], snsQ_out[1][k], 0.5f ); } -#endif } } /* prepare buffers depending on the chosen stereo mode */ -#ifndef FIX_445_SNS_BUGFIXES - /* remove means of L/R SNS parameters */ - for ( ch = 0; ch < CPE_CHANNELS; ++ch ) - { - st = sts[ch]; - nSubframes = ( st->core == TCX_20_CORE ) ? 1 : NB_DIV; - means = ( st->core == TCX_20_CORE ) ? ivas_sns_means_tcx20 : ivas_sns_means_tcx10; - for ( k = 0; k < nSubframes; ++k ) - { - v_sub( sns_in[ch][k], means, snsQ_out[ch][k], M ); - } - } -#endif -#ifdef FIX_445_SNS_BUGFIXES nSubframes = ( sts[0]->core == TCX_20_CORE ) ? 1 : NB_DIV; for ( k = 0; k < nSubframes; ++k ) { @@ -597,19 +461,6 @@ int16_t quantize_sns( convertToMS( M, snsQ_out[0][k], snsQ_out[1][k], 0.5f ); } } -#else - if ( sns_stereo_mode[0] == SNS_STEREO_MODE_MS || sns_stereo_mode[1] == SNS_STEREO_MODE_MS ) - { - nSubframes = ( sts[0]->core == TCX_20_CORE ) ? 1 : NB_DIV; - for ( k = 0; k < nSubframes; ++k ) - { - if ( sns_stereo_mode[k] == SNS_STEREO_MODE_MS ) - { - convertToMS( M, snsQ_out[0][k], snsQ_out[1][k], 0.5f ); - } - } - } -#endif for ( ch = 0; ch < CPE_CHANNELS; ++ch ) { @@ -639,16 +490,8 @@ int16_t quantize_sns( nStages = SNS_MSVQ_NSTAGES_SIDE; bits = ( st->core == TCX_20_CORE ) ? ivas_sns_cdbks_side_tcx20_bits : ivas_sns_cdbks_side_tcx10_bits; -#ifndef FIX_445_SNS_BUGFIXES - means = ( st->core == TCX_20_CORE ) ? ivas_sns_means_side_tcx20 : ivas_sns_means_side_tcx10; - - v_sub( sns_ptr, means, snsQ, M ); -#endif msvq_enc( side_cdbks, NULL, NULL, snsQ, side_levels, 3, nStages, weights, M, M, 0, NULL, &indices[idxIndices] ); msvq_dec( side_cdbks, NULL, NULL, nStages, M, M, &indices[idxIndices], 0, NULL, snsQ, NULL ); -#ifndef FIX_445_SNS_BUGFIXES - v_add( snsQ, means, snsQ, M ); -#endif } else { @@ -676,20 +519,6 @@ int16_t quantize_sns( } } -#ifndef FIX_445_SNS_BUGFIXES - /* add means back */ - for ( ch = 0; ch < CPE_CHANNELS; ++ch ) - { - st = sts[ch]; - nSubframes = ( st->core == TCX_20_CORE ) ? 1 : NB_DIV; - means = ( st->core == TCX_20_CORE ) ? ivas_sns_means_tcx20 : ivas_sns_means_tcx10; - for ( k = 0; k < nSubframes; ++k ) - { - v_add( snsQ_out[ch][k], means, snsQ_out[ch][k], M ); - } - } -#endif return nbits; } -#endif // SNS_MSVQ diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index b13bb4f20d0fd7aeb0d07d562bc1c3de74e2d3ed..39d1d6ead71169e342e9c841f70c8d142dc9fdca 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -66,6 +66,7 @@ ivas_error ivas_spar_enc_open( ENCODER_CONFIG_HANDLE hEncoderConfig; IVAS_FB_CFG *fb_cfg; int16_t nchan_inp, nchan_transport, sba_order_internal; + int16_t nchan_fb_in; int16_t table_idx, active_w_mixing; int32_t input_Fs, ivas_total_brate; ivas_error error; @@ -85,10 +86,29 @@ ivas_error ivas_spar_enc_open( input_Fs = hEncoderConfig->input_Fs; sba_order_internal = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); - nchan_inp = ivas_sba_get_nchan_metadata( sba_order_internal ); + nchan_inp = ivas_sba_get_nchan_metadata( sba_order_internal, + hEncoderConfig->ivas_total_brate ); assert( nchan_inp <= hEncoderConfig->nchan_inp ); ivas_total_brate = hEncoderConfig->ivas_total_brate; + nchan_fb_in = 0; + if ( st_ivas->sba_analysis_order == 1 ) + { + nchan_fb_in = FOA_CHANNELS; + } + else if ( st_ivas->sba_analysis_order == 2 ) + { + nchan_fb_in = 9; + } + else if ( st_ivas->sba_analysis_order == 3 ) + { + nchan_fb_in = 11; + } + else + { + assert( 0 && "sba_order must be 1,2, or 3!" ); + } + nchan_transport = ivas_get_sba_num_TCs( hEncoderConfig->ivas_total_brate, sba_order_internal ); // bw = ivas_get_bw_idx_from_sample_rate(pCfg->input_Fs); @@ -103,7 +123,8 @@ ivas_error ivas_spar_enc_open( /* set FB config. */ active_w_mixing = ivas_spar_br_table_consts[table_idx].active_w; - ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, nchan_inp, nchan_transport, active_w_mixing, input_Fs ); + ivas_fb_set_cfg( &fb_cfg, SBA_FORMAT, SBA_MODE_SPAR, nchan_inp, nchan_transport, active_w_mixing, input_Fs, + nchan_fb_in ); fb_cfg->remix_order = remix_order_set[hSpar->hMdEnc->spar_md_cfg.remix_unmix_order]; /* FB mixer handle */ @@ -202,7 +223,11 @@ ivas_error ivas_spar_enc_open( hSpar->hCoreCoderVAD->total_brate = hEncoderConfig->ivas_total_brate; /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */ hSpar->hCoreCoderVAD->mct_chan_mode = MCT_CHAN_MODE_IGNORE; - if ( ( error = init_encoder( hSpar->hCoreCoderVAD, 0, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 1, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) + if ( ( error = init_encoder( hSpar->hCoreCoderVAD, +#ifdef IND_LIST_DYN + st_ivas, +#endif + 0, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 1, st_ivas->ism_mode ) ) != IVAS_ERR_OK ) { return error; } @@ -389,10 +414,12 @@ static ivas_error ivas_spar_enc_process( float data_f[][L_FRAME48k] /* i/o: input/transport audio channels */ ) { - float pcm_tmp[IVAS_SPAR_MAX_CH][L_FRAME48k * 2]; - float *p_pcm_tmp[IVAS_SPAR_MAX_CH]; + float pcm_tmp[DIRAC_MAX_ANA_CHANS][L_FRAME48k * 2]; + float *p_pcm_tmp[DIRAC_MAX_ANA_CHANS]; + int16_t i, j, b, i_ts, input_frame, dtx_vad; int16_t transient_det[2]; + int32_t ivas_total_brate, input_Fs; float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; float *cov_dtx_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; @@ -404,14 +431,12 @@ static ivas_error ivas_spar_enc_process( SPAR_ENC_HANDLE hSpar = st_ivas->hSpar; IVAS_QMETADATA_HANDLE hQMetaData = st_ivas->hQMetaData; int16_t ts, l_ts, orig_dirac_bands, num_del_samples; + float *ppIn_FR_real[IVAS_SPAR_MAX_CH], *ppIn_FR_imag[IVAS_SPAR_MAX_CH]; -#ifdef SBA_TD_RESIDUAL float wyzx_del_buf[FOA_CHANNELS][IVAS_FB_1MS_48K_SAMP]; -#else - float w_del_buf[IVAS_FB_1MS_48K_SAMP]; -#endif float dir[3], avg_dir[3]; float energySum, vecLen; + int16_t nchan_fb_in; push_wmops( "ivas_spar_enc_process" ); @@ -427,11 +452,17 @@ static ivas_error ivas_spar_enc_process( input_frame = (int16_t) ( input_Fs / FRAMES_PER_SEC ); sba_order = min( st_ivas->sba_analysis_order, IVAS_MAX_SBA_ORDER ); - nchan_inp = ivas_sba_get_nchan_metadata( sba_order ); + nchan_inp = ivas_sba_get_nchan_metadata( sba_order, + hEncoderConfig->ivas_total_brate ); assert( nchan_inp <= hEncoderConfig->nchan_inp ); + int16_t active_w_vlbr; active_w_vlbr = ( hEncoderConfig->ivas_total_brate < IVAS_24k4 ) ? 1 : 0; - for ( i = FOA_CHANNELS + 1; i < nchan_inp; i++ ) + + nchan_fb_in = hSpar->hFbMixer->fb_cfg->nchan_fb_in; + nchan_transport = st_ivas->nchan_transport; + + for ( i = FOA_CHANNELS + 1; i < nchan_fb_in; i++ ) { mvr2r( data_f[HOA_keep_ind[i]], data_f[i], input_frame ); } @@ -441,17 +472,12 @@ static ivas_error ivas_spar_enc_process( *-----------------------------------------------------------------------------------------*/ ivas_transient_det_process( hSpar->hTranDet, data_f[0], input_frame, transient_det ); - if ( sba_order == 1 ) - { - transient_det[1] = transient_det[0]; - } if ( ivas_total_brate < IVAS_24k4 ) { transient_det[1] = 0; } /* store previous input samples for W in local buffer */ assert( num_del_samples <= IVAS_FB_1MS_48K_SAMP ); -#ifdef SBA_TD_RESIDUAL if ( hSpar->hFbMixer->fb_cfg->active_w_mixing == 0 ) { /* fill delay (1 ms) buffer for all Transport channels */ @@ -461,24 +487,22 @@ static ivas_error ivas_spar_enc_process( mvr2r( &hSpar->hFbMixer->ppFilterbank_prior_input[idx][hSpar->hFbMixer->fb_cfg->prior_input_length - num_del_samples], wyzx_del_buf[idx], num_del_samples ); } } -#else - mvr2r( &hSpar->hFbMixer->ppFilterbank_prior_input[0][hSpar->hFbMixer->fb_cfg->prior_input_length - num_del_samples], w_del_buf, num_del_samples ); -#endif /*-----------------------------------------------------------------------------------------* * FB mixer ingest *-----------------------------------------------------------------------------------------*/ - for ( i = 0; i < nchan_inp; i++ ) + for ( i = 0; i < nchan_fb_in; i++ ) { p_pcm_tmp[i] = pcm_tmp[i]; } /* run Filter Bank overlapping MDFT analysis first, then we can use the temporary buffer for Parameter MDFT analysis*/ - ivas_fb_mixer_pcm_ingest( hSpar->hFbMixer, data_f, p_pcm_tmp, input_frame ); + ivas_fb_mixer_pcm_ingest( hSpar->hFbMixer, data_f, p_pcm_tmp, input_frame, + hSpar->hMdEnc->HOA_md_ind ); /* prepare Parameter MDFT analysis */ - for ( i = 0; i < nchan_inp; i++ ) + for ( i = 0; i < nchan_fb_in; i++ ) { ppIn_FR_real[i] = p_pcm_tmp[i]; ppIn_FR_imag[i] = p_pcm_tmp[i] + input_frame; @@ -489,10 +513,13 @@ static ivas_error ivas_spar_enc_process( for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ ) { - ivas_fb_mixer_get_windowed_fr( hSpar->hFbMixer, p_pcm_tmp, ppIn_FR_real, ppIn_FR_imag, l_ts, l_ts ); - ivas_fb_mixer_update_prior_input( hSpar->hFbMixer, p_pcm_tmp, l_ts ); + ivas_fb_mixer_get_windowed_fr( hSpar->hFbMixer, p_pcm_tmp, ppIn_FR_real, ppIn_FR_imag, l_ts, l_ts, + nchan_fb_in ); + + ivas_fb_mixer_update_prior_input( hSpar->hFbMixer, p_pcm_tmp, l_ts, + nchan_fb_in ); - for ( i = 0; i < nchan_inp; i++ ) + for ( i = 0; i < nchan_fb_in; i++ ) { p_pcm_tmp[i] += l_ts; ppIn_FR_real[i] += l_ts; @@ -501,7 +528,7 @@ static ivas_error ivas_spar_enc_process( } /* turn pointers back to the local buffer, needed for the following processing */ - for ( i = 0; i < nchan_inp; i++ ) + for ( i = 0; i < nchan_fb_in; i++ ) { ppIn_FR_real[i] = pcm_tmp[i]; ppIn_FR_imag[i] = pcm_tmp[i] + input_frame; @@ -513,8 +540,10 @@ static ivas_error ivas_spar_enc_process( /*-----------------------------------------------------------------------------------------* * DirAC encoding *-----------------------------------------------------------------------------------------*/ - - ivas_dirac_param_est_enc( st_ivas->hDirAC, hQMetaData->q_direction, hQMetaData->useLowerRes, data_f, ppIn_FR_real, ppIn_FR_imag, input_frame, st_ivas->sba_mode ); + /*tyagiri: TODO: HODIRAC should be disabled for 256 kbps and outputs should be BE w.r.t baseline*/ + ivas_dirac_param_est_enc( st_ivas->hDirAC, hQMetaData->q_direction, hQMetaData->useLowerRes, data_f, ppIn_FR_real, ppIn_FR_imag, input_frame, st_ivas->sba_mode, + st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k, + st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k ? HOA2_CHANNELS : FOA_CHANNELS ); if ( hQMetaData->q_direction->cfg.nbands > 0 ) { @@ -524,14 +553,16 @@ static ivas_error ivas_spar_enc_process( { /* WB 4TC mode bit : disable for now*/ push_next_indice( hMetaData, 0, 1 ); - ivas_qmetadata_enc_encode( hMetaData, hQMetaData ); + + ivas_qmetadata_enc_encode( hMetaData, hQMetaData, + ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ); } else { hQMetaData->q_direction[0].cfg.nbands = DIRAC_DTX_BANDS; /* compute directions */ - for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + for ( i = 0; i < hQMetaData->q_direction[0].cfg.nblocks; i++ ) { set_zero( dir, 3 ); set_zero( avg_dir, 3 ); @@ -631,7 +662,19 @@ static ivas_error ivas_spar_enc_process( } } - ivas_enc_cov_handler_process( hSpar->hCovEnc, ppIn_FR_real, ppIn_FR_imag, cov_real, cov_dtx_real, hSpar->hFbMixer->pFb, 0, hSpar->hFbMixer->pFb->filterbank_num_bands, nchan_inp, dtx_vad, transient_det ); + ivas_enc_cov_handler_process( + hSpar->hCovEnc, + ppIn_FR_real, + ppIn_FR_imag, + cov_real, + cov_dtx_real, + hSpar->hFbMixer->pFb, + 0, + hSpar->hFbMixer->pFb->filterbank_num_bands, + nchan_inp, + dtx_vad, + transient_det, + hSpar->hMdEnc->HOA_md_ind ); nchan_transport = st_ivas->nchan_transport; /*-----------------------------------------------------------------------------------------* @@ -643,7 +686,7 @@ static ivas_error ivas_spar_enc_process( ivas_spar_md_enc_process( hSpar->hMdEnc, hEncoderConfig, cov_real, cov_dtx_real, hMetaData, dtx_vad, nchan_inp, sba_order, hSpar->hFbMixer->prior_mixer ); } - + if ( hSpar->hMdEnc->spar_hoa_dirac2spar_md_flag ) { float azi_dirac[IVAS_MAX_NUM_BANDS][MAX_PARAM_SPATIAL_SUBFRAMES]; float ele_dirac[IVAS_MAX_NUM_BANDS][MAX_PARAM_SPATIAL_SUBFRAMES]; @@ -660,8 +703,8 @@ static ivas_error ivas_spar_enc_process( dirac_band_idx = hSpar->dirac_to_spar_md_bands[b] - d_start_band; for ( i_ts = 0; i_ts < hQMetaData->q_direction->cfg.nblocks; i_ts++ ) { - azi_dirac[b][i_ts] = hQMetaData->q_direction->band_data[dirac_band_idx].azimuth[i_ts]; - ele_dirac[b][i_ts] = hQMetaData->q_direction->band_data[dirac_band_idx].elevation[i_ts]; + azi_dirac[b][i_ts] = hQMetaData->q_direction[0].band_data[dirac_band_idx].azimuth[i_ts]; + ele_dirac[b][i_ts] = hQMetaData->q_direction[0].band_data[dirac_band_idx].elevation[i_ts]; } diffuseness[b] = 1.0f - hQMetaData->q_direction->band_data[dirac_band_idx].energy_ratio[0]; } @@ -805,7 +848,6 @@ static ivas_error ivas_spar_enc_process( #ifdef DEBUG_SBA_AUDIO_DUMP ivas_spar_dump_signal_wav( input_frame, p_pcm_tmp, NULL, nchan_transport, spar_foa_enc_wav[1], "ivas_fb_mixer_process()" ); #endif -#ifdef SBA_TD_RESIDUAL if ( hSpar->hFbMixer->fb_cfg->active_w_mixing == 0 ) { /* delayed W */ @@ -821,14 +863,6 @@ static ivas_error ivas_spar_enc_process( v_add( data_f[idx], p_pcm_tmp[i] + num_del_samples, p_pcm_tmp[i] + num_del_samples, input_frame - num_del_samples ); } } -#else - /* move delayed W into output buffer unless activeW operation*/ - if ( hSpar->hFbMixer->fb_cfg->active_w_mixing == 0 ) - { - mvr2r( w_del_buf, p_pcm_tmp[0], num_del_samples ); - mvr2r( data_f[0], p_pcm_tmp[0] + num_del_samples, input_frame - num_del_samples ); - } -#endif #if 0 /* SBA_TD_RESIDUAL */ { static FILE *fid = 0; diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index cdfd6050ba872863a211f53c84c258bf1fcbc118..f93c9e6ca5fc88b38627278762fe1e829f72e2a5 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -119,7 +119,8 @@ ivas_error ivas_spar_md_enc_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR MD encoder" ); } - num_channels = ivas_sba_get_nchan_metadata( sba_order ); + num_channels = ivas_sba_get_nchan_metadata( sba_order, + hEncoderConfig->ivas_total_brate ); if ( ( hMdEnc->spar_md.band_coeffs = (ivas_band_coeffs_t *) malloc( IVAS_MAX_NUM_BANDS * sizeof( ivas_band_coeffs_t ) ) ) == NULL ) { @@ -314,9 +315,10 @@ ivas_error ivas_spar_md_enc_init( float PR_minmax[2]; int16_t num_channels, i, j, k; - hMdEnc->spar_hoa_md_flag = ivas_sba_get_spar_hoa_md_flag( sba_order, hEncoderConfig->ivas_total_brate ); - num_channels = ivas_sba_get_nchan_metadata( sba_order ); - + ivas_sba_get_spar_hoa_md_flag( sba_order, hEncoderConfig->ivas_total_brate, &hMdEnc->spar_hoa_md_flag, &hMdEnc->spar_hoa_dirac2spar_md_flag ); + num_channels = ivas_sba_get_nchan_metadata( sba_order, + hEncoderConfig->ivas_total_brate ); + ivas_sba_get_spar_hoa_ch_ind( num_channels, hEncoderConfig->ivas_total_brate, hMdEnc->HOA_md_ind ); table_idx = ivas_get_spar_table_idx( hEncoderConfig->ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); ivas_spar_set_bitrate_config( &hMdEnc->spar_md_cfg, table_idx, ( hMdEnc->spar_hoa_md_flag ) ? IVAS_MAX_NUM_BANDS : SPAR_DIRAC_SPLIT_START_BAND ); @@ -510,17 +512,29 @@ static void write_metadata_buffer( BSTR_ENC_HANDLE hMetaData_tmp, BSTR_ENC_HANDLE hMetaData, const int16_t bit_pos_start, - const int16_t next_ind_start, - const int16_t last_ind_start ) + const int16_t next_ind_start +#ifndef IND_LIST_DYN + , + const int16_t last_ind_start +#endif +) { int16_t i; if ( hMetaData->nb_bits_tot > 0 ) { - restore_metadata_buffer( hMetaData, next_ind_start, last_ind_start, bit_pos_start ); + restore_metadata_buffer( hMetaData, next_ind_start, +#ifndef IND_LIST_DYN + last_ind_start, +#endif + bit_pos_start ); } +#ifdef IND_LIST_DYN + for ( i = 0; i < hMetaData_tmp->nb_ind_tot; i++ ) +#else for ( i = 0; i < hMetaData_tmp->next_ind; i++ ) +#endif { push_next_indice( hMetaData, hMetaData_tmp->ind_list[i].value, hMetaData_tmp->ind_list[i].nb_bits ); } @@ -550,21 +564,28 @@ ivas_error ivas_spar_md_enc_process( { float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; float dm_fv_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; + int16_t i, j, b, qsi, ndm, ndec, num_ch, num_quant_strats; + int16_t planarCP; float pred_coeffs_re_local[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; - int16_t i, b, qsi, ndm, ndec, num_ch, num_quant_strats; - int16_t j, planarCP; int16_t k, bwidth, num_bands, num_bands_full, num_bands_bw; int16_t active_w, nchan_transport, dmx_switch, strat; int16_t nB, bands_bw, packed_ok = 0; ivas_strats_t cs[MAX_CODING_STRATS]; int16_t code_strat; - int16_t bit_pos_start, next_ind_start, last_ind_start; + int16_t bit_pos_start, next_ind_start; +#ifndef IND_LIST_DYN + int16_t last_ind_start; +#endif BSTR_ENC_DATA hMetaData_tmp; Indice ind_list_tmp[MAX_BITS_METADATA]; // IVAS_fmToDo: size to be optimized +#ifdef IND_LIST_DYN + int16_t max_num_indices_tmp; +#endif float Wscale[IVAS_MAX_NUM_BANDS]; num_quant_strats = hMdEnc->spar_md_cfg.num_quant_strats; - num_ch = ivas_sba_get_nchan_metadata( sba_order ); + num_ch = ivas_sba_get_nchan_metadata( sba_order, + hEncoderConfig->ivas_total_brate ); active_w = hMdEnc->spar_md_cfg.active_w; nchan_transport = hMdEnc->spar_md_cfg.nchan_transport; @@ -609,11 +630,20 @@ ivas_error ivas_spar_md_enc_process( } hMetaData_tmp.ind_list = ind_list_tmp; +#ifdef IND_LIST_DYN + max_num_indices_tmp = MAX_BITS_METADATA; + hMetaData_tmp.ivas_max_num_indices = &max_num_indices_tmp; + hMetaData_tmp.ivas_ind_list_zero = (Indice **) ( &hMetaData_tmp.ind_list ); +#endif /* Save state of metadata bitstream buffer */ bit_pos_start = hMetaData->nb_bits_tot; +#ifdef IND_LIST_DYN + next_ind_start = hMetaData->nb_ind_tot; +#else next_ind_start = hMetaData->next_ind; last_ind_start = hMetaData->last_ind; +#endif dmx_switch = 0; @@ -636,8 +666,7 @@ ivas_error ivas_spar_md_enc_process( nB = num_bands; bands_bw = 1; } - - if ( hMdEnc->spar_hoa_md_flag ) + if ( hMdEnc->spar_hoa_md_flag && hMdEnc->spar_hoa_dirac2spar_md_flag ) { for ( b = SPAR_DIRAC_SPLIT_START_BAND; b < num_bands; b++ ) { @@ -814,7 +843,7 @@ ivas_error ivas_spar_md_enc_process( } } - if ( hMdEnc->spar_hoa_md_flag ) + if ( hMdEnc->spar_hoa_md_flag && hMdEnc->spar_hoa_dirac2spar_md_flag ) { for ( b = SPAR_DIRAC_SPLIT_START_BAND; b < num_bands; b++ ) { @@ -925,7 +954,12 @@ ivas_error ivas_spar_md_enc_process( if ( hMetaData->nb_bits_tot == bit_pos_start || hMetaData_tmp.nb_bits_tot < ( hMetaData->nb_bits_tot - bit_pos_start ) ) { - write_metadata_buffer( &hMetaData_tmp, hMetaData, bit_pos_start, next_ind_start, last_ind_start ); + write_metadata_buffer( &hMetaData_tmp, hMetaData, bit_pos_start, next_ind_start +#ifndef IND_LIST_DYN + , + last_ind_start +#endif + ); code_strat = strat; } if ( hMetaData->nb_bits_tot - bit_pos_start + ( ( ( hEncoderConfig->ivas_total_brate == IVAS_256k ) && ( sba_order == SBA_FOA_ORDER ) ) ? 1 : 0 ) <= hMdEnc->spar_md_cfg.tgt_bits_per_blk ) @@ -1403,7 +1437,7 @@ static void ivas_get_huffman_coded_bs( pred_coeff_dim = ndm + ndec - 1; pred_offset = 0; - if ( hMdEnc->spar_hoa_md_flag ) + if ( hMdEnc->spar_hoa_md_flag && hMdEnc->spar_hoa_dirac2spar_md_flag ) { if ( i >= SPAR_DIRAC_SPLIT_START_BAND ) { @@ -1480,7 +1514,8 @@ static void ivas_get_arith_coded_bs( const int16_t strat, const int32_t ivas_total_brate ) { - int16_t i, j, any_diff; + int16_t i, any_diff; + int16_t j; ivas_cell_dim_t pred_cell_dims[IVAS_MAX_NUM_BANDS]; ivas_cell_dim_t drct_cell_dims[IVAS_MAX_NUM_BANDS]; ivas_cell_dim_t decd_cell_dims[IVAS_MAX_NUM_BANDS]; @@ -1493,6 +1528,7 @@ static void ivas_get_arith_coded_bs( int16_t ndm, ndec; ndm = hMdEnc->spar_md_cfg.num_dmx_chans_per_band[bands_bw * i]; ndec = hMdEnc->spar_md_cfg.num_decorr_per_band[bands_bw * i]; + if ( ( ivas_total_brate < IVAS_24k4 ) && ( strat > 3 ) && ( ( ( i % 2 == 1 ) && ( strat % 2 == 0 ) ) || ( ( i % 2 == 0 ) && ( strat % 2 == 1 ) ) ) ) { pred_cell_dims[i].dim1 = 0; @@ -1507,7 +1543,7 @@ static void ivas_get_arith_coded_bs( else { pred_cell_dims[i].dim1 = ndm + ndec - 1; - if ( hMdEnc->spar_hoa_md_flag ) + if ( hMdEnc->spar_hoa_md_flag && hMdEnc->spar_hoa_dirac2spar_md_flag ) { if ( i >= SPAR_DIRAC_SPLIT_START_BAND ) { @@ -1533,7 +1569,7 @@ static void ivas_get_arith_coded_bs( break; } } - if ( hMdEnc->spar_hoa_md_flag ) + if ( hMdEnc->spar_hoa_md_flag && hMdEnc->spar_hoa_dirac2spar_md_flag ) { for ( i = 0; i < nB; i++ ) { @@ -1563,7 +1599,7 @@ static void ivas_get_arith_coded_bs( ivas_arith_encode_cmplx_cell_array( &hMdEnc->arith_coeffs.pred_arith_re[qsi], &hMdEnc->arith_coeffs.pred_arith_re_diff[qsi], pDo_diff, nB, symbol_arr_re, symbol_arr_old_re, pred_cell_dims, hMetaData, any_diff ); - if ( hMdEnc->spar_hoa_md_flag ) + if ( hMdEnc->spar_hoa_md_flag && hMdEnc->spar_hoa_dirac2spar_md_flag ) { for ( i = 0; i < nB; i++ ) { diff --git a/lib_enc/ivas_stat_enc.h b/lib_enc/ivas_stat_enc.h index 9dfafbbc04fba7a832c29c042af618d7703dc179..daff0851ef2d8f58420cd6775ebffccc1d993bb2 100644 --- a/lib_enc/ivas_stat_enc.h +++ b/lib_enc/ivas_stat_enc.h @@ -81,6 +81,10 @@ typedef struct stereo_itd_data_struct int16_t prev_itd1; int16_t prev_itd2; +#ifdef HYBRID_ITD_MAX + /*flag for hybrid ITD for very large ITDs*/ + int16_t hybrid_itd_max; +#endif } ITD_DATA, *ITD_DATA_HANDLE; typedef struct dft_ana_struct @@ -315,6 +319,12 @@ typedef struct stereo_mdct_enc_data_structure typedef struct stereo_td_enc_data_structure { +#ifdef IND_LIST_DYN + BSTR_ENC_DATA tdm_hBstr_tmp; /* temporary bitstream structure holding TD stereo spatial parameters */ + Indice tdm_ind_list_tmp[MAX_IND_TDM_TMP]; /* temporary list of indices holding TD stereo spatial parameters */ + int16_t max_ind_tdm_tmp; /* maximum number of indices in the temporary list of indices holding TD stereo spatial parameters */ +#endif + int16_t tdm_lp_reuse_flag; /* Flag that indicate if it is possible to reuse the LP coefficient from the primary channel or not */ int16_t tdm_low_rate_mode; /* secondary channel low rate mode flag */ float tdm_Pri_pitch_buf[NB_SUBFR]; @@ -656,6 +666,8 @@ typedef struct ivas_spar_md_enc_state_t ivas_huff_coeffs_t huff_coeffs; int16_t table_idx; int16_t spar_hoa_md_flag; + int16_t spar_hoa_dirac2spar_md_flag; + int16_t HOA_md_ind[IVAS_SPAR_MAX_CH]; } ivas_spar_md_enc_state_t; /* PCA structure */ @@ -715,12 +727,26 @@ typedef struct ivas_param_mc_enc_data_structure } PARAM_MC_ENC_DATA, *PARAM_MC_ENC_HANDLE; +/*----------------------------------------------------------------------------------* + * MC ParamUpmix Mode encoder structures + *----------------------------------------------------------------------------------*/ +typedef struct ivas_mc_paramupmix_enc_data_structure +{ + ivas_trans_det_state_t *hTranDet[MC_PARAMUPMIX_COMBINATIONS * MC_PARAMUPMIX_NCH]; + IVAS_FB_MIXER_HANDLE hFbMixer; + ivas_enc_cov_handler_state_t *hCovEnc[MC_PARAMUPMIX_COMBINATIONS]; + float ***cov_real[MC_PARAMUPMIX_COMBINATIONS]; + float ***cov_dtx_real[MC_PARAMUPMIX_COMBINATIONS]; + float *midside[MC_PARAMUPMIX_COMBINATIONS][MC_PARAMUPMIX_NCH]; /* hold PCM of mid-side data */ + int32_t alpha_quant_prev[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + int32_t beta_quant_prev[MC_PARAMUPMIX_COMBINATIONS][IVAS_MAX_NUM_BANDS]; + bool first_frame; +} MC_PARAMUPMIX_ENC_DATA, *MC_PARAMUPMIX_ENC_HANDLE; /*----------------------------------------------------------------------------------* * MASA encoder structures *----------------------------------------------------------------------------------*/ -#ifdef FIX_398_MASA_DIRECTION_ALIGNMENT typedef struct ivas_masa_dir_align_struct { float previous_azi_dir1[MASA_FREQUENCY_BANDS]; @@ -730,7 +756,6 @@ typedef struct ivas_masa_dir_align_struct float previous_ele_dir2[MASA_FREQUENCY_BANDS]; } MASA_DIR_ALIGN_STATE, *MASA_DIR_ALIGN_HANDLE; -#endif /* structure storing MASA framing sync detection and compensation data */ typedef struct ivas_masa_sync_struct @@ -760,9 +785,7 @@ typedef struct ivas_masa_encoder_data_struct MASA_SYNC_STATE sync_state; -#ifdef FIX_398_MASA_DIRECTION_ALIGNMENT MASA_DIR_ALIGN_STATE dir_align_state; -#endif } MASA_ENCODER_DATA; @@ -806,8 +829,8 @@ typedef struct ivas_mcmasa_enc_data_structure float **buffer_intensity_real_vert; float *buffer_energy; - float chnlToFoaMtx[DIRAC_MAX_ANA_CHANS][MCMASA_MAX_ANA_CHANS]; - float chnlToFoaEvenMtx[DIRAC_MAX_ANA_CHANS][MCMASA_MAX_ANA_CHANS]; + float chnlToFoaMtx[FOA_CHANNELS][MCMASA_MAX_ANA_CHANS]; + float chnlToFoaEvenMtx[FOA_CHANNELS][MCMASA_MAX_ANA_CHANS]; float ls_azimuth[MCMASA_MAX_ANA_CHANS]; int16_t leftNearest[MCMASA_MAX_ANA_CHANS]; int16_t rightNearest[MCMASA_MAX_ANA_CHANS]; @@ -1062,6 +1085,13 @@ typedef struct { ENCODER_CONFIG_HANDLE hEncoderConfig; /* Encoder configuration structure */ +#ifdef IND_LIST_DYN + Indice *ind_list; /* List of indices */ + int16_t ivas_max_num_indices; /* Maximum allowed number of indices in the list */ + Indice *ind_list_metadata; /* List of indices for metadata */ + int16_t ivas_max_num_indices_metadata; /* Maximum allowed number of indices in the list of metadata */ +#endif + /* high-level encoder parameters */ int16_t nchan_transport; /* number of transport channels */ int16_t sba_analysis_order; /* Ambisonic (SBA) order used for analysis and coding */ @@ -1084,6 +1114,7 @@ typedef struct IVAS_QMETADATA_HANDLE hQMetaData; /* Metadata handle for q_metadata parametric spatial coding DirAC/MASA*/ MCT_ENC_HANDLE hMCT; /* MCT handle */ PARAM_MC_ENC_HANDLE hParamMC; /* Parametric MC handle */ + MC_PARAMUPMIX_ENC_HANDLE hMCParamUpmix; /* MC Param-Upmix handle */ MCMASA_ENC_HANDLE hMcMasa; /* Multi-channel MASA data handle */ LFE_ENC_HANDLE hLFE; /* LFE data handle */ diff --git a/lib_enc/ivas_stereo_cng_enc.c b/lib_enc/ivas_stereo_cng_enc.c index 2eb838bf5c5bbac673ae0308c93df86e4c972cf9..76f56532dc7a9f9917c228eefb9efc9524431d13 100644 --- a/lib_enc/ivas_stereo_cng_enc.c +++ b/lib_enc/ivas_stereo_cng_enc.c @@ -173,12 +173,7 @@ void stereo_dft_enc_sid_coh( int16_t alpha_level; int16_t n; -#ifdef FIX_418_SID_BITRATE nr_of_sid_stereo_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; -#else - /* TODO: still use old number of bits to keep bitexactness in output */ - nr_of_sid_stereo_bits = ( 4400 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; -#endif zeropad = 0; /* Encode coherence vector. Find best fixed predictor by minimizing prediction error on input vector. @@ -333,9 +328,6 @@ void stereo_dft_enc_sid_coh( ( *nb_bits )++; } -#ifndef FIX_418_SID_BITRATE - push_next_indice( hBstr, zeropad, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC ); -#endif return; } diff --git a/lib_enc/ivas_stereo_dft_enc.c b/lib_enc/ivas_stereo_dft_enc.c index dd07219780340c0b4343a888d14213ffb3bc476f..be4e0c06319f69172da4dfc0a71a4f27404fe5c0 100644 --- a/lib_enc/ivas_stereo_dft_enc.c +++ b/lib_enc/ivas_stereo_dft_enc.c @@ -294,9 +294,16 @@ ivas_error stereo_dft_enc_create( hStereoDft_loc->hConfig->force_mono_transmission = 0; stereo_dft_config( hStereoDft_loc->hConfig, IVAS_24k4, &tmpS, &tmpS ); - stereo_dft_hybrid_ITD_flag( hStereoDft_loc->hConfig, input_Fs ); + stereo_dft_enc_open( hStereoDft_loc, input_Fs, max_bwidth ); + stereo_dft_hybrid_ITD_flag( hStereoDft_loc->hConfig, input_Fs +#ifdef HYBRID_ITD_MAX + , + hStereoDft_loc->hItd->hybrid_itd_max +#endif + ); + *hStereoDft = hStereoDft_loc; return IVAS_ERR_OK; @@ -560,6 +567,9 @@ void stereo_enc_itd_init( hItd->prev_itd1 = 0; hItd->prev_itd2 = 0; +#ifdef HYBRID_ITD_MAX + hItd->hybrid_itd_max = 0; +#endif return; } diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index d2c0bc7fe1ec78ae00051af7f280b97fe93c1d2a..025729e0cdc3832e6487d73f76e1f8781f275130 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -115,11 +115,19 @@ static void set_band_limits( void stereo_dft_hybrid_ITD_flag( STEREO_DFT_CONFIG_DATA_HANDLE hConfig, /* o : DFT stereo configuration */ const int32_t input_Fs /* i : CPE element sampling rate */ +#ifdef HYBRID_ITD_MAX + , + const int16_t hybrid_itd_max /* i : flag for hybrid ITD for very large ITDs */ +#endif ) { if ( hConfig != NULL ) { - if ( hConfig->res_cod_mode || ( hConfig->ada_wb_res_cod_mode && input_Fs == 16000 ) ) + if ( hConfig->res_cod_mode || ( hConfig->ada_wb_res_cod_mode && input_Fs == 16000 ) +#ifdef HYBRID_ITD_MAX + || ( hybrid_itd_max == 1 ) +#endif + ) { hConfig->hybrid_itd_flag = 1; } @@ -642,6 +650,11 @@ void stereo_dft_enc_compute_itd( float cng_xcorr_filt; +#ifdef HYBRID_ITD_MAX + int16_t prev_itd_max; + int16_t itd_max_flip; +#endif + if ( hCPE->element_mode == IVAS_CPE_DFT ) { hStereoDft = hCPE->hStereoDft; @@ -1328,7 +1341,12 @@ void stereo_dft_enc_compute_itd( hItd->prev_sum_nrg_L_lb = sum_nrg_L_lb; mvr2r( xcorr_lb, hItd->prev_xcorr_lb, STEREO_DFT_XCORR_LB_MAX ); } - +#ifdef HYBRID_ITD_MAX + /*save previous flag*/ + prev_itd_max = hItd->hybrid_itd_max; + /* enable hybrid ITD handling for very large ITDs*/ + hItd->hybrid_itd_max = ( abs( itd ) > STEREO_DFT_ITD_MAX && abs( itd ) < STEREO_DFT_ITD_MAX_ANA && !hCPE->hCoreCoder[0]->sp_aud_decision0 && hCPE->element_brate < IVAS_32k ); +#endif /* Update memory */ hItd->prev_itd = itd; @@ -1343,7 +1361,7 @@ void stereo_dft_enc_compute_itd( #ifdef DEBUG_STEREO_CLF dbgwrite( &hItd->itd[k_offset], sizeof( float ), 1, 1, "res/ITD.x" ); #endif - + /* limit ITD range for MDCT stereo even more */ if ( hCPE->element_mode == IVAS_CPE_MDCT && fabsf( hItd->itd[k_offset] ) > ITD_MAX_MDCT ) { itd = 0; @@ -1353,7 +1371,25 @@ void stereo_dft_enc_compute_itd( hItd->deltaItd[k_offset] = hItd->itd[k_offset] - hItd->td_itd[k_offset]; - /* limit ITD range for MDCT stereo even more */ +#ifdef HYBRID_ITD_MAX + if ( hItd->hybrid_itd_max ) + { + /*check if there is an ITD flip*/ + itd_max_flip = ( hItd->itd[k_offset] * hItd->itd[k_offset - 1] < 0 ); + + if ( hItd->deltaItd[k_offset - 1] != 0 && itd_max_flip == 0 ) + { + int16_t tmp_itd = (int16_t) floor( ( ( hItd->prev_itd ) * ( (float) input_frame / 640 ) ) + 0.5f ); + hItd->deltaItd[k_offset] = -1.0f * tmp_itd - hItd->td_itd[k_offset]; + } + } + /*signal change for next frame*/ + if ( prev_itd_max == 1 && hItd->hybrid_itd_max == 0 ) + { + hItd->hybrid_itd_max = -1; + } +#endif + #ifdef DEBUG_MODE_DFT { int16_t tmp; diff --git a/lib_enc/ivas_stereo_dft_td_itd.c b/lib_enc/ivas_stereo_dft_td_itd.c index b7fb95422f3136080892b0df097b65719ef747c6..27a71dfae477f0d3702d266163887e9204d73f00 100644 --- a/lib_enc/ivas_stereo_dft_td_itd.c +++ b/lib_enc/ivas_stereo_dft_td_itd.c @@ -271,11 +271,18 @@ void stereo_td_itd( hITD->td_itd_32k[i] = hITD->td_itd_32k[i + 1]; } } +#ifdef HYBRID_ITD_MAX + /*reset TD ITDs in case of hybrid itd_max change - turn hybrid ITD off*/ + if ( hITD->hybrid_itd_max == -1 && hybrid_itd_flag == 0 ) + { + hITD->td_itd[k_offset] = 0; + hITD->td_itd_32k[k_offset] = 0; + } +#endif if ( hybrid_itd_flag == 0 ) { return; } - stereo_td_get_td_itd( &( hITD->td_itd[k_offset] ), &( hITD->td_itd_32k[k_offset] ), hITD->itd[k_offset], sts[0]->input_Fs ); /* initializations*/ diff --git a/lib_enc/ivas_stereo_mdct_core_enc.c b/lib_enc/ivas_stereo_mdct_core_enc.c index 2e739cc90651f43dc4f4d7d9adb4e733425e15fd..03fcad485a8493450e60aa5f673c257d11a2444c 100644 --- a/lib_enc/ivas_stereo_mdct_core_enc.c +++ b/lib_enc/ivas_stereo_mdct_core_enc.c @@ -362,7 +362,13 @@ void stereo_mdct_core_enc( for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { st = sts[ch]; - +#ifdef IND_LIST_DYN + /* update the pointer to the buffer of indices of the second channel */ + if ( ch == 1 ) + { + st->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif ProcessIGF( st, st->hTcxEnc->spectrum[n], orig_spectrum[ch][n], &powerSpec[ch][n * L_subframeTCX], st->core == TCX_20_CORE, n, hCPE->hCoreCoder[0]->sp_aud_decision0, 0 ); } } @@ -373,6 +379,13 @@ void stereo_mdct_core_enc( for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { st = sts[ch]; +#ifdef IND_LIST_DYN + /* update the pointer to the buffer of indices of the second channel */ + if ( ch == 1 ) + { + st->hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif nSubframes = ( st->hTcxEnc->tcxMode == TCX_20 ) ? 1 : NB_DIV; if ( st->igf ) { diff --git a/lib_enc/ivas_stereo_td_enc.c b/lib_enc/ivas_stereo_td_enc.c index 3857795dceadc5a1f43a07939971f77ac20dcd90..2357e307c56bb49cd1b862f7dd57ee15b8220433 100644 --- a/lib_enc/ivas_stereo_td_enc.c +++ b/lib_enc/ivas_stereo_td_enc.c @@ -124,6 +124,14 @@ void stereo_td_init_enc( hStereoTD->tdm_prev_desired_idx = LRTD_STEREO_LEFT_IS_PRIM; } +#ifdef IND_LIST_DYN + hStereoTD->tdm_hBstr_tmp.ind_list = hStereoTD->tdm_ind_list_tmp; + hStereoTD->tdm_hBstr_tmp.ivas_ind_list_zero = (Indice **) ( &hStereoTD->tdm_hBstr_tmp.ind_list ); + hStereoTD->max_ind_tdm_tmp = MAX_IND_TDM_TMP; + hStereoTD->tdm_hBstr_tmp.ivas_max_num_indices = &hStereoTD->max_ind_tdm_tmp; + reset_indices_enc( &hStereoTD->tdm_hBstr_tmp, MAX_IND_TDM_TMP ); +#endif + return; } @@ -314,12 +322,16 @@ void tdm_configure_enc( int16_t tdm_ratio_bit_alloc_idx, mod_ct; STEREO_TD_ENC_DATA_HANDLE hStereoTD; Encoder_State **sts; +#ifndef IND_LIST_DYN BSTR_ENC_HANDLE hBstr; +#endif int16_t loc_coder_tyape_raw0; hStereoTD = hCPE->hStereoTD; sts = hCPE->hCoreCoder; +#ifndef IND_LIST_DYN hBstr = sts[1]->hBstr; +#endif loc_coder_tyape_raw0 = sts[0]->coder_type_raw; /*----------------------------------------------------------------* @@ -475,6 +487,46 @@ void tdm_configure_enc( * Bitstream writing *----------------------------------------------------------------*/ +#ifdef IND_LIST_DYN + /* transmit the ratio index */ + if ( tdm_SM_or_LRTD_Pri && hStereoTD->tdm_LRTD_flag == 0 ) + { + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, tdm_ratio_idx_SM, TDM_RATIO_BITS ); + } + else + { + if ( hStereoTD->tdm_LRTD_flag == 1 ) + { + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, hStereoTD->tdm_inst_ratio_idx, TDM_RATIO_BITS ); + } + else + { + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, tdm_ratio_idx, TDM_RATIO_BITS ); + } + } + + /* LPC reuse flag */ + if ( sts[1]->coder_type == INACTIVE && tdm_ratio_idx < 29 && tdm_ratio_idx > 1 ) + { + /* normal TD, tdm_lp_reuse_flag always on, tdm_use_IAWB_Ave_lpc varies tdm_ratio_idx<29 && tdm_ratio_idx> 1*/ + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_LPC_REUSE, hStereoTD->tdm_use_IAWB_Ave_lpc, TDM_LP_REUSE_BITS ); + } + else + { + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_LPC_REUSE, hStereoTD->tdm_lp_reuse_flag, TDM_LP_REUSE_BITS ); + } + + /* LRTD flag */ + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_LRTD_FLAG, hStereoTD->tdm_LRTD_flag, TDM_LR_CONTENT_BITS ); + + /* Stereo ICA parameters */ + if ( hStereoTD->tdm_LRTD_flag == 0 ) + { + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_REFCHAN, hCPE->hStereoTCA->refChanIndx, STEREO_BITS_TCA_CHAN ); + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_CORRSTATS, hCPE->hStereoTCA->indx_ica_NCShift, STEREO_BITS_TCA_CORRSTATS ); + push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_GD, hCPE->hStereoTCA->indx_ica_gD, STEREO_BITS_TCA_GD ); + } +#else /* transmit the ratio index */ if ( tdm_SM_or_LRTD_Pri && hStereoTD->tdm_LRTD_flag == 0 ) { @@ -513,12 +565,14 @@ void tdm_configure_enc( push_indice( hBstr, IND_STEREO_CORRSTATS, hCPE->hStereoTCA->indx_ica_NCShift, STEREO_BITS_TCA_CORRSTATS ); push_indice( hBstr, IND_STEREO_GD, hCPE->hStereoTCA->indx_ica_gD, STEREO_BITS_TCA_GD ); } +#endif #ifdef DEBUG_MODE_TD dbgwrite( &hStereoTD->tdm_low_rate_mode, 2, 1, 320, "res/tdm_low_rate_mode" ); dbgwrite( &hStereoTD->tdm_lp_reuse_flag, 2, 1, 320, "res/tdm_lp_reuse_flag" ); dbgwrite( &mod_ct, 2, 1, 320, "res/mod_ct.enx" ); #endif + /*----------------------------------------------------------------* * Updates *----------------------------------------------------------------*/ diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c old mode 100644 new mode 100755 index 45d4c856837432451c385ce5b194b79591cb519e..240cbb0e5a54ef73e75d36af5a83e330167735e7 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -35,11 +35,13 @@ #include "prot.h" #include #include +#include #include #ifdef DEBUGGING #include "debug.h" #endif #include "wmc_auto.h" +#include "options.h" /*---------------------------------------------------------------------* * Local struct @@ -48,8 +50,12 @@ struct IVAS_ENC { Encoder_Struct *st_ivas; - Indice ind_list[MAX_NUM_DATA][MAX_NUM_INDICES]; /* list of indices */ +#ifndef IND_LIST_DYN + Indice ind_list[MAX_NUM_DATA][MAX_NUM_INDICES]; /* list of indices */ +#endif +#ifndef IND_LIST_DYN Indice ind_list_metadata[MAX_NUM_METADATA][MAX_BITS_METADATA]; /* list of indices for metadata */ +#endif ENC_CORE_HANDLE hCoreCoder; bool isConfigured; #ifdef DEBUGGING @@ -100,7 +106,9 @@ ivas_error IVAS_ENC_Open( ) { Encoder_Struct *st_ivas; +#ifndef IND_LIST_DYN int16_t i, j; +#endif if ( phIvasEnc == NULL ) { @@ -135,6 +143,7 @@ ivas_error IVAS_ENC_Open( * Initialize indices *-----------------------------------------------------------------*/ +#ifndef IND_LIST_DYN for ( i = 0; i < MAX_NUM_DATA; ++i ) { for ( j = 0; j < MAX_NUM_INDICES; ++j ) @@ -143,7 +152,9 @@ ivas_error IVAS_ENC_Open( ( *phIvasEnc )->ind_list[i][j].value = 0; } } +#endif +#ifndef IND_LIST_DYN for ( i = 0; i < MAX_NUM_METADATA; ++i ) { for ( j = 0; j < MAX_BITS_METADATA; ++j ) @@ -152,6 +163,7 @@ ivas_error IVAS_ENC_Open( ( *phIvasEnc )->ind_list_metadata[i][j].value = 0; } } +#endif /*-----------------------------------------------------------------* * Allocate IVAS-codec encoder state @@ -179,6 +191,11 @@ ivas_error IVAS_ENC_Open( /* initialize pointers to handles to NULL */ ivas_initialize_handles_enc( st_ivas ); +#ifdef IND_LIST_DYN + st_ivas->ind_list = NULL; + st_ivas->ind_list_metadata = NULL; +#endif + /* set high-level parameters */ st_ivas->mc_mode = MC_MODE_NONE; st_ivas->ism_mode = ISM_MODE_NONE; @@ -430,7 +447,7 @@ ivas_error IVAS_ENC_FeedObjectMetadata( return IVAS_ERR_INDEX_OUT_OF_BOUNDS; } - error = ivas_set_ism_metadata( hIvasEnc->st_ivas->hIsmMetaData[ismIndex], metadata.azimuth, metadata.elevation, metadata.radius, metadata.yaw, metadata.pitch ); + error = ivas_set_ism_metadata( hIvasEnc->st_ivas->hIsmMetaData[ismIndex], metadata.azimuth, metadata.elevation, metadata.radius, metadata.yaw, metadata.pitch, metadata.non_diegetic_flag ); if ( error != IVAS_ERR_OK ) { @@ -908,7 +925,16 @@ static ivas_error configureEncoder( * Finalize initialization *-----------------------------------------------------------------*/ - if ( ( error = ivas_init_encoder( st_ivas, hIvasEnc->ind_list, hIvasEnc->ind_list_metadata ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_init_encoder( st_ivas +#ifndef IND_LIST_DYN + , + hIvasEnc->ind_list +#endif +#ifndef IND_LIST_DYN + , + hIvasEnc->ind_list_metadata +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -1049,6 +1075,9 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( ENCODER_CONFIG_HANDLE hEncoderConfig; ENC_CORE_HANDLE hCoreCoder; int16_t i; +#ifdef IND_LIST_DYN + int16_t n, ch; +#endif ivas_error error; error = IVAS_ERR_OK; @@ -1116,6 +1145,89 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( hIvasEnc->switchingActive = true; } +#ifdef IND_LIST_DYN + /*-----------------------------------------------------------------* + * Re-allocate and re-initialize buffer of indices if IVAS total bitrate has changed + *-----------------------------------------------------------------*/ + + if ( hEncoderConfig->ivas_total_brate != hEncoderConfig->last_ivas_total_brate ) + { + /* de-allocate old buffer of indices */ + free( st_ivas->ind_list ); + + /* set the maximum allowed number of indices in the list */ + st_ivas->ivas_max_num_indices = get_ivas_max_num_indices( hEncoderConfig->ivas_format, hEncoderConfig->ivas_total_brate ); + + /* allocate new buffer of indices */ + if ( ( st_ivas->ind_list = (INDICE_HANDLE) malloc( st_ivas->ivas_max_num_indices * sizeof( Indice ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for buffer of indices!\n" ) ); + } + + /* reset the list of indices */ + for ( i = 0; i < st_ivas->ivas_max_num_indices; i++ ) + { + st_ivas->ind_list[i].nb_bits = -1; + } + + /* de-allocate old buffer of metadata indices */ + if ( st_ivas->ind_list_metadata != NULL ) + { + free( st_ivas->ind_list_metadata ); + } + + /* set the maximum allowed number of metadata indices in the list */ + st_ivas->ivas_max_num_indices_metadata = get_ivas_max_num_indices_metadata( hEncoderConfig->ivas_format, hEncoderConfig->ivas_total_brate ); + + if ( st_ivas->ivas_max_num_indices_metadata > 0 ) + { + /* allocate new buffer of metadata indices */ + if ( ( st_ivas->ind_list_metadata = (INDICE_HANDLE) malloc( st_ivas->ivas_max_num_indices_metadata * sizeof( Indice ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for buffer of metadata indices!\n" ) ); + } + + /* reset the list of metadata indices */ + for ( i = 0; i < st_ivas->ivas_max_num_indices_metadata; i++ ) + { + st_ivas->ind_list_metadata[i].nb_bits = -1; + } + } + else + { + st_ivas->ind_list_metadata = NULL; + } + + /* set pointers to the new buffers of indices in each element */ + for ( n = 0; n < st_ivas->nSCE; n++ ) + { + st_ivas->hSCE[n]->hCoreCoder[0]->hBstr->ind_list = st_ivas->ind_list; + st_ivas->hSCE[n]->hCoreCoder[0]->hBstr->ivas_ind_list_zero = &st_ivas->ind_list; + + if ( st_ivas->hSCE[n]->hMetaData != NULL ) + { + st_ivas->hSCE[n]->hMetaData->ind_list = st_ivas->ind_list_metadata; + st_ivas->hSCE[n]->hMetaData->ivas_ind_list_zero = &st_ivas->ind_list_metadata; + } + } + + for ( n = 0; n < st_ivas->nCPE; n++ ) + { + for ( ch = 0; ch < CPE_CHANNELS; ch++ ) + { + st_ivas->hCPE[n]->hCoreCoder[ch]->hBstr->ind_list = st_ivas->ind_list; + st_ivas->hCPE[n]->hCoreCoder[ch]->hBstr->ivas_ind_list_zero = &st_ivas->ind_list; + } + + if ( st_ivas->hCPE[n]->hMetaData != NULL ) + { + st_ivas->hCPE[n]->hMetaData->ind_list = st_ivas->ind_list_metadata; + st_ivas->hCPE[n]->hMetaData->ivas_ind_list_zero = &st_ivas->ind_list_metadata; + } + } + } +#endif + if ( hIvasEnc->switchingActive && hEncoderConfig->ivas_format == MONO_FORMAT ) { copy_encoder_config( st_ivas, hCoreCoder, 0 ); diff --git a/lib_enc/lib_enc.h b/lib_enc/lib_enc.h index 349c41ebef721a1b65be35235e7a17e63a1de4e4..a4a3726b45003fba91b8c9163cc77f0876216be6 100644 --- a/lib_enc/lib_enc.h +++ b/lib_enc/lib_enc.h @@ -94,6 +94,13 @@ typedef enum _IVAS_ENC_MASA_VARIANT IVAS_ENC_MASA_UNDEFINED = 0xffff } IVAS_ENC_MASA_VARIANT; +typedef enum _IVAS_ENC_COMPLEXITY_LEVEL +{ + IVAS_ENC_COMPLEXITY_LEVEL_ONE = 1, + IVAS_ENC_COMPLEXITY_LEVEL_TWO = 2, + IVAS_ENC_COMPLEXITY_LEVEL_THREE = 3 +} IVAS_ENC_COMPLEXITY_LEVEL; + #ifdef DEBUGGING typedef enum _IVAS_ENC_STEREO_MODE { diff --git a/lib_enc/lsf_msvq_ma_enc.c b/lib_enc/lsf_msvq_ma_enc.c index 0f7a798a75a8971530b55965a1ae43a7cb1b5a64..9c7bed762948c8b29da305cca7bd148f4f5adad1 100644 --- a/lib_enc/lsf_msvq_ma_enc.c +++ b/lib_enc/lsf_msvq_ma_enc.c @@ -54,8 +54,6 @@ // void dctT2_N_apply_matrix( const float *input, float *output, const int16_t dct_dim, int16_t fdcngvq_dim, const float *idctT2_24_X_matrixQ16, const int16_t matrix_1st_dim, DCTTYPE dcttype ); -#ifdef ERI_MSVQ_CLEANUP - int16_t msvq_stage1_dct_search( /* o : (p_max , best candidate sofar ) */ const float *u, /* i : target */ @@ -304,7 +302,6 @@ int16_t msvq_stage1_dct_recalc_candidates_fdcng_wb( return p_max_local; } -#endif /*--------------------------------------------------------------------------* @@ -337,36 +334,9 @@ void msvq_enc( float resid_buf[2 * LSFMBEST_MAX * M_MAX], dist_buf[2 * LSFMBEST_MAX], Tmp[M_MAX]; int16_t idx_buf[2 * LSFMBEST_MAX * MAX_VQ_STAGES_USED], parents[LSFMBEST_MAX]; int16_t n, maxn, start; -#ifndef ERI_MSVQ_CLEANUP - /* buffers */ - float dct_target[FDCNG_VQ_DCT_MAXTRUNC]; - float u_mr[FDCNG_VQ_MAX_LEN]; - float u_mr_scaled[FDCNG_VQ_MAX_LEN]; - float mse_trunc_all_segms; - float mse_trunc_segm[FDCNG_VQ_DCT_NSEGM]; - float mse; - - const Word8 *cbpW8; - const Word16 *dct_col_shift_tab; - - float *st1_mse_pair; - int16_t *st1_idx_pair; + float *st1_syn_vec_ptr; /* ptr to buffer in dynRAM */ + float *st1_mse_ptr; /* ptr to buffer in existing dRAM used for stage 1 candidate analysis */ int16_t indices_st1_local[FDCNG_VQ_DCT_NSEGM * 2]; /* after stage#1 DCT search this is copied to the global indices[1][s*stages] structure */ - int16_t n_ana, p_mins[2], idx_min[2]; - DCTTYPE dcttype = DCT_T2_24_XX; - float tmp2; - - int16_t check_ind[FDCNG_VQ_DCT_NPOST]; - int16_t segm, j_full, maxC_pre; -#endif - float *st1_syn_vec_ptr; /* ptr to buffer in dynRAM */ - float *st1_mse_ptr; /* ptr to buffer in existing dRAM used for stage 1 candidate analysis */ -#ifdef ERI_MSVQ_CLEANUP - int16_t indices_st1_local[FDCNG_VQ_DCT_NSEGM * 2]; /* after stage#1 DCT search this is copied to the global indices[1][s*stages] structure */ -#else - float res24, high_diff[FDCNG_VQ_MAX_LEN - FDCNG_VQ_MAX_LEN_WB]; - maxC_pre = ( FDCNG_VQ_DCT_NSEGM * 2 ); -#endif assert( maxC <= LSFMBEST_MAX ); assert( ( LSFMBEST_MAX * M_MAX ) > ( N * maxC ) ); /* top of resid_buf is resid[1] and used for stage#1 residuals (input target u), @@ -375,10 +345,6 @@ void msvq_enc( st1_syn_vec_ptr = &( resid_buf[1 * LSFMBEST_MAX * M_MAX] ) - FDCNG_VQ_MAX_LEN * maxC; /* reuse top of resid[0] scratch RAM for residual */ -#ifndef ERI_MSVQ_CLEANUP - dcttype = DCT_T2_24_XX; -#endif - /*----------------------------------------------------------------* * Allocate memory for previous (parent) and current nodes. @@ -462,7 +428,6 @@ void msvq_enc( dist[1][j] = FLT_MAX; } -#ifdef ERI_MSVQ_CLEANUP if ( !s && applyDCT_flag != 0 ) /* means: m==1 */ { /* stage 1 candidates search in truncated dct24 domain without any weights */ @@ -495,167 +460,6 @@ void msvq_enc( indices[1][c * stages] = indices_st1_local[c]; } } -#else - if ( !s && applyDCT_flag != 0 ) /* means: m==1 */ - { /* stage 1 search in truncated dct domain without any weights */ - - n_ana = FDCNG_VQ_MAX_LEN; /* VQ stage#1 core is always using stored DCT24 coeffs */ - /*remove mean/mid fdcng stage#1 vector, in original subband domain */ - v_sub( u, cdk1r_tr_midQ_truncQ, u_mr, n_ana ); - - v_multc( u_mr, fdcng_dct_invScaleF[1], u_mr_scaled, n_ana ); /*scale up target to upscaled W8x storage domain */ - /* 16.0-->scale up from Q0 to search domain in Q4, not really needed in BASOP , impl. by shifts */ - - assert( n_ana >= FDCNG_VQ_DCT_MAXTRUNC ); /* check for WB , SWB, FB operation */ - - dctT2_N_apply_matrix( (const float *) u_mr_scaled, dct_target, min( FDCNG_VQ_DCT_MAXTRUNC, n_ana ), n_ana, invTrfMatrix, FDCNG_VQ_DCT_MAXTRUNC, dcttype ); - - mse_trunc_all_segms = 0; - mse = 0; - - /* init search state ptr's at the top */ - for ( segm = 0; segm < FDCNG_VQ_DCT_NSEGM; segm++ ) - { - /* point to a new paired location */ - st1_mse_pair = &( dist[1][2 * segm] ); /* req. ptr init +=2 */ - st1_mse_pair[0] = FLT_MAX; /* req */ - st1_mse_pair[1] = FLT_MAX; /* req */ - st1_idx_pair = &( indices_st1_local[2 * segm] ); /* +=2 */ - p_max = 0; /* req. to point to 1 or 0 */ - - /* compute segment common trunction error in dct domain */ - mse_trunc_segm[segm] = mse_trunc_all_segms; - mse_trunc_segm[segm] += sum2_f( (const float *) ( &( dct_target[cdk1_ivas_cols_per_segment[segm]] ) ), cdk1_ivas_trunc_dct_cols_per_segment[segm] ); - - cbpW8 = cdk_37bits_ivas_stage1_W8Qx_dct_sections[segm]; /* Word8 column variable Qx storage*/ - - for ( j = 0; j < cdk1_ivas_entries_per_segment[segm]; j++ ) - { - /* unweighted segmented search DCT domain loop */ - j_full = j + cdk1_ivas_cum_entries_per_segment[segm]; /* or simply use j_full++ */ - - mse = mse_trunc_segm[segm]; /* move32() init mse with with common mse truncation part */ - - dct_col_shift_tab = stage1_dct_col_syn_shift[segm]; /* ptr init */ - - for ( c2 = 0; c2 < cdk1_ivas_cols_per_segment[segm]; c2++ ) - { - -#define WMC_TOOL_SKIP - tmp = dct_target[c2] - (float) ( ( (Word16) cbpW8[c2] ) << dct_col_shift_tab[c2] ); /* Word8 storage MSE inner loop */ - LOGIC( 1 ); - SHIFT( 1 ); - ADD( 1 ); /* in BASOP: s_and(for W8->W16), shl(), sub()*/ -#undef WMC_TOOL_SKIP - - mse += tmp * tmp; /* L_mac or L_mac0() square Word16 -> Word32*/ - } - st1_mse_ptr[j_full] = mse; /* save MSE in shared dynamic 2^7=128 RAM, move32() in BASOP */ - -#define WMC_TOOL_SKIP - cbpW8 += cdk1_ivas_cols_per_segment[segm]; /* pointer increment */ -#undef WMC_TOOL_SKIP - /* overwrite with a new worst index at p_max */ - - /* The three inner loop if's below are not really properly instrumented by WMC tool */ - /* a ptr to worst index will be in use */ - if ( mse < st1_mse_pair[p_max] ) /* L_sub */ - { - st1_idx_pair[p_max] = j_full; /* simplified */ - } /* BASOP 2 ops */ - - if ( st1_idx_pair[p_max] == j_full ) /* simplified */ - { /*idx updated to j_full --> also update mse */ - st1_mse_pair[p_max] = mse; /* move32(), single BASOP */ - } /* BASOP 3 ops */ - /* avoid WC costly list management by always updating p_max, as we have only a pair to maintain */ - p_max = 0; /* move16() */ - if ( ( st1_mse_pair[0] - st1_mse_pair[1] ) < 0 ) /* L_sub()*/ - { - p_max = 1; /* move16() */ - } /* BASOP 3 ops ,Note 2 ops possible in BASOP with L_sub and L_lshr */ - - /* Note: logical shift right not available in ANSI-C */ - /* p_max = (st1_mse_pair[0] - st1_mse_pair[1]) ">>>" 31; */ - /* in java logical shift right is available as >>> , in BASOP it is L_lshr */ - - /* Cost: weighted sum with cond moves ('if') => 8 in float , 7 in BASOP with L_lshr */ - } /* j in section */ - - } /* next segment */ - - for ( j = 0; j < maxC_pre; j++ ) - { - /* compute_full mse using stored DCT24 domain MSE's */ - /* calculate MSE from stage1 inner using existing inner DCT domain variables */ - dist[1][j] *= fdcng_dct_scaleF[2]; /* single multiplication to get the MSE scale to the correct input domain */ - } - - p_max = maximum( dist[1], maxC_pre, NULL ); /* establish current worst candidate for stage#2 among all maxC_pre candidates */ - - p_mins[0] = minimum( dist[1], maxC_pre, NULL ); /* find best entry among all maxC_pre */ - tmp = dist[1][p_mins[0]]; - dist[1][p_mins[0]] = FLT_MAX; /* exclude 1st */ - - p_mins[1] = minimum( dist[1], maxC_pre, NULL ); /* find 2nd best entry */ - tmp2 = dist[1][p_mins[1]]; - dist[1][p_mins[1]] = FLT_MAX; /* exclude 2nd*/ - - dist[1][p_mins[0]] = tmp; /* restore 1st */ - dist[1][p_mins[1]] = tmp2; /* restore 2nd */ - - idx_min[0] = indices_st1_local[p_mins[0]]; - idx_min[1] = indices_st1_local[p_mins[1]]; - - - /* use global exclusion list to never reselect the two (best) mse values sofar */ - st1_mse_ptr[idx_min[0]] = FLT_MAX; /* move32() */ - st1_mse_ptr[idx_min[1]] = FLT_MAX; /* move32() */ - - /* circular MSE-neigbour list in use to potentially replace some segment search candidates */ - /* using both 1st and 2nd best neighbours in fwd and rev directions */ - check_ind[0] = cdk1_ivas_segm_neighbour_fwd[idx_min[0]]; - check_ind[1] = cdk1_ivas_segm_neighbour_rev[idx_min[0]]; - - check_ind[2] = cdk1_ivas_segm_neighbour_fwd[idx_min[1]]; - check_ind[3] = cdk1_ivas_segm_neighbour_rev[idx_min[1]]; - - check_ind[4] = cdk1_ivas_segm_neighbour_fwd[check_ind[0]]; - check_ind[5] = cdk1_ivas_segm_neighbour_rev[check_ind[1]]; - - check_ind[6] = cdk1_ivas_segm_neighbour_fwd[check_ind[2]]; - check_ind[7] = cdk1_ivas_segm_neighbour_rev[check_ind[3]]; - - for ( i = 0; i < FDCNG_VQ_DCT_NPOST; i++ ) - { - float check_mse = st1_mse_ptr[check_ind[i]] * fdcng_dct_scaleF[2]; - /* *= fdcng_dct_scaleF[2]; */ /* multiplication in use to get the float outer loop scale correct */ - - if ( check_mse < dist[1][p_max] ) - { - /* new winner , replace */ - dist[1][p_max] = check_mse; - indices_st1_local[p_max] = check_ind[i]; - st1_mse_ptr[check_ind[i]] = FLT_MAX; /* BASOP: move32() */ - p_max = maximum( dist[1], maxC_pre, NULL ); /* establish a new current worst candidate among all maxC */ - } - } - - for ( c = 0; c < maxC_pre; c++ ) - { - indices[1][c * stages] = indices_st1_local[c]; /* move established stage#1 indices to global MSVQ list structure */ - } - - /* extract the selected stage one vectors in DCT domain , apply IDCT_N and scale up */ - /*always extract full length signal(24) to be able to update WB( N==21) candidate MSE values */ - for ( c = 0; c < maxC_pre; c++ ) - { - dec_FDCNG_MSVQ_stage1( indices_st1_local[c], FDCNG_VQ_MAX_LEN, invTrfMatrix, dcttype + 1, &( st1_syn_vec_ptr[c * FDCNG_VQ_MAX_LEN] ), NULL ); - } - - assert( maxC == maxC_pre ); - } -#endif else /* non-DCT Stage #1 code below */ if ( !s ) /* means: m==1 */ @@ -784,28 +588,10 @@ void msvq_enc( essentially subtract res21^2 ,res22^2, res23^2 that was included in stage1 MSE in the DCT24 domain truncated search, excludes the waveform contributions at pos 21,22,23 to the MSE, important to keep WB MSEs update for the subsequent stages */ -#ifdef ERI_MSVQ_CLEANUP if ( s == 0 && applyDCT_flag != 0 && n == FDCNG_VQ_MAX_LEN_WB ) { p_max = msvq_stage1_dct_recalc_candidates_fdcng_wb( st1_syn_vec_ptr, u, maxC, dist[1] ); } -#else - if ( s == 0 && applyDCT_flag != 0 && n == FDCNG_VQ_MAX_LEN_WB ) - { - assert( start == 0 ); - for ( c = 0; c < maxC; c++ ) - { /* point to extended synthesis part */ - p2 = (const float *) &( st1_syn_vec_ptr[c * FDCNG_VQ_MAX_LEN + FDCNG_VQ_MAX_LEN_WB] ); /* ptr init */ - /* for stage#1 use "u" instead of the shortened resid[0], to access the extended/extrapolated input target */ - v_sub( p2, &( u[FDCNG_VQ_MAX_LEN_WB] ), high_diff, FDCNG_VQ_MAX_LEN - FDCNG_VQ_MAX_LEN_WB ); - res24 = dotp( high_diff, high_diff, FDCNG_VQ_MAX_LEN - FDCNG_VQ_MAX_LEN_WB ); /* sum squared over 3 env. values */ - - dist[1][c] -= res24; /* remove DCT24 high band error contribution */ - } - /* update p_max, as it may potentially change, due to the core DCT24 search originally optimizing over longer basis vectors than 21 */ - p_max = maximum( dist[1], maxC, NULL ); - } -#endif m = maxC; } /* for (m=1, s=0; shSpMusClas; @@ -1861,7 +1859,6 @@ void ivas_smc_mode_selection( S_ave = sum_f( st->hSpMusClas->tod_lt_Bin_E, TOD_NSPEC ) / TOD_NSPEC; S_p2a = S_max - S_ave; -#ifdef FIX_SP2A if ( element_brate <= IVAS_16k4 ) { thr_sp2a = THR_P2A_HIGH; @@ -1870,14 +1867,9 @@ void ivas_smc_mode_selection( { thr_sp2a = THR_P2A; } -#endif /* initial 3-way selection of coding modes (ACELP/GSC/TCX) */ -#ifdef FIX_SP2A if ( relE > -10.0f && ( S_p2a > thr_sp2a || ton > hSpMusClas->tod_thr_lt ) ) -#else - if ( relE > -10.0f && ( S_p2a > THR_P2A || ton > hSpMusClas->tod_thr_lt ) ) -#endif { /* select TCX to encode extremely peaky signals or strongly tonal signals */ st->sp_aud_decision1 = 1; diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index ec7fb594d1a9d6c326de1f3964f895fd1c7ba01b..77c0ea3d34eb98386bb3a23a3128044af9cc7859 100644 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -51,11 +51,20 @@ * Indice *------------------------------------------------------------------------------------------*/ +#ifdef IND_LIST_DYN +typedef struct +{ + int16_t id; /* id of the indice */ + uint16_t value; /* value of the quantized indice */ + int16_t nb_bits; /* number of bits used for the quantization of the indice */ +} Indice, *INDICE_HANDLE; +#else typedef struct { uint16_t value; /* value of the quantized indice */ int16_t nb_bits; /* number of bits used for the quantization of the indice */ } Indice; +#endif /*----------------------------------------------------------------------------------* * Bitstream structure @@ -63,11 +72,19 @@ typedef struct typedef struct bitstream_enc_data_structure { +#ifdef IND_LIST_DYN + int16_t nb_ind_tot; /* total number of indices already written */ +#endif int16_t nb_bits_tot; /* total number of bits already written */ Indice *ind_list; /* list of indices */ - int16_t next_ind; /* pointer to the next empty slot in the list of indices */ - int16_t last_ind; /* last written indice */ - +#ifndef IND_LIST_DYN + int16_t next_ind; /* pointer to the next empty slot in the list of indices */ + int16_t last_ind; /* last written indice */ +#endif +#ifdef IND_LIST_DYN + int16_t *ivas_max_num_indices; /* maximum total number of indices in the list */ + Indice **ivas_ind_list_zero; /* beginning of the buffer of indices */ +#endif } BSTR_ENC_DATA, *BSTR_ENC_HANDLE; /*----------------------------------------------------------------------------------* diff --git a/lib_enc/tcx_utils_enc.c b/lib_enc/tcx_utils_enc.c index ba709f0158fee7c34847204f8e5984c5a50b61c9..8099b8cb073c000dc45f5458f172bde8db18e26b 100644 --- a/lib_enc/tcx_utils_enc.c +++ b/lib_enc/tcx_utils_enc.c @@ -1486,11 +1486,19 @@ void ProcessIGF( } else { +#ifdef IND_LIST_DYN + pBsStart = hBstr->nb_ind_tot; +#else pBsStart = hBstr->next_ind; +#endif IGFEncWriteBitstream( hIGFEnc, hBstr, &hIGFEnc->infoTotalBitsPerFrameWritten, igfGridIdx, isIndepFlag ); +#ifdef IND_LIST_DYN + bsBits = hBstr->nb_ind_tot - pBsStart; +#else bsBits = hBstr->next_ind - pBsStart; +#endif IGFEncConcatenateBitstream( hIGFEnc, bsBits, hBstr ); } @@ -1570,11 +1578,24 @@ void ProcessStereoIGF( else { hBstr = sts[ch]->hBstr; +#ifdef IND_LIST_DYN + pBsStart = hBstr->nb_ind_tot; +#else pBsStart = hBstr->next_ind; - +#endif +#ifdef IND_LIST_DYN + if ( ch > 0 ) + { + hBstr->ind_list = sts[0]->hBstr->ind_list + sts[0]->hBstr->nb_ind_tot; + } +#endif IGFEncWriteBitstream( hIGFEnc[ch], hBstr, &hIGFEnc[ch]->infoTotalBitsPerFrameWritten, igfGridIdx, isIndepFlag ); +#ifdef IND_LIST_DYN + bsBits = hBstr->nb_ind_tot - pBsStart; +#else bsBits = hBstr->next_ind - pBsStart; +#endif IGFEncConcatenateBitstream( hIGFEnc[ch], bsBits, hBstr ); } } diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index c05ae7c2626401afd599719743834488a63786fd..a7572aea3fe8d0e2bd0663d981ce9e67d6e9f01b 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -939,8 +939,13 @@ static ivas_error ivas_rend_crendConvolver( const CREND_WRAPPER *pCrend, IVAS_REND_AudioConfig inConfig, IVAS_REND_AudioConfig outConfig, +#ifdef JBM_TSM_ON_TCS + float *pcm_in[], + float *pcm_out[], +#else float pcm_in[][L_FRAME48k], float pcm_out[][L_FRAME48k], +#endif const int32_t output_Fs, const int16_t i_ts ) { @@ -1105,12 +1110,19 @@ ivas_error ivas_rend_crendProcess( HEAD_TRACK_DATA_HANDLE hHeadTrackData, IVAS_OUTPUT_SETUP_HANDLE hIntSetup, EFAP_HANDLE hEFAPdata, +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: input/output audio channels */ +#else float output[][L_FRAME48k], /* i/o: input/output audio channels */ +#endif const int32_t output_Fs ) { int16_t i, subframe_idx, output_frame, subframe_len; int16_t nchan_out; float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k]; +#ifdef JBM_TSM_ON_TCS + float *p_pcm_tmp[BINAURAL_CHANNELS]; +#endif AUDIO_CONFIG in_config; IVAS_REND_AudioConfigType inConfigType; ivas_error error; @@ -1133,6 +1145,12 @@ ivas_error ivas_rend_crendProcess( output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); subframe_len = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + { + p_pcm_tmp[i] = pcm_tmp[i]; + } +#endif for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ ) { if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData && hHeadTrackData->num_quaternions >= 0 ) @@ -1156,14 +1174,22 @@ ivas_error ivas_rend_crendProcess( if ( ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) || ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendConvolver( pCrend, inRendConfig, outRendConfig, output, p_pcm_tmp, output_Fs, subframe_idx ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendConvolver( pCrend, inRendConfig, outRendConfig, output, pcm_tmp, output_Fs, subframe_idx ) ) != IVAS_ERR_OK ) +#endif { return error; } if ( pCrend->hCrend->hReverb != NULL ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_reverb_process( pCrend->hCrend->hReverb, in_config, 1, output, p_pcm_tmp, subframe_idx ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_reverb_process( pCrend->hCrend->hReverb, in_config, 1, output, pcm_tmp, subframe_idx ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -1185,3 +1211,130 @@ ivas_error ivas_rend_crendProcess( return IVAS_ERR_OK; } + +#ifdef JBM_TSM_ON_TCS +ivas_error ivas_rend_crendProcessSubframe( + const CREND_WRAPPER *pCrend, + const AUDIO_CONFIG inConfig, + const AUDIO_CONFIG outConfig, + DECODER_CONFIG_HANDLE hDecoderConfig, + HEAD_TRACK_DATA_HANDLE hHeadTrackData, + IVAS_OUTPUT_SETUP_HANDLE hIntSetup, + EFAP_HANDLE hEFAPdata, + DECODER_TC_BUFFER_HANDLE hTcBuffer, + float *input_f[], + float *output[], /* i/o: input/output audio channels */ + const int16_t n_samples_to_render, + const int32_t output_Fs ) +{ + int16_t subframe_idx, subframe_len; + int16_t nchan_out, nchan_in, ch, first_sf, last_sf, slot_size, slots_to_render; + float *tc_local[MAX_TRANSPORT_CHANNELS]; + float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k]; + float *p_pcm_tmp[BINAURAL_CHANNELS]; + AUDIO_CONFIG in_config; + IVAS_REND_AudioConfigType inConfigType; + ivas_error error; + IVAS_REND_AudioConfig inRendConfig; + IVAS_REND_AudioConfig outRendConfig; + + push_wmops( "ivas_rend_crendProcessSubframe" ); + + inRendConfig = getRendAudioConfigFromIvasAudioConfig( inConfig ); + outRendConfig = getRendAudioConfigFromIvasAudioConfig( outConfig ); + + in_config = getIvasAudioConfigFromRendAudioConfig( inRendConfig ); + inConfigType = getAudioConfigType( inRendConfig ); + if ( ( error = getAudioConfigNumChannels( outRendConfig, &nchan_out ) ) != IVAS_ERR_OK ) + { + return error; + } + if ( ( error = getAudioConfigNumChannels( inRendConfig, &nchan_in ) ) != IVAS_ERR_OK ) + { + return error; + } + + for ( ch = 0; ch < nchan_in; ch++ ) + { + tc_local[ch] = input_f[ch]; + } + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + p_pcm_tmp[ch] = pcm_tmp[ch]; + } + + slot_size = hTcBuffer->n_samples_granularity; + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( hTcBuffer->num_slots - hTcBuffer->slots_rendered, n_samples_to_render / slot_size ); + first_sf = hTcBuffer->subframes_rendered; + last_sf = first_sf; + hTcBuffer->slots_rendered += slots_to_render; + while ( slots_to_render > 0 ) + { + slots_to_render -= hTcBuffer->subframe_nbslots[last_sf]; + last_sf++; + } + + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + subframe_len = hTcBuffer->subframe_nbslots[subframe_idx] * hTcBuffer->n_samples_granularity; + if ( hDecoderConfig && hDecoderConfig->Opt_Headrotation && hHeadTrackData && hHeadTrackData->num_quaternions >= 0 ) + { + + /* Rotation in SHD for: + MC with elevation (5_1_2 / 5_1_4 / 7_1_4) -> BINAURAL + SBA SPAR -> BINAURAL or BINAURAL_ROOM + */ + if ( in_config == AUDIO_CONFIG_FOA || in_config == AUDIO_CONFIG_HOA2 || in_config == AUDIO_CONFIG_HOA3 ) + { + rotateFrame_shd( hHeadTrackData, tc_local, subframe_len, *hIntSetup, 0 ); + } + /* Rotation in SD for MC -> BINAURAL_ROOM */ + else if ( ( hIntSetup != NULL ) && hIntSetup->is_loudspeaker_setup ) + { + rotateFrame_sd( hHeadTrackData, tc_local, subframe_len, *hIntSetup, hEFAPdata, 0 ); + } + } + + if ( ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) || ( inConfigType == IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS ) ) + { + if ( ( error = ivas_rend_crendConvolver( pCrend, inRendConfig, outRendConfig, tc_local, p_pcm_tmp, output_Fs, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + + if ( pCrend->hCrend->hReverb != NULL ) + { + if ( ( error = ivas_reverb_process( pCrend->hCrend->hReverb, in_config, 1, tc_local, p_pcm_tmp, 0 ) ) != IVAS_ERR_OK ) + { + return error; + } + } + for ( ch = 0; ch < nchan_in; ch++ ) + { + tc_local[ch] += subframe_len; + } + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + p_pcm_tmp[ch] += subframe_len; + } + } + else + { + return IVAS_ERR_INVALID_INPUT_FORMAT; + } + } + + /* move to output */ + for ( ch = 0; ch < nchan_out; ch++ ) + { + mvr2r( pcm_tmp[ch], output[ch], n_samples_to_render ); + } + + + hTcBuffer->subframes_rendered = last_sf; + pop_wmops(); + + return IVAS_ERR_OK; +} +#endif diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index 0af9e47868fc878c6e8ce1903dd1c603873bf9f2..f19e0dbf1a4657f63f4961b27c21c6a6d10dbc47 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -52,11 +52,9 @@ * Local constants *------------------------------------------------------------------------*/ -#define CLDFB_HALF_BIN_FREQUENCY_OFFSET 0.5f -#ifdef FIX_417_TD_DECORR_BRATE_SW +#define CLDFB_HALF_BIN_FREQUENCY_OFFSET 0.5f #define IVAS_TDET_DUCK_MULT_FAC_PARA_BIN ( 2.0f ) #define IVAS_TDET_DUCK_MULT_FAC_PARA_BIN_LOW_BR ( 3.0f ) -#endif /* powf(0.95f, 4.0f) for sub-frame smoothing instead of CLDFB slot */ #define ADAPT_HTPROTO_IIR_FAC 0.81450625f @@ -70,37 +68,32 @@ * Local function prototypes *------------------------------------------------------------------------*/ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS +#ifdef JBM_TSM_ON_TCS +static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, float *output_f[], const int16_t nchan_transport, const int16_t subframe ); +#else static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, float output_f[][L_FRAME48k], const int16_t nchan_transport, const int16_t subframe ); - +#endif static void ivas_dirac_dec_decorrelate_slot( DIRAC_DEC_HANDLE hDirAC, const int16_t slot, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float decRe[][CLDFB_NO_CHANNELS_MAX], float decIm[][CLDFB_NO_CHANNELS_MAX] ); static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( Decoder_Struct *st_ivas, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float Rmat[3][3], const int16_t subframe ); -#else -static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, float output_f[][L_FRAME48k], const int16_t nchan_transport, const uint8_t firstSubframe, const uint8_t nSubframes ); -static void ivas_dirac_dec_decorrelate_slot( DIRAC_DEC_HANDLE hDirAC, const int8_t slot, float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float decRe[][CLDFB_NO_CHANNELS_MAX], float decIm[][CLDFB_NO_CHANNELS_MAX] ); +static void ivas_dirac_dec_binaural_determine_processing_matrices( Decoder_Struct *st_ivas, const int16_t max_band_decorr, float Rmat[3][3] ); -static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( Decoder_Struct *st_ivas, float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Rmat[3][3], const uint8_t firstSubframe, const uint8_t nSubFrames ); -#endif +#ifdef JBM_TSM_ON_TCS +static void ivas_dirac_dec_binaural_process_output( Decoder_Struct *st_ivas, float *output_f[], float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t max_band_decorr, const int16_t numInChannels, const int16_t subframe ); -static void ivas_dirac_dec_binaural_determine_processing_matrices( Decoder_Struct *st_ivas, const int16_t max_band_decorr, float Rmat[3][3] ); +static void adaptTransportSignalsHeadtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, const int16_t nSlots, float Rmat[3][3] ); -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS +static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, const int16_t nSlots, float Rmat[3][3] ); +#else static void ivas_dirac_dec_binaural_process_output( Decoder_Struct *st_ivas, float output_f[][L_FRAME48k], float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t max_band_decorr, const int16_t numInChannels, const int16_t subframe ); static void adaptTransportSignalsHeadtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, float Rmat[3][3] ); static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, float Rmat[3][3] ); -#else -static void ivas_dirac_dec_binaural_process_output( Decoder_Struct *st_ivas, float output_f[][L_FRAME48k], float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const int16_t max_band_decorr, const uint8_t numInputChannels, const uint8_t firstSlot, const uint8_t slotEnd ); - -static void adaptTransportSignalsHeadtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const uint8_t firstSlot, const uint8_t slotEnd, const uint8_t nBins, float Rmat[3][3] ); - -static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const uint8_t firstSlot, const uint8_t slotEnd, const uint8_t nBins, float Rmat[3][3] ); - #endif + static void formulate2x2MixingMatrix( float Ein1, float Ein2, float CinRe, float CinIm, float Eout1, float Eout2, float CoutRe, float CoutIm, float Q[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Mre[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Mim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], const float regularizationFactor ); static void hrtfShGetHrtf( const int16_t bin, const int16_t aziDeg, const int16_t eleDeg, float *lRealp, float *lImagp, float *rRealp, float *rImagp ); @@ -111,10 +104,9 @@ static void matrixMul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Ai static void matrixTransp2Mul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Aim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Bre[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Bim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float outRe[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float outIm[BINAURAL_CHANNELS][BINAURAL_CHANNELS] ); -#ifndef FIX_417_TD_DECORR_BRATE_SW -static float configure_reqularization_factor( const IVAS_FORMAT ivas_format, const int32_t ivas_brate ); -#endif +#ifdef JBM_TSM_ON_TCS +#endif /*------------------------------------------------------------------------- * ivas_dirac_dec_init_binaural_data() * @@ -173,34 +165,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( set_zero( hBinaural->ChCrossImOutPrev, nBins ); hBinaural->renderStereoOutputInsteadOfBinaural = 0; -#ifndef FIX_355_REFACTOR_PARAMBIN_TO_5MS - hBinaural->useSubframeMode = 1; -#endif - -#ifndef FIX_417_TD_DECORR_BRATE_SW - hBinaural->useTdDecorr = 0; - if ( st_ivas->ivas_format == SBA_FORMAT ) - { - if ( st_ivas->nchan_transport == 1 ) - { - hBinaural->useTdDecorr = 1; - } - } - else if ( st_ivas->ivas_format == MASA_FORMAT ) - { - if ( ( st_ivas->hDecoderConfig->ivas_total_brate < IVAS_48k && st_ivas->nchan_transport == 1 ) || st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE ) - { - hBinaural->useTdDecorr = 1; - } - } - else if ( st_ivas->ivas_format == MC_FORMAT ) - { - if ( ( st_ivas->hDecoderConfig->ivas_total_brate < IVAS_48k && st_ivas->nchan_transport == 1 ) ) - { - hBinaural->useTdDecorr = 1; - } - } -#endif for ( bin = 0; bin < nBins; bin++ ) { @@ -227,7 +191,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( mvr2r( hHrtfParambin->parametricEarlyPartEneCorrection, hBinaural->earlyPartEneCorrection, nBins ); /* reconfiguration needed when Reverb. parameters are changed -> close and open the handle again */ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS if ( hBinaural->hReverb != NULL && ( ( hBinaural->hReverb->numBins != nBins ) || ( hBinaural->hReverb->blockSize != CLDFB_SLOTS_PER_SUBFRAME ) ) ) { @@ -238,7 +201,7 @@ ivas_error ivas_dirac_dec_init_binaural_data( { if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, nBins, - CLDFB_SLOTS_PER_SUBFRAME, NULL, + CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, st_ivas->hIntSetup.output_config, output_Fs, RENDERER_BINAURAL_PARAMETRIC_ROOM, @@ -248,47 +211,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( return error; } } -#else - if ( hBinaural->hReverb != NULL && ( ( hBinaural->hReverb->numBins != nBins ) || - ( hBinaural->useSubframeMode && hBinaural->hReverb->blockSize != CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ) || - ( !hBinaural->useSubframeMode && hBinaural->hReverb->blockSize != CLDFB_NO_COL_MAX ) ) ) - { - ivas_binaural_reverb_close( &( hBinaural->hReverb ) ); - } - - if ( hBinaural->hReverb == NULL ) - { - if ( hBinaural->useSubframeMode ) - { - if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, - nBins, - CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES, NULL, - st_ivas->hIntSetup.output_config, - output_Fs, - RENDERER_BINAURAL_PARAMETRIC_ROOM, - st_ivas->hHrtfFastConv, - st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) - { - return error; - } - } - else - { - if ( ( error = ivas_binaural_reverb_open( &hBinaural->hReverb, - nBins, - CLDFB_NO_COL_MAX, - NULL, - st_ivas->hIntSetup.output_config, - output_Fs, - RENDERER_BINAURAL_PARAMETRIC_ROOM, - st_ivas->hHrtfFastConv, - st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK ) - { - return error; - } - } - } -#endif } else if ( renderer_type == RENDERER_STEREO_PARAMETRIC ) { @@ -301,7 +223,6 @@ ivas_error ivas_dirac_dec_init_binaural_data( assert( false ); } -#ifdef FIX_417_TD_DECORR_BRATE_SW if ( hBinaural->hTdDecorr == NULL ) { hBinaural->useTdDecorr = 0; @@ -311,39 +232,25 @@ ivas_error ivas_dirac_dec_init_binaural_data( { return error; } -#else - if ( hBinaural->useTdDecorr ) + + hBinaural->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); + + st_ivas->hDiracDecBin = hBinaural; + +#ifdef JBM_TSM_ON_TCS + /* allocate transport channels*/ + if ( st_ivas->hDecoderConfig->voip_active == 1 && st_ivas->hTcBuffer == NULL ) { - if ( st_ivas->hDecoderConfig->ivas_total_brate >= IVAS_13k2 && st_ivas->ivas_format == SBA_FORMAT ) - { - if ( hBinaural->hTdDecorr == NULL ) - { - ivas_td_decorr_dec_open( &( hBinaural->hTdDecorr ), output_Fs, 3, 1 ); - } + int16_t nchan_to_allocate; - if ( st_ivas->hDecoderConfig->ivas_total_brate < IVAS_24k4 ) - { - hBinaural->hTdDecorr->pTrans_det->duck_mult_fac = IVAS_TDET_DUCK_MULT_FAC_PARA_BIN_LOW_BR; - } - else - { - hBinaural->hTdDecorr->pTrans_det->duck_mult_fac = IVAS_TDET_DUCK_MULT_FAC_PARA_BIN; - } - } - else + nchan_to_allocate = 2 * BINAURAL_CHANNELS; + if ( ( error = ivas_jbm_dec_tc_buffer_open( st_ivas, TC_BUFFER_MODE_RENDERER, ivas_jbm_dec_get_num_tc_channels( st_ivas ), nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK ) { - ivas_td_decorr_dec_open( &( hBinaural->hTdDecorr ), output_Fs, 3, 0 ); + return error; } } - else - { - ivas_td_decorr_dec_close( &( hBinaural->hTdDecorr ) ); - } -#endif - - hBinaural->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate ); - st_ivas->hDiracDecBin = hBinaural; +#endif /* JBM_TMS_ON_TCS*/ return IVAS_ERR_OK; } @@ -423,6 +330,64 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs( return IVAS_ERR_OK; } +#ifdef JBM_TSM_ON_TCS +void ivas_dirac_dec_binaural_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + const int16_t nchan_transport, + float *output_f[] /* o : rendered time signal */ +) +{ + int16_t slots_to_render, first_sf, last_sf, subframe_idx; + uint16_t slot_size, ch; + uint16_t nchan_out; + DIRAC_DEC_HANDLE hDirAC; + float *output_f_local[MAX_OUTPUT_CHANNELS]; + + hDirAC = st_ivas->hDirAC; + nchan_out = BINAURAL_CHANNELS; +#ifdef DEBUGGING + assert( hDirAC ); +#endif + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] = output_f[ch]; + } + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ + slots_to_render = min( hDirAC->num_slots - hDirAC->slots_rendered, nSamplesAsked / slot_size ); + *nSamplesRendered = slots_to_render * slot_size; + first_sf = hDirAC->subframes_rendered; + last_sf = first_sf; + while ( slots_to_render > 0 ) + { + slots_to_render -= hDirAC->subframe_nbslots[last_sf]; + last_sf++; + } +#ifdef DEBUGGING + assert( slots_to_render == 0 ); +#endif + for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ ) + { + int16_t n_samples_sf = slot_size * hDirAC->subframe_nbslots[subframe_idx]; + ivas_dirac_dec_binaural_internal( st_ivas, output_f_local, nchan_transport, subframe_idx ); + for ( ch = 0; ch < nchan_out; ch++ ) + { + output_f_local[ch] += n_samples_sf; + } + } + if ( hDirAC->slots_rendered == hDirAC->num_slots ) + { + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + DEFAULT_JBM_SUBFRAMES_5MS ) % st_ivas->hDirAC->dirac_md_buffer_length; + } + *nSamplesAvailable = ( hDirAC->num_slots - hDirAC->slots_rendered ) * slot_size; + + return; +} +#endif + /*------------------------------------------------------------------------- * ivas_dirac_dec_binaural() * @@ -435,45 +400,90 @@ void ivas_dirac_dec_binaural( const int16_t nchan_transport /* i : number of transport channels */ ) { -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS int16_t subframe; +#ifdef JBM_TSM_ON_TCS + float cng_td_buffer[L_FRAME16k]; + float *p_output[MAX_OUTPUT_CHANNELS]; + int16_t ch; + int16_t slot_size; + int16_t numInChannels; + + slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); + for ( ch = 0; ch < 2 * BINAURAL_CHANNELS; ch++ ) + { + p_output[ch] = &output_f[ch][0]; + } + numInChannels = nchan_transport; + if ( st_ivas->hOutSetup.separateChannelEnabled ) + { + numInChannels++; + } + for ( ch = 0; ch < numInChannels; ch++ ) + { + st_ivas->hTcBuffer->tc[ch] = &output_f[ch][0]; + } + + ivas_dirac_dec_set_md_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); + if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) + { + ivas_spar_dec_set_render_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS ); + } #endif + if ( st_ivas->hDiracDecBin->useTdDecorr ) { float *decorr_signal[BINAURAL_CHANNELS]; +#ifndef JBM_TSM_ON_TCS int16_t ch; +#endif int16_t output_frame; for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { decorr_signal[ch] = (float *) &( output_f[ch + BINAURAL_CHANNELS][0] ); +#ifdef JBM_TSM_ON_TCS + st_ivas->hTcBuffer->tc[ch + BINAURAL_CHANNELS] = decorr_signal[ch]; +#endif } output_frame = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ); - +#ifdef JBM_TSM_ON_TCS + { + ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, p_output, decorr_signal, output_frame ); + } +#else ivas_td_decorr_process( st_ivas->hDiracDecBin->hTdDecorr, output_f, decorr_signal, output_frame ); +#endif } - -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS - for ( subframe = 0; subframe < MAX_PARAM_SPATIAL_SUBFRAMES; subframe++ ) +#ifdef JBM_TSM_ON_TCS + if ( nchan_transport == 1 && st_ivas->nchan_transport != 2 && st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag ) { - ivas_dirac_dec_binaural_internal( st_ivas, output_f, nchan_transport, subframe ); + Decoder_State *st = st_ivas->hSCE[0]->hCoreCoder[0]; + st_ivas->hTcBuffer->tc[nchan_transport] = &cng_td_buffer[0]; + generate_masking_noise_lb_dirac( st->hFdCngDec->hFdCngCom, st_ivas->hTcBuffer->tc[nchan_transport], DEFAULT_JBM_CLDFB_TIMESLOTS, st->cna_dirac_flag && st->flag_cna ); } -#else - if ( st_ivas->hDiracDecBin->useSubframeMode ) +#endif + + for ( subframe = 0; subframe < MAX_PARAM_SPATIAL_SUBFRAMES; subframe++ ) { - uint8_t subframe; - for ( subframe = 0; subframe < MAX_PARAM_SPATIAL_SUBFRAMES; subframe++ ) +#ifdef JBM_TSM_ON_TCS + int16_t n_samples_sf = slot_size * st_ivas->hDirAC->subframe_nbslots[subframe]; + ivas_dirac_dec_binaural_internal( st_ivas, p_output, nchan_transport, subframe ); + for ( ch = 0; ch < 2 * BINAURAL_CHANNELS; ch++ ) { - ivas_dirac_dec_binaural_internal( st_ivas, output_f, nchan_transport, subframe, 1u ); + p_output[ch] += n_samples_sf; } + st_ivas->hDirAC->dirac_read_idx = ( st_ivas->hDirAC->dirac_read_idx + 1 ) % st_ivas->hDirAC->dirac_md_buffer_length; +#else + ivas_dirac_dec_binaural_internal( st_ivas, output_f, nchan_transport, subframe ); +#endif } - else +#ifdef JBM_TSM_ON_TCS + for ( ch = 0; ch < 2 * BINAURAL_CHANNELS; ch++ ) { - ivas_dirac_dec_binaural_internal( st_ivas, output_f, nchan_transport, 0u, (uint8_t) MAX_PARAM_SPATIAL_SUBFRAMES ); + st_ivas->hTcBuffer->tc[ch] = NULL; } #endif - return; } @@ -481,11 +491,16 @@ void ivas_dirac_dec_binaural( /*------------------------------------------------------------------------- * Local functions *------------------------------------------------------------------------*/ +#ifdef JBM_TSM_ON_TCS +#endif -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS static void ivas_dirac_dec_binaural_internal( Decoder_Struct *st_ivas, +#ifdef JBM_TSM_ON_TCS + float *output_f[], +#else float output_f[][L_FRAME48k], +#endif const int16_t nchan_transport, const int16_t subframe ) { @@ -500,7 +515,11 @@ static void ivas_dirac_dec_binaural_internal( hDirAC = st_ivas->hDirAC; nBins = hDirAC->num_freq_bands; +#ifdef JBM_TSM_ON_TCS + offsetSamples = hDirAC->slots_rendered * nBins; +#else offsetSamples = subframe * CLDFB_SLOTS_PER_SUBFRAME * nBins; +#endif /* The input channel number at this processing function (not nchan_transport) */ numInChannels = BINAURAL_CHANNELS; @@ -522,16 +541,25 @@ static void ivas_dirac_dec_binaural_internal( Rmat[2][2] = 1.0f; /* CLDFB Analysis of input */ +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < hDirAC->subframe_nbslots[subframe]; slot++ ) +#else for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#endif { for ( ch = 0; ch < numInChannels; ch++ ) { if ( ch == 0 || nchan_transport == 2 ) { - cldfbAnalysis_ts( &( output_f[ch][nBins * slot + offsetSamples] ), - Cldfb_RealBuffer_in[ch][slot], - Cldfb_ImagBuffer_in[ch][slot], - nBins, st_ivas->cldfbAnaDec[ch] ); + cldfbAnalysis_ts( +#ifdef JBM_TSM_ON_TCS + &( st_ivas->hTcBuffer->tc[ch][nBins * slot + offsetSamples] ), +#else + &( output_f[ch][nBins * slot + offsetSamples] ), +#endif + Cldfb_RealBuffer_in[ch][slot], + Cldfb_ImagBuffer_in[ch][slot], + nBins, st_ivas->cldfbAnaDec[ch] ); } else if ( st_ivas->nchan_transport == 2 ) /* Stereo signal transmitted as mono with DFT stereo */ { @@ -548,11 +576,19 @@ static void ivas_dirac_dec_binaural_internal( int16_t slotInFrame; numCoreBands = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->numCoreBands; +#ifdef JBM_TSM_ON_TCS + slotInFrame = hDirAC->slots_rendered + slot; +#else slotInFrame = subframe * CLDFB_SLOTS_PER_SUBFRAME + slot; +#endif generate_masking_noise_dirac( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom, st_ivas->cldfbAnaDec[1], +#ifdef JBM_TSM_ON_TCS + st_ivas->hTcBuffer->tc[nchan_transport], +#else &( output_f[1][L_FRAME48k - L_FRAME16k] ), /*used as temporary static buffer for the whole frame*/ +#endif Cldfb_RealBuffer_in[2][slot], Cldfb_ImagBuffer_in[2][slot], slotInFrame, st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->hSCE[0]->hCoreCoder[0]->flag_cna, @@ -604,10 +640,15 @@ static void ivas_dirac_dec_binaural_internal( { for ( ch = BINAURAL_CHANNELS; ch < ( 2 * BINAURAL_CHANNELS ); ch++ ) { - cldfbAnalysis_ts( &( output_f[ch][nBins * slot + offsetSamples] ), - Cldfb_RealBuffer_in[ch][slot], - Cldfb_ImagBuffer_in[ch][slot], - nBins, st_ivas->cldfbAnaDec[ch] ); + cldfbAnalysis_ts( +#ifdef JBM_TSM_ON_TCS + &( st_ivas->hTcBuffer->tc[ch][nBins * slot + offsetSamples] ), +#else + &( output_f[ch][nBins * slot + offsetSamples] ), +#endif + Cldfb_RealBuffer_in[ch][slot], + Cldfb_ImagBuffer_in[ch][slot], + nBins, st_ivas->cldfbAnaDec[ch] ); if ( st_ivas->nchan_transport == 1 && st_ivas->ivas_format == SBA_FORMAT ) { @@ -633,9 +674,15 @@ static void ivas_dirac_dec_binaural_internal( if ( nchan_transport == 2 ) { +#ifdef JBM_TSM_ON_TCS + adaptTransportSignalsHeadtracked( st_ivas->hHeadTrackData, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, nBins, hDirAC->subframe_nbslots[subframe], Rmat ); + + ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( st_ivas->hHeadTrackData, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, nBins, hDirAC->subframe_nbslots[subframe], Rmat ); +#else adaptTransportSignalsHeadtracked( st_ivas->hHeadTrackData, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, nBins, Rmat ); ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( st_ivas->hHeadTrackData, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, nBins, Rmat ); +#endif } } @@ -659,257 +706,74 @@ static void ivas_dirac_dec_binaural_internal( ivas_dirac_dec_binaural_process_output( st_ivas, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, max_band_decorr, numInChannels, subframe ); st_ivas->hDirAC->hDiffuseDist = NULL; + + +#ifdef JBM_TSM_ON_TCS + hDirAC->slots_rendered += hDirAC->subframe_nbslots[subframe]; + hDirAC->subframes_rendered++; +#else hDirAC->dirac_read_idx = ( hDirAC->dirac_read_idx + 1 ) % hDirAC->dirac_md_buffer_length; +#endif return; } -#else -static void ivas_dirac_dec_binaural_internal( - Decoder_Struct *st_ivas, - float output_f[][L_FRAME48k], - const int16_t nchan_transport, - const uint8_t firstSubframe, - const uint8_t nSubframes ) -{ - DIRAC_DEC_HANDLE hDirAC; - uint8_t slot, ch, nBins, numInChannels; - float Cldfb_RealBuffer_in[4][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_in[4][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float Rmat[3][3]; - uint8_t firstSlot, slotEnd; - int16_t max_band_decorr; - DIFFUSE_DISTRIBUTION_DATA diffuseDistData; - firstSlot = firstSubframe * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); - slotEnd = ( firstSubframe + nSubframes ) * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); - hDirAC = st_ivas->hDirAC; - nBins = (uint8_t) hDirAC->num_freq_bands; +static void ivas_dirac_dec_decorrelate_slot( + DIRAC_DEC_HANDLE hDirAC, + const int16_t slot, + float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], + float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], + float decRe[][CLDFB_NO_CHANNELS_MAX], + float decIm[][CLDFB_NO_CHANNELS_MAX] ) +{ + int16_t offset, ch, bin; + float onset_filter[BINAURAL_CHANNELS * CLDFB_NO_CHANNELS_MAX]; /* 2 ch, 60 bins */ + float decorrelatedFrameInterleaved[2 * BINAURAL_CHANNELS * CLDFB_NO_CHANNELS_MAX]; /* 2 ch, real + imag, 60 bins */ - /* The input channel number at this processing function (not nchan_transport) */ - numInChannels = BINAURAL_CHANNELS; - if ( st_ivas->hOutSetup.separateChannelEnabled ) + /* Decorrelation needs interleaved data. Copy left and right signals to proto_frame_f */ + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { - numInChannels++; + offset = hDirAC->num_freq_bands * BINAURAL_CHANNELS * ch; + for ( bin = 0; bin < hDirAC->num_freq_bands; bin++ ) + { + hDirAC->proto_frame_f[( bin * BINAURAL_CHANNELS ) + offset] = inRe[ch][slot][bin]; + hDirAC->proto_frame_f[( bin * BINAURAL_CHANNELS ) + offset + 1] = inIm[ch][slot][bin]; + } } - Rmat[0][0] = 1.0f; - Rmat[0][1] = 0.0f; - Rmat[0][2] = 0.0f; - - Rmat[1][0] = 0.0f; - Rmat[1][1] = 1.0f; - Rmat[1][2] = 0.0f; - - Rmat[2][0] = 0.0f; - Rmat[2][1] = 0.0f; - Rmat[2][2] = 1.0f; + /* Decorrelate proto signal to decorrelatedFrameInterleaved */ + ivas_dirac_dec_decorr_process( hDirAC->num_freq_bands, + hDirAC->num_outputs_diff, + hDirAC->num_protos_diff, + hDirAC->synthesisConf, + BINAURAL_CHANNELS, + hDirAC->proto_frame_f, + hDirAC->num_protos_diff, + hDirAC->proto_index_diff, + decorrelatedFrameInterleaved, + onset_filter, + hDirAC->h_freq_domain_decorr_ap_params, + hDirAC->h_freq_domain_decorr_ap_state ); - /* CLDFB Analysis of input */ - for ( slot = firstSlot; slot < slotEnd; slot++ ) + /* De-interleave decorrelated signals*/ + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { - for ( ch = 0; ch < numInChannels; ch++ ) + offset = hDirAC->num_freq_bands * BINAURAL_CHANNELS * ch; + for ( bin = 0; bin < hDirAC->num_freq_bands; bin++ ) { - if ( ch == 0 || nchan_transport == 2 ) - { - cldfbAnalysis_ts( &( output_f[ch][nBins * slot] ), - Cldfb_RealBuffer_in[ch][slot], - Cldfb_ImagBuffer_in[ch][slot], - nBins, st_ivas->cldfbAnaDec[ch] ); - } - else if ( st_ivas->nchan_transport == 2 ) /* Stereo signal transmitted as mono with DFT stereo */ - { - /* At mono input duplicate the channel to dual-mono */ - mvr2r( Cldfb_RealBuffer_in[0][slot], Cldfb_RealBuffer_in[1][slot], nBins ); - mvr2r( Cldfb_ImagBuffer_in[0][slot], Cldfb_ImagBuffer_in[1][slot], nBins ); - } - else /* when nchan_transport == 1 and ch == 1 */ - { - /* CNA and HB FD-CNG*/ - if ( st_ivas->hSCE[0]->hCoreCoder[0] != NULL && st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag ) - { - int16_t numCoreBands, b; + decRe[ch][bin] = decorrelatedFrameInterleaved[( bin * BINAURAL_CHANNELS ) + offset]; + decIm[ch][bin] = decorrelatedFrameInterleaved[( bin * BINAURAL_CHANNELS ) + offset + 1]; + } + } - numCoreBands = st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->numCoreBands; + return; +} - generate_masking_noise_dirac( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom, - st_ivas->cldfbAnaDec[1], - &( output_f[1][L_FRAME48k - L_FRAME16k] ), /*used as temporary static buffer for the whole frame*/ - Cldfb_RealBuffer_in[2][slot], Cldfb_ImagBuffer_in[2][slot], - slot, - st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->hSCE[0]->hCoreCoder[0]->flag_cna, - ( st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == FRAME_NO_DATA || st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == SID_2k40 ) && ( st_ivas->hSCE[0]->hCoreCoder[0]->cng_type == FD_CNG ) && st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag ); +#ifdef JBM_TSM_ON_TCS +#endif - generate_masking_noise_dirac( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom, - st_ivas->cldfbAnaDec[1], /*nothing will be analyzed, just get cnst*/ - NULL, - Cldfb_RealBuffer_in[1][slot], Cldfb_ImagBuffer_in[1][slot], - slot, - st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag && st_ivas->hSCE[0]->hCoreCoder[0]->flag_cna, - ( st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == FRAME_NO_DATA || st_ivas->hSCE[0]->hCoreCoder[0]->core_brate == SID_2k40 ) && ( st_ivas->hSCE[0]->hCoreCoder[0]->cng_type == FD_CNG ) && st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag ); - /* LB: Copy first channel + LB-CNG to first and second channels with same scaling (dual-mono)*/ - for ( b = 0; b < numCoreBands; b++ ) - { - Cldfb_RealBuffer_in[0][slot][b] = INV_SQRT2 * ( Cldfb_RealBuffer_in[0][slot][b] + Cldfb_RealBuffer_in[2][slot][b] ); - Cldfb_RealBuffer_in[1][slot][b] = Cldfb_RealBuffer_in[0][slot][b]; - Cldfb_ImagBuffer_in[0][slot][b] = INV_SQRT2 * ( Cldfb_ImagBuffer_in[0][slot][b] + Cldfb_ImagBuffer_in[2][slot][b] ); - Cldfb_ImagBuffer_in[1][slot][b] = Cldfb_ImagBuffer_in[0][slot][b]; - } - - /* HB: Copy first channel to second channel and add HB-CNGs with different scalings*/ - for ( ; b < nBins; b++ ) - { - Cldfb_RealBuffer_in[0][slot][b] *= INV_SQRT2; - Cldfb_RealBuffer_in[1][slot][b] = Cldfb_RealBuffer_in[0][slot][b] + 0.5f * Cldfb_RealBuffer_in[1][slot][b] + Cldfb_RealBuffer_in[0][slot][b]; - Cldfb_RealBuffer_in[0][slot][b] += 0.5f * Cldfb_RealBuffer_in[2][slot][b]; - - Cldfb_ImagBuffer_in[0][slot][b] *= INV_SQRT2; - Cldfb_ImagBuffer_in[1][slot][b] = Cldfb_ImagBuffer_in[0][slot][b] + 0.5f * Cldfb_ImagBuffer_in[1][slot][b]; - Cldfb_ImagBuffer_in[0][slot][b] += 0.5f * Cldfb_ImagBuffer_in[2][slot][b]; - } - } - else - { - /* At mono input duplicate the channel to dual-mono, and apply gain - correction to ensure same overall level as in stereo mode */ - v_multc( Cldfb_RealBuffer_in[0][slot], INV_SQRT_2, Cldfb_RealBuffer_in[0][slot], nBins ); - v_multc( Cldfb_ImagBuffer_in[0][slot], INV_SQRT_2, Cldfb_ImagBuffer_in[0][slot], nBins ); - - mvr2r( Cldfb_RealBuffer_in[0][slot], Cldfb_RealBuffer_in[1][slot], nBins ); - mvr2r( Cldfb_ImagBuffer_in[0][slot], Cldfb_ImagBuffer_in[1][slot], nBins ); - } - } - } - - if ( st_ivas->hDiracDecBin->useTdDecorr ) - { - for ( ch = BINAURAL_CHANNELS; ch < ( 2 * BINAURAL_CHANNELS ); ch++ ) - { - cldfbAnalysis_ts( &( output_f[ch][nBins * slot] ), - Cldfb_RealBuffer_in[ch][slot], - Cldfb_ImagBuffer_in[ch][slot], - nBins, st_ivas->cldfbAnaDec[ch] ); - - if ( st_ivas->nchan_transport == 1 && st_ivas->ivas_format == SBA_FORMAT ) - { - v_multc( Cldfb_RealBuffer_in[ch][slot], INV_SQRT_2, Cldfb_RealBuffer_in[ch][slot], nBins ); - v_multc( Cldfb_ImagBuffer_in[ch][slot], INV_SQRT_2, Cldfb_ImagBuffer_in[ch][slot], nBins ); - } - } - } - } - - if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR ) - { - st_ivas->hDirAC->hDiffuseDist = &diffuseDistData; - - ivas_spar_param_to_masa_param_mapping( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, firstSubframe, nSubframes ); - - ivas_sba_prototype_renderer( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, firstSubframe, nSubframes ); - } - - if ( st_ivas->hHeadTrackData && st_ivas->hHeadTrackData->num_quaternions >= 0 ) - { - QuatToRotMat( st_ivas->hHeadTrackData->Quaternions[firstSubframe], Rmat ); - - if ( nchan_transport == 2 ) - { - adaptTransportSignalsHeadtracked( st_ivas->hHeadTrackData, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, firstSlot, slotEnd, nBins, Rmat ); - - ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( st_ivas->hHeadTrackData, Cldfb_ImagBuffer_in, Cldfb_RealBuffer_in, firstSlot, slotEnd, nBins, Rmat ); - } - } - - ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( st_ivas, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, Rmat, firstSubframe, nSubframes ); - - if ( st_ivas->ivas_format == ISM_FORMAT ) - { - max_band_decorr = 0; - } - else if ( st_ivas->hDiracDecBin->useTdDecorr ) - { - max_band_decorr = CLDFB_NO_CHANNELS_MAX; - } - else - { - max_band_decorr = st_ivas->hDirAC->h_freq_domain_decorr_ap_params->max_band_decorr; - } - - ivas_dirac_dec_binaural_determine_processing_matrices( st_ivas, max_band_decorr, Rmat ); - - ivas_dirac_dec_binaural_process_output( st_ivas, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, max_band_decorr, numInChannels, firstSlot, slotEnd ); - - st_ivas->hDirAC->hDiffuseDist = NULL; - - return; -} -#endif - - -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS -static void ivas_dirac_dec_decorrelate_slot( - DIRAC_DEC_HANDLE hDirAC, - const int16_t slot, - float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], - float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], - float decRe[][CLDFB_NO_CHANNELS_MAX], - float decIm[][CLDFB_NO_CHANNELS_MAX] ) -#else -static void ivas_dirac_dec_decorrelate_slot( - DIRAC_DEC_HANDLE hDirAC, - const int8_t slot, - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float decRe[][CLDFB_NO_CHANNELS_MAX], - float decIm[][CLDFB_NO_CHANNELS_MAX] ) -#endif -{ - int16_t offset, ch, bin; - float onset_filter[BINAURAL_CHANNELS * CLDFB_NO_CHANNELS_MAX]; /* 2 ch, 60 bins */ - float decorrelatedFrameInterleaved[2 * BINAURAL_CHANNELS * CLDFB_NO_CHANNELS_MAX]; /* 2 ch, real + imag, 60 bins */ - - /* Decorrelation needs interleaved data. Copy left and right signals to proto_frame_f */ - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - offset = hDirAC->num_freq_bands * BINAURAL_CHANNELS * ch; - for ( bin = 0; bin < hDirAC->num_freq_bands; bin++ ) - { - hDirAC->proto_frame_f[( bin * BINAURAL_CHANNELS ) + offset] = inRe[ch][slot][bin]; - hDirAC->proto_frame_f[( bin * BINAURAL_CHANNELS ) + offset + 1] = inIm[ch][slot][bin]; - } - } - - /* Decorrelate proto signal to decorrelatedFrameInterleaved */ - ivas_dirac_dec_decorr_process( hDirAC->num_freq_bands, - hDirAC->num_outputs_diff, - hDirAC->num_protos_diff, - hDirAC->synthesisConf, - BINAURAL_CHANNELS, - hDirAC->proto_frame_f, - hDirAC->num_protos_diff, - hDirAC->proto_index_diff, - decorrelatedFrameInterleaved, - onset_filter, - hDirAC->h_freq_domain_decorr_ap_params, - hDirAC->h_freq_domain_decorr_ap_state ); - - /* De-interleave decorrelated signals*/ - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - offset = hDirAC->num_freq_bands * BINAURAL_CHANNELS * ch; - for ( bin = 0; bin < hDirAC->num_freq_bands; bin++ ) - { - decRe[ch][bin] = decorrelatedFrameInterleaved[( bin * BINAURAL_CHANNELS ) + offset]; - decIm[ch][bin] = decorrelatedFrameInterleaved[( bin * BINAURAL_CHANNELS ) + offset + 1]; - } - } - - return; -} - - -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( Decoder_Struct *st_ivas, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], @@ -971,10 +835,18 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric /* Formulate input and target covariance matrices for this subframe */ set_zero( subFrameTotalEne, CLDFB_NO_CHANNELS_MAX ); +#ifdef JBM_TSM_ON_TCS + dirac_read_idx = hDirAC->render_to_md_map[subframe]; +#else dirac_read_idx = hDirAC->dirac_read_idx; +#endif /* Calculate input covariance matrix */ +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < hDirAC->subframe_nbslots[subframe]; slot++ ) +#else for ( slot = 0; slot < hDirAC->subframe_nbslots; slot++ ) +#endif { for ( bin = 0; bin < nBins; bin++ ) { @@ -1015,7 +887,11 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric set_zero( subFrameTotalEne, CLDFB_NO_CHANNELS_MAX ); +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < hDirAC->subframe_nbslots[subframe]; slot++ ) +#else for ( slot = 0; slot < hDirAC->subframe_nbslots; slot++ ) +#endif { for ( bin = 0; bin < nBins; bin++ ) { @@ -1197,451 +1073,47 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric } /* Add diffuse / ambient part covariance matrix */ - diffuseness = max( 0.0f, diffuseness ); - diffEne = diffuseness * meanEnePerCh; - surCoh = hDirAC->surroundingCoherence[dirac_read_idx][bin]; - if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) - { - if ( !h->renderStereoOutputInsteadOfBinaural ) - { - idx = min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 ); - /* Apply target spectrum that emphasizes low frequencies when the sound is surround coherent */ - diffEne *= ( 1.0f - surCoh ) + surCoh * surCohEne[idx]; - } - } - h->ChEneOut[0][bin] += diffEne; /* Diff ene part*/ - h->ChEneOut[1][bin] += diffEne; - - if ( h->renderStereoOutputInsteadOfBinaural ) - { - /* When rendering stereo, ambience (except for surround coherent sound) has zero ICC. */ - h->ChCrossReOut[bin] += surCoh * diffEne; - } - else /* When rendering binaural, ambience has frequency dependent ICC. */ - { - if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && bin < BINAURAL_COHERENCE_DIFFERENCE_BINS ) - { - float diffuseFieldCoherence; - diffuseFieldCoherence = hDirAC->hDiffuseDist->diffuseRatioX[subframe][bin] * h->diffuseFieldCoherenceX[bin] + hDirAC->hDiffuseDist->diffuseRatioY[subframe][bin] * h->diffuseFieldCoherenceY[bin] + hDirAC->hDiffuseDist->diffuseRatioZ[subframe][bin] * h->diffuseFieldCoherenceZ[bin]; - h->ChCrossReOut[bin] += ( ( 1.0f - surCoh ) * diffuseFieldCoherence + surCoh ) * diffEne; - } - else - { - h->ChCrossReOut[bin] += ( ( 1.0f - surCoh ) * h->diffuseFieldCoherence[bin] + surCoh ) * diffEne; - } - } - - /* Store parameters for formulating average diffuseness over frame */ - h->frameMeanDiffuseness[bin] += diffEne; - frameMeanDiffusenessEneWeight[bin] += meanEnePerCh; - } - - /* Formulate average diffuseness over frame */ - for ( bin = 0; bin < nBins; bin++ ) - { - h->frameMeanDiffuseness[bin] /= fmaxf( 1e-12f, frameMeanDiffusenessEneWeight[bin] ); - } - - /* Determine encoding quality based additional smoothing factor */ - qualityBasedSmFactor = 1.0f; - if ( st_ivas->hMasa != NULL ) - { - qualityBasedSmFactor = st_ivas->hMasa->data.dir_decode_quality; - qualityBasedSmFactor *= qualityBasedSmFactor; - } - - /* Temporal IIR-type smoothing of covariance matrices */ - if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE ) - { - IIReneLimiterFactor = 16.0f + ( 1.0f - qualityBasedSmFactor ); - } - else - { - IIReneLimiterFactor = 8.0f + ( 1.0f - qualityBasedSmFactor ); - } - for ( bin = 0; bin < nBins; bin++ ) - { - float eneRatio, IIReneLimiter; - - /* Temporally smooth cov mtx estimates for resulting mixing matrix stability. The design principle is that - * the energy history (IIR) must not be more than double of the current frame energy. This provides more - * robust performance at energy offsets when compared to typical IIR averaging. */ - eneRatio = ( h->ChEne[0][bin] + h->ChEne[1][bin] ) / fmaxf( 1e-12f, ( h->ChEnePrev[0][bin] + h->ChEnePrev[1][bin] ) ); - IIReneLimiter = fminf( 1.0f, eneRatio * IIReneLimiterFactor ); - - h->ChCrossRe[bin] *= qualityBasedSmFactor; - h->ChCrossIm[bin] *= qualityBasedSmFactor; - h->ChCrossReOut[bin] *= qualityBasedSmFactor; - h->ChCrossImOut[bin] *= qualityBasedSmFactor; - - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - h->ChEne[ch][bin] *= qualityBasedSmFactor; - h->ChEneOut[ch][bin] *= qualityBasedSmFactor; - } - - h->ChCrossRe[bin] += IIReneLimiter * h->ChCrossRePrev[bin]; - h->ChCrossIm[bin] += IIReneLimiter * h->ChCrossImPrev[bin]; - h->ChCrossReOut[bin] += IIReneLimiter * h->ChCrossReOutPrev[bin]; - h->ChCrossImOut[bin] += IIReneLimiter * h->ChCrossImOutPrev[bin]; - - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - h->ChEne[ch][bin] += IIReneLimiter * h->ChEnePrev[ch][bin]; - h->ChEneOut[ch][bin] += IIReneLimiter * h->ChEneOutPrev[ch][bin]; - } - - /* Store energy values and coefficients for next round */ - h->ChCrossRePrev[bin] = h->ChCrossRe[bin]; - h->ChCrossImPrev[bin] = h->ChCrossIm[bin]; - h->ChCrossReOutPrev[bin] = h->ChCrossReOut[bin]; - h->ChCrossImOutPrev[bin] = h->ChCrossImOut[bin]; - - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - h->ChEnePrev[ch][bin] = h->ChEne[ch][bin]; - h->ChEneOutPrev[ch][bin] = h->ChEneOut[ch][bin]; - } - } - - return; -} -#else -static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matrices( - Decoder_Struct *st_ivas, - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Rmat[3][3], - const uint8_t firstSubframe, - const uint8_t nSubframes ) -{ - uint8_t ch, slot, bin, subframe; - uint8_t separateCenterChannelRendering; - int16_t nBins, idx; - float frameMeanDiffusenessEneWeight[CLDFB_NO_CHANNELS_MAX]; - DIRAC_DEC_HANDLE hDirAC; - DIRAC_DEC_BIN_HANDLE h; - float IIReneLimiterFactor; - float qualityBasedSmFactor; - float lowBitRateEQ[CLDFB_NO_CHANNELS_MAX]; - uint8_t applyLowBitRateEQ; - int16_t dirac_read_idx; - - hDirAC = st_ivas->hDirAC; - h = st_ivas->hDiracDecBin; - separateCenterChannelRendering = st_ivas->hOutSetup.separateChannelEnabled; - nBins = hDirAC->num_freq_bands; /* Actually bins */ - - set_zero( h->ChCrossRe, nBins ); - set_zero( h->ChCrossIm, nBins ); - set_zero( h->ChCrossReOut, nBins ); - set_zero( h->ChCrossImOut, nBins ); - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - set_zero( h->ChEne[ch], nBins ); - set_zero( h->ChEneOut[ch], nBins ); - } - set_zero( h->frameMeanDiffuseness, nBins ); - - set_zero( frameMeanDiffusenessEneWeight, CLDFB_NO_CHANNELS_MAX ); - - /* Determine EQ for low bit rates (13.2 and 16.4 kbps) */ - applyLowBitRateEQ = 0; - if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MC_FORMAT ) && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE ) - { - applyLowBitRateEQ = 1; - if ( st_ivas->hDecoderConfig->ivas_total_brate == IVAS_16k4 ) - { - for ( bin = 0; bin < LOW_BIT_RATE_BINAURAL_EQ_BINS; bin++ ) - { - lowBitRateEQ[bin + LOW_BIT_RATE_BINAURAL_EQ_OFFSET] = lowBitRateBinauralEQ[bin] * 0.5f + 0.5f; - } - } - else - { - for ( bin = 0; bin < LOW_BIT_RATE_BINAURAL_EQ_BINS; bin++ ) - { - lowBitRateEQ[bin + LOW_BIT_RATE_BINAURAL_EQ_OFFSET] = lowBitRateBinauralEQ[bin]; - } - } - } - - /* Formulate input and target covariance matrices combining all subframes */ - for ( subframe = firstSubframe; subframe < ( firstSubframe + nSubframes ); subframe++ ) - { - float subFrameTotalEne[CLDFB_NO_CHANNELS_MAX]; - - set_zero( subFrameTotalEne, CLDFB_NO_CHANNELS_MAX ); - dirac_read_idx = hDirAC->dirac_read_idx; - - /* Calculate input covariance matrix */ - for ( slot = 0; slot < (uint8_t) hDirAC->subframe_nbslots; slot++ ) - { - int16_t slotThis = slot + ( hDirAC->subframe_nbslots * subframe ); - - for ( bin = 0; bin < nBins; bin++ ) - { - for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - float instEne; - - instEne = ( inRe[ch][slotThis][bin] * inRe[ch][slotThis][bin] ); - instEne += ( inIm[ch][slotThis][bin] * inIm[ch][slotThis][bin] ); - h->ChEne[ch][bin] += instEne; - subFrameTotalEne[bin] += instEne; - } - h->ChCrossRe[bin] += inRe[0][slotThis][bin] * inRe[1][slotThis][bin]; - h->ChCrossRe[bin] += inIm[0][slotThis][bin] * inIm[1][slotThis][bin]; - h->ChCrossIm[bin] += inRe[0][slotThis][bin] * inIm[1][slotThis][bin]; - h->ChCrossIm[bin] -= inIm[0][slotThis][bin] * inRe[1][slotThis][bin]; - } - } - - /* Apply EQ at low bit rates */ - if ( applyLowBitRateEQ ) - { - int16_t lastEqBin = LOW_BIT_RATE_BINAURAL_EQ_OFFSET + LOW_BIT_RATE_BINAURAL_EQ_BINS - 1; - - for ( bin = LOW_BIT_RATE_BINAURAL_EQ_OFFSET; bin < lastEqBin; bin++ ) - { - subFrameTotalEne[bin] *= lowBitRateEQ[bin]; - } - for ( ; bin < nBins; bin++ ) - { - subFrameTotalEne[bin] *= lowBitRateEQ[lastEqBin]; - } - } - - if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->nchan_transport == 2 ) - { - float tempRe, tempIm; - - set_zero( subFrameTotalEne, CLDFB_NO_CHANNELS_MAX ); - - for ( slot = 0; slot < (uint8_t) hDirAC->subframe_nbslots; slot++ ) - { - int16_t slotThis = slot + ( hDirAC->subframe_nbslots * subframe ); - - for ( bin = 0; bin < nBins; bin++ ) - { - tempRe = inRe[0][slotThis][bin] + inRe[1][slotThis][bin]; - tempIm = inIm[0][slotThis][bin] + inIm[1][slotThis][bin]; - subFrameTotalEne[bin] += tempRe * tempRe + tempIm * tempIm; - } - } - } - - /* Determine target covariance matrix containing target binaural properties */ - for ( bin = 0; bin < nBins; bin++ ) - { - float diffuseness = 1.0f; /* ratio1 and ratio2 are subtracted from diffuseness further below */ - float surCoh = 0.0f, spreadCoh = 0.0f; /* Default values if spreadSurroundCoherenceApplied == false */ - float diffEne, dirEne, meanEnePerCh; - uint16_t dirIndex; - - /* When BINAURAL_ROOM is not indicated, hBinaural->earlyPartEneCorrection[bin] values are all 1.0f. - * When BINAURAL_ROOM is indicated, the binaural audio output is based on combined use of the - * HRTF data set and a BRIR-based data set. The HRTF data set is spectrally corrected to match - * the early spectrum of the BRIR data, using the spectral correction data in - * hBinaural->earlyPartEneCorrection[bin], based on the BRIR set. */ - meanEnePerCh = h->earlyPartEneCorrection[bin] * subFrameTotalEne[bin] / 2.0f; - - /* Determine direct part target covariance matrix (for 1 or 2 directions) */ - for ( dirIndex = 0; dirIndex < hDirAC->numSimultaneousDirections; dirIndex++ ) - { - int16_t aziDeg, eleDeg; - float lRealp, lImagp, rRealp, rImagp; - float lRealpTmp, lImagpTmp, rRealpTmp, rImagpTmp; - float hrtfEne[BINAURAL_CHANNELS], hrtfCrossRe, hrtfCrossIm, ratio; - - if ( dirIndex == 0 ) /* For first of the two simultaneous directions */ - { - aziDeg = hDirAC->azimuth[dirac_read_idx][bin]; - eleDeg = hDirAC->elevation[dirac_read_idx][bin]; - ratio = hDirAC->energy_ratio1[dirac_read_idx][bin]; - spreadCoh = hDirAC->spreadCoherence[dirac_read_idx][bin]; - } - else /* For second of the two simultaneous directions */ - { - aziDeg = hDirAC->azimuth2[dirac_read_idx][bin]; - eleDeg = hDirAC->elevation2[dirac_read_idx][bin]; - ratio = hDirAC->energy_ratio2[dirac_read_idx][bin]; - spreadCoh = hDirAC->spreadCoherence2[dirac_read_idx][bin]; - } - diffuseness -= ratio; /* diffuseness = 1 - ratio1 - ratio2 */ - - if ( separateCenterChannelRendering ) - { - /* In masa + mono rendering mode, the center directions originate from phantom sources, so the - * spread coherence is increased */ - float aziRad, eleRad, doaVectorX, spatialAngleDeg, altSpreadCoh; - - aziRad = (float) aziDeg * PI_OVER_180; - eleRad = (float) eleDeg * PI_OVER_180; - doaVectorX = cosf( aziRad ) * cosf( eleRad ); - spatialAngleDeg = acosf( doaVectorX ) * _180_OVER_PI; - altSpreadCoh = 1.0f - ( spatialAngleDeg / 30.0f ); - spreadCoh = max( spreadCoh, altSpreadCoh ); - } - - getDirectPartGains( bin, aziDeg, eleDeg, &lRealp, &lImagp, &rRealp, &rImagp, h->renderStereoOutputInsteadOfBinaural, Rmat ); - - if ( h->renderStereoOutputInsteadOfBinaural ) - { - /* Synthesizing spread coherence is not needed for stereo loudspeaker output, - * as directional sound is reproduced with two loudspeakers in any case */ - spreadCoh = 0.0f; - } - - if ( spreadCoh > 0.0f ) - { - float centerMul, sidesMul; - float hrtfEneCenter, hrtfEneSides, hrtfEneRealized, eneCorrectionFactor; - float w1, w2, w3, eq; - - hrtfEneCenter = ( lRealp * lRealp ) + ( lImagp * lImagp ) + ( rRealp * rRealp ) + ( rImagp * rImagp ); - - /* Spread coherence is synthesized as coherent sources at 30 degree horizontal spacing. - * The following formulas determine the gains for these sources. - * spreadCoh = 0: Only panning - * spreadCoh = 0.5: Three sources coherent panning (e.g. 30 0 -30 deg azi) - * spreadCoh = 1.0: Two sources coherent panning with gap (as above, but center is silent) */ - if ( spreadCoh < 0.5f ) - { - /* 0.0f < spreadCoh < 0.5f */ - sidesMul = 0.5774f * spreadCoh * 2.0f; /* sqrt(1/3) = 0.5774f */ - centerMul = 1.0f - ( spreadCoh * 2.0f ) + sidesMul; - } - else - { - /* 0.5f <= spreadCoh < 1.0f */ - centerMul = 2.0f - ( 2.0f * spreadCoh ); - sidesMul = inv_sqrt( centerMul + 2.0f ); - centerMul *= sidesMul; - } - - /* Apply the gain for the center source of the three coherent sources */ - lRealp *= centerMul; - lImagp *= centerMul; - rRealp *= centerMul; - rImagp *= centerMul; - - /* Apply the gain for the left source of the three coherent sources */ - getDirectPartGains( bin, aziDeg + 30, eleDeg, &lRealpTmp, &lImagpTmp, &rRealpTmp, &rImagpTmp, h->renderStereoOutputInsteadOfBinaural, Rmat ); - - hrtfEneSides = ( lRealpTmp * lRealpTmp ) + ( lImagpTmp * lImagpTmp ) + ( rRealpTmp * rRealpTmp ) + ( rImagpTmp * rImagpTmp ); - lRealp += sidesMul * lRealpTmp; - lImagp += sidesMul * lImagpTmp; - rRealp += sidesMul * rRealpTmp; - rImagp += sidesMul * rImagpTmp; - - /* Apply the gain for the right source of the three coherent sources. - * -30 degrees to 330 wrapping due to internal functions. */ - getDirectPartGains( bin, aziDeg + 330, eleDeg, &lRealpTmp, &lImagpTmp, &rRealpTmp, &rImagpTmp, h->renderStereoOutputInsteadOfBinaural, Rmat ); - - hrtfEneSides += ( lRealpTmp * lRealpTmp ) + ( lImagpTmp * lImagpTmp ) + ( rRealpTmp * rRealpTmp ) + ( rImagpTmp * rImagpTmp ); - lRealp += sidesMul * lRealpTmp; - lImagp += sidesMul * lImagpTmp; - rRealp += sidesMul * rRealpTmp; - rImagp += sidesMul * rImagpTmp; - - /* Formulate an eneCorrectionFactor that compensates for the coherent summation of the HRTFs */ - hrtfEneRealized = ( lRealp * lRealp ) + ( lImagp * lImagp ) + ( rRealp * rRealp ) + ( rImagp * rImagp ); - eneCorrectionFactor = ( ( hrtfEneSides * sidesMul * sidesMul ) + - ( hrtfEneCenter * centerMul * centerMul ) ) / - max( 1e-12f, hrtfEneRealized ); - - /* Weighting factors to determine appropriate target spectrum for spread coherent sound */ - if ( spreadCoh < 0.5 ) - { - w1 = 1.0f - 2.0f * spreadCoh; - w2 = 2.0f * spreadCoh; - w3 = 0.0f; - } - else - { - w1 = 0.0f; - w2 = 2.0f - 2.0f * spreadCoh; - w3 = 2.0f * spreadCoh - 1.0f; - } - - if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) - { - idx = min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 ); - - /* Apply the target spectrum to the eneCorrectionFactor */ - if ( separateCenterChannelRendering ) /* spreadCoh mostly originates from phantom sources in separate channel rendering mode */ - { - eneCorrectionFactor *= w1 * 1.0f + ( w2 + w3 ) * spreadCohEne1[idx]; - } - else - { - eneCorrectionFactor *= w1 * 1.0f + w2 * spreadCohEne05[idx] + w3 * spreadCohEne1[idx]; - } - } - - /* Equalize the spread coherent combined HRTFs */ - eq = min( 4.0f, sqrtf( eneCorrectionFactor ) ); - lRealp *= eq; - lImagp *= eq; - rRealp *= eq; - rImagp *= eq; - } - - hrtfEne[0] = ( lRealp * lRealp ) + ( lImagp * lImagp ); - hrtfEne[1] = ( rRealp * rRealp ) + ( rImagp * rImagp ); - hrtfCrossRe = ( lRealp * rRealp ) + ( lImagp * rImagp ); - hrtfCrossIm = ( -lImagp * rRealp ) + ( lRealp * rImagp ); - - /* Add direct part (1 or 2) covariance matrix */ - dirEne = ratio * meanEnePerCh; - h->ChEneOut[0][bin] += dirEne * hrtfEne[0]; /* Dir ene part*/ - h->ChEneOut[1][bin] += dirEne * hrtfEne[1]; - h->ChCrossReOut[bin] += dirEne * hrtfCrossRe; /* Dir cross re */ - h->ChCrossImOut[bin] += dirEne * hrtfCrossIm; /* Dir cross im */ - } - - /* Add diffuse / ambient part covariance matrix */ - diffuseness = max( 0.0f, diffuseness ); - diffEne = diffuseness * meanEnePerCh; - surCoh = hDirAC->surroundingCoherence[dirac_read_idx][bin]; - if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) + diffuseness = max( 0.0f, diffuseness ); + diffEne = diffuseness * meanEnePerCh; + surCoh = hDirAC->surroundingCoherence[dirac_read_idx][bin]; + if ( ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) ) + { + if ( !h->renderStereoOutputInsteadOfBinaural ) { - if ( !h->renderStereoOutputInsteadOfBinaural ) - { - idx = min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 ); - /* Apply target spectrum that emphasizes low frequencies when the sound is surround coherent */ - diffEne *= ( 1.0f - surCoh ) + surCoh * surCohEne[idx]; - } + idx = min( bin, MASA_NUM_DEFINED_SUR_SPR_COH_ENE_BINS - 1 ); + /* Apply target spectrum that emphasizes low frequencies when the sound is surround coherent */ + diffEne *= ( 1.0f - surCoh ) + surCoh * surCohEne[idx]; } - h->ChEneOut[0][bin] += diffEne; /* Diff ene part*/ - h->ChEneOut[1][bin] += diffEne; + } + h->ChEneOut[0][bin] += diffEne; /* Diff ene part*/ + h->ChEneOut[1][bin] += diffEne; - if ( h->renderStereoOutputInsteadOfBinaural ) + if ( h->renderStereoOutputInsteadOfBinaural ) + { + /* When rendering stereo, ambience (except for surround coherent sound) has zero ICC. */ + h->ChCrossReOut[bin] += surCoh * diffEne; + } + else /* When rendering binaural, ambience has frequency dependent ICC. */ + { + if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && bin < BINAURAL_COHERENCE_DIFFERENCE_BINS ) { - /* When rendering stereo, ambience (except for surround coherent sound) has zero ICC. */ - h->ChCrossReOut[bin] += surCoh * diffEne; + float diffuseFieldCoherence; +#ifdef JBM_TSM_ON_TCS + diffuseFieldCoherence = hDirAC->hDiffuseDist->diffuseRatioX[bin] * h->diffuseFieldCoherenceX[bin] + hDirAC->hDiffuseDist->diffuseRatioY[bin] * h->diffuseFieldCoherenceY[bin] + hDirAC->hDiffuseDist->diffuseRatioZ[bin] * h->diffuseFieldCoherenceZ[bin]; +#else + diffuseFieldCoherence = hDirAC->hDiffuseDist->diffuseRatioX[subframe][bin] * h->diffuseFieldCoherenceX[bin] + hDirAC->hDiffuseDist->diffuseRatioY[subframe][bin] * h->diffuseFieldCoherenceY[bin] + hDirAC->hDiffuseDist->diffuseRatioZ[subframe][bin] * h->diffuseFieldCoherenceZ[bin]; +#endif + h->ChCrossReOut[bin] += ( ( 1.0f - surCoh ) * diffuseFieldCoherence + surCoh ) * diffEne; } - else /* When rendering binaural, ambience has frequency dependent ICC. */ + else { - if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && bin < BINAURAL_COHERENCE_DIFFERENCE_BINS ) - { - float diffuseFieldCoherence; - diffuseFieldCoherence = hDirAC->hDiffuseDist->diffuseRatioX[subframe][bin] * h->diffuseFieldCoherenceX[bin] + hDirAC->hDiffuseDist->diffuseRatioY[subframe][bin] * h->diffuseFieldCoherenceY[bin] + hDirAC->hDiffuseDist->diffuseRatioZ[subframe][bin] * h->diffuseFieldCoherenceZ[bin]; - h->ChCrossReOut[bin] += ( ( 1.0f - surCoh ) * diffuseFieldCoherence + surCoh ) * diffEne; - } - else - { - h->ChCrossReOut[bin] += ( ( 1.0f - surCoh ) * h->diffuseFieldCoherence[bin] + surCoh ) * diffEne; - } + h->ChCrossReOut[bin] += ( ( 1.0f - surCoh ) * h->diffuseFieldCoherence[bin] + surCoh ) * diffEne; } - - /* Store parameters for formulating average diffuseness over frame */ - h->frameMeanDiffuseness[bin] += diffEne; - frameMeanDiffusenessEneWeight[bin] += meanEnePerCh; } - hDirAC->dirac_read_idx = ( hDirAC->dirac_read_idx + 1 ) % hDirAC->dirac_md_buffer_length; + /* Store parameters for formulating average diffuseness over frame */ + h->frameMeanDiffuseness[bin] += diffEne; + frameMeanDiffusenessEneWeight[bin] += meanEnePerCh; } /* Formulate average diffuseness over frame */ @@ -1661,11 +1133,11 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric /* Temporal IIR-type smoothing of covariance matrices */ if ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->hDecoderConfig->ivas_total_brate < MASA_STEREO_MIN_BITRATE ) { - IIReneLimiterFactor = 16.0f / (float) nSubframes + ( 1.0f - qualityBasedSmFactor ); + IIReneLimiterFactor = 16.0f + ( 1.0f - qualityBasedSmFactor ); } else { - IIReneLimiterFactor = 8.0f / (float) nSubframes + ( 1.0f - qualityBasedSmFactor ); + IIReneLimiterFactor = 8.0f + ( 1.0f - qualityBasedSmFactor ); } for ( bin = 0; bin < nBins; bin++ ) { @@ -1714,7 +1186,6 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric return; } -#endif static void ivas_dirac_dec_binaural_determine_processing_matrices( @@ -1722,11 +1193,7 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices( const int16_t max_band_decorr, float Rmat[3][3] ) { -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS int16_t chA, chB, bin; -#else - uint8_t chA, chB, bin; -#endif uint8_t separateCenterChannelRendering; int16_t nBins; DIRAC_DEC_BIN_HANDLE h; @@ -1888,11 +1355,16 @@ static void ivas_dirac_dec_binaural_determine_processing_matrices( return; } +#ifdef JBM_TSM_ON_TCS +#endif -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS static void ivas_dirac_dec_binaural_process_output( Decoder_Struct *st_ivas, +#ifdef JBM_TSM_ON_TCS + float *output_f[], +#else float output_f[][L_FRAME48k], +#endif float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t max_band_decorr, @@ -1910,21 +1382,41 @@ static void ivas_dirac_dec_binaural_process_output( float *decSlotRePointer; float *decSlotImPointer; int16_t offsetSamples; +#ifdef JBM_TSM_ON_TCS + int16_t nSlots; +#endif h = st_ivas->hDiracDecBin; nBins = st_ivas->hDirAC->num_freq_bands; +#ifdef JBM_TSM_ON_TCS + offsetSamples = 0; + nSlots = st_ivas->hDirAC->subframe_nbslots[subframe]; +#else offsetSamples = subframe * CLDFB_SLOTS_PER_SUBFRAME * nBins; +#endif if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { /* Process second / room effect part of binaural output when needed */ +#ifdef JBM_TSM_ON_TCS + ivas_binaural_reverb_processSubframe( st_ivas->hDiracDecBin->hReverb, numInChannels, nSlots, inRe, inIm, reverbRe, reverbIm ); +#else ivas_binaural_reverb_processSubframe( st_ivas->hDiracDecBin->hReverb, numInChannels, inRe, inIm, reverbRe, reverbIm ); +#endif } interpVal = 0.0f; +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < nSlots; slot++ ) +#else for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#endif { +#ifdef JBM_TSM_ON_TCS + interpVal += 1.0f / (float) nSlots; +#else interpVal += 1.0f / ( (float) CLDFB_SLOTS_PER_SUBFRAME ); +#endif if ( !st_ivas->hDiracDecBin->useTdDecorr && max_band_decorr > 0 ) { ivas_dirac_dec_decorrelate_slot( st_ivas->hDirAC, slot, inRe, inIm, decSlotRe, decSlotIm ); @@ -1999,126 +1491,18 @@ static void ivas_dirac_dec_binaural_process_output( return; } -#else -static void ivas_dirac_dec_binaural_process_output( - Decoder_Struct *st_ivas, - float output_f[][L_FRAME48k], - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const int16_t max_band_decorr, - const uint8_t numInChannels, - const uint8_t firstSlot, - const uint8_t slotEnd ) -{ - uint8_t slot, bin, chA, chB; - int16_t nBins; - float outSlotRe[CLDFB_NO_CHANNELS_MAX], outSlotIm[CLDFB_NO_CHANNELS_MAX]; - float decSlotRe[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX], decSlotIm[BINAURAL_CHANNELS][CLDFB_NO_CHANNELS_MAX]; - float reverbRe[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float reverbIm[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - uint8_t numSlots; - DIRAC_DEC_BIN_HANDLE h; - float interpVal; - float *decSlotRePointer; - float *decSlotImPointer; - - numSlots = slotEnd - firstSlot; - h = st_ivas->hDiracDecBin; - nBins = st_ivas->hDirAC->num_freq_bands; - - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) - { - /* Process second / room effect part of binaural output when needed */ - ivas_binaural_reverb_processFrame( st_ivas->hDiracDecBin->hReverb, numInChannels, inRe, inIm, reverbRe, reverbIm, firstSlot ); - } - - interpVal = 0.0f; - for ( slot = firstSlot; slot < ( firstSlot + numSlots ); slot++ ) - { - interpVal += 1.0f / (float) numSlots; - if ( !st_ivas->hDiracDecBin->useTdDecorr && max_band_decorr > 0 ) - { - ivas_dirac_dec_decorrelate_slot( st_ivas->hDirAC, slot, inRe, inIm, decSlotRe, decSlotIm ); - } - - for ( chA = 0; chA < BINAURAL_CHANNELS; chA++ ) - { - float *outSlotRePr, *outSlotImPr; /* Pointers needed for function call compatibility */ - - set_zero( outSlotRe, CLDFB_NO_CHANNELS_MAX ); - set_zero( outSlotIm, CLDFB_NO_CHANNELS_MAX ); - - /* Processing of the first / HRTF part of the binaural output. */ - for ( chB = 0; chB < numInChannels; chB++ ) - { - if ( st_ivas->hDiracDecBin->useTdDecorr ) - { - decSlotRePointer = inRe[chB + 2][slot]; - decSlotImPointer = inIm[chB + 2][slot]; - } - else - { - decSlotRePointer = decSlotRe[chB]; - decSlotImPointer = decSlotIm[chB]; - } - - for ( bin = 0; bin < nBins; bin++ ) - { - float gain; - - /* Mixing using the formulated processing matrix M */ - gain = ( 1.0f - interpVal ) * h->processMtxRePrev[chA][chB][bin] + - interpVal * h->processMtxRe[chA][chB][bin]; - outSlotRe[bin] += gain * inRe[chB][slot][bin]; - outSlotIm[bin] += gain * inIm[chB][slot][bin]; - - gain = ( 1.0f - interpVal ) * h->processMtxImPrev[chA][chB][bin] + - interpVal * h->processMtxIm[chA][chB][bin]; - outSlotRe[bin] -= gain * inIm[chB][slot][bin]; - outSlotIm[bin] += gain * inRe[chB][slot][bin]; - - /* Mixing decorrelated signals using the formulated residual processing matrix Mdec */ - if ( bin < max_band_decorr && chB < 2 ) - { - gain = ( 1.0f - interpVal ) * h->processMtxDecRePrev[chA][chB][bin] + - interpVal * h->processMtxDecRe[chA][chB][bin]; - outSlotRe[bin] += gain * decSlotRePointer[bin]; - outSlotIm[bin] += gain * decSlotImPointer[bin]; - - gain = ( 1.0f - interpVal ) * h->processMtxDecImPrev[chA][chB][bin] + - interpVal * h->processMtxDecIm[chA][chB][bin]; - outSlotRe[bin] -= gain * decSlotImPointer[bin]; - outSlotIm[bin] += gain * decSlotRePointer[bin]; - } - } - } - - if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) - { - /* Combine second (reverb) part with the first (HRTF) part to obtain binaural output signal with room effect */ - v_add( outSlotRe, reverbRe[chA][slot], outSlotRe, CLDFB_NO_CHANNELS_MAX ); - v_add( outSlotIm, reverbIm[chA][slot], outSlotIm, CLDFB_NO_CHANNELS_MAX ); - } - outSlotRePr = &( outSlotRe[0] ); - outSlotImPr = &( outSlotIm[0] ); - - /* Inverse filter bank */ - cldfbSynthesis( &outSlotRePr, &outSlotImPr, &( output_f[chA][nBins * slot] ), nBins, st_ivas->cldfbSynDec[chA] ); - } - } - - return; -} +#ifdef JBM_TSM_ON_TCS #endif - -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS static void adaptTransportSignalsHeadtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, +#ifdef JBM_TSM_ON_TCS + const int16_t nSlots, +#endif float Rmat[3][3] ) { int16_t slot, ch, bin, louderCh; @@ -2150,7 +1534,11 @@ static void adaptTransportSignalsHeadtracked( for ( ch = 0; ch < 2; ch++ ) { ch_nrg[ch] = 0.0f; +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < nSlots; slot++ ) +#else for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#endif { for ( bin = bin_lo; bin < bin_hi; bin++ ) { @@ -2186,7 +1574,11 @@ static void adaptTransportSignalsHeadtracked( { float band_nrg = 0.0f; +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < nSlots; slot++ ) +#else for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#endif { for ( bin = bin_lo; bin < bin_hi; bin++ ) { @@ -2212,7 +1604,11 @@ static void adaptTransportSignalsHeadtracked( ene_proc = hHeadTrackData->procChEneIIR[0][band_idx] + hHeadTrackData->procChEneIIR[1][band_idx]; eqVal = fminf( 4.0f, sqrtf( ene_target / fmaxf( 1e-12f, ene_proc ) ) ); +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < nSlots; slot++ ) +#else for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#endif { for ( ch = 0; ch < 2; ch++ ) { @@ -2227,156 +1623,18 @@ static void adaptTransportSignalsHeadtracked( return; } -#else -static void adaptTransportSignalsHeadtracked( - HEAD_TRACK_DATA_HANDLE hHeadTrackData, - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const uint8_t firstSlot, - const uint8_t slotEnd, - const uint8_t nBins, - float Rmat[3][3] ) -{ - int16_t slot, ch, bin, louderCh; - float ILD, mono_factor_ILD, mono_factor_rotation, mono_factor, y_val, ene_proc, ene_target; - uint8_t n_slots_per_sf, sf_idx, n_sf; - int16_t max_band; - - /* Determine head-orientation-based mono factor. - Rmat[1][1] entry informs how close the ears are aligned according to transport signals. */ - y_val = 1.0f - fabsf( Rmat[1][1] ); - mono_factor_rotation = ( y_val - ADAPT_HTPROTO_ROT_LIM_0 ) / ( ADAPT_HTPROTO_ROT_LIM_1 - ADAPT_HTPROTO_ROT_LIM_0 ); - mono_factor_rotation = fmaxf( 0.0f, fminf( 1.0f, mono_factor_rotation ) ); - - /* Adapt transport signals in frequency bands */ - /* optimization grouping CLDFB bins into MASA bands (they are readily available in ROM and suitable for the task) AND group CLDFB slots into sub-frames */ - n_slots_per_sf = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; - n_sf = ( slotEnd - firstSlot ) / n_slots_per_sf; - - max_band = 0; - while ( max_band < MASA_FREQUENCY_BANDS && MASA_band_grouping_24[max_band] < nBins ) - { - max_band++; - } - - for ( sf_idx = 0; sf_idx < n_sf; sf_idx++ ) - { - float eqVal; - uint8_t start_slot, stop_slot; - int16_t band_idx, bin_lo, bin_hi; - - start_slot = firstSlot + sf_idx * n_slots_per_sf; - stop_slot = start_slot + n_slots_per_sf; - - for ( band_idx = 0; band_idx < max_band; band_idx++ ) - { - float ch_nrg[2]; /* storage for input signal channel energies */ - bin_lo = MASA_band_grouping_24[band_idx]; - bin_hi = min( MASA_band_grouping_24[band_idx + 1], (int16_t) nBins ); - for ( ch = 0; ch < 2; ch++ ) - { - ch_nrg[ch] = 0.0f; - for ( slot = start_slot; slot < stop_slot; slot++ ) - { - for ( bin = bin_lo; bin < bin_hi; bin++ ) - { - ch_nrg[ch] += ( inRe[ch][slot][bin] * inRe[ch][slot][bin] ) + ( inIm[ch][slot][bin] * inIm[ch][slot][bin] ); - } - } - hHeadTrackData->chEneIIR[ch][band_idx] *= ADAPT_HTPROTO_IIR_FAC; - hHeadTrackData->chEneIIR[ch][band_idx] += ( 1.0f - ADAPT_HTPROTO_IIR_FAC ) * ch_nrg[ch]; - } - - /* Determine ILD */ - ILD = fabsf( 10.0f * log10f( fmaxf( 1e-12f, hHeadTrackData->chEneIIR[0][band_idx] ) / fmaxf( 1e-12f, hHeadTrackData->chEneIIR[1][band_idx] ) ) ); - if ( hHeadTrackData->chEneIIR[1][band_idx] > hHeadTrackData->chEneIIR[0][band_idx] ) - { - louderCh = 1; - } - else - { - louderCh = 0; - } - - /* Determine ILD-based mono factor */ - mono_factor_ILD = ( ILD - ADAPT_HTPROTO_ILD_LIM_DB0 ) / ( ADAPT_HTPROTO_ILD_LIM_DB1 - ADAPT_HTPROTO_ILD_LIM_DB0 ); - mono_factor_ILD = fmaxf( 0.0f, fminf( 1.0f, mono_factor_ILD ) ); - - /* Combine mono factors */ - mono_factor = mono_factor_ILD * mono_factor_rotation; - - /* Mix original audio and sum signal according to determined mono factor */ - for ( ch = 0; ch < 2; ch++ ) - { - if ( ch != louderCh ) - { - float band_nrg = 0.0f; - - for ( slot = start_slot; slot < stop_slot; slot++ ) - { - for ( bin = bin_lo; bin < bin_hi; bin++ ) - { - /* mono sum signal with the computed weight + rest from the original channel */ - inRe[ch][slot][bin] = mono_factor * ( inRe[0][slot][bin] + inRe[1][slot][bin] ) + ( 1.0f - mono_factor ) * inRe[ch][slot][bin]; - inIm[ch][slot][bin] = mono_factor * ( inIm[0][slot][bin] + inIm[1][slot][bin] ) + ( 1.0f - mono_factor ) * inIm[ch][slot][bin]; - band_nrg += ( inRe[ch][slot][bin] * inRe[ch][slot][bin] ) + ( inIm[ch][slot][bin] * inIm[ch][slot][bin] ); - } - } - hHeadTrackData->procChEneIIR[ch][band_idx] *= ADAPT_HTPROTO_IIR_FAC; - hHeadTrackData->procChEneIIR[ch][band_idx] += ( 1.0f - ADAPT_HTPROTO_IIR_FAC ) * band_nrg; - } - else - { - /* processed signal is input. use the original channel, so no need to compute new signals or signal energy */ - hHeadTrackData->procChEneIIR[ch][band_idx] *= ADAPT_HTPROTO_IIR_FAC; - hHeadTrackData->procChEneIIR[ch][band_idx] += ( 1.0f - ADAPT_HTPROTO_IIR_FAC ) * ch_nrg[ch]; - } - } - - /* Equalize */ - ene_target = hHeadTrackData->chEneIIR[0][band_idx] + hHeadTrackData->chEneIIR[1][band_idx]; - ene_proc = hHeadTrackData->procChEneIIR[0][band_idx] + hHeadTrackData->procChEneIIR[1][band_idx]; - eqVal = fminf( 4.0f, sqrtf( ene_target / fmaxf( 1e-12f, ene_proc ) ) ); - - for ( slot = start_slot; slot < stop_slot; slot++ ) - { - for ( ch = 0; ch < 2; ch++ ) - { - for ( bin = bin_lo; bin < bin_hi; bin++ ) - { - inRe[ch][slot][bin] *= eqVal; - inIm[ch][slot][bin] *= eqVal; - } - } - } - } - } - - return; -} -#endif -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( HEAD_TRACK_DATA_HANDLE hHeadTrackData, float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], const int16_t nBins, +#ifdef JBM_TSM_ON_TCS + const int16_t nSlots, +#endif float Rmat[3][3] ) { int16_t slot, bin, ch; -#else -static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( - HEAD_TRACK_DATA_HANDLE hHeadTrackData, - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const uint8_t firstSlot, - const uint8_t slotEnd, - const uint8_t nBins, - float Rmat[3][3] ) -{ - uint8_t slot, bin, ch; -#endif float tmpVal; /* When not currently in prototype signal left-right switching procedure, check if such switching is needed */ @@ -2396,10 +1654,10 @@ static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( /* When currently in interpolation */ if ( hHeadTrackData->lrSwitchedNext != hHeadTrackData->lrSwitchedCurrent ) { -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS - for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < nSlots; slot++ ) #else - for ( slot = firstSlot; slot < slotEnd; slot++ ) + for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) #endif { float switchOrderFactor, origOrderFactor; @@ -2456,10 +1714,10 @@ static void ivas_dirac_dec_binaural_check_and_switch_transports_headtracked( /* If not in interpolation, but in switched prototype situation, then switch left and right channels */ if ( hHeadTrackData->lrSwitchedCurrent == 1 ) { -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS - for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) +#ifdef JBM_TSM_ON_TCS + for ( slot = 0; slot < nSlots; slot++ ) #else - for ( slot = firstSlot; slot < slotEnd; slot++ ) + for ( slot = 0; slot < CLDFB_SLOTS_PER_SUBFRAME; slot++ ) #endif { for ( bin = 0; bin < nBins; bin++ ) @@ -2922,39 +2180,20 @@ static void hrtfShGetHrtf( *------------------------------------------------------------------------*/ /*! r: Configured reqularization factor value */ -#ifndef FIX_417_TD_DECORR_BRATE_SW -static -#endif - float - configure_reqularization_factor( - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - const int32_t ivas_total_brate /* i : IVAS total bitrate */ - ) +float configure_reqularization_factor( + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const int32_t ivas_total_brate /* i : IVAS total bitrate */ +) { float reqularizationFactor; reqularizationFactor = 1.0f; /* Default value */ if ( ivas_format == MASA_FORMAT ) { -#ifdef FIX_447_PARAMBIN_MASA_REGU_FAC if ( ivas_total_brate >= IVAS_160k ) { reqularizationFactor = 0.4f; } -#else - if ( ivas_total_brate >= IVAS_256k ) - { - reqularizationFactor = 0.2f; - } - else if ( ivas_total_brate == IVAS_192k ) - { - reqularizationFactor = 0.3f; - } - else if ( ivas_total_brate == IVAS_160k ) - { - reqularizationFactor = 0.4f; - } -#endif else if ( ivas_total_brate == IVAS_128k ) { reqularizationFactor = 0.5f; @@ -2977,11 +2216,7 @@ static { if ( ivas_total_brate >= IVAS_96k ) { -#ifdef FIX_447_PARAMBIN_MASA_REGU_FAC reqularizationFactor = 0.4f; -#else - reqularizationFactor = 0.3f; -#endif } else if ( ivas_total_brate >= IVAS_80k ) { diff --git a/lib_rend/ivas_limiter.c b/lib_rend/ivas_limiter.c index 28c272bc0c820c180908817035d9446a12d6b819..7875165e51d0ce47be819eba3bd6124fe92061be 100644 --- a/lib_rend/ivas_limiter.c +++ b/lib_rend/ivas_limiter.c @@ -171,11 +171,15 @@ void ivas_limiter_close( *-------------------------------------------------------------------*/ void ivas_limiter_dec( - IVAS_LIMITER_HANDLE hLimiter, /* i/o: limiter struct handle */ + IVAS_LIMITER_HANDLE hLimiter, /* i/o: limiter struct handle */ +#ifdef JBM_TSM_ON_TCS + float *output[MAX_OUTPUT_CHANNELS], /* i/o: input/output buffer */ +#else float output[MAX_OUTPUT_CHANNELS][L_FRAME48k], /* i/o: input/output buffer */ - const int16_t num_channels, /* i : number of channels to be processed */ - const int16_t output_frame, /* i : number of samples per channel in the buffer */ - const int16_t BER_detect /* i : BER detect flag */ +#endif + const int16_t num_channels, /* i : number of channels to be processed */ + const int16_t output_frame, /* i : number of samples per channel in the buffer */ + const int16_t BER_detect /* i : BER detect flag */ ) { int16_t c; diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 0618534448deec903f1f016e8d2f8030f84e028f..f4063edc48001f134d5a482b894084fe3c9a31ef 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -34,6 +34,7 @@ #include #include "options.h" #include "prot.h" +#include "ivas_prot.h" #include "ivas_prot_rend.h" #include #include "ivas_rom_com.h" @@ -47,9 +48,12 @@ * Local function prototypes *---------------------------------------------------------------------*/ + static void TDREND_Clear_Update_flags( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd ); + static void angles_to_vec( const float radius, const float azimuth, const float elevation, float *vec ); + /*---------------------------------------------------------------------* * ivas_td_binaural_open_unwrap() * @@ -259,14 +263,27 @@ ivas_error ivas_td_binaural_renderer_unwrap( const int16_t Opt_Headrotation, /* i : Head rotation flag */ const IVAS_QUATERNION *Quaternions, /* i : Head tracking data per subframe */ const IVAS_VECTOR3 *Pos, /* i : Listener position data per subframe */ - float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ - const int16_t output_frame /* i : output frame length */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: SCE channels / Binaural synthesis */ +#else + float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ +#endif + const int16_t output_frame /* i : output frame length */ ) { int16_t subframe_length; int16_t subframe_idx; float reverb_signal[BINAURAL_CHANNELS][L_FRAME48k]; ivas_error error; +#ifdef JBM_TSM_ON_TCS + float *p_reverb_signal[BINAURAL_CHANNELS]; + int16_t ch; + + for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + p_reverb_signal[ch] = reverb_signal[ch]; + } +#endif subframe_length = output_frame / MAX_PARAM_SPATIAL_SUBFRAMES; @@ -280,7 +297,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( if ( hReverb != NULL && hReverb->pConfig.roomAcoustics.late_reverb_on ) { +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_reverb_process( hReverb, transport_config, 0, output, p_reverb_signal, subframe_idx ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_reverb_process( hReverb, transport_config, 0, output, reverb_signal, subframe_idx ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -313,9 +334,13 @@ ivas_error ivas_td_binaural_renderer_unwrap( ivas_error TDREND_GetMix( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ - float output[][L_FRAME48k], /* i/o: ISM object synth / rendered output in 0,1 */ - const int16_t subframe_length, /* i/o: subframe length */ - const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: ISM object synth / rendered output in 0,1 */ +#else + float output[][L_FRAME48k], /* i/o: ISM object synth / rendered output in 0,1 */ +#endif + const int16_t subframe_length, /* i/o: subframe length */ + const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ ) { int16_t i; @@ -327,6 +352,8 @@ ivas_error TDREND_GetMix( float hrf_left_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float hrf_right_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; int16_t intp_count; + float pan_left, pan_right; + error = IVAS_ERR_OK; /* Clear the output buffer to accumulate rendered sources */ @@ -347,7 +374,7 @@ ivas_error TDREND_GetMix( SrcRend_p = Src_p->SrcRend_p; /* Update rendering params if needed */ - if ( hBinRendererTd->Listener_p->PoseUpdated || SrcSpatial_p->Updated ) + if ( ( SrcRend_p->PlayStatus == TDREND_PLAYSTATUS_PLAYING ) && ( hBinRendererTd->Listener_p->PoseUpdated || SrcSpatial_p->Updated ) ) { TDREND_SRC_REND_UpdateFiltersFromSpatialParams( hBinRendererTd, SrcRend_p, SrcSpatial_p, Src_p->hrf_left_prev, Src_p->hrf_right_prev, hrf_left_delta, hrf_right_delta, &intp_count, &Src_p->filterlength, &Src_p->itd, &Src_p->Gain, Src_p, subframe_idx ); @@ -358,6 +385,14 @@ ivas_error TDREND_GetMix( { error = TDREND_REND_RenderSourceHRFilt( Src_p, hrf_left_delta, hrf_right_delta, intp_count, output_buf, subframe_length ); } + + if ( ( SrcRend_p->InputAvailable == TRUE ) && ( SrcRend_p->PlayStatus == TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC ) ) + { + pan_left = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f; + pan_right = 1.f - pan_left; + v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_left, output_buf[0], subframe_length ); + v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length ); + } } /* Populate output variable */ @@ -406,7 +441,11 @@ void TDREND_Update_object_positions( const int16_t lfe_idx, /* i : Input LFE index */ const IVAS_FORMAT in_format, /* i : Format of input sources */ const ISM_METADATA_HANDLE *hIsmMetaData, /* i : Input metadata for ISM objects */ - float output[][L_FRAME48k] /* i/o: SCE/MC channels */ +#ifdef JBM_TSM_ON_TCS + float *output[] +#else + float output[][L_FRAME48k] /* i/o: SCE/MC channels */ +#endif ) { TDREND_DirAtten_t *DirAtten_p; @@ -435,15 +474,28 @@ void TDREND_Update_object_positions( /* Source position and direction */ angles_to_vec( hIsmMetaData[nS]->radius, hIsmMetaData[nS]->azimuth, hIsmMetaData[nS]->elevation, Pos ); angles_to_vec( 1.0f, hIsmMetaData[nS]->yaw, hIsmMetaData[nS]->pitch, Dir ); +#ifndef FIX_463_TD_RENDERER_DIRECTIVITY_RESET /* Source directivity info */ DirAtten_p->ConeInnerAngle = 360.0f; DirAtten_p->ConeOuterAngle = 360.0f; DirAtten_p->ConeOuterGain = 1.0f; +#endif TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos ); TDREND_MIX_SRC_SetDirAtten( hBinRendererTd, nS, DirAtten_p ); - TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); + if ( hIsmMetaData[nS]->non_diegetic_flag ) + { + Pos[0] = 0; + Pos[1] = hIsmMetaData[nS]->azimuth / 90.f; + Pos[2] = 0; + TDREND_MIX_SRC_SetPos( hBinRendererTd, nS, Pos ); + TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING_NON_DIEGETIC ); + } + else + { + TDREND_MIX_SRC_SetPlayState( hBinRendererTd, nS, TDREND_PLAYSTATUS_PLAYING ); + } TDREND_MIX_SRC_SetDir( hBinRendererTd, nS, Dir ); } } @@ -583,6 +635,15 @@ ivas_error ivas_td_binaural_renderer_ext( IVAS_REND_AudioConfigType inConfigType; AUDIO_CONFIG transport_config; ivas_error error; +#ifdef JBM_TSM_ON_TCS + float *p_output[MAX_OUTPUT_CHANNELS]; + int16_t ch; + + for ( ch = 0; ch < MAX_OUTPUT_CHANNELS; ch++ ) + { + p_output[ch] = output[ch]; + } +#endif push_wmops( "ivas_td_binaural_renderer_ext" ); @@ -618,11 +679,19 @@ ivas_error ivas_td_binaural_renderer_ext( hIsmMetaData[0]->yaw = currentPos->yaw; hIsmMetaData[0]->pitch = currentPos->pitch; hIsmMetaData[0]->radius = currentPos->radius; + hIsmMetaData[0]->non_diegetic_flag = currentPos->non_diegetic_flag; } +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_td_binaural_renderer_unwrap( hReverb, transport_config, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, headRotData->headRotEnabled, + ( headRotData != NULL ) ? headRotData->headPositions : NULL, + ( headRotData != NULL ) ? headRotData->Pos : NULL, p_output, output_frame ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_td_binaural_renderer_unwrap( hReverb, transport_config, pTDRend->hBinRendererTd, num_src, lfe_idx, ivas_format, hIsmMetaData, headRotData->headRotEnabled, ( headRotData != NULL ) ? headRotData->headPositions : NULL, ( headRotData != NULL ) ? headRotData->Pos : NULL, output, output_frame ) ) != IVAS_ERR_OK ) + +#endif { return error; } diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 97d0b68fb8e83c6fb28f6e35b001800be2f9f5ac..6a2bf00278d535f817c46af256111b1a5acd87a4 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -69,21 +69,11 @@ ivas_error TDREND_REND_RenderSourceHRFilt( { float LeftOutputFrame[L_SPATIAL_SUBFR_48k]; float RightOutputFrame[L_SPATIAL_SUBFR_48k]; -#ifndef FIX_379_GAININTP - float Gain; - - Gain = ( *Src_p->SrcRend_p->DirGain_p ) * ( *Src_p->SrcRend_p->DistGain_p ); -#endif TDREND_Apply_ITD( Src_p->InputFrame_p, LeftOutputFrame, RightOutputFrame, &Src_p->previtd, Src_p->itd, Src_p->mem_itd, subframe_length ); -#ifdef FIX_379_GAININTP TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength, Src_p->Gain, Src_p->prevGain ); TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength, Src_p->Gain, Src_p->prevGain ); Src_p->prevGain = Src_p->Gain; -#else - TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength, Gain ); - TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength, Gain ); -#endif /* Copy to accumulative output frame */ v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); diff --git a/lib_rend/ivas_objectRenderer_sfx.c b/lib_rend/ivas_objectRenderer_sfx.c index af3231df613a8717b5e8ada8603bc5fa92f94848..d988ad53d2ac65baf5a69da192b9261b6efe7d22 100644 --- a/lib_rend/ivas_objectRenderer_sfx.c +++ b/lib_rend/ivas_objectRenderer_sfx.c @@ -236,12 +236,8 @@ void TDREND_firfilt( float *mem, /* i/o: filter memory */ const int16_t subframe_length, /* i : Length of signal */ const int16_t filterlength, /* i : Filter length */ -#ifdef FIX_379_GAININTP - const float Gain, /* i : Gain */ - const float prevGain /* i : Previous gain */ -#else - const float Gain /* i : Gain */ -#endif + const float Gain, /* i : Gain */ + const float prevGain /* i : Previous gain */ ) { float buffer[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1 + L_SUBFRAME5MS_48k]; @@ -250,13 +246,11 @@ void TDREND_firfilt( float *p_filter; float tmp; int16_t i, j; -#ifdef FIX_379_GAININTP float step, gain_tmp, gain_delta; gain_delta = ( Gain - prevGain ); step = gain_delta / ( subframe_length ); gain_tmp = prevGain; -#endif /* Handle memory */ p_signal = buffer + filterlength - 1; @@ -274,13 +268,9 @@ void TDREND_firfilt( { tmp += ( *p_filter++ ) * ( *p_tmp-- ); } -#ifdef FIX_379_GAININTP /* Apply linear gain interpolation in case of abrupt gain changes */ gain_tmp = gain_tmp + step; signal[i] = tmp * gain_tmp; -#else - signal[i] = tmp * Gain; -#endif if ( i < intp_count ) { diff --git a/lib_rend/ivas_objectRenderer_sources.c b/lib_rend/ivas_objectRenderer_sources.c index 91253748b2eb4ee2554f80c6d8f2782b72c31fe8..0d307ea442316cb100b799c6532517a7edf8b0b0 100644 --- a/lib_rend/ivas_objectRenderer_sources.c +++ b/lib_rend/ivas_objectRenderer_sources.c @@ -687,9 +687,7 @@ void TDREND_SRC_Init( Src_p->hrf_right_prev[0] = 1; Src_p->azim_prev = 0.0f; Src_p->elev_prev = 0.0f; -#ifdef FIX_379_GAININTP Src_p->prevGain = 1.0f; -#endif return; } diff --git a/lib_rend/ivas_orient_trk.c b/lib_rend/ivas_orient_trk.c index 63d863c4b635dcdfc832f9c0027d165a7c902238..ae646b4d5c4b05f4164366730274e152ef58de92 100644 --- a/lib_rend/ivas_orient_trk.c +++ b/lib_rend/ivas_orient_trk.c @@ -406,7 +406,11 @@ ivas_error ivas_orient_trk_Init( pOTR->refRot = identity; /* set safe default tracking mode */ +#ifdef FIX_439_OTR_PARAMS + pOTR->orientation_tracking = HEAD_ORIENT_TRK_NONE; +#else pOTR->trackingType = OTR_TRACKING_NONE; +#endif return IVAS_ERR_OK; } @@ -419,15 +423,24 @@ ivas_error ivas_orient_trk_Init( *-------------------------------------------------------------------*/ ivas_error ivas_orient_trk_SetTrackingType( - ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ + ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ +#ifdef FIX_439_OTR_PARAMS + const HEAD_ORIENT_TRK_T orientation_tracking /* i : orientation tracking type */ +#else const OTR_TRACKING_T trackingType /* i/o: orientation tracking type */ +#endif ) { if ( pOTR == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + +#ifdef FIX_439_OTR_PARAMS + pOTR->orientation_tracking = orientation_tracking; +#else pOTR->trackingType = trackingType; +#endif return IVAS_ERR_OK; } @@ -477,17 +490,36 @@ ivas_error ivas_orient_trk_GetMainOrientation( { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + +#ifdef FIX_439_OTR_PARAMS + switch ( pOTR->orientation_tracking ) +#else switch ( pOTR->trackingType ) +#endif { +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_NONE: +#else case OTR_TRACKING_NONE: +#endif *pOrientation = IdentityQuaternion(); break; +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_REF_VEC: + case HEAD_ORIENT_TRK_REF_VEC_LEV: + case HEAD_ORIENT_TRK_REF: +#else case OTR_TRACKING_REF_VEC: case OTR_TRACKING_REF_VEC_LEV: case OTR_TRACKING_REF_ORIENT: +#endif *pOrientation = pOTR->refRot; break; +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_AVG: +#else case OTR_TRACKING_AVG_ORIENT: +#endif *pOrientation = pOTR->absAvgRot; break; } @@ -539,15 +571,30 @@ ivas_error ivas_orient_trk_SetReferenceVector( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } +#ifdef FIX_439_OTR_PARAMS + switch ( pOTR->orientation_tracking ) +#else switch ( pOTR->trackingType ) +#endif { +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_NONE: + case HEAD_ORIENT_TRK_REF: + case HEAD_ORIENT_TRK_AVG: + case HEAD_ORIENT_TRK_REF_VEC: +#else case OTR_TRACKING_NONE: case OTR_TRACKING_REF_ORIENT: case OTR_TRACKING_AVG_ORIENT: case OTR_TRACKING_REF_VEC: +#endif acousticFrontVector = VectorSubtract( listenerPos, refPos ); break; +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_REF_VEC_LEV: +#else case OTR_TRACKING_REF_VEC_LEV: +#endif /* ignore the height difference between listener position and reference position */ listenerPosLevel.z = refPosLevel.z = listenerPos.z; listenerPosLevel.x = listenerPos.x; @@ -605,14 +652,28 @@ ivas_error ivas_orient_trk_Process( result = IVAS_ERR_OK; +#ifdef FIX_439_OTR_PARAMS + switch ( pOTR->orientation_tracking ) +#else switch ( pOTR->trackingType ) +#endif { +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_NONE: +#else case OTR_TRACKING_NONE: +#endif pOTR->trkRot = absRot; break; +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_REF: + case HEAD_ORIENT_TRK_REF_VEC: + case HEAD_ORIENT_TRK_REF_VEC_LEV: +#else case OTR_TRACKING_REF_VEC: case OTR_TRACKING_REF_VEC_LEV: case OTR_TRACKING_REF_ORIENT: +#endif /* Reset average orientation */ pOTR->absAvgRot = absRot; @@ -624,7 +685,11 @@ ivas_error ivas_orient_trk_Process( QuaternionProduct( pOTR->trkRot, absRot, &pOTR->trkRot ); break; +#ifdef FIX_439_OTR_PARAMS + case HEAD_ORIENT_TRK_AVG: +#else case OTR_TRACKING_AVG_ORIENT: +#endif /* Compute average (low-pass filtered) absolute orientation */ QuaternionSlerp( pOTR->absAvgRot, absRot, alpha, &pOTR->absAvgRot ); diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index efa211124382f4c05ce4b3e77df0724c1608625a..f8c730bd14fb8be1e19774c20c109473f0659b9a 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -92,7 +92,11 @@ void ivas_limiter_close( void ivas_limiter_dec ( IVAS_LIMITER_HANDLE hLimiter, /* i/o: limiter struct handle */ +#ifdef JBM_TSM_ON_TCS + float *output[MAX_OUTPUT_CHANNELS], /* i/o: input/output buffer */ +#else float output[MAX_OUTPUT_CHANNELS][L_FRAME48k], /* i/o: input/output buffer */ +#endif const int16_t num_channels, /* i : number of channels to be processed */ const int16_t output_frame, /* i : number of samples per channel in the buffer */ const int16_t BER_detect /* i : BER detect flag */ @@ -136,22 +140,12 @@ void efap_determine_gains( * SBA rendering *----------------------------------------------------------------------------------*/ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS void ivas_sba_prototype_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ const int16_t subframe /* i : Subframe to render */ ); -#else -void ivas_sba_prototype_renderer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ - const int16_t firstSubframe, /* i : First subframe to map */ - const int16_t nSubframes /* i : Number of subframes to map */ -); -#endif ivas_error ivas_sba_get_hoa_dec_matrix( const IVAS_OUTPUT_SETUP hOutSetup, /* i : target output setup */ @@ -165,6 +159,17 @@ void ivas_dirac_dec_binaural( const int16_t nchan_transport /* i : number of transport channels */ ); +#ifdef JBM_TSM_ON_TCS +void ivas_dirac_dec_binaural_render( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ + uint16_t *nSamplesRendered, /* o : number of CLDFB slots rendered */ + uint16_t *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + const int16_t nchan_transport, + float *output_f[] /* o : rendered time signal */ +); +#endif + ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ HRTFS_PARAMBIN_HANDLE hHrtfParambin /* i : HRTF structure for rendering */ @@ -231,7 +236,11 @@ ivas_error ivas_td_binaural_renderer_unwrap( const int16_t Opt_Headrotation, /* i : Head rotation flag */ const IVAS_QUATERNION *Quaternions, /* i : Head tracking data per subframe */ const IVAS_VECTOR3 *Pos, /* i : Listener position data per subframe */ - float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: SCE channels / Binaural synthesis */ +#else + float output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis */ +#endif const int16_t output_frame /* i : output frame length */ ); @@ -273,7 +282,11 @@ void ivas_td_binaural_close( ivas_error TDREND_GetMix( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: ISM object synth / rendered output in 0,1 */ +#else float output[][L_FRAME48k], /* i/o: ISM object synth / rendered output in 0,1 */ +#endif const int16_t subframe_length, /* i/o: subframe length */ const int16_t subframe_idx /* i : Subframe index to 5 ms subframe */ ); @@ -291,7 +304,11 @@ void TDREND_Update_object_positions( const int16_t lfe_idx, /* i : Input LFE index */ const IVAS_FORMAT in_format, /* i : Format of input sources */ const ISM_METADATA_HANDLE *hIsmMetaData, /* i : Input metadata for ISM objects */ +#ifdef JBM_TSM_ON_TCS + float *output[] /* i/o: SCE/MC channels */ +#else float output[][L_FRAME48k] /* i/o: SCE/MC channels */ +#endif ); void BSplineModelEvalDealloc( @@ -471,12 +488,8 @@ void TDREND_firfilt( float *mem, /* i/o: filter memory */ const int16_t subframe_length, /* i : Length of signal */ const int16_t filterlength, /* i : Filter length */ -#ifdef FIX_379_GAININTP const float Gain, /* i : Gain */ const float prevGain /* i : Previous gain */ -#else - const float Gain /* i : Gain */ -#endif ); @@ -507,11 +520,29 @@ ivas_error ivas_rend_crendProcess( HEAD_TRACK_DATA_HANDLE hHeadTrackData, IVAS_OUTPUT_SETUP_HANDLE hIntSetup, EFAP_HANDLE hEFAPdata, +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: input/output audio channels */ +#else float output[][L_FRAME48k], /* i/o: input/output audio channels */ +#endif const int32_t output_Fs ); - +#ifdef JBM_TSM_ON_TCS +ivas_error ivas_rend_crendProcessSubframe( + const CREND_WRAPPER *pCrend, + const AUDIO_CONFIG inConfig, + const AUDIO_CONFIG outConfig, + DECODER_CONFIG_HANDLE hDecoderConfig, + HEAD_TRACK_DATA_HANDLE hHeadTrackData, + IVAS_OUTPUT_SETUP_HANDLE hIntSetup, + EFAP_HANDLE hEFAPdata, + DECODER_TC_BUFFER_HANDLE hTcBuffer, + float *input_f[], + float *output[], /* i/o: input/output audio channels */ + const int16_t n_samples_to_render, + const int32_t output_Fs ); +#endif ivas_error ivas_crend_init_from_rom( @@ -551,25 +582,19 @@ void ivas_binaural_reverb_close( REVERB_STRUCT_HANDLE *hReverb /* i/o: binaural reverb handle */ ); -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS void ivas_binaural_reverb_processSubframe( REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ const int16_t numInChannels, /* i : num input channels to be processed */ +#ifdef JBM_TSM_ON_TCS + const int16_t numSlots, /* i : number of slots to be processed */ +#endif float inReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data real */ float inImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data imag */ float outReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data real */ float outImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] /* o : output CLDFB data imag */ ); -#else -void ivas_binaural_reverb_processFrame( - REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ - const int16_t numInChannels, /* i : num input channels to be processed */ - float inReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data real */ - float inImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data imag */ - float outReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data real */ - float outImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data imag */ - const uint8_t offsetSamplesIO /* i : number of offset samples */ -); + +#ifdef JBM_TSM_ON_TCS #endif ivas_error ivas_reverb_open( @@ -588,8 +613,13 @@ ivas_error ivas_reverb_process( const REVERB_HANDLE hReverb, /* i : Reverberator handle */ const AUDIO_CONFIG input_audio_config, /* i : reverb. input audio configuration */ const int16_t mix_signals, /* i : add reverb to output signal */ +#ifdef JBM_TSM_ON_TCS + float *pcm_in[], /* i : the PCM audio to apply reverb on */ + float *pcm_out[], /* o : the PCM audio with reverb applied */ +#else float pcm_in[][L_FRAME48k], /* i : the PCM audio to apply reverb on */ float pcm_out[][L_FRAME48k], /* o : the PCM audio with reverb applied */ +#endif const int16_t i_ts /* i : subframe index */ ); @@ -812,7 +842,11 @@ void SHrotmatgen( void rotateFrame_shd( HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ - float output[][L_FRAME48k], /* i/o: unrotated HOA3 signal buffer in TD */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: unrotated HOA3 signal buffer in TD */ +#else + float output[][L_FRAME48k], /* i/o: unrotated HOA3 signal buffer in TD */ +#endif const int16_t subframe_len, /* i : subframe length per channel */ const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ const int16_t subframe_idx /* i : subframe index */ @@ -820,7 +854,11 @@ void rotateFrame_shd( void rotateFrame_sd( HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ - float output[][L_FRAME48k], /* i/o: unrotated SD signal buffer in TD */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: unrotated SD signal buffer in TD */ +#else + float output[][L_FRAME48k], /* i/o: unrotated SD signal buffer in TD */ +#endif const int16_t subframe_len, /* i : subframe length per channel */ const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ @@ -832,6 +870,9 @@ void rotateFrame_shd_cldfb( float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain imag part */ float Rmat[3][3], /* i : real-space rotation matrix */ const int16_t nInChannels, /* i : number of channels */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, /* i : number of time slots to process */ +#endif const int16_t shd_rot_max_order /* i : split-order rotation method */ ); @@ -841,6 +882,9 @@ void rotateFrame_sd_cldfb( float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain imag part */ const IVAS_OUTPUT_SETUP_HANDLE hOutputSetup, /* i : output format setup number of channels */ const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, /* i : number of time slots to process */ +#endif const int16_t nb_band /* i : number of CLDFB bands to process */ ); @@ -873,7 +917,11 @@ ivas_error ivas_orient_trk_Init( ivas_error ivas_orient_trk_SetTrackingType( ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ +#ifdef FIX_439_OTR_PARAMS + const HEAD_ORIENT_TRK_T orientation_tracking /* i : orientation tracking type */ +#else const OTR_TRACKING_T trackingType /* i : orientation tracking type */ +#endif ); ivas_error ivas_orient_trk_SetReferenceRotation( diff --git a/lib_rend/ivas_reverb.c b/lib_rend/ivas_reverb.c index af2717cc11a01fbe8a5bb9e41e33ca1b7a4f5dc9..baa83fad0e58d61fb16a3eb6ccee7f1e0f353728 100644 --- a/lib_rend/ivas_reverb.c +++ b/lib_rend/ivas_reverb.c @@ -1437,7 +1437,11 @@ static void reverb_block( static ivas_error downmix_input_block( const REVERB_HANDLE hReverb, +#ifdef JBM_TSM_ON_TCS + float *pcm_in[], +#else float pcm_in[][L_FRAME48k], +#endif const AUDIO_CONFIG input_audio_config, float *pPcm_out, const int16_t input_offset ) @@ -1579,9 +1583,14 @@ ivas_error ivas_reverb_process( const REVERB_HANDLE hReverb, /* i : Reverberator handle */ const AUDIO_CONFIG input_audio_config, /* i : reverb. input audio configuration */ const int16_t mix_signals, /* i : add reverb to output signal */ - float pcm_in[][L_FRAME48k], /* i : the PCM audio to apply reverb on */ - float pcm_out[][L_FRAME48k], /* o : the PCM audio with reverb applied */ - const int16_t i_ts /* i : subframe index */ +#ifdef JBM_TSM_ON_TCS + float *pcm_in[], /* i : the PCM audio to apply reverb on */ + float *pcm_out[], /* o : the PCM audio with reverb applied */ +#else + float pcm_in[][L_FRAME48k], /* i : the PCM audio to apply reverb on */ + float pcm_out[][L_FRAME48k], /* o : the PCM audio with reverb applied */ +#endif + const int16_t i_ts /* i : subframe index */ ) { float tmp0[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES], tmp1[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES], tmp2[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; @@ -1616,36 +1625,39 @@ ivas_error ivas_reverb_process( * Compute the reverberation - room effect *------------------------------------------------------------------------*/ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS void ivas_binaural_reverb_processSubframe( - REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ - const int16_t numInChannels, /* i : num inputs to be processed */ + REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ + const int16_t numInChannels, /* i : num inputs to be processed */ +#ifdef JBM_TSM_ON_TCS + const int16_t numSlots, /* i : number of slots to be processed */ +#endif float inReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data real, Comment: This change swaps two first dimensions as first dimension is not constant. */ float inImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data imag */ float outReal[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data real */ float outImag[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] /* o : output CLDFB data imag */ ) -#else -void ivas_binaural_reverb_processFrame( - REVERB_STRUCT_HANDLE hReverb, /* i/o: binaural reverb handle */ - const int16_t numInChannels, /* i : num inputs to be processed */ - float inReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data real, Comment: This change swaps two first dimensions as first dimension is not constant. */ - float inImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : input CLDFB data imag */ - float outReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data real */ - float outImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : output CLDFB data imag */ - const uint8_t offsetSamplesIO /* i : number of offset samples */ -) -#endif { /* Declare the required variables */ int16_t idx, bin, ch, sample, invertSampleIndex, tapIdx, *phaseShiftTypePr; float **tapRealPr, **tapImagPr; + push_wmops( "binaural_reverb" ); /* 1) Rotate the data in the loop buffer of the reverberator. * Notice that the audio at the loop buffers is at time-inverted order * for convolution purposes later on. */ for ( bin = 0; bin < hReverb->numBins; bin++ ) { +#ifdef JBM_TSM_ON_TCS + /* Move the data forwards by blockSize (i.e. by the frame size of 16 CLDFB slots) */ + mvr2r( hReverb->loopBufReal[bin], hReverb->loopBufReal[bin] + numSlots, hReverb->loopBufLength[bin] ); + mvr2r( hReverb->loopBufImag[bin], hReverb->loopBufImag[bin] + numSlots, hReverb->loopBufLength[bin] ); + + /* Add the data from the end of the loop to the beginning, with an attenuation factor + * according to RT60. This procedure generates an IIR decaying response. The response + * is decorrelated later on. */ + v_multc( hReverb->loopBufReal[bin] + hReverb->loopBufLength[bin], hReverb->loopAttenuationFactor[bin], hReverb->loopBufReal[bin], numSlots ); + v_multc( hReverb->loopBufImag[bin] + hReverb->loopBufLength[bin], hReverb->loopAttenuationFactor[bin], hReverb->loopBufImag[bin], numSlots ); +#else /* Move the data forwards by blockSize (i.e. by the frame size of 16 CLDFB slots) */ mvr2r( hReverb->loopBufReal[bin], hReverb->loopBufReal[bin] + hReverb->blockSize, hReverb->loopBufLength[bin] ); mvr2r( hReverb->loopBufImag[bin], hReverb->loopBufImag[bin] + hReverb->blockSize, hReverb->loopBufLength[bin] ); @@ -1655,17 +1667,23 @@ void ivas_binaural_reverb_processFrame( * is decorrelated later on. */ v_multc( hReverb->loopBufReal[bin] + hReverb->loopBufLength[bin], hReverb->loopAttenuationFactor[bin], hReverb->loopBufReal[bin], hReverb->blockSize ); v_multc( hReverb->loopBufImag[bin] + hReverb->loopBufLength[bin], hReverb->loopAttenuationFactor[bin], hReverb->loopBufImag[bin], hReverb->blockSize ); +#endif } /* 2) Apply the determined pre-delay to the input audio, and add the delayed audio to the loop. */ idx = hReverb->preDelayBufferIndex; +#ifdef JBM_TSM_ON_TCS + for ( sample = 0; sample < numSlots; sample++ ) +#else for ( sample = 0; sample < hReverb->blockSize; sample++ ) - { -#ifndef FIX_355_REFACTOR_PARAMBIN_TO_5MS - uint16_t sampleWithOffset; - sampleWithOffset = sample + offsetSamplesIO; #endif + { +#ifdef JBM_TSM_ON_TCS + invertSampleIndex = numSlots - sample - 1; +#else invertSampleIndex = hReverb->blockSize - sample - 1; +#endif + for ( bin = 0; bin < hReverb->numBins; bin++ ) { /* Add from pre-delay buffer a sample to the loop buffer, in a time-inverted order. @@ -1678,7 +1696,6 @@ void ivas_binaural_reverb_processFrame( /* Add every second input channel as is to the pre-delay buffer, and every second input channel with * 90 degrees phase shift to reduce energy imbalances between coherent and incoherent sounds */ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS for ( ch = 0; ch < numInChannels; ch++ ) { if ( ch % 2 ) @@ -1694,23 +1711,6 @@ void ivas_binaural_reverb_processFrame( } idx = ( idx + 1 ) % hReverb->preDelayBufferLength; } -#else - for ( ch = 0; ch < numInChannels; ch++ ) - { - if ( ch % 2 ) - { - v_add( hReverb->preDelayBufferReal[idx], inReal[ch][sampleWithOffset], hReverb->preDelayBufferReal[idx], hReverb->numBins ); - v_add( hReverb->preDelayBufferImag[idx], inImag[ch][sampleWithOffset], hReverb->preDelayBufferImag[idx], hReverb->numBins ); - } - else - { - v_sub( hReverb->preDelayBufferReal[idx], inImag[ch][sampleWithOffset], hReverb->preDelayBufferReal[idx], hReverb->numBins ); - v_add( hReverb->preDelayBufferImag[idx], inReal[ch][sampleWithOffset], hReverb->preDelayBufferImag[idx], hReverb->numBins ); - } - } - idx = ( idx + 1 ) % hReverb->preDelayBufferLength; - } -#endif hReverb->preDelayBufferIndex = idx; /* 3) Perform the filtering/decorrelating, using complex and sparse FIR filtering */ @@ -1721,17 +1721,41 @@ void ivas_binaural_reverb_processFrame( /* These tap pointers have been determined to point to the loop buffer at sparse locations */ tapRealPr = hReverb->tapPointersReal[bin][ch]; tapImagPr = hReverb->tapPointersImag[bin][ch]; + phaseShiftTypePr = hReverb->tapPhaseShiftType[bin][ch]; /* Flush output */ +#ifdef JBM_TSM_ON_TCS + set_f( hReverb->outputBufferReal[bin][ch], 0.0f, numSlots ); + set_f( hReverb->outputBufferImag[bin][ch], 0.0f, numSlots ); +#else set_f( hReverb->outputBufferReal[bin][ch], 0.0f, hReverb->blockSize ); set_f( hReverb->outputBufferImag[bin][ch], 0.0f, hReverb->blockSize ); +#endif /* Add from temporally decaying sparse tap locations the audio to the output. */ for ( tapIdx = 0; tapIdx < hReverb->taps[bin][ch]; tapIdx++ ) { switch ( phaseShiftTypePr[tapIdx] ) { +#ifdef JBM_TSM_ON_TCS + case 0: /* 0 degrees phase */ + v_add( hReverb->outputBufferReal[bin][ch], tapRealPr[tapIdx], hReverb->outputBufferReal[bin][ch], numSlots ); + v_add( hReverb->outputBufferImag[bin][ch], tapImagPr[tapIdx], hReverb->outputBufferImag[bin][ch], numSlots ); + break; + case 1: /* 90 degrees phase */ + v_sub( hReverb->outputBufferReal[bin][ch], tapImagPr[tapIdx], hReverb->outputBufferReal[bin][ch], numSlots ); + v_add( hReverb->outputBufferImag[bin][ch], tapRealPr[tapIdx], hReverb->outputBufferImag[bin][ch], numSlots ); + break; + case 2: /* 180 degrees phase */ + v_sub( hReverb->outputBufferReal[bin][ch], tapRealPr[tapIdx], hReverb->outputBufferReal[bin][ch], numSlots ); + v_sub( hReverb->outputBufferImag[bin][ch], tapImagPr[tapIdx], hReverb->outputBufferImag[bin][ch], numSlots ); + break; + default: /* 270 degrees phase */ + v_add( hReverb->outputBufferReal[bin][ch], tapImagPr[tapIdx], hReverb->outputBufferReal[bin][ch], numSlots ); + v_sub( hReverb->outputBufferImag[bin][ch], tapRealPr[tapIdx], hReverb->outputBufferImag[bin][ch], numSlots ); + break; +#else case 0: /* 0 degrees phase */ v_add( hReverb->outputBufferReal[bin][ch], tapRealPr[tapIdx], hReverb->outputBufferReal[bin][ch], hReverb->blockSize ); v_add( hReverb->outputBufferImag[bin][ch], tapImagPr[tapIdx], hReverb->outputBufferImag[bin][ch], hReverb->blockSize ); @@ -1748,6 +1772,7 @@ void ivas_binaural_reverb_processFrame( v_add( hReverb->outputBufferReal[bin][ch], tapImagPr[tapIdx], hReverb->outputBufferReal[bin][ch], hReverb->blockSize ); v_sub( hReverb->outputBufferImag[bin][ch], tapRealPr[tapIdx], hReverb->outputBufferImag[bin][ch], hReverb->blockSize ); break; +#endif } } } @@ -1757,7 +1782,11 @@ void ivas_binaural_reverb_processFrame( { if ( hReverb->useBinauralCoherence ) { +#ifdef JBM_TSM_ON_TCS + for ( sample = 0; sample < numSlots; sample++ ) +#else for ( sample = 0; sample < hReverb->blockSize; sample++ ) +#endif { float leftRe, rightRe, leftIm, rightIm; @@ -1778,17 +1807,19 @@ void ivas_binaural_reverb_processFrame( /* 4) Write data to output */ for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { +#ifdef JBM_TSM_ON_TCS + for ( sample = 0; sample < numSlots; sample++ ) +#else for ( sample = 0; sample < hReverb->blockSize; sample++ ) - { -#ifndef FIX_355_REFACTOR_PARAMBIN_TO_5MS - uint16_t sampleWithOffset; - - sampleWithOffset = sample + offsetSamplesIO; #endif - /* Audio was in the temporally inverted order for convolution, re-invert audio to output */ + { +/* Audio was in the temporally inverted order for convolution, re-invert audio to output */ +#ifdef JBM_TSM_ON_TCS + invertSampleIndex = numSlots - sample - 1; +#else invertSampleIndex = hReverb->blockSize - sample - 1; +#endif -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS for ( bin = 0; bin < hReverb->numBins; bin++ ) { outReal[ch][sample][bin] = hReverb->outputBufferReal[bin][ch][invertSampleIndex]; @@ -1799,24 +1830,15 @@ void ivas_binaural_reverb_processFrame( outReal[ch][sample][bin] = 0.0f; outImag[ch][sample][bin] = 0.0f; } -#else - for ( bin = 0; bin < hReverb->numBins; bin++ ) - { - outReal[ch][sampleWithOffset][bin] = hReverb->outputBufferReal[bin][ch][invertSampleIndex]; - outImag[ch][sampleWithOffset][bin] = hReverb->outputBufferImag[bin][ch][invertSampleIndex]; - } - for ( ; bin < CLDFB_NO_CHANNELS_MAX; bin++ ) - { - outReal[ch][sampleWithOffset][bin] = 0.0f; - outImag[ch][sampleWithOffset][bin] = 0.0f; - } -#endif } } + pop_wmops(); return; } +#ifdef JBM_TSM_ON_TCS +#endif /*------------------------------------------------------------------------- * ivas_binaural_reverb_open() diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 4d9eeef3d5f228f8514d21fc80c52835a7d93cbe..6809cdee2bcf9869dbe8918d5bb820746c242f29 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -165,24 +165,13 @@ void Euler2Quat( float cr = cosf( roll * 0.5f ); float sr = sinf( roll * 0.5f ); float cp = cosf( pitch * 0.5f ); -#ifdef EUALER2QUAT_FIX float sp = sinf( pitch * 0.5f ); -#else - float sp = sinf( -pitch * 0.5f ); -#endif float cy = cosf( yaw * 0.5f ); float sy = sinf( yaw * 0.5f ); -#ifdef EUALER2QUAT_FIX quat->w = cr * cp * cy + sr * sp * sy; quat->x = sr * cp * cy - cr * sp * sy; quat->y = sr * cp * sy + cr * sp * cy; quat->z = cr * cp * sy - sr * sp * cy; -#else - quat->w = cr * cp * cy - sr * sp * sy; - quat->x = sr * cp * cy + cr * sp * sy; - quat->y = cr * sp * cy - sr * cp * sy; - quat->z = cr * cp * sy + sr * sp * cy; -#endif return; } @@ -261,10 +250,14 @@ void rotateAziEle( void rotateFrame_shd( HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ - float output[][L_FRAME48k], /* i/o: unrotated HOA3 signal buffer in TD */ - const int16_t subframe_len, /* i : subframe length per channel */ - const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ - const int16_t subframe_idx /* i : subframe index */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: unrotated HOA3 signal buffer in TD */ +#else + float output[][L_FRAME48k], /* i/o: unrotated HOA3 signal buffer in TD */ +#endif + const int16_t subframe_len, /* i : subframe length per channel */ + const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ + const int16_t subframe_idx /* i : subframe index */ ) { int16_t i, l, n, m; @@ -364,11 +357,15 @@ void rotateFrame_shd( void rotateFrame_sd( HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ - float output[][L_FRAME48k], /* i/o: unrotated SD signal buffer in TD */ - const int16_t subframe_len, /* i : subframe length per channel */ - const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ - const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ - const int16_t subframe_idx /* i : subframe index */ +#ifdef JBM_TSM_ON_TCS + float *output[], /* i/o: unrotated SD signal buffer in TD */ +#else + float output[][L_FRAME48k], /* i/o: unrotated SD signal buffer in TD */ +#endif + const int16_t subframe_len, /* i : subframe length per channel */ + const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ + const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ + const int16_t subframe_idx /* i : subframe index */ ) { int16_t i, j; @@ -502,7 +499,10 @@ void rotateFrame_shd_cldfb( float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain imag part */ float Rmat[3][3], /* i : real-space rotation matrix */ const int16_t nInChannels, /* i : number of channels */ - const int16_t shd_rot_max_order /* i : split-order rotation method */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, +#endif + const int16_t shd_rot_max_order /* i : split-order rotation method */ ) { int16_t n = 0; @@ -525,7 +525,11 @@ void rotateFrame_shd_cldfb( SHrotmatgen( SHrotmat, Rmat, shd_rot_max_order ); /* rotation by mtx multiplication */ +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < numTimeSlots; i++ ) +#else for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) +#endif { for ( iBand = 0; iBand < CLDFB_NO_CHANNELS_MAX; iBand++ ) { @@ -596,7 +600,10 @@ void rotateFrame_sd_cldfb( float Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain imag part */ const IVAS_OUTPUT_SETUP_HANDLE hOutputSetup, /* i : output format setup number of channels */ const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ - const int16_t nb_band /* i : number of CLDFB bands to process */ +#ifdef JBM_TSM_ON_TCS + const int16_t numTimeSlots, /* i : number of time slots to process */ +#endif + const int16_t nb_band /* i : number of CLDFB bands to process */ ) { int16_t iBlock, iBand, m, n; @@ -654,7 +661,11 @@ void rotateFrame_sd_cldfb( p_imagRot = imagRot[n]; if ( g1 > 0.f ) { +#ifdef JBM_TSM_ON_TCS + for ( iBlock = 0; iBlock < numTimeSlots; iBlock++ ) +#else for ( iBlock = 0; iBlock < MAX_PARAM_SPATIAL_SUBFRAMES; iBlock++ ) +#endif { p_real = Cldfb_RealBuffer[m][iBlock]; p_imag = Cldfb_ImagBuffer[m][iBlock]; @@ -674,7 +685,11 @@ void rotateFrame_sd_cldfb( { p_realRot = realRot[n]; p_imagRot = imagRot[n]; +#ifdef JBM_TSM_ON_TCS + for ( iBlock = 0; iBlock < numTimeSlots; iBlock++ ) +#else for ( iBlock = 0; iBlock < MAX_PARAM_SPATIAL_SUBFRAMES; iBlock++ ) +#endif { p_real = Cldfb_RealBuffer[n][iBlock]; p_imag = Cldfb_ImagBuffer[n][iBlock]; diff --git a/lib_rend/ivas_sba_rendering.c b/lib_rend/ivas_sba_rendering.c index f59df117b4ef938b3b2d8bac9481046f9c2c40ad..eeeb505dea009192cd800ae5acbc8ceb3026e320 100644 --- a/lib_rend/ivas_sba_rendering.c +++ b/lib_rend/ivas_sba_rendering.c @@ -50,22 +50,12 @@ * Render prototype audio signals using SBA mixing matrices *-------------------------------------------------------------------*/ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS -void ivas_sba_prototype_renderer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ - float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ - float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ - const int16_t subframe /* i : Subframe to render */ +#ifdef JBM_TSM_ON_TCS +void ivas_sba_prototype_renderer_sf( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ + float inRe[][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ + float inIm[][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX] /* i : Input audio in CLDFB domain, imag */ ) -#else -void ivas_sba_prototype_renderer( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ - float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ - float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ - const int16_t firstSubframe, /* i : First subframe to map */ - const int16_t nSubframes /* i : Number of subframes to map */ -) -#endif { float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; SPAR_DEC_HANDLE hSpar; @@ -75,12 +65,8 @@ void ivas_sba_prototype_renderer( int16_t num_cldfb_bands, numch_in, numch_out; int16_t cldfb_band; int16_t out_ch, in_ch; -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS int16_t firstInCh, inChEnd, firstOutCh, outChEnd; -#else - int16_t firstSlot, slotEnd, firstInCh, inChEnd, firstOutCh, outChEnd; - int16_t sf_idx; -#endif + int16_t slot_idx_start; push_wmops( "ivas_sba_prototype_renderer" ); @@ -88,10 +74,6 @@ void ivas_sba_prototype_renderer( hDecoderConfig = st_ivas->hDecoderConfig; num_spar_bands = hSpar->hFbMixer->pFb->filterbank_num_bands; -#ifndef FIX_355_REFACTOR_PARAMBIN_TO_5MS - firstSlot = firstSubframe * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); - slotEnd = ( firstSubframe + nSubframes ) * ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ); -#endif num_cldfb_bands = hSpar->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; numch_in = hSpar->hFbMixer->fb_cfg->num_in_chans; numch_out = hSpar->hFbMixer->fb_cfg->num_out_chans; @@ -110,13 +92,13 @@ void ivas_sba_prototype_renderer( firstOutCh = 1; outChEnd = 2; } - + slot_idx_start = hSpar->slots_rendered; /* Apply mixing matrix */ -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS - for ( ts = 0; ts < CLDFB_SLOTS_PER_SUBFRAME; ts++ ) + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { + int16_t md_idx = hSpar->render_to_md_map[ts + slot_idx_start]; /* determine SPAR parameters for this time slot */ - ivas_spar_get_parameters( hSpar, hDecoderConfig, ts + subframe * CLDFB_SLOTS_PER_SUBFRAME, numch_out, numch_in, num_spar_bands, mixer_mat ); + ivas_spar_get_parameters( hSpar, hDecoderConfig, md_idx, numch_out, numch_in, num_spar_bands, mixer_mat ); for ( cldfb_band = 0; cldfb_band < num_cldfb_bands; cldfb_band++ ) { @@ -159,31 +141,129 @@ void ivas_sba_prototype_renderer( inIm[out_ch][ts][cldfb_band] = out_im[out_ch]; } } - } - /* Update mixing matrices */ - hSpar->i_subframe++; - hSpar->i_subframe = min( hSpar->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); - mvr2r( hSpar->hMdDec->mixer_mat_prev[1][0][0], hSpar->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - mvr2r( hSpar->hMdDec->mixer_mat_prev[2][0][0], hSpar->hMdDec->mixer_mat_prev[1][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - mvr2r( hSpar->hMdDec->mixer_mat_prev[3][0][0], hSpar->hMdDec->mixer_mat_prev[2][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - mvr2r( hSpar->hMdDec->mixer_mat_prev[4][0][0], hSpar->hMdDec->mixer_mat_prev[3][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + /* Update mixing matrices */ + if ( ( ( slot_idx_start + ts + 1 ) == hSpar->num_slots ) || ( ( md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME ) != ( hSpar->render_to_md_map[ts + slot_idx_start + 1] / JBM_CLDFB_SLOTS_IN_SUBFRAME ) ) ) + { + /* we have crossed an unadapted parameter sf border, update previous mixing matrices */ + int16_t md_sf = md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME; + hSpar->i_subframe++; + hSpar->i_subframe = min( hSpar->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[1][0][0], hSpar->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[2][0][0], hSpar->hMdDec->mixer_mat_prev[1][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[3][0][0], hSpar->hMdDec->mixer_mat_prev[2][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[4][0][0], hSpar->hMdDec->mixer_mat_prev[3][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); - for ( out_ch = 0; out_ch < numch_out; out_ch++ ) + for ( out_ch = 0; out_ch < numch_out; out_ch++ ) + { + for ( in_ch = 0; in_ch < numch_in; in_ch++ ) + { + for ( b = 0; b < num_spar_bands; b++ ) + { + hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + md_sf * IVAS_MAX_NUM_BANDS]; + } + } + } + } + } + + /* Create prototypes */ + if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { - for ( in_ch = 0; in_ch < numch_in; in_ch++ ) + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) { - for ( b = 0; b < num_spar_bands; b++ ) + if ( st_ivas->nchan_transport == 1 ) /* Dual mono */ { - hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + subframe * IVAS_MAX_NUM_BANDS]; + mvr2r( inRe[0][ts], inRe[1][ts], CLDFB_NO_CHANNELS_MAX ); + mvr2r( inIm[0][ts], inIm[1][ts], CLDFB_NO_CHANNELS_MAX ); + } + else if ( st_ivas->nchan_transport == 2 ) /* Opposing cardioids */ + { + float temp_signal[CLDFB_NO_CHANNELS_MAX]; + + v_add( inRe[0][ts], inRe[1][ts], temp_signal, CLDFB_NO_CHANNELS_MAX ); + v_sub( inRe[0][ts], inRe[1][ts], inRe[1][ts], CLDFB_NO_CHANNELS_MAX ); + mvr2r( temp_signal, inRe[0][ts], CLDFB_NO_CHANNELS_MAX ); + v_multc( inRe[0][ts], 0.5f, inRe[0][ts], CLDFB_NO_CHANNELS_MAX ); + v_multc( inRe[1][ts], 0.5f, inRe[1][ts], CLDFB_NO_CHANNELS_MAX ); + + v_add( inIm[0][ts], inIm[1][ts], temp_signal, CLDFB_NO_CHANNELS_MAX ); + v_sub( inIm[0][ts], inIm[1][ts], inIm[1][ts], CLDFB_NO_CHANNELS_MAX ); + mvr2r( temp_signal, inIm[0][ts], CLDFB_NO_CHANNELS_MAX ); + v_multc( inIm[0][ts], 0.5f, inIm[0][ts], CLDFB_NO_CHANNELS_MAX ); + v_multc( inIm[1][ts], 0.5f, inIm[1][ts], CLDFB_NO_CHANNELS_MAX ); } } } + + pop_wmops(); + + return; +} +#endif + +void ivas_sba_prototype_renderer( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ + float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ + float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ + const int16_t subframe /* i : Subframe to render */ +) +{ + float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS]; + SPAR_DEC_HANDLE hSpar; + DECODER_CONFIG_HANDLE hDecoderConfig; + int16_t num_spar_bands, spar_band; + int16_t b, ts; + int16_t num_cldfb_bands, numch_in, numch_out; + int16_t cldfb_band; + int16_t out_ch, in_ch; + int16_t firstInCh, inChEnd, firstOutCh, outChEnd; +#ifdef JBM_TSM_ON_TCS + int16_t slot_idx_start, md_idx; +#endif + + push_wmops( "ivas_sba_prototype_renderer" ); + + hSpar = st_ivas->hSpar; + hDecoderConfig = st_ivas->hDecoderConfig; + num_spar_bands = hSpar->hFbMixer->pFb->filterbank_num_bands; + + num_cldfb_bands = hSpar->hFbMixer->pFb->fb_bin_to_band.num_cldfb_bands; + numch_in = hSpar->hFbMixer->fb_cfg->num_in_chans; + numch_out = hSpar->hFbMixer->fb_cfg->num_out_chans; +#ifdef JBM_TSM_ON_TCS + slot_idx_start = hSpar->slots_rendered; +#endif + + if ( st_ivas->nchan_transport == 1 ) + { + firstInCh = 0; + inChEnd = 1; + firstOutCh = 0; + outChEnd = 1; + } + else /* 2 TC */ + { + firstInCh = 0; + inChEnd = 2; + firstOutCh = 1; + outChEnd = 2; + } + + /* Apply mixing matrix */ +#ifdef JBM_TSM_ON_TCS + for ( ts = 0; ts < hSpar->subframe_nbslots[hSpar->subframes_rendered]; ts++ ) #else - for ( ts = firstSlot; ts < slotEnd; ts++ ) + for ( ts = 0; ts < CLDFB_SLOTS_PER_SUBFRAME; ts++ ) +#endif { /* determine SPAR parameters for this time slot */ - ivas_spar_get_parameters( hSpar, hDecoderConfig, ts, numch_out, numch_in, num_spar_bands, mixer_mat ); +#ifdef JBM_TSM_ON_TCS + md_idx = hSpar->render_to_md_map[ts + slot_idx_start]; + ivas_spar_get_parameters( hSpar, hDecoderConfig, md_idx, numch_out, numch_in, num_spar_bands, mixer_mat ); +#else + ivas_spar_get_parameters( hSpar, hDecoderConfig, ts + subframe * CLDFB_SLOTS_PER_SUBFRAME, numch_out, numch_in, num_spar_bands, mixer_mat ); +#endif for ( cldfb_band = 0; cldfb_band < num_cldfb_bands; cldfb_band++ ) { @@ -226,11 +306,12 @@ void ivas_sba_prototype_renderer( inIm[out_ch][ts][cldfb_band] = out_im[out_ch]; } } - +#ifdef JBM_TSM_ON_TCS /* Update mixing matrices */ - if ( ( ( ts + 1 ) % MAX_PARAM_SPATIAL_SUBFRAMES ) == 0 ) + if ( ( ( slot_idx_start + ts + 1 ) == hSpar->num_slots ) || ( ( md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME ) != ( hSpar->render_to_md_map[ts + slot_idx_start + 1] / JBM_CLDFB_SLOTS_IN_SUBFRAME ) ) ) { - sf_idx = ts / MAX_PARAM_SPATIAL_SUBFRAMES; + /* we have crossed an unadapted parameter sf border, update previous mixing matrices */ + int16_t md_sf = md_idx / JBM_CLDFB_SLOTS_IN_SUBFRAME; hSpar->i_subframe++; hSpar->i_subframe = min( hSpar->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); mvr2r( hSpar->hMdDec->mixer_mat_prev[1][0][0], hSpar->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); @@ -244,21 +325,42 @@ void ivas_sba_prototype_renderer( { for ( b = 0; b < num_spar_bands; b++ ) { - hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + sf_idx * IVAS_MAX_NUM_BANDS]; + hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + md_sf * IVAS_MAX_NUM_BANDS]; } } } } +#endif + } + +#ifndef JBM_TSM_ON_TCS + /* Update mixing matrices */ + hSpar->i_subframe++; + hSpar->i_subframe = min( hSpar->i_subframe, MAX_PARAM_SPATIAL_SUBFRAMES ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[1][0][0], hSpar->hMdDec->mixer_mat_prev[0][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[2][0][0], hSpar->hMdDec->mixer_mat_prev[1][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[3][0][0], hSpar->hMdDec->mixer_mat_prev[2][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + mvr2r( hSpar->hMdDec->mixer_mat_prev[4][0][0], hSpar->hMdDec->mixer_mat_prev[3][0][0], IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_FB_MIXER_IN_CH * IVAS_MAX_NUM_BANDS ); + + for ( out_ch = 0; out_ch < numch_out; out_ch++ ) + { + for ( in_ch = 0; in_ch < numch_in; in_ch++ ) + { + for ( b = 0; b < num_spar_bands; b++ ) + { + hSpar->hMdDec->mixer_mat_prev[4][out_ch][in_ch][b] = hSpar->hMdDec->mixer_mat[out_ch][in_ch][b + subframe * IVAS_MAX_NUM_BANDS]; + } + } } #endif /* Create prototypes */ if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) { -#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS - for ( ts = 0; ts < CLDFB_SLOTS_PER_SUBFRAME; ts++ ) +#ifdef JBM_TSM_ON_TCS + for ( ts = 0; ts < hSpar->subframe_nbslots[subframe]; ts++ ) #else - for ( ts = firstSlot; ts < slotEnd; ts++ ) + for ( ts = 0; ts < CLDFB_SLOTS_PER_SUBFRAME; ts++ ) #endif { if ( st_ivas->nchan_transport == 1 ) /* Dual mono */ @@ -285,6 +387,10 @@ void ivas_sba_prototype_renderer( } } +#ifdef JBM_TSM_ON_TCS + hSpar->subframes_rendered++; + hSpar->slots_rendered += hSpar->subframe_nbslots[subframe]; +#endif pop_wmops(); return; diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index a3308e23c21e39a73a6ef9554257a9fdf52f7af2..09c0bbff8035970eb52dd34a75fa7473550304c8 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -228,7 +228,11 @@ typedef struct EFAP typedef struct ivas_orient_trk_state_t { +#ifdef FIX_439_OTR_PARAMS + HEAD_ORIENT_TRK_T orientation_tracking; +#else OTR_TRACKING_T trackingType; +#endif float centerAdaptationRate; float offCenterAdaptationRate; float adaptationAngle; @@ -604,9 +608,7 @@ typedef struct float mem_hrf_left[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; float mem_hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1]; float Gain; -#ifdef FIX_379_GAININTP float prevGain; -#endif } TDREND_SRC_t; /* Top level TD binaural renderer handle */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 7744a6582b1e019890f23f5c7417d340e7ed0876..edb495e2e5cb6b4afe0f17a39681ad4770df0e0b 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -118,6 +118,8 @@ typedef struct CREND_WRAPPER_HANDLE crendWrapper; REVERB_HANDLE hReverb; rotation_matrix rot_mat_prev; + int16_t nonDiegeticPan; + float nonDiegeticPanGain; } input_ism; typedef struct @@ -144,6 +146,8 @@ typedef struct CREND_WRAPPER_HANDLE crendWrapper; REVERB_HANDLE hReverb; rotation_gains rot_gains_prev; + int16_t nonDiegeticPan; + float nonDiegeticPanGain; lfe_routing lfeRouting; } input_mc; @@ -1010,6 +1014,7 @@ static IVAS_REND_AudioObjectPosition defaultObjectPosition( pos.radius = 1.0f; pos.yaw = 0.0f; pos.pitch = 0.0f; + pos.non_diegetic_flag = 0; return pos; } @@ -1615,7 +1620,16 @@ static ivas_error updateMcPanGainsForMcOut( inputMc->base.inConfig == IVAS_REND_AUDIO_CONFIG_MONO || inputMc->base.inConfig == IVAS_REND_AUDIO_CONFIG_LS_CUSTOM ) { - error = initMcPanGainsWithEfap( inputMc, outConfig ); + if ( ( inputMc->base.inConfig == IVAS_REND_AUDIO_CONFIG_MONO ) && ( inputMc->nonDiegeticPan ) ) + { + inputMc->panGains[0][0] = ( inputMc->nonDiegeticPanGain + 1.f ) * 0.5f; + inputMc->panGains[0][1] = 1.f - inputMc->panGains[0][0]; + error = IVAS_ERR_OK; + } + else + { + error = initMcPanGainsWithEfap( inputMc, outConfig ); + } } else if ( outConfig == IVAS_REND_AUDIO_CONFIG_MONO ) { @@ -2195,6 +2209,8 @@ static ivas_error initMasaDummyDecForMcOut( output_config = getIvasAudioConfigFromRendAudioConfig( outConfig ); decDummy->hDecoderConfig->output_config = output_config; + decDummy->sba_analysis_order = 1; + decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */ decDummy->sba_mode = SBA_MODE_NONE; /* Todo Nokia: This is done to prevent ivas_dirac_dec_config() to not use uninitialized value. It could be considered if this should not be even accessed when not in SBA. */ decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */ @@ -2282,6 +2298,8 @@ static ivas_error initMasaDummyDecForSbaOut( decDummy->sba_mode = SBA_MODE_NONE; /* Todo Nokia: This is done to prevent ivas_dirac_dec_config() to not use uninitialized value. It could be considered if this should not be even accessed when not in SBA. */ decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */ + decDummy->sba_analysis_order = 1; + ivas_output_init( &( decDummy->hOutSetup ), output_config ); ivas_output_init( &( decDummy->hIntSetup ), output_config ); decDummy->renderer_type = RENDERER_DIRAC; @@ -2348,6 +2366,8 @@ static ivas_error initMasaDummyDecForBinauralOut( output_config = decDummy->hDecoderConfig->output_config; + decDummy->sba_analysis_order = 1; + decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */ decDummy->sba_mode = SBA_MODE_NONE; /* Todo Nokia: This is done to prevent ivas_dirac_dec_config() to not use uninitialized value. It could be considered if this should not be even accessed when not in SBA. */ decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */ @@ -2447,6 +2467,9 @@ static DecoderDummy *initDecoderDummy( decDummy->hDecoderConfig->output_Fs = sampleRate; decDummy->hDecoderConfig->nchan_out = numOutChannels; decDummy->hDecoderConfig->Opt_Headrotation = 0; +#ifdef JBM_TSM_ON_TCS + decDummy->hDecoderConfig->voip_active = 0; +#endif decDummy->hBinRenderer = NULL; decDummy->hEFAPdata = NULL; @@ -2458,10 +2481,18 @@ static DecoderDummy *initDecoderDummy( decDummy->hMasa = NULL; decDummy->hDiracDecBin = NULL; decDummy->hQMetaData = NULL; +#ifdef FIX_482_DUMMYDEC_INIT + decDummy->hHrtfParambin = NULL; + decDummy->hHeadTrackData = NULL; + decDummy->hDirAC = NULL; +#endif +#ifdef JBM_TSM_ON_TCS + decDummy->hTcBuffer = NULL; +#endif decDummy->hDecoderConfig->output_config = getIvasAudioConfigFromRendAudioConfig( outConfig ); decDummy->nchan_transport = numTransChannels; - if ( outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM || outConfig == IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) + if ( getAudioConfigType( outConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) { decDummy->hHeadTrackData = malloc( sizeof( HEAD_TRACK_DATA ) ); /* Initialise Rmat_prev to I, Rmat will be computed later */ @@ -2471,6 +2502,19 @@ static DecoderDummy *initDecoderDummy( decDummy->hHeadTrackData->Rmat_prev[i][i] = 1.0f; } +#ifdef FIX_482_DUMMYDEC_INIT + set_zero( decDummy->hHeadTrackData->chEneIIR[0], MASA_FREQUENCY_BANDS ); + set_zero( decDummy->hHeadTrackData->chEneIIR[1], MASA_FREQUENCY_BANDS ); + set_zero( decDummy->hHeadTrackData->procChEneIIR[0], MASA_FREQUENCY_BANDS ); + set_zero( decDummy->hHeadTrackData->procChEneIIR[1], MASA_FREQUENCY_BANDS ); + for ( i = 0; i < MAX_PARAM_SPATIAL_SUBFRAMES; i++ ) + { + decDummy->hHeadTrackData->Quaternions[i].w = 1.0f; + decDummy->hHeadTrackData->Quaternions[i].x = 0.0f; + decDummy->hHeadTrackData->Quaternions[i].y = 0.0f; + decDummy->hHeadTrackData->Quaternions[i].z = 0.0f; + } +#endif decDummy->hHeadTrackData->num_quaternions = 0; decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f; decDummy->hHeadTrackData->lrSwitchedCurrent = 0; @@ -2494,6 +2538,11 @@ static DecoderDummy *initDecoderDummy( decDummy->hRenderConfig = NULL; } +#ifdef JBM_TSM_ON_TCS + /* get a default TC buffer, needed for some renderers */ + ivas_jbm_dec_tc_buffer_open( decDummy, TC_BUFFER_MODE_NONE, 0, 0, 0, 1 ); +#endif + decDummy->renderer_type = RENDERER_DISABLE; return decDummy; @@ -2601,6 +2650,11 @@ static void freeDecoderDummy( /* Parametric binaural renderer handle */ ivas_dirac_dec_close_binaural_data( &pDecDummy->hDiracDecBin ); +#ifdef JBM_TSM_ON_TCS + /* TC buffer */ + ivas_jbm_dec_tc_buffer_close( &pDecDummy->hTcBuffer ); +#endif + free( pDecDummy ); pDecDummy = NULL; @@ -2623,7 +2677,9 @@ static void clearInputMasa( ivas_error IVAS_REND_Open( IVAS_REND_HANDLE *phIvasRend, const int32_t outputSampleRate, - const IVAS_REND_AudioConfig outConfig ) + const IVAS_REND_AudioConfig outConfig, + const int16_t nonDiegeticPan, + const float nonDiegeticPanGain ) { int16_t i; IVAS_REND_HANDLE hIvasRend; @@ -2693,6 +2749,8 @@ ivas_error IVAS_REND_Open( hIvasRend->inputsIsm[i].crendWrapper = NULL; hIvasRend->inputsIsm[i].hReverb = NULL; hIvasRend->inputsIsm[i].tdRendWrapper.hBinRendererTd = NULL; + hIvasRend->inputsIsm[i].nonDiegeticPan = nonDiegeticPan; + hIvasRend->inputsIsm[i].nonDiegeticPanGain = nonDiegeticPanGain; } for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i ) @@ -2702,6 +2760,8 @@ ivas_error IVAS_REND_Open( hIvasRend->inputsMc[i].crendWrapper = NULL; hIvasRend->inputsMc[i].hReverb = NULL; hIvasRend->inputsMc[i].tdRendWrapper.hBinRendererTd = NULL; + hIvasRend->inputsMc[i].nonDiegeticPan = nonDiegeticPan; + hIvasRend->inputsMc[i].nonDiegeticPanGain = nonDiegeticPanGain; } for ( i = 0; i < RENDERER_MAX_SBA_INPUTS; ++i ) @@ -3728,6 +3788,9 @@ int16_t IVAS_REND_GetRenderConfig( hRCout->room_acoustics.nBands = hRCin->roomAcoustics.nBands; hRCout->room_acoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; hRCout->room_acoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; +#ifdef FIX_463_TD_RENDERER_DIRECTIVITY_RESET + mvr2r( hRCin->directivity, hRCout->directivity, 3 ); +#endif mvr2r( hRCin->roomAcoustics.pFc_input, hRCout->room_acoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( hRCin->roomAcoustics.pAcoustic_rt60, hRCout->room_acoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); @@ -3754,9 +3817,8 @@ int16_t IVAS_REND_FeedRenderConfig( { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - hRenderConfig = hIvasRend->hRendererConfig; - mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 ); + #ifdef DEBUGGING hRenderConfig->renderer_type_override = RENDER_TYPE_OVERRIDE_NONE; if ( renderConfig.renderer_type_override == IVAS_RENDER_TYPE_OVERRIDE_FASTCONV ) @@ -3777,6 +3839,7 @@ int16_t IVAS_REND_FeedRenderConfig( mvr2r( renderConfig.room_acoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_rt60, hRenderConfig->roomAcoustics.pAcoustic_rt60, CLDFB_NO_CHANNELS_MAX ); mvr2r( renderConfig.room_acoustics.pAcoustic_dsr, hRenderConfig->roomAcoustics.pAcoustic_dsr, CLDFB_NO_CHANNELS_MAX ); + mvr2r( renderConfig.directivity, hRenderConfig->directivity, 3 ); return IVAS_ERR_OK; } @@ -3845,9 +3908,16 @@ ivas_error IVAS_REND_SetHeadRotation( ivas_error IVAS_REND_SetOrientationTrackingMode( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const uint8_t otrMode /* i : Orientation tracking mode */ +#ifdef FIX_439_OTR_PARAMS + const HEAD_ORIENT_TRK_T orientation_tracking /* i : Head orientation tracking type */ +#else + const uint8_t otrMode /* i : Orientation tracking mode */ +#endif ) { +#ifdef FIX_439_OTR_PARAMS + return ivas_orient_trk_SetTrackingType( hIvasRend->headRotData.hOrientationTracker, orientation_tracking ); +#else OTR_TRACKING_T mode; ivas_error error; @@ -3882,6 +3952,7 @@ ivas_error IVAS_REND_SetOrientationTrackingMode( } return IVAS_ERR_OK; +#endif } @@ -4350,6 +4421,13 @@ static ivas_error renderIsmToBinauralRoom( IVAS_REND_AudioBuffer tmpMcBuffer; IVAS_REND_AudioObjectPosition rotatedPos; const IVAS_REND_HeadRotData *headRotData; +#ifdef JBM_TSM_ON_TCS + float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpRendBuffer[i] = tmpRendBuffer[i]; + } +#endif push_wmops( "renderIsmToBinauralRoom" ); @@ -4449,8 +4527,13 @@ static ivas_error renderIsmToBinauralRoom( copyBufferTo2dArray( tmpMcBuffer, tmpRendBuffer ); +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( ismInput->crendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM, + NULL, NULL, NULL, NULL, p_tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( ismInput->crendWrapper, AUDIO_CONFIG_7_1_4, AUDIO_CONFIG_BINAURAL_ROOM, NULL, NULL, NULL, NULL, tmpRendBuffer, *ismInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4477,17 +4560,26 @@ static ivas_error renderIsmToMc( /* TODO(sgi): Possible optimization: less processing needed if position didn't change */ if ( *ismInput->base.ctx.pOutConfig == IVAS_REND_AUDIO_CONFIG_STEREO ) { - set_zero( currentPanGains, 16 ); - ivas_ism_get_stereo_gains( ismInput->currentPos.azimuth, - ismInput->currentPos.elevation, - ¤tPanGains[0], - ¤tPanGains[1] ); - - set_zero( previousPanGains, 16 ); - ivas_ism_get_stereo_gains( ismInput->previousPos.azimuth, - ismInput->previousPos.elevation, - &previousPanGains[0], - &previousPanGains[1] ); + if ( ismInput->nonDiegeticPan ) + { + previousPanGains[0] = currentPanGains[0] = ( ismInput->nonDiegeticPanGain + 1.f ) * 0.5f; + previousPanGains[1] = currentPanGains[1] = 1.f - currentPanGains[0]; + error = IVAS_ERR_OK; + } + else + { + set_zero( currentPanGains, 16 ); + ivas_ism_get_stereo_gains( ismInput->currentPos.azimuth, + ismInput->currentPos.elevation, + ¤tPanGains[0], + ¤tPanGains[1] ); + + set_zero( previousPanGains, 16 ); + ivas_ism_get_stereo_gains( ismInput->previousPos.azimuth, + ismInput->previousPos.elevation, + &previousPanGains[0], + &previousPanGains[1] ); + } } else { @@ -4710,6 +4802,15 @@ static ivas_error renderMcToBinaural( ivas_error error; IVAS_REND_AudioBuffer tmpRotBuffer; +#ifdef JBM_TSM_ON_TCS + float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; + int16_t i; + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpRendBuffer[i] = tmpRendBuffer[i]; + } +#endif + push_wmops( "renderMcToBinaural" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; @@ -4749,8 +4850,13 @@ static ivas_error renderMcToBinaural( } /* call CREND */ +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), + NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4780,6 +4886,15 @@ static ivas_error renderMcToBinauralRoom( ivas_error error; IVAS_REND_AudioBuffer tmpRotBuffer; +#ifdef JBM_TSM_ON_TCS + float *p_tmpRendBuffer[MAX_OUTPUT_CHANNELS]; + int16_t i; + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpRendBuffer[i] = tmpRendBuffer[i]; + } +#endif + push_wmops( "renderMcToBinauralRoom" ); headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; @@ -4819,8 +4934,13 @@ static ivas_error renderMcToBinauralRoom( } /* call CREND */ +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), + NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( mcInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -4853,12 +4973,23 @@ static ivas_error renderMcCustomLsToBinauralRoom( IVAS_REND_AudioBuffer tmpMcBuffer; IVAS_REND_AudioBuffer *tmpBufPtr; +#ifdef JBM_TSM_ON_TCS + float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; +#endif + push_wmops( "renderMcCustomLsToBinauralRoom" ); tmpRotBuffer = outAudio; /* avoid compilation warning */ headRotEnabled = mcInput->base.ctx.pHeadRotData->headRotEnabled; +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpCrendBuffer[i] = tmpCrendBuffer[i]; + } +#endif + /* apply rotation */ if ( headRotEnabled ) { @@ -4892,8 +5023,13 @@ static ivas_error renderMcCustomLsToBinauralRoom( copyBufferTo2dArray( tmpMcBuffer, tmpCrendBuffer ); /* call CREND */ +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, + p_tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, tmpCrendBuffer, *mcInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -5096,8 +5232,20 @@ static ivas_error renderSbaToBinaural( ivas_error error; IVAS_REND_AudioBuffer tmpRotBuffer; +#ifdef JBM_TSM_ON_TCS + float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; + int16_t i; +#endif + push_wmops( "renderSbaToBinaural" ); +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpCrendBuffer[i] = tmpCrendBuffer[i]; + } +#endif + /* apply rotation */ if ( sbaInput->base.ctx.pHeadRotData->headRotEnabled ) { @@ -5121,8 +5269,13 @@ static ivas_error renderSbaToBinaural( } /* call CREND */ +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), + NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, getIvasAudioConfigFromRendAudioConfig( sbaInput->base.inConfig ), getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -5148,10 +5301,21 @@ static ivas_error renderSbaToBinauralRoom( IVAS_REND_AudioBuffer tmpMcBuffer; IVAS_REND_AudioBuffer *tmpBufPtr; +#ifdef JBM_TSM_ON_TCS + float *p_tmpCrendBuffer[MAX_OUTPUT_CHANNELS]; +#endif + tmpRotBuffer = outAudio; /* avoid compilation warning */ push_wmops( "renderSbaToBinauralRoom" ); +#ifdef JBM_TSM_ON_TCS + for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) + { + p_tmpCrendBuffer[i] = tmpCrendBuffer[i]; + } +#endif + headRotEnabled = sbaInput->base.ctx.pHeadRotData->headRotEnabled; /* apply rotation */ @@ -5190,8 +5354,13 @@ static ivas_error renderSbaToBinauralRoom( copyBufferTo2dArray( tmpMcBuffer, tmpCrendBuffer ); /* call CREND */ +#ifdef JBM_TSM_ON_TCS + if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), + NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#else if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, AUDIO_CONFIG_7_1_4, getIvasAudioConfigFromRendAudioConfig( outConfig ), NULL, NULL, NULL, NULL, tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK ) +#endif { return error; } @@ -5344,7 +5513,11 @@ static void renderMasaToMc( } else { +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); +#else ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels, NULL, NULL, -1 ); +#endif } accumulate2dArrayToBuffer( tmpBuffer, &outAudio ); @@ -5361,7 +5534,11 @@ static void renderMasaToSba( copyBufferTo2dArray( masaInput->base.inputBuffer, tmpBuffer ); copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hDirAC ); +#ifdef JBM_TSM_ON_TCS + ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); +#else ivas_dirac_dec( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels, NULL, NULL, -1 ); +#endif accumulate2dArrayToBuffer( tmpBuffer, &outAudio ); diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 1e9d41fd38c1c49044b537b6d5826ab3f520acb3..727a0d8928bbb18d67de68a351407aa85d4ea2f8 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -134,7 +134,9 @@ typedef uint16_t IVAS_REND_InputId; ivas_error IVAS_REND_Open( IVAS_REND_HANDLE *phIvasRend, /* i/o: Pointer to renderer handle */ const int32_t outputSampleRate, /* i : output sampling rate */ - const IVAS_REND_AudioConfig outConfig /* i : output audio config */ + const IVAS_REND_AudioConfig outConfig, /* i : output audio config */ + const int16_t nonDiegeticPan, /* i : non-diegetic object flag */ + const float nonDiegeticPanGain /* i : non-diegetic panning gain */ ); /* Note: this will reset custom LFE routings set for any MC input */ @@ -228,8 +230,8 @@ ivas_error IVAS_REND_FeedInputMasaMetadata( ); ivas_error IVAS_REND_InitConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_REND_AudioConfig outAudioConfig /* i : output audioConfig */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_AudioConfig outAudioConfig /* i : output audioConfig */ ); int16_t IVAS_REND_GetRenderConfig( @@ -245,12 +247,16 @@ int16_t IVAS_REND_FeedRenderConfig( ivas_error IVAS_REND_SetHeadRotation( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_QUATERNION headRot[RENDERER_HEAD_POSITIONS_PER_FRAME], /* i : head orientations for next rendering call */ - const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ + const IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME] /* i : listener positions for next rendering call */ ); ivas_error IVAS_REND_SetOrientationTrackingMode( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const uint8_t otrMode /* i : Orientation tracking mode */ +#ifdef FIX_439_OTR_PARAMS + const HEAD_ORIENT_TRK_T orientation_tracking /* i : Head orientation tracking type */ +#else + const uint8_t otrMode /* i : Orientation tracking mode */ +#endif ); ivas_error IVAS_REND_SetReferenceRotation( diff --git a/lib_util/cmdln_parser.c b/lib_util/cmdln_parser.c index 200b8c86e9bf77bf6c38f39b0f444e4da097e59b..6ac2b0ec2d0ebf5e58c7637c5c00e3e813dd4444 100644 --- a/lib_util/cmdln_parser.c +++ b/lib_util/cmdln_parser.c @@ -31,6 +31,7 @@ *******************************************************************************************************/ #include "cmdln_parser.h" +#include "cmdl_tools.h" #include #include #include @@ -119,7 +120,7 @@ static int16_t initOpts( static int8_t stringLooksLikeOption( const char *str ) { - if ( str[0] == '-' ) + if ( ( str[0] == '-' ) && is_number( str ) == false ) { return 1; } @@ -130,7 +131,7 @@ static int8_t stringLooksLikeOption( static const char *stringToOptionName( const char *str ) { - while ( *str == '-' ) + while ( ( *str == '-' ) && ( ( str[1] != '0' ) || ( str[1] != '1' ) ) ) { ++str; } @@ -268,7 +269,7 @@ static const char *getBasename( static int32_t totalOptionNameLength( const OptionProps opt ) { - return strlen( opt.match ) + strlen( opt.matchShort ); + return (int32_t) ( strlen( opt.match ) + strlen( opt.matchShort ) ); } static void printWhitespace( diff --git a/lib_util/ism_file_reader.c b/lib_util/ism_file_reader.c index fa449512e403dc3e49634206a26b2d15e894b96f..7054d2081bc8b4f59ceef6574eb71efc08ac0dfd 100644 --- a/lib_util/ism_file_reader.c +++ b/lib_util/ism_file_reader.c @@ -35,10 +35,9 @@ #include #include - #define META_LINE_LENGTH 200 /* max number of characters at one line of metadata input/output file */ -#define NUM_ISM_METADATA_PER_LINE 7 /* Number of ISM metadata per line in a metadata file */ -#define NUM_MIN_ISM_METADATA 2 /* Minimum number of metadata parameters (azimuth and elevation) */ +#define NUM_ISM_METADATA_PER_LINE 8 /* Number of ISM metadata per line in a metadata file */ +#define NUM_MIN_ISM_METADATA 1 /* Minimum number of metadata parameters (azimuth) */ struct IsmFileReader @@ -96,7 +95,7 @@ ivas_error IsmFileReader_readNextFrame( { char char_buff[META_LINE_LENGTH]; float meta_prm[NUM_ISM_METADATA_PER_LINE]; - const float meta_prm_default[NUM_ISM_METADATA_PER_LINE] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f }; + const float meta_prm_default[NUM_ISM_METADATA_PER_LINE] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f }; char *char_ptr; int16_t i; FILE *file; @@ -142,7 +141,6 @@ ivas_error IsmFileReader_readNextFrame( return IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT; } - ismMetadata->azimuth = meta_prm[0]; ismMetadata->elevation = meta_prm[1]; ismMetadata->radius = meta_prm[2]; @@ -150,8 +148,14 @@ ivas_error IsmFileReader_readNextFrame( ismMetadata->gainFactor = meta_prm[4]; ismMetadata->yaw = meta_prm[5]; ismMetadata->pitch = meta_prm[6]; + ismMetadata->non_diegetic_flag = (int16_t) meta_prm[7]; /* verify whether the read metadata values are in an expected range */ + if ( ( ismMetadata->non_diegetic_flag ) != 0 && ( ismMetadata->non_diegetic_flag != 1 ) ) + { + return IVAS_ERR_ISM_INVALID_METADATA_VALUE; + } + if ( ismMetadata->azimuth > 180 || ismMetadata->azimuth < -180 ) { return IVAS_ERR_ISM_INVALID_METADATA_VALUE; diff --git a/lib_util/ism_file_writer.c b/lib_util/ism_file_writer.c index b29386282b016342c147f0c60775a8b9eb314ba4..470b02e698b61da0d4f3dbb375fcd6c312cfe9e0 100644 --- a/lib_util/ism_file_writer.c +++ b/lib_util/ism_file_writer.c @@ -63,7 +63,7 @@ ivas_error IsmFileWriter_open( strncpy( metadata_filename_loc, filePathWav, sizeof( metadata_filename_loc ) - 1 ); snprintf( ext_meta, sizeof( ext_meta ), ".%d.csv", obj_num ); - const int32_t maxNumCharactersToAppend = (int32_t) sizeof( metadata_filename_loc ) - strlen( metadata_filename_loc ) - 1; + const int32_t maxNumCharactersToAppend = (int32_t) ( sizeof( metadata_filename_loc ) - strlen( metadata_filename_loc ) - 1 ); strncat( metadata_filename_loc, ext_meta, maxNumCharactersToAppend ); strcpy( filePath, metadata_filename_loc ); @@ -114,11 +114,7 @@ ivas_error IsmFileWriter_writeFrame( file = ismWriter->file; /* IVAS_fmToDo: work in progress; currently position_azimuth, position_elevation, position_radius, spread, gain_factor */ -#ifdef FIX_293_EXT_RENDERER_CLI - sprintf( char_buff, "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f,%+07.2f,%+06.2f\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor, ismMetadata.yaw, ismMetadata.pitch ); -#endif - snprintf( char_buff, sizeof( char_buff ), "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f,%+07.2f,%+06.2f\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor, ismMetadata.yaw, ismMetadata.pitch ); - + snprintf( char_buff, sizeof( char_buff ), "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f,%+07.2f,%+06.2f,%d\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor, ismMetadata.yaw, ismMetadata.pitch, ismMetadata.non_diegetic_flag ); if ( file ) { fputs( char_buff, file ); diff --git a/lib_util/masa_file_reader.c b/lib_util/masa_file_reader.c index 95da7818e703a19eb0c03ff85aba45d69c8d4b06..90756a39b1ec5dcb33c3c2034f832ba5f1d9042e 100644 --- a/lib_util/masa_file_reader.c +++ b/lib_util/masa_file_reader.c @@ -84,7 +84,7 @@ MasaFileReader *MasaFileReader_open( *------------------------------------------------------------------------*/ IVAS_MASA_METADATA_HANDLE MasaFileReader_getMetadataHandle( - MasaFileReader *self /* i/o: MasaFileReader handle */ + MasaFileReader *self /* i/o: MasaFileReader handle */ ) { if ( self == NULL ) @@ -95,21 +95,19 @@ IVAS_MASA_METADATA_HANDLE MasaFileReader_getMetadataHandle( return &self->metadataFrame; } + +#ifndef HR_METADATA /*------------------------------------------------------------------------- * deindex_sph_idx() * * deindex the MASA metadata from the input metadata file *------------------------------------------------------------------------*/ -#ifndef HR_METADATA -static -#endif - void - deindex_sph_idx( - const uint16_t sphIndex, /* i : Spherical index */ - const SPHERICAL_GRID_DATA *gridData, /* i : Prepared spherical grid */ - float *theta, /* o : Elevation */ - float *phi /* o : Azimuth */ - ) +static void deindex_sph_idx( + const uint16_t sphIndex, /* i : Spherical index */ + const SPHERICAL_GRID_DATA *gridData, /* i : Prepared spherical grid */ + float *theta, /* o : Elevation */ + float *phi /* o : Azimuth */ +) { float ba_crt, del_crt, div_crt, a4_crt; float estim; @@ -252,6 +250,7 @@ static return; } +#endif /*------------------------------------------------------------------------- @@ -418,7 +417,7 @@ ivas_error MasaFileReader_readNextFrame( *------------------------------------------------------------------------*/ void MasaFileReader_close( - MasaFileReader **selfPtr /* i/o: pointer to MasaFileReader handle */ + MasaFileReader **selfPtr /* i/o: pointer to MasaFileReader handle */ ) { if ( selfPtr == NULL || *selfPtr == NULL ) diff --git a/lib_util/tinywaveout_c.h b/lib_util/tinywaveout_c.h index d0531eb6653c47288f7db1b6f1c84d454f55227d..b82c0cd131a20a9fea782b08e523ebdb56ac6e3d 100644 --- a/lib_util/tinywaveout_c.h +++ b/lib_util/tinywaveout_c.h @@ -490,6 +490,49 @@ static int32_t WriteWavShort( return __TWO_SUCCESS; } +#ifdef DEBUG_JBM +/* this function expects values in the 16 bit range +-32767/8 */ +static int32_t WriteWavFloat( + WAVEFILEOUT *self, + float sampleBuffer[], + uint32_t nSamples ) +{ + uint32_t i; + int32_t err = __TWO_SUCCESS; + + if ( !self ) + { + return __TWO_ERROR; + } + if ( !sampleBuffer ) + { + return __TWO_ERROR; + } + if ( __dataSizeChk( self, nSamples * sizeof( float ) ) ) + { + return __TWO_ERROR; + } + + for ( i = 0; i < nSamples; i++ ) + { + if ( self->bps == 32 ) + { + err = __WriteSample32( self, sampleBuffer[i] / 32768.0f ); + } + else + { + err = __TWO_ERROR; + } + if ( err != __TWO_SUCCESS ) + { + return err; + } + } + + return __TWO_SUCCESS; +} +#endif + static int32_t CloseWav( WAVEFILEOUT *self ) { diff --git a/lib_util/tsm_scale_file_reader.c b/lib_util/tsm_scale_file_reader.c new file mode 100644 index 0000000000000000000000000000000000000000..fbd1824d9dfd4d7219ad72c18549bc19a9d016a9 --- /dev/null +++ b/lib_util/tsm_scale_file_reader.c @@ -0,0 +1,148 @@ +/****************************************************************************************************** + + (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. + +*******************************************************************************************************/ + +#include "tsm_scale_file_reader.h" +#include "cmdl_tools.h" +#include +#include +#include + +struct TsmScaleFileReader +{ + FILE *file; + char *file_path; + bool fileRewind; +}; + + +/*---------------------------------------------------------------------* + * TsmScaleFileReader_open() + * + * Allocates memory for an TsmScaleFileReader and opens the file at given path for reading. + *---------------------------------------------------------------------*/ + +/*! r: JbmFileReader handle */ +TsmScaleFileReader *TsmScaleFileReader_open( + const char *filePath /* i : path to CA config file */ +) +{ + TsmScaleFileReader *self; + FILE *file; + + if ( !filePath ) + { + return NULL; + } + + file = fopen( filePath, "rb" ); + + if ( !file ) + { + return NULL; + } + + self = calloc( sizeof( TsmScaleFileReader ), 1 ); + self->file = file; + self->file_path = calloc( sizeof( char ), strlen( filePath ) + 1 ); + strcpy( self->file_path, filePath ); + + return self; +} + + +/*---------------------------------------------------------------------* + * TsmScaleFileReader_readScale() + * + * Read TSM scale entry + *---------------------------------------------------------------------*/ + +ivas_error TsmScaleFileReader_readScale( + TsmScaleFileReader *self, /* i/o: TsmScaleFileReader handle */ + int16_t *scale /* o : scale */ +) +{ + int tmp; + if ( 1 != fscanf( self->file, "%d", &tmp ) ) + { + if ( feof( self->file ) ) + { + rewind( self->file ); + self->fileRewind = true; + return TsmScaleFileReader_readScale( self, scale ); + } + return IVAS_ERR_FAILED_FILE_PARSE; + } + *scale = (int16_t) tmp; + return IVAS_ERR_OK; +} + + +/*---------------------------------------------------------------------* + * JbmFileReader_close() + * + * De-allocates all underlying memory of an JbmFileReader. + *---------------------------------------------------------------------*/ + +void TsmScaleFileReader_close( + TsmScaleFileReader **selfPtr /* i/o: pointer to JbmFileReader handle */ +) +{ + if ( selfPtr == NULL || *selfPtr == NULL ) + { + return; + } + + fclose( ( *selfPtr )->file ); + free( ( *selfPtr )->file_path ); + free( *selfPtr ); + *selfPtr = NULL; + + return; +} + + +/*---------------------------------------------------------------------* + * JbmFileReader_getFilePath() + * + *---------------------------------------------------------------------*/ + +const char *TsmScaleFileReader_getFilePath( + TsmScaleFileReader *self /* i/o: JbmFileReader handle */ +) +{ + if ( self == NULL ) + { + return NULL; + } + + return self->file_path; +} diff --git a/lib_util/tsm_scale_file_reader.h b/lib_util/tsm_scale_file_reader.h new file mode 100644 index 0000000000000000000000000000000000000000..7a795a25cb27316f36acef8bb07dfe67c6dcbf4c --- /dev/null +++ b/lib_util/tsm_scale_file_reader.h @@ -0,0 +1,67 @@ +/****************************************************************************************************** + + (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. + +*******************************************************************************************************/ + +#ifndef IVAS_TSM_SCALE_FILE_READER_H +#define IVAS_TSM_SCALE_FILE_READER_H + +#include +#include "common_api_types.h" +#include "ivas_error.h" + +/* clang-format off */ + +typedef struct TsmScaleFileReader TsmScaleFileReader; + + +/*! r: TsmScaleFileReader handle */ +TsmScaleFileReader *TsmScaleFileReader_open( + const char *filePath /* i : path to TSM scale file */ +); + +ivas_error TsmScaleFileReader_readScale( + TsmScaleFileReader* self, /* i/o: TsmScaleFileReader handle */ + int16_t *scale /* o : next scale */ +); + +void TsmScaleFileReader_close( + TsmScaleFileReader **selfPtr /* i/o: pointer to TsmScaleFileReader handle */ +); + +/*! r: path to the currently opened file or NULL if `self` is NULL */ +const char *TsmScaleFileReader_getFilePath( + TsmScaleFileReader* self /* i/o: TsmScaleFileReader handle */ +); + + +/* clang-format on */ + +#endif /* IVAS_TSM_SCALE_FILE_READER_H */ diff --git a/readme.txt b/readme.txt index 397de57438376dc40fddf2b0560bad76291488be..21a5a19e7940665f7cf537520a0cf248466d22e7 100644 --- a/readme.txt +++ b/readme.txt @@ -265,8 +265,8 @@ Options: -rvf File : Reference vector specified by external trajectory file works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes -render_config File : Renderer configuration option File --no_diegetic_pan : panning mono non-diegetic sound to stereo -1<= pan <=1, - left or l or 1->left, right or r or -1->right, center or c or 0->middle +-non_diegetic_pan P : panning mono non-diegetic sound to stereo -90<= P <=90, + left or l or 90->left, right or r or -90->right, center or c or 0->middle -q : Quiet mode, no frame counter default is deactivated @@ -384,25 +384,33 @@ stvISM4.csv These are comma separated files (csv) which indicate the per object position in the format: -frame azimuth, elevation, radius, spread, gain, yaw, pitch +frame azimuth, elevation, radius, spread, gain, yaw, pitch, non-diegetic with the following meaning: -| Parameter | format, value range | meaning ------------------------------------------------------------------------------------ -| azimuth | float, [-180,180[ | azimuth; positive indicates left ------------------------------------------------------------------------------------ -| elevation | float, [-90,90] | elevation; positive indicates up ------------------------------------------------------------------------------------ -| radius | float, [0, 15.75] | radius (extended metadata) ------------------------------------------------------------------------------------ -| spread | float, [0,360] | spread in angles from 0...360 deg; default: 0 ------------------------------------------------------------------------------------ -| gain | float, [0,1] | gain; default: 1 ------------------------------------------------------------------------------------ -| yaw | float, [-180,180[ | yaw (extended metadata); positive indicates left ------------------------------------------------------------------------------------ -| pitch | float, [-90,90] | pitch (extended metadata); positive indicates up ------------------------------------------------------------------------------------ +| Parameter | format, value range | meaning +--------------------------------------------------------------------------------------------------- +| azimuth | float, [-180,180] | azimuth; positive indicates left; default: 0 +--------------------------------------------------------------------------------------------------- +| elevation | float, [-90,90] | elevation; positive indicates up; default: 0 +--------------------------------------------------------------------------------------------------- +| radius | float, [0, 15.75] | radius (extended metadata); default: 1 +--------------------------------------------------------------------------------------------------- +| spread | float, [0,360] | spread in angles from 0...360 deg; default: 0 +--------------------------------------------------------------------------------------------------- +| gain | float, [0,1] | gain; default: 1 +--------------------------------------------------------------------------------------------------- +| yaw | float, [-180,180] | yaw (extended metadata); positive indicates left; default: 0 +--------------------------------------------------------------------------------------------------- +| pitch | float, [-90,90] | pitch (extended metadata); positive indicates up; default: 0 +--------------------------------------------------------------------------------------------------- +| non-diegetic | float*, [0 1] | Flag for activation of non-diegetic rendering; default: 0 +| | if Flag is set to 1, panning gain is specified by azimuth. +| | Value between [-90,90], 90 left, -90 right, 0 center +--------------------------------------------------------------------------------------------------- +*Read as float value for convenience, but used as an integer flag internally. + +The metadata reader accepts 1-8 values specified per line. If a value is not specified, the default +value is assumed. For the HRTF filter File option, external HRTF filter Files are available in folder /scripts/binauralRenderer_interface/binaural_renderers_hrtf_data : diff --git a/scripts/batch_comp_audio.py b/scripts/batch_comp_audio.py index 72ae3fcc7d6a506aea3d94386f0a02e5b77e1af1..97e9f8f54840f22f71fddb44ebd0bddd8fa486ce 100755 --- a/scripts/batch_comp_audio.py +++ b/scripts/batch_comp_audio.py @@ -96,10 +96,9 @@ def main(args): if not args.diffs_only or diff > 0: if diff == 0.0: - label = "\033[00;32m[OKAY]\033[00;00m" + label = "[OKAY]" else: - label = "\033[00;31m[FAIL]\033[00;00m" - + label = "[FAIL]" result = f"{label} Max. diff (PCM) for file {f}: {diff}" if args.verbose and diff != 0.0: @@ -108,10 +107,10 @@ def main(args): print(result, file=out_file) - if num_files_diff > 0: - print(f"{num_files_diff} files differ/don't exist", file=out_file) - else: - print(f"All files are bitexact", file=out_file) + if num_files_diff > 0: + print(f"{num_files_diff} files differ/don't exist", file=out_file) + else: + print(f"All files are bitexact", file=out_file) def compare_files(f, fol1, fol2, outputs_dict): diff --git a/scripts/config/ivas_modes.json b/scripts/config/ivas_modes.json index ab08c4e5cd8039bab7406e191dfad601a99eb25d..d4f1e107cc6c2a798920a8874115ed24f5902f9d 100644 --- a/scripts/config/ivas_modes.json +++ b/scripts/config/ivas_modes.json @@ -964,6 +964,44 @@ ] } }, + "MASA_1TC_1DIR_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-masa", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "MASA1TC1DIR", + "table_name": "MASA 1TC 1DIR@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + + }, "MASA_2TC_1DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-masa", @@ -1034,6 +1072,46 @@ ] } }, + "MASA_2TC_1DIR_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-masa", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "7_1_4": [], + "HOA3": [], + "mono": [], + "stereo": [], + "EXT": [] + }, + "in_config": "MASA2TC1DIR", + "table_name": "MASA 2TC 1DIR@{table_bitrate} kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "{item}.met" + ], + "rs": true, + "amr": false, + "mono": false, + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_13k2_512k.bin" + } + } + }, "MASA_1TC_2DIR_b{bitrate}_{bandwidth}_cbr": { "encmodeoption": [ "-masa", @@ -1851,6 +1929,39 @@ ] } }, + "ISM1_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism", + "1" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "EXT": [] + }, + "in_config": "ISM1", + "table_name": "ISM1@{table_bitrate} RS kbps {bandwidth}", + "nummetadata": 1, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_13k2_128k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_13k2_128k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_32k_128k.bin" + } + } + }, "ISM1_b{bitrate}_dtx_{bandwidth}_cbr": { "encmodeoption": [ "-ism", @@ -2030,6 +2141,39 @@ 256000 ] } + }, + "ISM2_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism", + "2" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "EXT": [] + }, + "in_config": "ISM2", + "table_name": "ISM2@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 2, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_16k4_256k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_16k4_256k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_32k_256k.bin" + } + } } }, "ISM3": { @@ -2157,6 +2301,39 @@ 384000 ] } + }, + "ISM3_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism", + "3" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "EXT": [] + }, + "in_config": "ISM3", + "table_name": "ISM3@{table_bitrate} kbps {bandwidth}", + "nummetadata": 3, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_24k4_384k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_24k4_384k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_32k_384k.bin" + } + } } }, "ISM4": { @@ -2290,6 +2467,39 @@ 512000 ] } + }, + "ISM4_b{bitrate}_{bandwidth}_rs": { + "encmodeoption": [ + "-ism", + "4" + ], + "encoptions": [ + "-max_band", + "{bandwidth}" + ], + "dec": { + "EXT": [] + }, + "in_config": "ISM4", + "table_name": "ISM4@{table_bitrate} kbps RS {bandwidth}", + "nummetadata": 4, + "metadatafilenames": [ + "stvISM{mdi}.csv" + ], + "rs": true, + "amr": false, + "mono": false, + "bitrates": { + "wb": { + "all": "{sw_files_path}/sw_24k4_384k.bin" + }, + "swb": { + "all": "{sw_files_path}/sw_24k4_384k.bin" + }, + "fb": { + "all": "{sw_files_path}/sw_32k_384k.bin" + } + } } }, "ISM+1": { diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 91bca7eef212539b05ae367039d1072f8871248f..81fe3cff88cee088f0ac88a1dcc0a6c5924957c9 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -900,6 +900,14 @@ ../IVAS_cod -mc 7_1_4 96000 48 testv/stv714MC48c.wav bit ../IVAS_dec -fec 5 5_1 48 bit testv/stv714MC48c.wav_MC714_96000_48-48_5_1_FEC5.tst +// Multi-channel 7_1_4 at 160 kbps, 48kHz in, 48kHz out, BINAURAL out +../IVAS_cod -mc 7_1_4 160000 48 testv/stv714MC48c.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv714MC48c.wav_MC714_160000_48-48_MC_binaural.tst + +// Multi-channel 7_1_4 at 160 kbps, 48kHz in, 48kHz out, 7_1_4 out +../IVAS_cod -mc 7_1_4 160000 48 testv/stv714MC48c.wav bit +../IVAS_dec 7_1_4 48 bit testv/stv714MC48c.wav_MC714_160000_48-48_MC714.tst + // Multi-channel 5_1_2 at 32 kbps, 48kHz in, 48kHz out, STEREO out, random FEC at 5% ../IVAS_cod -mc 5_1_2 32000 48 testv/stv512MC48c.wav bit ../IVAS_dec -fec 5 STEREO 48 bit testv/stv512MC48c.wav_MC714_32000_48-48_Stereo.tst @@ -1016,3 +1024,14 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 ../IVAS_dec -Tracefile tracefile_dec -VOIP 7_1_4 48 netsimoutput testv/stv51MC48c.wav_MC51_384000_48-48_7_1_4_JBM5.tst + + + +// NON DIEGETiC PAN at 60 kbps, 48kHz in, 48kHz out, STEREO out +../IVAS_cod 64000 48 testv/stv48c.wav bit +../IVAS_dec -non_diegetic_pan -0.5 48 bit testv/stv48c.pcm_MONO_64000_48-48_STEREO_NON-DIEGETIC-PAN_-0.5.tst + +// 4 ISM with extended metadata and non diegetic pan object switching bitrate 256 kbps, 48 kHz in, 48 kHz out, DTX on, BINAURAL out +../IVAS_cod -dtx -ism +4 testv/stvISM1.csv NULL testv/stvISM_with_no_diegetic_switch.csv testv/stvISM4.csv 256000 48 testv/stv4ISM48s.wav bit +../IVAS_dec BINAURAL 48 bit testv/stv+4ISM48s+non_diegetic_pan.wav_brate_256000-48_DTX_binaural.tst + diff --git a/scripts/cut_bs.py b/scripts/cut_bs.py index 5fee9845e743fb26b0f3552b09e26b31cf3d0954..c0ae6e19330bd70f8e04ee7e67a56e062689043d 100755 --- a/scripts/cut_bs.py +++ b/scripts/cut_bs.py @@ -35,11 +35,12 @@ import argparse import os.path import sys -SID_BITS = {35, 48, 88, 100} +#SID_BITS = {35, 48, 88, 100} +SID_BITS = {35, 48, 104} SYNC_WORDS = {b"!k", b" k"} -def cut_bs(fp, fp_out, start_frame=0, start_with_sid=False): +def cut_bs(fp, fp_out, start_frame = 0, start_with_sid = False): # cut until start frame fr_cnt = 0 cut_cnt = 0 @@ -86,7 +87,6 @@ def cut_bs(fp, fp_out, start_frame=0, start_with_sid=False): fp_out.write(n_bits_bs) fp_out.write(fp.read(n_bits * 2)) fr_cnt += 1 - return (fr_cnt, cut_cnt) diff --git a/scripts/runIvasCodec.py b/scripts/runIvasCodec.py index 070fb8e4f04da261e273fc0a1576c6ab5533cb6b..f96758e5be8d99b7fece0049e027eef277b40e4f 100755 --- a/scripts/runIvasCodec.py +++ b/scripts/runIvasCodec.py @@ -34,6 +34,7 @@ import os.path import platform import sys import logging +import shutil from pyivastest import IvasScriptsCommon, IvasModeRunner import pyivastest.constants as constants @@ -81,6 +82,11 @@ class RunIvasCodec(IvasScriptsCommon.IvasScript): help="Decoder binary name (default {})".format(default_dec), default=default_dec, ) + self.parser.add_argument( + "--fail_log_dir", + help="Move logs of failed modes to dir (default none)", + default=None, + ) def run(self): self.parse_args() @@ -137,10 +143,19 @@ class RunIvasCodec(IvasScriptsCommon.IvasScript): self.logger.console(" Encoder: {}".format(bin_enc), logging.INFO) self.logger.console(" Decoder: {}".format(bin_dec), logging.INFO) + runner.run() self.logger.console(" ") + fail_log_dir=None + if self.args["fail_log_dir"] is not None: + fail_log_dir = os.path.realpath(self.args["fail_log_dir"]) + if not(os.path.exists(fail_log_dir)): + os.makedirs(fail_log_dir) for r in runner.results: self.logger.console(r[0]) + if fail_log_dir is not None: + shutil.copy(r[3],fail_log_dir) + self.logger.console(" ") diff --git a/scripts/switchPaths/sw_13k2_128k.bin b/scripts/switchPaths/sw_13k2_128k.bin new file mode 100644 index 0000000000000000000000000000000000000000..7309ee26ab59fbbfaf4889e1163b97628a0ef565 --- /dev/null +++ b/scripts/switchPaths/sw_13k2_128k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9ddf71b27bcd47d5f37abb6c62146ff4fb5a848cd85605d4df87a9cc4b1d1e0 +size 60000 diff --git a/scripts/switchPaths/sw_13k2_256k.bin b/scripts/switchPaths/sw_13k2_256k.bin new file mode 100644 index 0000000000000000000000000000000000000000..1d0c3fac28a5f752f12830674f1864f6ac1e971b --- /dev/null +++ b/scripts/switchPaths/sw_13k2_256k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05fd8870e43b0eb349d5e9b3bb939574b71d3e7630940a10d6767cae2c6c4a3c +size 60000 diff --git a/scripts/switchPaths/sw_16k4_128k.bin b/scripts/switchPaths/sw_16k4_128k.bin new file mode 100644 index 0000000000000000000000000000000000000000..1e85a18b77c031b534476e37465cdf5ca76a6472 --- /dev/null +++ b/scripts/switchPaths/sw_16k4_128k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e07f8c6be0e08ed96b15c9a3daa2811ef0b596dc08cc687bce1f0ca8e49969b +size 60000 diff --git a/scripts/switchPaths/sw_16k4_256k.bin b/scripts/switchPaths/sw_16k4_256k.bin new file mode 100644 index 0000000000000000000000000000000000000000..47bc9c9aa35a39376bffd6059fb41e54123f2dc0 --- /dev/null +++ b/scripts/switchPaths/sw_16k4_256k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7dedd5a20cbc5594ec869b13b3e9774efd6394ad5d5b64a4e98210447c3a75ba +size 60000 diff --git a/scripts/switchPaths/sw_24k4_256k_1.bin b/scripts/switchPaths/sw_24k4_256k_1.bin new file mode 100644 index 0000000000000000000000000000000000000000..e2852619262f36e617038034a42807364fae28ed --- /dev/null +++ b/scripts/switchPaths/sw_24k4_256k_1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf5b303299209bdd4f7e007d1190c7957b17ab3ee399570f1bb87d27f3fec092 +size 60000 diff --git a/scripts/switchPaths/sw_24k4_384k.bin b/scripts/switchPaths/sw_24k4_384k.bin new file mode 100644 index 0000000000000000000000000000000000000000..781e3023b26710b65400686883f8502e1c683253 --- /dev/null +++ b/scripts/switchPaths/sw_24k4_384k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e3e7599638d3792d851a5bdc13b85d6b401ebc9724795562b1a5d25fc2c3bc6 +size 60000 diff --git a/scripts/switchPaths/sw_24k4_512k.bin b/scripts/switchPaths/sw_24k4_512k.bin new file mode 100644 index 0000000000000000000000000000000000000000..dcc58dbdc6a2b4801563dcbab3b87d76cb180b5c --- /dev/null +++ b/scripts/switchPaths/sw_24k4_512k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2369edc21bdf3440ceaf21de16698e38cf50c246ddf04878a5961538dded11ad +size 60000 diff --git a/scripts/switchPaths/sw_32k_128k.bin b/scripts/switchPaths/sw_32k_128k.bin new file mode 100644 index 0000000000000000000000000000000000000000..fc4b81e0c3d2f57cc7241c75c37d64fbcec9f909 --- /dev/null +++ b/scripts/switchPaths/sw_32k_128k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fdb0da661cb08cc546c3761afa1d778d2c7aa04df61b608ae4301e31867dcc2e +size 60000 diff --git a/scripts/switchPaths/sw_32k_256k.bin b/scripts/switchPaths/sw_32k_256k.bin new file mode 100644 index 0000000000000000000000000000000000000000..46b1e17cd4bb30aa1b3fd5ed82c7b1ac1702824a --- /dev/null +++ b/scripts/switchPaths/sw_32k_256k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61dacf79a7582edb83c151c300392efb719f08762a963da29f9b7665305a8c5f +size 60000 diff --git a/scripts/switchPaths/sw_32k_384k.bin b/scripts/switchPaths/sw_32k_384k.bin new file mode 100644 index 0000000000000000000000000000000000000000..088edfacbffdb508a96b89d434cf5298081a6b21 --- /dev/null +++ b/scripts/switchPaths/sw_32k_384k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77f6e7b141b16bd21005c5169cd9bc8b7b2c96df379ce9e74788717c66b9130f +size 60000 diff --git a/scripts/switchPaths/sw_32k_512k.bin b/scripts/switchPaths/sw_32k_512k.bin new file mode 100644 index 0000000000000000000000000000000000000000..d385f3a890804eedaafdc308233954e106e9f2c4 --- /dev/null +++ b/scripts/switchPaths/sw_32k_512k.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a6eb4080fce3bc1a7ba20cfc8ef3e8ff981ebce5de7c8e45bbc12edf7f21d0c +size 60000 diff --git a/scripts/testv/stvISM1.csv b/scripts/testv/stvISM1.csv index 0082c1282340113845a884c78f6b8140646057da..9100a52238a17843ed9bd03fc3ded73440efb2d2 100644 --- a/scripts/testv/stvISM1.csv +++ b/scripts/testv/stvISM1.csv @@ -1,1500 +1,1500 @@ -0.00,0.00,0.00,0.00,1.00,0.00,0.00 -4.80,0.00,0.02,0.00,1.00,0.00,-4.80 -9.60,0.00,0.04,0.00,1.00,0.00,4.80 -14.40,0.00,0.06,0.00,1.00,0.00,-9.60 -19.20,0.00,0.09,0.00,1.00,0.00,14.40 -24.00,0.00,0.11,0.00,1.00,0.00,-14.40 -28.80,0.00,0.13,0.00,1.00,0.00,19.20 -33.60,0.00,0.15,0.00,1.00,0.00,-24.00 -38.40,0.00,0.17,0.00,1.00,0.00,24.00 -43.20,0.00,0.19,0.00,1.00,0.00,-28.80 -48.00,0.00,0.21,0.00,1.00,0.00,33.60 -52.80,0.00,0.23,0.00,1.00,0.00,-33.60 -57.60,0.00,0.26,0.00,1.00,0.00,38.40 -62.40,0.00,0.28,0.00,1.00,4.80,-38.40 -67.20,0.00,0.30,0.00,1.00,4.80,38.40 -72.00,0.00,0.32,0.00,1.00,4.80,-43.20 -76.80,0.00,0.34,0.00,1.00,9.60,43.20 -81.60,0.00,0.36,0.00,1.00,19.20,-43.20 -86.40,0.00,0.38,0.00,1.00,134.40,43.20 -91.20,0.00,0.41,0.00,1.00,168.00,-43.20 -96.00,0.00,0.43,0.00,1.00,172.80,43.20 -100.80,0.00,0.45,0.00,1.00,177.60,-43.20 -105.60,0.00,0.47,0.00,1.00,177.60,43.20 -110.40,0.00,0.49,0.00,1.00,177.60,-43.20 -115.20,0.00,0.51,0.00,1.00,177.60,38.40 -120.00,0.00,0.53,0.00,1.00,177.60,-38.40 -124.80,0.00,0.56,0.00,1.00,177.60,33.60 -129.60,0.00,0.58,0.00,1.00,177.60,-33.60 -134.40,0.00,0.60,0.00,1.00,177.60,28.80 -139.20,0.00,0.62,0.00,1.00,177.60,-28.80 -144.00,0.00,0.64,0.00,1.00,177.60,24.00 -148.80,0.00,0.66,0.00,1.00,177.60,-19.20 -153.60,0.00,0.68,0.00,1.00,177.60,19.20 -158.40,0.00,0.70,0.00,1.00,177.60,-14.40 -163.20,0.00,0.73,0.00,1.00,177.60,9.60 -168.00,0.00,0.75,0.00,1.00,177.60,-9.60 -172.80,0.00,0.77,0.00,1.00,177.60,4.80 -177.60,0.00,0.79,0.00,1.00,-177.60,-0.00 --177.60,0.00,0.81,0.00,1.00,-177.60,-0.00 --172.80,0.00,0.83,0.00,1.00,-177.60,4.80 --168.00,0.00,0.85,0.00,1.00,-177.60,-9.60 --163.20,0.00,0.88,0.00,1.00,-177.60,9.60 --158.40,0.00,0.90,0.00,1.00,-177.60,-14.40 --153.60,0.00,0.92,0.00,1.00,-177.60,19.20 --148.80,0.00,0.94,0.00,1.00,-177.60,-19.20 --144.00,0.00,0.96,0.00,1.00,-177.60,24.00 --139.20,0.00,0.98,0.00,1.00,-177.60,-28.80 --134.40,0.00,1.00,0.00,1.00,-177.60,28.80 --129.60,0.00,1.03,0.00,1.00,-177.60,-33.60 --124.80,0.00,1.05,0.00,1.00,-177.60,33.60 --120.00,0.00,1.07,0.00,1.00,-177.60,-38.40 --115.20,0.00,1.09,0.00,1.00,-177.60,38.40 --110.40,0.00,1.11,0.00,1.00,-177.60,-43.20 --105.60,0.00,1.13,0.00,1.00,-172.80,43.20 --100.80,0.00,1.15,0.00,1.00,-168.00,-43.20 --96.00,0.00,1.17,0.00,1.00,-134.40,43.20 --91.20,0.00,1.20,0.00,1.00,-19.20,-43.20 --86.40,0.00,1.22,0.00,1.00,-9.60,43.20 --81.60,0.00,1.24,0.00,1.00,-4.80,-43.20 --76.80,0.00,1.26,0.00,1.00,-4.80,43.20 --72.00,0.00,1.28,0.00,1.00,-4.80,-43.20 --67.20,0.00,1.30,0.00,1.00,-0.00,38.40 --62.40,0.00,1.32,0.00,1.00,-0.00,-38.40 --57.60,0.00,1.35,0.00,1.00,-0.00,38.40 --52.80,0.00,1.37,0.00,1.00,-0.00,-33.60 --48.00,0.00,1.39,0.00,1.00,-0.00,33.60 --43.20,0.00,1.41,0.00,1.00,-0.00,-28.80 --38.40,0.00,1.43,0.00,1.00,-0.00,24.00 --33.60,0.00,1.45,0.00,1.00,-0.00,-24.00 --28.80,0.00,1.47,0.00,1.00,-0.00,19.20 --24.00,0.00,1.50,0.00,1.00,-0.00,-14.40 --19.20,0.00,1.52,0.00,1.00,-0.00,14.40 --14.40,0.00,1.54,0.00,1.00,-0.00,-9.60 --9.60,0.00,1.56,0.00,1.00,-0.00,4.80 --4.80,0.00,1.58,0.00,1.00,-0.00,-4.80 -0.00,0.00,1.60,0.00,1.00,-0.00,0.00 -4.80,-0.00,1.62,0.00,1.00,-0.00,-4.80 -9.60,-0.00,1.64,0.00,1.00,-0.00,4.80 -14.40,-0.00,1.67,0.00,1.00,-0.00,-9.60 -19.20,-0.00,1.69,0.00,1.00,-0.00,14.40 -24.00,-0.00,1.71,0.00,1.00,-0.00,-14.40 -28.80,-0.00,1.73,0.00,1.00,-0.00,19.20 -33.60,-4.80,1.75,0.00,1.00,-4.80,-19.20 -38.40,-4.80,1.77,0.00,1.00,-4.80,24.00 -43.20,-4.80,1.79,0.00,1.00,-4.80,-24.00 -48.00,-4.80,1.82,0.00,1.00,-4.80,28.80 -52.80,-4.80,1.84,0.00,1.00,-4.80,-28.80 -57.60,-4.80,1.86,0.00,1.00,-4.80,33.60 -62.40,-4.80,1.88,0.00,1.00,-9.60,-33.60 -67.20,-4.80,1.90,0.00,1.00,-9.60,38.40 -72.00,-4.80,1.92,0.00,1.00,-14.40,-38.40 -76.80,-4.80,1.94,0.00,1.00,-24.00,38.40 -81.60,-4.80,1.97,0.00,1.00,-43.20,-38.40 -86.40,-4.80,1.99,0.00,1.00,-110.40,38.40 -91.20,-4.80,2.01,0.00,1.00,-148.80,-38.40 -96.00,-4.80,2.03,0.00,1.00,-163.20,38.40 -100.80,-4.80,2.05,0.00,1.00,-168.00,-38.40 -105.60,-4.80,2.07,0.00,1.00,-172.80,38.40 -110.40,-4.80,2.09,0.00,1.00,-172.80,-38.40 -115.20,-4.80,2.11,0.00,1.00,-172.80,33.60 -120.00,-4.80,2.14,0.00,1.00,-172.80,-33.60 -124.80,-4.80,2.16,0.00,1.00,-177.60,33.60 -129.60,-4.80,2.18,0.00,1.00,-177.60,-28.80 -134.40,-4.80,2.20,0.00,1.00,-177.60,28.80 -139.20,-4.80,2.22,0.00,1.00,-177.60,-24.00 -144.00,-4.80,2.24,0.00,1.00,-177.60,24.00 -148.80,-4.80,2.26,0.00,1.00,-177.60,-19.20 -153.60,-0.00,2.29,0.00,1.00,-177.60,14.40 -158.40,-0.00,2.31,0.00,1.00,-177.60,-14.40 -163.20,-0.00,2.33,0.00,1.00,-177.60,9.60 -168.00,-0.00,2.35,0.00,1.00,-177.60,-9.60 -172.80,-0.00,2.37,0.00,1.00,-177.60,4.80 -177.60,-0.00,2.39,0.00,1.00,177.60,-0.00 --177.60,0.00,2.41,0.00,1.00,177.60,-0.00 --172.80,0.00,2.44,0.00,1.00,177.60,4.80 --168.00,0.00,2.46,0.00,1.00,177.60,-9.60 --163.20,0.00,2.48,0.00,1.00,177.60,9.60 --158.40,0.00,2.50,0.00,1.00,177.60,-14.40 --153.60,0.00,2.52,0.00,1.00,177.60,14.40 --148.80,4.80,2.54,0.00,1.00,177.60,-19.20 --144.00,4.80,2.56,0.00,1.00,177.60,24.00 --139.20,4.80,2.58,0.00,1.00,177.60,-24.00 --134.40,4.80,2.61,0.00,1.00,177.60,28.80 --129.60,4.80,2.63,0.00,1.00,172.80,-28.80 --124.80,4.80,2.65,0.00,1.00,172.80,33.60 --120.00,4.80,2.67,0.00,1.00,172.80,-33.60 --115.20,4.80,2.69,0.00,1.00,172.80,33.60 --110.40,4.80,2.71,0.00,1.00,168.00,-38.40 --105.60,4.80,2.73,0.00,1.00,163.20,38.40 --100.80,4.80,2.76,0.00,1.00,148.80,-38.40 --96.00,4.80,2.78,0.00,1.00,110.40,38.40 --91.20,4.80,2.80,0.00,1.00,43.20,-38.40 --86.40,4.80,2.82,0.00,1.00,24.00,38.40 --81.60,4.80,2.84,0.00,1.00,14.40,-38.40 --76.80,4.80,2.86,0.00,1.00,9.60,38.40 --72.00,4.80,2.88,0.00,1.00,9.60,-38.40 --67.20,4.80,2.91,0.00,1.00,4.80,38.40 --62.40,4.80,2.93,0.00,1.00,4.80,-33.60 --57.60,4.80,2.95,0.00,1.00,4.80,33.60 --52.80,4.80,2.97,0.00,1.00,4.80,-28.80 --48.00,4.80,2.99,0.00,1.00,4.80,28.80 --43.20,4.80,3.01,0.00,1.00,4.80,-24.00 --38.40,4.80,3.03,0.00,1.00,0.00,24.00 --33.60,4.80,3.05,0.00,1.00,0.00,-19.20 --28.80,0.00,3.08,0.00,1.00,0.00,19.20 --24.00,0.00,3.10,0.00,1.00,0.00,-14.40 --19.20,0.00,3.12,0.00,1.00,0.00,14.40 --14.40,0.00,3.14,0.00,1.00,0.00,-9.60 --9.60,0.00,3.16,0.00,1.00,0.00,4.80 --4.80,0.00,3.18,0.00,1.00,0.00,-4.80 -0.00,0.00,3.20,0.00,1.00,-0.00,0.00 -4.80,-0.00,3.23,0.00,1.00,-0.00,-4.80 -9.60,-0.00,3.25,0.00,1.00,-0.00,4.80 -14.40,-0.00,3.27,0.00,1.00,-4.80,-9.60 -19.20,-4.80,3.29,0.00,1.00,-4.80,9.60 -24.00,-4.80,3.31,0.00,1.00,-4.80,-14.40 -28.80,-4.80,3.33,0.00,1.00,-4.80,14.40 -33.60,-4.80,3.35,0.00,1.00,-4.80,-19.20 -38.40,-4.80,3.38,0.00,1.00,-9.60,19.20 -43.20,-4.80,3.40,0.00,1.00,-9.60,-24.00 -48.00,-4.80,3.42,0.00,1.00,-9.60,24.00 -52.80,-9.60,3.44,0.00,1.00,-14.40,-28.80 -57.60,-9.60,3.46,0.00,1.00,-14.40,28.80 -62.40,-9.60,3.48,0.00,1.00,-19.20,-28.80 -67.20,-9.60,3.50,0.00,1.00,-24.00,33.60 -72.00,-9.60,3.52,0.00,1.00,-33.60,-33.60 -76.80,-9.60,3.55,0.00,1.00,-43.20,33.60 -81.60,-9.60,3.57,0.00,1.00,-67.20,-33.60 -86.40,-9.60,3.59,0.00,1.00,-96.00,33.60 -91.20,-9.60,3.61,0.00,1.00,-124.80,-33.60 -96.00,-9.60,3.63,0.00,1.00,-144.00,33.60 -100.80,-9.60,3.65,0.00,1.00,-153.60,-33.60 -105.60,-9.60,3.67,0.00,1.00,-158.40,33.60 -110.40,-9.60,3.70,0.00,1.00,-163.20,-33.60 -115.20,-9.60,3.72,0.00,1.00,-168.00,33.60 -120.00,-9.60,3.74,0.00,1.00,-168.00,-28.80 -124.80,-9.60,3.76,0.00,1.00,-168.00,28.80 -129.60,-9.60,3.78,0.00,1.00,-172.80,-28.80 -134.40,-4.80,3.80,0.00,1.00,-172.80,24.00 -139.20,-4.80,3.82,0.00,1.00,-172.80,-24.00 -144.00,-4.80,3.85,0.00,1.00,-172.80,19.20 -148.80,-4.80,3.87,0.00,1.00,-177.60,-19.20 -153.60,-4.80,3.89,0.00,1.00,-177.60,14.40 -158.40,-4.80,3.91,0.00,1.00,-177.60,-14.40 -163.20,-4.80,3.93,0.00,1.00,-177.60,9.60 -168.00,-0.00,3.95,0.00,1.00,-177.60,-4.80 -172.80,-0.00,3.97,0.00,1.00,-177.60,4.80 -177.60,-0.00,3.99,0.00,1.00,177.60,-0.00 --177.60,0.00,4.02,0.00,1.00,177.60,-0.00 --172.80,0.00,4.04,0.00,1.00,177.60,4.80 --168.00,0.00,4.06,0.00,1.00,177.60,-4.80 --163.20,4.80,4.08,0.00,1.00,177.60,9.60 --158.40,4.80,4.10,0.00,1.00,177.60,-14.40 --153.60,4.80,4.12,0.00,1.00,172.80,14.40 --148.80,4.80,4.14,0.00,1.00,172.80,-19.20 --144.00,4.80,4.17,0.00,1.00,172.80,19.20 --139.20,4.80,4.19,0.00,1.00,172.80,-24.00 --134.40,4.80,4.21,0.00,1.00,168.00,24.00 --129.60,9.60,4.23,0.00,1.00,168.00,-28.80 --124.80,9.60,4.25,0.00,1.00,168.00,28.80 --120.00,9.60,4.27,0.00,1.00,163.20,-28.80 --115.20,9.60,4.29,0.00,1.00,158.40,33.60 --110.40,9.60,4.32,0.00,1.00,153.60,-33.60 --105.60,9.60,4.34,0.00,1.00,144.00,33.60 --100.80,9.60,4.36,0.00,1.00,124.80,-33.60 --96.00,9.60,4.38,0.00,1.00,96.00,33.60 --91.20,9.60,4.40,0.00,1.00,67.20,-33.60 --86.40,9.60,4.42,0.00,1.00,43.20,33.60 --81.60,9.60,4.44,0.00,1.00,33.60,-33.60 --76.80,9.60,4.46,0.00,1.00,24.00,33.60 --72.00,9.60,4.49,0.00,1.00,19.20,-33.60 --67.20,9.60,4.51,0.00,1.00,14.40,33.60 --62.40,9.60,4.53,0.00,1.00,14.40,-28.80 --57.60,9.60,4.55,0.00,1.00,9.60,28.80 --52.80,9.60,4.57,0.00,1.00,9.60,-28.80 --48.00,4.80,4.59,0.00,1.00,9.60,24.00 --43.20,4.80,4.61,0.00,1.00,4.80,-24.00 --38.40,4.80,4.64,0.00,1.00,4.80,19.20 --33.60,4.80,4.66,0.00,1.00,4.80,-19.20 --28.80,4.80,4.68,0.00,1.00,4.80,14.40 --24.00,4.80,4.70,0.00,1.00,4.80,-14.40 --19.20,4.80,4.72,0.00,1.00,0.00,9.60 --14.40,0.00,4.74,0.00,1.00,0.00,-9.60 --9.60,0.00,4.76,0.00,1.00,0.00,4.80 --4.80,0.00,4.79,0.00,1.00,0.00,-4.80 -0.00,0.00,4.81,0.00,1.00,-0.00,0.00 -4.80,-0.00,4.83,0.00,1.00,-0.00,-4.80 -9.60,-0.00,4.85,0.00,1.00,-4.80,4.80 -14.40,-4.80,4.87,0.00,1.00,-4.80,-9.60 -19.20,-4.80,4.89,0.00,1.00,-4.80,9.60 -24.00,-4.80,4.91,0.00,1.00,-4.80,-9.60 -28.80,-4.80,4.93,0.00,1.00,-9.60,14.40 -33.60,-9.60,4.96,0.00,1.00,-9.60,-14.40 -38.40,-9.60,4.98,0.00,1.00,-14.40,19.20 -43.20,-9.60,5.00,0.00,1.00,-14.40,-19.20 -48.00,-9.60,5.02,0.00,1.00,-14.40,24.00 -52.80,-9.60,5.04,0.00,1.00,-19.20,-24.00 -57.60,-14.40,5.06,0.00,1.00,-24.00,24.00 -62.40,-14.40,5.08,0.00,1.00,-28.80,-28.80 -67.20,-14.40,5.11,0.00,1.00,-33.60,28.80 -72.00,-14.40,5.13,0.00,1.00,-43.20,-28.80 -76.80,-14.40,5.15,0.00,1.00,-57.60,28.80 -81.60,-14.40,5.17,0.00,1.00,-76.80,-28.80 -86.40,-14.40,5.19,0.00,1.00,-96.00,28.80 -91.20,-14.40,5.21,0.00,1.00,-115.20,-28.80 -96.00,-14.40,5.23,0.00,1.00,-129.60,28.80 -100.80,-14.40,5.26,0.00,1.00,-139.20,-28.80 -105.60,-14.40,5.28,0.00,1.00,-148.80,28.80 -110.40,-14.40,5.30,0.00,1.00,-153.60,-28.80 -115.20,-14.40,5.32,0.00,1.00,-158.40,28.80 -120.00,-14.40,5.34,0.00,1.00,-163.20,-24.00 -124.80,-9.60,5.36,0.00,1.00,-163.20,24.00 -129.60,-9.60,5.38,0.00,1.00,-168.00,-24.00 -134.40,-9.60,5.40,0.00,1.00,-168.00,19.20 -139.20,-9.60,5.43,0.00,1.00,-172.80,-19.20 -144.00,-9.60,5.45,0.00,1.00,-172.80,19.20 -148.80,-9.60,5.47,0.00,1.00,-172.80,-14.40 -153.60,-4.80,5.49,0.00,1.00,-172.80,14.40 -158.40,-4.80,5.51,0.00,1.00,-177.60,-9.60 -163.20,-4.80,5.53,0.00,1.00,-177.60,9.60 -168.00,-4.80,5.55,0.00,1.00,-177.60,-4.80 -172.80,-0.00,5.58,0.00,1.00,-177.60,4.80 -177.60,-0.00,5.60,0.00,1.00,177.60,-0.00 --177.60,0.00,5.62,0.00,1.00,177.60,-0.00 --172.80,0.00,5.64,0.00,1.00,177.60,4.80 --168.00,4.80,5.66,0.00,1.00,177.60,-4.80 --163.20,4.80,5.68,0.00,1.00,172.80,9.60 --158.40,4.80,5.70,0.00,1.00,172.80,-9.60 --153.60,4.80,5.72,0.00,1.00,172.80,14.40 --148.80,9.60,5.75,0.00,1.00,172.80,-14.40 --144.00,9.60,5.77,0.00,1.00,168.00,19.20 --139.20,9.60,5.79,0.00,1.00,168.00,-19.20 --134.40,9.60,5.81,0.00,1.00,163.20,19.20 --129.60,9.60,5.83,0.00,1.00,163.20,-24.00 --124.80,9.60,5.85,0.00,1.00,158.40,24.00 --120.00,14.40,5.87,0.00,1.00,153.60,-24.00 --115.20,14.40,5.90,0.00,1.00,148.80,28.80 --110.40,14.40,5.92,0.00,1.00,139.20,-28.80 --105.60,14.40,5.94,0.00,1.00,129.60,28.80 --100.80,14.40,5.96,0.00,1.00,115.20,-28.80 --96.00,14.40,5.98,0.00,1.00,96.00,28.80 --91.20,14.40,6.00,0.00,1.00,76.80,-28.80 --86.40,14.40,6.02,0.00,1.00,57.60,28.80 --81.60,14.40,6.05,0.00,1.00,43.20,-28.80 --76.80,14.40,6.07,0.00,1.00,33.60,28.80 --72.00,14.40,6.09,0.00,1.00,28.80,-28.80 --67.20,14.40,6.11,0.00,1.00,24.00,28.80 --62.40,14.40,6.13,0.00,1.00,19.20,-28.80 --57.60,14.40,6.15,0.00,1.00,14.40,24.00 --52.80,9.60,6.17,0.00,1.00,14.40,-24.00 --48.00,9.60,6.19,0.00,1.00,14.40,24.00 --43.20,9.60,6.22,0.00,1.00,9.60,-19.20 --38.40,9.60,6.24,0.00,1.00,9.60,19.20 --33.60,9.60,6.26,0.00,1.00,4.80,-14.40 --28.80,4.80,6.28,0.00,1.00,4.80,14.40 --24.00,4.80,6.30,0.00,1.00,4.80,-9.60 --19.20,4.80,6.32,0.00,1.00,4.80,9.60 --14.40,4.80,6.34,0.00,1.00,0.00,-9.60 --9.60,0.00,6.37,0.00,1.00,0.00,4.80 --4.80,0.00,6.39,0.00,1.00,0.00,-4.80 -0.00,0.00,6.41,0.00,1.00,-0.00,0.00 -4.80,-0.00,6.43,0.00,1.00,-4.80,-0.00 -9.60,-4.80,6.45,0.00,1.00,-4.80,4.80 -14.40,-4.80,6.47,0.00,1.00,-4.80,-4.80 -19.20,-4.80,6.49,0.00,1.00,-9.60,9.60 -24.00,-9.60,6.52,0.00,1.00,-9.60,-9.60 -28.80,-9.60,6.54,0.00,1.00,-9.60,14.40 -33.60,-9.60,6.56,0.00,1.00,-14.40,-14.40 -38.40,-9.60,6.58,0.00,1.00,-14.40,14.40 -43.20,-14.40,6.60,0.00,1.00,-19.20,-19.20 -48.00,-14.40,6.62,0.00,1.00,-24.00,19.20 -52.80,-14.40,6.64,0.00,1.00,-24.00,-19.20 -57.60,-14.40,6.66,0.00,1.00,-28.80,19.20 -62.40,-19.20,6.69,0.00,1.00,-38.40,-24.00 -67.20,-19.20,6.71,0.00,1.00,-43.20,24.00 -72.00,-19.20,6.73,0.00,1.00,-52.80,-24.00 -76.80,-19.20,6.75,0.00,1.00,-62.40,24.00 -81.60,-19.20,6.77,0.00,1.00,-76.80,-24.00 -86.40,-19.20,6.79,0.00,1.00,-96.00,24.00 -91.20,-19.20,6.81,0.00,1.00,-110.40,-24.00 -96.00,-19.20,6.84,0.00,1.00,-120.00,24.00 -100.80,-19.20,6.86,0.00,1.00,-134.40,-24.00 -105.60,-19.20,6.88,0.00,1.00,-139.20,24.00 -110.40,-19.20,6.90,0.00,1.00,-148.80,-24.00 -115.20,-19.20,6.92,0.00,1.00,-153.60,24.00 -120.00,-14.40,6.94,0.00,1.00,-158.40,-24.00 -124.80,-14.40,6.96,0.00,1.00,-158.40,19.20 -129.60,-14.40,6.99,0.00,1.00,-163.20,-19.20 -134.40,-14.40,7.01,0.00,1.00,-163.20,19.20 -139.20,-14.40,7.03,0.00,1.00,-168.00,-14.40 -144.00,-9.60,7.05,0.00,1.00,-168.00,14.40 -148.80,-9.60,7.07,0.00,1.00,-172.80,-14.40 -153.60,-9.60,7.09,0.00,1.00,-172.80,9.60 -158.40,-4.80,7.11,0.00,1.00,-172.80,-9.60 -163.20,-4.80,7.13,0.00,1.00,-177.60,9.60 -168.00,-4.80,7.16,0.00,1.00,-177.60,-4.80 -172.80,-0.00,7.18,0.00,1.00,-177.60,4.80 -177.60,-0.00,7.20,0.00,1.00,177.60,-0.00 --177.60,0.00,7.22,0.00,1.00,177.60,-0.00 --172.80,0.00,7.24,0.00,1.00,177.60,4.80 --168.00,4.80,7.26,0.00,1.00,172.80,-4.80 --163.20,4.80,7.28,0.00,1.00,172.80,9.60 --158.40,4.80,7.31,0.00,1.00,172.80,-9.60 --153.60,9.60,7.33,0.00,1.00,168.00,9.60 --148.80,9.60,7.35,0.00,1.00,168.00,-14.40 --144.00,9.60,7.37,0.00,1.00,163.20,14.40 --139.20,14.40,7.39,0.00,1.00,163.20,-14.40 --134.40,14.40,7.41,0.00,1.00,158.40,19.20 --129.60,14.40,7.43,0.00,1.00,158.40,-19.20 --124.80,14.40,7.46,0.00,1.00,153.60,19.20 --120.00,14.40,7.48,0.00,1.00,148.80,-24.00 --115.20,19.20,7.50,0.00,1.00,139.20,24.00 --110.40,19.20,7.52,0.00,1.00,134.40,-24.00 --105.60,19.20,7.54,0.00,1.00,120.00,24.00 --100.80,19.20,7.56,0.00,1.00,110.40,-24.00 --96.00,19.20,7.58,0.00,1.00,96.00,24.00 --91.20,19.20,7.60,0.00,1.00,76.80,-24.00 --86.40,19.20,7.63,0.00,1.00,62.40,24.00 --81.60,19.20,7.65,0.00,1.00,52.80,-24.00 --76.80,19.20,7.67,0.00,1.00,43.20,24.00 --72.00,19.20,7.69,0.00,1.00,38.40,-24.00 --67.20,19.20,7.71,0.00,1.00,28.80,24.00 --62.40,19.20,7.73,0.00,1.00,24.00,-24.00 --57.60,14.40,7.75,0.00,1.00,24.00,19.20 --52.80,14.40,7.78,0.00,1.00,19.20,-19.20 --48.00,14.40,7.80,0.00,1.00,14.40,19.20 --43.20,14.40,7.82,0.00,1.00,14.40,-19.20 --38.40,9.60,7.84,0.00,1.00,9.60,14.40 --33.60,9.60,7.86,0.00,1.00,9.60,-14.40 --28.80,9.60,7.88,0.00,1.00,9.60,14.40 --24.00,9.60,7.90,0.00,1.00,4.80,-9.60 --19.20,4.80,7.93,0.00,1.00,4.80,9.60 --14.40,4.80,7.95,0.00,1.00,4.80,-4.80 --9.60,4.80,7.97,0.00,1.00,0.00,4.80 --4.80,0.00,7.99,0.00,1.00,0.00,-0.00 -0.00,0.00,8.01,0.00,1.00,-0.00,0.00 -4.80,-0.00,8.03,0.00,1.00,-4.80,-0.00 -9.60,-4.80,8.05,0.00,1.00,-4.80,4.80 -14.40,-4.80,8.07,0.00,1.00,-9.60,-4.80 -19.20,-9.60,8.10,0.00,1.00,-9.60,4.80 -24.00,-9.60,8.12,0.00,1.00,-14.40,-9.60 -28.80,-9.60,8.14,0.00,1.00,-14.40,9.60 -33.60,-14.40,8.16,0.00,1.00,-19.20,-9.60 -33.60,-14.40,8.18,0.00,1.00,-19.20,14.40 -38.40,-14.40,8.20,0.00,1.00,-24.00,-14.40 -43.20,-19.20,8.22,0.00,1.00,-28.80,14.40 -48.00,-19.20,8.25,0.00,1.00,-33.60,-14.40 -57.60,-19.20,8.27,0.00,1.00,-38.40,19.20 -62.40,-19.20,8.29,0.00,1.00,-43.20,-19.20 -67.20,-24.00,8.31,0.00,1.00,-48.00,19.20 -72.00,-24.00,8.33,0.00,1.00,-57.60,-19.20 -76.80,-24.00,8.35,0.00,1.00,-67.20,19.20 -81.60,-24.00,8.37,0.00,1.00,-81.60,-19.20 -86.40,-24.00,8.40,0.00,1.00,-91.20,19.20 -91.20,-24.00,8.42,0.00,1.00,-105.60,-19.20 -96.00,-24.00,8.44,0.00,1.00,-115.20,19.20 -100.80,-24.00,8.46,0.00,1.00,-124.80,-19.20 -105.60,-24.00,8.48,0.00,1.00,-134.40,19.20 -110.40,-24.00,8.50,0.00,1.00,-139.20,-19.20 -115.20,-19.20,8.52,0.00,1.00,-144.00,19.20 -120.00,-19.20,8.54,0.00,1.00,-148.80,-19.20 -129.60,-19.20,8.57,0.00,1.00,-153.60,19.20 -134.40,-19.20,8.59,0.00,1.00,-158.40,-14.40 -139.20,-19.20,8.61,0.00,1.00,-163.20,14.40 -144.00,-14.40,8.63,0.00,1.00,-163.20,-14.40 -148.80,-14.40,8.65,0.00,1.00,-168.00,14.40 -148.80,-14.40,8.67,0.00,1.00,-168.00,-9.60 -153.60,-9.60,8.69,0.00,1.00,-172.80,9.60 -158.40,-9.60,8.72,0.00,1.00,-172.80,-9.60 -163.20,-4.80,8.74,0.00,1.00,-177.60,4.80 -168.00,-4.80,8.76,0.00,1.00,-177.60,-4.80 -172.80,-4.80,8.78,0.00,1.00,-177.60,4.80 -177.60,-0.00,8.80,0.00,1.00,177.60,-0.00 --177.60,0.00,8.82,0.00,1.00,177.60,-0.00 --172.80,4.80,8.84,0.00,1.00,177.60,4.80 --168.00,4.80,8.87,0.00,1.00,172.80,-4.80 --163.20,4.80,8.89,0.00,1.00,172.80,4.80 --158.40,9.60,8.91,0.00,1.00,168.00,-9.60 --153.60,9.60,8.93,0.00,1.00,168.00,9.60 --148.80,14.40,8.95,0.00,1.00,163.20,-9.60 --148.80,14.40,8.97,0.00,1.00,163.20,14.40 --144.00,14.40,8.99,0.00,1.00,158.40,-14.40 --139.20,19.20,9.01,0.00,1.00,153.60,14.40 --134.40,19.20,9.04,0.00,1.00,148.80,-14.40 --129.60,19.20,9.06,0.00,1.00,144.00,19.20 --120.00,19.20,9.08,0.00,1.00,139.20,-19.20 --115.20,19.20,9.10,0.00,1.00,134.40,19.20 --110.40,24.00,9.12,0.00,1.00,124.80,-19.20 --105.60,24.00,9.14,0.00,1.00,115.20,19.20 --100.80,24.00,9.16,0.00,1.00,105.60,-19.20 --96.00,24.00,9.19,0.00,1.00,91.20,19.20 --91.20,24.00,9.21,0.00,1.00,81.60,-19.20 --86.40,24.00,9.23,0.00,1.00,67.20,19.20 --81.60,24.00,9.25,0.00,1.00,57.60,-19.20 --76.80,24.00,9.27,0.00,1.00,48.00,19.20 --72.00,24.00,9.29,0.00,1.00,43.20,-19.20 --67.20,24.00,9.31,0.00,1.00,38.40,19.20 --62.40,19.20,9.34,0.00,1.00,33.60,-19.20 --57.60,19.20,9.36,0.00,1.00,28.80,19.20 --48.00,19.20,9.38,0.00,1.00,24.00,-14.40 --43.20,19.20,9.40,0.00,1.00,19.20,14.40 --38.40,14.40,9.42,0.00,1.00,19.20,-14.40 --33.60,14.40,9.44,0.00,1.00,14.40,14.40 --33.60,14.40,9.46,0.00,1.00,14.40,-9.60 --28.80,9.60,9.48,0.00,1.00,9.60,9.60 --24.00,9.60,9.51,0.00,1.00,9.60,-9.60 --19.20,9.60,9.53,0.00,1.00,4.80,4.80 --14.40,4.80,9.55,0.00,1.00,4.80,-4.80 --9.60,4.80,9.57,0.00,1.00,0.00,4.80 --4.80,0.00,9.59,0.00,1.00,0.00,-0.00 -0.00,0.00,9.61,0.00,1.00,-0.00,0.00 -4.80,-0.00,9.63,0.00,1.00,-4.80,-0.00 -9.60,-4.80,9.66,0.00,1.00,-4.80,4.80 -14.40,-4.80,9.68,0.00,1.00,-9.60,-4.80 -19.20,-9.60,9.70,0.00,1.00,-9.60,4.80 -19.20,-9.60,9.72,0.00,1.00,-14.40,-4.80 -24.00,-14.40,9.74,0.00,1.00,-19.20,9.60 -28.80,-14.40,9.76,0.00,1.00,-19.20,-9.60 -33.60,-19.20,9.78,0.00,1.00,-24.00,9.60 -38.40,-19.20,9.81,0.00,1.00,-28.80,-9.60 -43.20,-19.20,9.83,0.00,1.00,-33.60,9.60 -48.00,-24.00,9.85,0.00,1.00,-38.40,-14.40 -52.80,-24.00,9.87,0.00,1.00,-43.20,14.40 -57.60,-24.00,9.89,0.00,1.00,-48.00,-14.40 -62.40,-24.00,9.91,0.00,1.00,-52.80,14.40 -72.00,-28.80,9.93,0.00,1.00,-62.40,-14.40 -76.80,-28.80,9.95,0.00,1.00,-72.00,14.40 -81.60,-28.80,9.98,0.00,1.00,-81.60,-14.40 -86.40,-28.80,10.00,0.00,1.00,-91.20,14.40 -91.20,-28.80,10.02,0.00,1.00,-100.80,-14.40 -96.00,-28.80,10.04,0.00,1.00,-110.40,14.40 -100.80,-28.80,10.06,0.00,1.00,-120.00,-14.40 -105.60,-28.80,10.08,0.00,1.00,-129.60,14.40 -115.20,-28.80,10.10,0.00,1.00,-134.40,-14.40 -120.00,-24.00,10.13,0.00,1.00,-139.20,14.40 -124.80,-24.00,10.15,0.00,1.00,-144.00,-14.40 -129.60,-24.00,10.17,0.00,1.00,-148.80,14.40 -134.40,-24.00,10.19,0.00,1.00,-153.60,-14.40 -139.20,-19.20,10.21,0.00,1.00,-158.40,9.60 -144.00,-19.20,10.23,0.00,1.00,-163.20,-9.60 -148.80,-14.40,10.25,0.00,1.00,-163.20,9.60 -153.60,-14.40,10.28,0.00,1.00,-168.00,-9.60 -158.40,-14.40,10.30,0.00,1.00,-168.00,4.80 -163.20,-9.60,10.32,0.00,1.00,-172.80,-4.80 -163.20,-9.60,10.34,0.00,1.00,-172.80,4.80 -168.00,-4.80,10.36,0.00,1.00,-177.60,-4.80 -172.80,-4.80,10.38,0.00,1.00,-177.60,0.00 -177.60,-0.00,10.40,0.00,1.00,177.60,-0.00 --177.60,0.00,10.42,0.00,1.00,177.60,-0.00 --172.80,4.80,10.45,0.00,1.00,172.80,0.00 --168.00,4.80,10.47,0.00,1.00,172.80,-4.80 --163.20,9.60,10.49,0.00,1.00,168.00,4.80 --163.20,9.60,10.51,0.00,1.00,168.00,-4.80 --158.40,14.40,10.53,0.00,1.00,163.20,4.80 --153.60,14.40,10.55,0.00,1.00,163.20,-9.60 --148.80,14.40,10.57,0.00,1.00,158.40,9.60 --144.00,19.20,10.60,0.00,1.00,153.60,-9.60 --139.20,19.20,10.62,0.00,1.00,148.80,9.60 --134.40,24.00,10.64,0.00,1.00,144.00,-14.40 --129.60,24.00,10.66,0.00,1.00,139.20,14.40 --124.80,24.00,10.68,0.00,1.00,134.40,-14.40 --120.00,24.00,10.70,0.00,1.00,129.60,14.40 --115.20,28.80,10.72,0.00,1.00,120.00,-14.40 --105.60,28.80,10.74,0.00,1.00,110.40,14.40 --100.80,28.80,10.77,0.00,1.00,100.80,-14.40 --96.00,28.80,10.79,0.00,1.00,91.20,14.40 --91.20,28.80,10.81,0.00,1.00,81.60,-14.40 --86.40,28.80,10.83,0.00,1.00,72.00,14.40 --81.60,28.80,10.85,0.00,1.00,62.40,-14.40 --76.80,28.80,10.87,0.00,1.00,52.80,14.40 --72.00,28.80,10.89,0.00,1.00,48.00,-14.40 --62.40,24.00,10.92,0.00,1.00,43.20,14.40 --57.60,24.00,10.94,0.00,1.00,38.40,-14.40 --52.80,24.00,10.96,0.00,1.00,33.60,14.40 --48.00,24.00,10.98,0.00,1.00,28.80,-14.40 --43.20,19.20,11.00,0.00,1.00,24.00,9.60 --38.40,19.20,11.02,0.00,1.00,19.20,-9.60 --33.60,19.20,11.04,0.00,1.00,19.20,9.60 --28.80,14.40,11.07,0.00,1.00,14.40,-9.60 --24.00,14.40,11.09,0.00,1.00,9.60,9.60 --19.20,9.60,11.11,0.00,1.00,9.60,-4.80 --19.20,9.60,11.13,0.00,1.00,4.80,4.80 --14.40,4.80,11.15,0.00,1.00,4.80,-4.80 --9.60,4.80,11.17,0.00,1.00,0.00,4.80 --4.80,0.00,11.19,0.00,1.00,0.00,-0.00 -0.00,0.00,11.21,0.00,1.00,-4.80,0.00 -4.80,-4.80,11.24,0.00,1.00,-4.80,-0.00 -9.60,-4.80,11.26,0.00,1.00,-9.60,0.00 -14.40,-9.60,11.28,0.00,1.00,-9.60,-4.80 -14.40,-9.60,11.30,0.00,1.00,-14.40,4.80 -19.20,-14.40,11.32,0.00,1.00,-14.40,-4.80 -24.00,-14.40,11.34,0.00,1.00,-19.20,4.80 -28.80,-19.20,11.36,0.00,1.00,-24.00,-4.80 -33.60,-19.20,11.39,0.00,1.00,-28.80,4.80 -38.40,-24.00,11.41,0.00,1.00,-28.80,-9.60 -43.20,-24.00,11.43,0.00,1.00,-33.60,9.60 -48.00,-24.00,11.45,0.00,1.00,-38.40,-9.60 -52.80,-28.80,11.47,0.00,1.00,-48.00,9.60 -57.60,-28.80,11.49,0.00,1.00,-52.80,-9.60 -62.40,-28.80,11.51,0.00,1.00,-57.60,9.60 -67.20,-33.60,11.54,0.00,1.00,-67.20,-9.60 -72.00,-33.60,11.56,0.00,1.00,-76.80,9.60 -81.60,-33.60,11.58,0.00,1.00,-81.60,-9.60 -86.40,-33.60,11.60,0.00,1.00,-91.20,9.60 -91.20,-33.60,11.62,0.00,1.00,-100.80,-9.60 -96.00,-33.60,11.64,0.00,1.00,-110.40,9.60 -100.80,-33.60,11.66,0.00,1.00,-115.20,-9.60 -110.40,-33.60,11.68,0.00,1.00,-124.80,9.60 -115.20,-33.60,11.71,0.00,1.00,-129.60,-9.60 -120.00,-28.80,11.73,0.00,1.00,-139.20,9.60 -124.80,-28.80,11.75,0.00,1.00,-144.00,-9.60 -129.60,-28.80,11.77,0.00,1.00,-148.80,9.60 -134.40,-24.00,11.79,0.00,1.00,-153.60,-9.60 -139.20,-24.00,11.81,0.00,1.00,-153.60,9.60 -144.00,-19.20,11.83,0.00,1.00,-158.40,-9.60 -148.80,-19.20,11.86,0.00,1.00,-163.20,4.80 -153.60,-14.40,11.88,0.00,1.00,-163.20,-4.80 -158.40,-14.40,11.90,0.00,1.00,-168.00,4.80 -163.20,-9.60,11.92,0.00,1.00,-172.80,-4.80 -168.00,-9.60,11.94,0.00,1.00,-172.80,4.80 -168.00,-4.80,11.96,0.00,1.00,-177.60,-0.00 -172.80,-4.80,11.98,0.00,1.00,-177.60,0.00 -177.60,-0.00,12.01,0.00,1.00,177.60,-0.00 --177.60,0.00,12.03,0.00,1.00,177.60,-0.00 --172.80,4.80,12.05,0.00,1.00,172.80,0.00 --168.00,4.80,12.07,0.00,1.00,172.80,-0.00 --168.00,9.60,12.09,0.00,1.00,168.00,4.80 --163.20,9.60,12.11,0.00,1.00,163.20,-4.80 --158.40,14.40,12.13,0.00,1.00,163.20,4.80 --153.60,14.40,12.15,0.00,1.00,158.40,-4.80 --148.80,19.20,12.18,0.00,1.00,153.60,4.80 --144.00,19.20,12.20,0.00,1.00,153.60,-9.60 --139.20,24.00,12.22,0.00,1.00,148.80,9.60 --134.40,24.00,12.24,0.00,1.00,144.00,-9.60 --129.60,28.80,12.26,0.00,1.00,139.20,9.60 --124.80,28.80,12.28,0.00,1.00,129.60,-9.60 --120.00,28.80,12.30,0.00,1.00,124.80,9.60 --115.20,33.60,12.33,0.00,1.00,115.20,-9.60 --110.40,33.60,12.35,0.00,1.00,110.40,9.60 --100.80,33.60,12.37,0.00,1.00,100.80,-9.60 --96.00,33.60,12.39,0.00,1.00,91.20,9.60 --91.20,33.60,12.41,0.00,1.00,81.60,-9.60 --86.40,33.60,12.43,0.00,1.00,76.80,9.60 --81.60,33.60,12.45,0.00,1.00,67.20,-9.60 --72.00,33.60,12.48,0.00,1.00,57.60,9.60 --67.20,33.60,12.50,0.00,1.00,52.80,-9.60 --62.40,28.80,12.52,0.00,1.00,48.00,9.60 --57.60,28.80,12.54,0.00,1.00,38.40,-9.60 --52.80,28.80,12.56,0.00,1.00,33.60,9.60 --48.00,24.00,12.58,0.00,1.00,28.80,-9.60 --43.20,24.00,12.60,0.00,1.00,28.80,9.60 --38.40,24.00,12.62,0.00,1.00,24.00,-9.60 --33.60,19.20,12.65,0.00,1.00,19.20,4.80 --28.80,19.20,12.67,0.00,1.00,14.40,-4.80 --24.00,14.40,12.69,0.00,1.00,14.40,4.80 --19.20,14.40,12.71,0.00,1.00,9.60,-4.80 --14.40,9.60,12.73,0.00,1.00,9.60,4.80 --14.40,9.60,12.75,0.00,1.00,4.80,-4.80 --9.60,4.80,12.77,0.00,1.00,4.80,0.00 --4.80,4.80,12.80,0.00,1.00,0.00,-0.00 -0.00,0.00,12.82,0.00,1.00,-4.80,0.00 -4.80,-4.80,12.84,0.00,1.00,-4.80,-0.00 -9.60,-4.80,12.86,0.00,1.00,-9.60,0.00 -9.60,-9.60,12.88,0.00,1.00,-9.60,-0.00 -14.40,-9.60,12.90,0.00,1.00,-14.40,0.00 -19.20,-14.40,12.92,0.00,1.00,-19.20,-4.80 -24.00,-19.20,12.95,0.00,1.00,-24.00,4.80 -28.80,-19.20,12.97,0.00,1.00,-24.00,-4.80 -33.60,-24.00,12.99,0.00,1.00,-28.80,4.80 -38.40,-24.00,13.01,0.00,1.00,-33.60,-4.80 -43.20,-28.80,13.03,0.00,1.00,-38.40,4.80 -48.00,-28.80,13.05,0.00,1.00,-43.20,-4.80 -52.80,-33.60,13.07,0.00,1.00,-48.00,4.80 -57.60,-33.60,13.09,0.00,1.00,-52.80,-4.80 -62.40,-33.60,13.12,0.00,1.00,-62.40,4.80 -67.20,-38.40,13.14,0.00,1.00,-67.20,-4.80 -72.00,-38.40,13.16,0.00,1.00,-76.80,4.80 -81.60,-38.40,13.18,0.00,1.00,-86.40,-4.80 -86.40,-38.40,13.20,0.00,1.00,-91.20,4.80 -91.20,-38.40,13.22,0.00,1.00,-100.80,-4.80 -96.00,-38.40,13.24,0.00,1.00,-105.60,4.80 -105.60,-38.40,13.27,0.00,1.00,-115.20,-4.80 -110.40,-38.40,13.29,0.00,1.00,-120.00,4.80 -115.20,-33.60,13.31,0.00,1.00,-129.60,-4.80 -120.00,-33.60,13.33,0.00,1.00,-134.40,4.80 -124.80,-33.60,13.35,0.00,1.00,-139.20,-4.80 -129.60,-28.80,13.37,0.00,1.00,-144.00,4.80 -134.40,-28.80,13.39,0.00,1.00,-148.80,-4.80 -139.20,-24.00,13.42,0.00,1.00,-153.60,4.80 -144.00,-24.00,13.44,0.00,1.00,-158.40,-4.80 -148.80,-19.20,13.46,0.00,1.00,-158.40,4.80 -153.60,-19.20,13.48,0.00,1.00,-163.20,-4.80 -158.40,-14.40,13.50,0.00,1.00,-168.00,4.80 -163.20,-14.40,13.52,0.00,1.00,-168.00,-4.80 -168.00,-9.60,13.54,0.00,1.00,-172.80,0.00 -172.80,-9.60,13.56,0.00,1.00,-177.60,-0.00 -172.80,-4.80,13.59,0.00,1.00,-177.60,0.00 -177.60,-0.00,13.61,0.00,1.00,177.60,-0.00 --177.60,0.00,13.63,0.00,1.00,177.60,-0.00 --172.80,4.80,13.65,0.00,1.00,172.80,0.00 --172.80,9.60,13.67,0.00,1.00,168.00,-0.00 --168.00,9.60,13.69,0.00,1.00,168.00,0.00 --163.20,14.40,13.71,0.00,1.00,163.20,-4.80 --158.40,14.40,13.74,0.00,1.00,158.40,4.80 --153.60,19.20,13.76,0.00,1.00,158.40,-4.80 --148.80,19.20,13.78,0.00,1.00,153.60,4.80 --144.00,24.00,13.80,0.00,1.00,148.80,-4.80 --139.20,24.00,13.82,0.00,1.00,144.00,4.80 --134.40,28.80,13.84,0.00,1.00,139.20,-4.80 --129.60,28.80,13.86,0.00,1.00,134.40,4.80 --124.80,33.60,13.89,0.00,1.00,129.60,-4.80 --120.00,33.60,13.91,0.00,1.00,120.00,4.80 --115.20,33.60,13.93,0.00,1.00,115.20,-4.80 --110.40,38.40,13.95,0.00,1.00,105.60,4.80 --105.60,38.40,13.97,0.00,1.00,100.80,-4.80 --96.00,38.40,13.99,0.00,1.00,91.20,4.80 --91.20,38.40,14.01,0.00,1.00,86.40,-4.80 --86.40,38.40,14.03,0.00,1.00,76.80,4.80 --81.60,38.40,14.06,0.00,1.00,67.20,-4.80 --72.00,38.40,14.08,0.00,1.00,62.40,4.80 --67.20,38.40,14.10,0.00,1.00,52.80,-4.80 --62.40,33.60,14.12,0.00,1.00,48.00,4.80 --57.60,33.60,14.14,0.00,1.00,43.20,-4.80 --52.80,33.60,14.16,0.00,1.00,38.40,4.80 --48.00,28.80,14.18,0.00,1.00,33.60,-4.80 --43.20,28.80,14.21,0.00,1.00,28.80,4.80 --38.40,24.00,14.23,0.00,1.00,24.00,-4.80 --33.60,24.00,14.25,0.00,1.00,24.00,4.80 --28.80,19.20,14.27,0.00,1.00,19.20,-4.80 --24.00,19.20,14.29,0.00,1.00,14.40,4.80 --19.20,14.40,14.31,0.00,1.00,9.60,-4.80 --14.40,9.60,14.33,0.00,1.00,9.60,0.00 --9.60,9.60,14.36,0.00,1.00,4.80,-0.00 --9.60,4.80,14.38,0.00,1.00,4.80,0.00 --4.80,4.80,14.40,0.00,1.00,0.00,-0.00 -0.00,0.00,14.42,0.00,1.00,-4.80,0.00 -4.80,-4.80,14.44,0.00,1.00,-4.80,-0.00 -4.80,-4.80,14.46,0.00,1.00,-9.60,0.00 -9.60,-9.60,14.48,0.00,1.00,-14.40,-0.00 -14.40,-14.40,14.50,0.00,1.00,-14.40,0.00 -19.20,-14.40,14.53,0.00,1.00,-19.20,-0.00 -24.00,-19.20,14.55,0.00,1.00,-24.00,0.00 -24.00,-24.00,14.57,0.00,1.00,-28.80,-0.00 -28.80,-24.00,14.59,0.00,1.00,-33.60,0.00 -33.60,-28.80,14.61,0.00,1.00,-38.40,-0.00 -38.40,-28.80,14.63,0.00,1.00,-43.20,0.00 -43.20,-33.60,14.65,0.00,1.00,-48.00,-0.00 -48.00,-33.60,14.68,0.00,1.00,-52.80,0.00 -52.80,-38.40,14.70,0.00,1.00,-57.60,-0.00 -62.40,-38.40,14.72,0.00,1.00,-62.40,0.00 -67.20,-38.40,14.74,0.00,1.00,-72.00,-0.00 -72.00,-43.20,14.76,0.00,1.00,-76.80,0.00 -76.80,-43.20,14.78,0.00,1.00,-86.40,-0.00 -86.40,-43.20,14.80,0.00,1.00,-91.20,0.00 -91.20,-43.20,14.83,0.00,1.00,-100.80,-0.00 -96.00,-43.20,14.85,0.00,1.00,-105.60,0.00 -105.60,-43.20,14.87,0.00,1.00,-110.40,-0.00 -110.40,-43.20,14.89,0.00,1.00,-120.00,0.00 -115.20,-38.40,14.91,0.00,1.00,-124.80,-0.00 -124.80,-38.40,14.93,0.00,1.00,-129.60,0.00 -129.60,-38.40,14.95,0.00,1.00,-134.40,-0.00 -134.40,-33.60,14.97,0.00,1.00,-139.20,0.00 -139.20,-33.60,15.00,0.00,1.00,-144.00,-0.00 -144.00,-28.80,15.02,0.00,1.00,-148.80,0.00 -148.80,-28.80,15.04,0.00,1.00,-153.60,-0.00 -153.60,-24.00,15.06,0.00,1.00,-158.40,0.00 -158.40,-19.20,15.08,0.00,1.00,-163.20,-0.00 -158.40,-19.20,15.10,0.00,1.00,-163.20,0.00 -163.20,-14.40,15.12,0.00,1.00,-168.00,-0.00 -168.00,-9.60,15.15,0.00,1.00,-172.80,0.00 -172.80,-9.60,15.17,0.00,1.00,-172.80,-0.00 -172.80,-4.80,15.19,0.00,1.00,-177.60,0.00 -177.60,-0.00,15.21,0.00,1.00,177.60,-0.00 --177.60,0.00,15.23,0.00,1.00,172.80,-0.00 --172.80,4.80,15.25,0.00,1.00,172.80,0.00 --172.80,9.60,15.27,0.00,1.00,168.00,-0.00 --168.00,9.60,15.30,0.00,1.00,163.20,0.00 --163.20,14.40,15.32,0.00,1.00,163.20,-0.00 --158.40,19.20,15.34,0.00,1.00,158.40,0.00 --158.40,19.20,15.36,0.00,1.00,153.60,-0.00 --153.60,24.00,15.38,0.00,1.00,148.80,0.00 --148.80,28.80,15.40,0.00,1.00,144.00,-0.00 --144.00,28.80,15.42,0.00,1.00,139.20,0.00 --139.20,33.60,15.44,0.00,1.00,134.40,-0.00 --134.40,33.60,15.47,0.00,1.00,129.60,0.00 --129.60,38.40,15.49,0.00,1.00,124.80,-0.00 --124.80,38.40,15.51,0.00,1.00,120.00,0.00 --115.20,38.40,15.53,0.00,1.00,110.40,-0.00 --110.40,43.20,15.55,0.00,1.00,105.60,0.00 --105.60,43.20,15.57,0.00,1.00,100.80,-0.00 --96.00,43.20,15.59,0.00,1.00,91.20,0.00 --91.20,43.20,15.62,0.00,1.00,86.40,-0.00 --86.40,43.20,15.64,0.00,1.00,76.80,0.00 --76.80,43.20,15.66,0.00,1.00,72.00,-0.00 --72.00,43.20,15.68,0.00,1.00,62.40,0.00 --67.20,38.40,15.70,0.00,1.00,57.60,-0.00 --62.40,38.40,15.72,0.00,1.00,52.80,0.00 --52.80,38.40,15.74,0.00,1.00,48.00,-0.00 --48.00,33.60,15.77,0.00,1.00,43.20,0.00 --43.20,33.60,15.79,0.00,1.00,38.40,-0.00 --38.40,28.80,15.81,0.00,1.00,33.60,0.00 --33.60,28.80,15.83,0.00,1.00,28.80,-0.00 --28.80,24.00,15.85,0.00,1.00,24.00,0.00 --24.00,24.00,15.87,0.00,1.00,19.20,-0.00 --24.00,19.20,15.89,0.00,1.00,14.40,0.00 --19.20,14.40,15.91,0.00,1.00,14.40,-0.00 --14.40,14.40,15.94,0.00,1.00,9.60,0.00 --9.60,9.60,15.96,0.00,1.00,4.80,-0.00 --4.80,4.80,15.98,0.00,1.00,4.80,0.00 --4.80,4.80,16.00,0.00,1.00,0.00,-0.00 -0.00,0.00,16.00,0.00,1.00,-4.80,0.00 -4.80,-4.80,15.98,0.00,1.00,-4.80,0.00 -4.80,-4.80,15.96,0.00,1.00,-9.60,-0.00 -9.60,-9.60,15.94,0.00,1.00,-14.40,0.00 -14.40,-14.40,15.91,0.00,1.00,-19.20,-0.00 -14.40,-19.20,15.89,0.00,1.00,-24.00,0.00 -19.20,-19.20,15.87,0.00,1.00,-24.00,-0.00 -24.00,-24.00,15.85,0.00,1.00,-28.80,0.00 -28.80,-28.80,15.83,0.00,1.00,-33.60,-0.00 -33.60,-28.80,15.81,0.00,1.00,-38.40,0.00 -38.40,-33.60,15.79,0.00,1.00,-43.20,-0.00 -43.20,-38.40,15.77,0.00,1.00,-48.00,0.00 -48.00,-38.40,15.74,0.00,1.00,-52.80,-4.80 -52.80,-43.20,15.72,0.00,1.00,-62.40,4.80 -57.60,-43.20,15.70,0.00,1.00,-67.20,-4.80 -62.40,-43.20,15.68,0.00,1.00,-72.00,4.80 -72.00,-48.00,15.66,0.00,1.00,-76.80,-4.80 -76.80,-48.00,15.64,0.00,1.00,-86.40,4.80 -86.40,-48.00,15.62,0.00,1.00,-91.20,-4.80 -91.20,-48.00,15.59,0.00,1.00,-96.00,4.80 -100.80,-48.00,15.57,0.00,1.00,-105.60,-4.80 -105.60,-48.00,15.55,0.00,1.00,-110.40,4.80 -110.40,-48.00,15.53,0.00,1.00,-115.20,-4.80 -120.00,-43.20,15.51,0.00,1.00,-124.80,4.80 -124.80,-43.20,15.49,0.00,1.00,-129.60,-4.80 -129.60,-38.40,15.47,0.00,1.00,-134.40,4.80 -134.40,-38.40,15.44,0.00,1.00,-139.20,-4.80 -139.20,-33.60,15.42,0.00,1.00,-144.00,0.00 -144.00,-33.60,15.40,0.00,1.00,-148.80,-0.00 -148.80,-28.80,15.38,0.00,1.00,-153.60,0.00 -153.60,-24.00,15.36,0.00,1.00,-158.40,-0.00 -158.40,-24.00,15.34,0.00,1.00,-158.40,0.00 -163.20,-19.20,15.32,0.00,1.00,-163.20,-0.00 -163.20,-14.40,15.30,0.00,1.00,-168.00,0.00 -168.00,-14.40,15.27,0.00,1.00,-172.80,-0.00 -172.80,-9.60,15.25,0.00,1.00,-172.80,0.00 -172.80,-4.80,15.23,0.00,1.00,-177.60,-0.00 -177.60,-0.00,15.21,0.00,1.00,177.60,0.00 --177.60,0.00,15.19,0.00,1.00,172.80,0.00 --172.80,4.80,15.17,0.00,1.00,172.80,-0.00 --172.80,9.60,15.15,0.00,1.00,168.00,0.00 --168.00,14.40,15.12,0.00,1.00,163.20,-0.00 --163.20,14.40,15.10,0.00,1.00,158.40,0.00 --163.20,19.20,15.08,0.00,1.00,158.40,-0.00 --158.40,24.00,15.06,0.00,1.00,153.60,0.00 --153.60,24.00,15.04,0.00,1.00,148.80,-0.00 --148.80,28.80,15.02,0.00,1.00,144.00,0.00 --144.00,33.60,15.00,0.00,1.00,139.20,-0.00 --139.20,33.60,14.97,0.00,1.00,134.40,0.00 --134.40,38.40,14.95,0.00,1.00,129.60,-4.80 --129.60,38.40,14.93,0.00,1.00,124.80,4.80 --124.80,43.20,14.91,0.00,1.00,115.20,-4.80 --120.00,43.20,14.89,0.00,1.00,110.40,4.80 --110.40,48.00,14.87,0.00,1.00,105.60,-4.80 --105.60,48.00,14.85,0.00,1.00,96.00,4.80 --100.80,48.00,14.83,0.00,1.00,91.20,-4.80 --91.20,48.00,14.80,0.00,1.00,86.40,4.80 --86.40,48.00,14.78,0.00,1.00,76.80,-4.80 --76.80,48.00,14.76,0.00,1.00,72.00,4.80 --72.00,48.00,14.74,0.00,1.00,67.20,-4.80 --62.40,43.20,14.72,0.00,1.00,62.40,4.80 --57.60,43.20,14.70,0.00,1.00,52.80,-4.80 --52.80,43.20,14.68,0.00,1.00,48.00,4.80 --48.00,38.40,14.65,0.00,1.00,43.20,-4.80 --43.20,38.40,14.63,0.00,1.00,38.40,0.00 --38.40,33.60,14.61,0.00,1.00,33.60,-0.00 --33.60,28.80,14.59,0.00,1.00,28.80,0.00 --28.80,28.80,14.57,0.00,1.00,24.00,-0.00 --24.00,24.00,14.55,0.00,1.00,24.00,0.00 --19.20,19.20,14.53,0.00,1.00,19.20,-0.00 --14.40,19.20,14.50,0.00,1.00,14.40,0.00 --14.40,14.40,14.48,0.00,1.00,9.60,-0.00 --9.60,9.60,14.46,0.00,1.00,4.80,0.00 --4.80,4.80,14.44,0.00,1.00,4.80,-0.00 --4.80,4.80,14.42,0.00,1.00,0.00,0.00 -0.00,0.00,14.40,0.00,1.00,-4.80,0.00 -4.80,-4.80,14.38,0.00,1.00,-9.60,0.00 -4.80,-9.60,14.36,0.00,1.00,-9.60,-0.00 -9.60,-9.60,14.33,0.00,1.00,-14.40,0.00 -9.60,-14.40,14.31,0.00,1.00,-19.20,-4.80 -14.40,-19.20,14.29,0.00,1.00,-24.00,4.80 -19.20,-24.00,14.27,0.00,1.00,-28.80,-4.80 -24.00,-24.00,14.25,0.00,1.00,-33.60,4.80 -24.00,-28.80,14.23,0.00,1.00,-38.40,-4.80 -28.80,-33.60,14.21,0.00,1.00,-43.20,4.80 -33.60,-38.40,14.18,0.00,1.00,-48.00,-4.80 -38.40,-38.40,14.16,0.00,1.00,-52.80,4.80 -43.20,-43.20,14.14,0.00,1.00,-57.60,-4.80 -48.00,-43.20,14.12,0.00,1.00,-62.40,4.80 -52.80,-48.00,14.10,0.00,1.00,-67.20,-4.80 -62.40,-48.00,14.08,0.00,1.00,-72.00,9.60 -67.20,-52.80,14.06,0.00,1.00,-81.60,-9.60 -76.80,-52.80,14.03,0.00,1.00,-86.40,9.60 -86.40,-52.80,14.01,0.00,1.00,-91.20,-9.60 -91.20,-52.80,13.99,0.00,1.00,-96.00,9.60 -100.80,-52.80,13.97,0.00,1.00,-105.60,-9.60 -105.60,-52.80,13.95,0.00,1.00,-110.40,9.60 -115.20,-48.00,13.93,0.00,1.00,-115.20,-9.60 -120.00,-48.00,13.91,0.00,1.00,-120.00,9.60 -129.60,-48.00,13.89,0.00,1.00,-124.80,-4.80 -134.40,-43.20,13.86,0.00,1.00,-129.60,4.80 -139.20,-43.20,13.84,0.00,1.00,-134.40,-4.80 -144.00,-38.40,13.82,0.00,1.00,-139.20,4.80 -148.80,-33.60,13.80,0.00,1.00,-144.00,-4.80 -153.60,-33.60,13.78,0.00,1.00,-148.80,4.80 -158.40,-28.80,13.76,0.00,1.00,-153.60,-4.80 -158.40,-24.00,13.74,0.00,1.00,-158.40,4.80 -163.20,-19.20,13.71,0.00,1.00,-163.20,-4.80 -168.00,-19.20,13.69,0.00,1.00,-168.00,4.80 -168.00,-14.40,13.67,0.00,1.00,-172.80,-0.00 -172.80,-9.60,13.65,0.00,1.00,-172.80,0.00 -177.60,-4.80,13.63,0.00,1.00,-177.60,-0.00 -177.60,-0.00,13.61,0.00,1.00,177.60,0.00 --177.60,0.00,13.59,0.00,1.00,172.80,0.00 --177.60,4.80,13.56,0.00,1.00,172.80,-0.00 --172.80,9.60,13.54,0.00,1.00,168.00,0.00 --168.00,14.40,13.52,0.00,1.00,163.20,-0.00 --168.00,19.20,13.50,0.00,1.00,158.40,4.80 --163.20,19.20,13.48,0.00,1.00,153.60,-4.80 --158.40,24.00,13.46,0.00,1.00,148.80,4.80 --158.40,28.80,13.44,0.00,1.00,144.00,-4.80 --153.60,33.60,13.42,0.00,1.00,139.20,4.80 --148.80,33.60,13.39,0.00,1.00,134.40,-4.80 --144.00,38.40,13.37,0.00,1.00,129.60,4.80 --139.20,43.20,13.35,0.00,1.00,124.80,-4.80 --134.40,43.20,13.33,0.00,1.00,120.00,4.80 --129.60,48.00,13.31,0.00,1.00,115.20,-4.80 --120.00,48.00,13.29,0.00,1.00,110.40,9.60 --115.20,48.00,13.27,0.00,1.00,105.60,-9.60 --105.60,52.80,13.24,0.00,1.00,96.00,9.60 --100.80,52.80,13.22,0.00,1.00,91.20,-9.60 --91.20,52.80,13.20,0.00,1.00,86.40,9.60 --86.40,52.80,13.18,0.00,1.00,81.60,-9.60 --76.80,52.80,13.16,0.00,1.00,72.00,9.60 --67.20,52.80,13.14,0.00,1.00,67.20,-9.60 --62.40,48.00,13.12,0.00,1.00,62.40,9.60 --52.80,48.00,13.09,0.00,1.00,57.60,-4.80 --48.00,43.20,13.07,0.00,1.00,52.80,4.80 --43.20,43.20,13.05,0.00,1.00,48.00,-4.80 --38.40,38.40,13.03,0.00,1.00,43.20,4.80 --33.60,38.40,13.01,0.00,1.00,38.40,-4.80 --28.80,33.60,12.99,0.00,1.00,33.60,4.80 --24.00,28.80,12.97,0.00,1.00,28.80,-4.80 --24.00,24.00,12.95,0.00,1.00,24.00,4.80 --19.20,24.00,12.92,0.00,1.00,19.20,-4.80 --14.40,19.20,12.90,0.00,1.00,14.40,4.80 --9.60,14.40,12.88,0.00,1.00,9.60,-4.80 --9.60,9.60,12.86,0.00,1.00,9.60,0.00 --4.80,9.60,12.84,0.00,1.00,4.80,-0.00 --4.80,4.80,12.82,0.00,1.00,0.00,0.00 -0.00,0.00,12.80,0.00,1.00,-4.80,0.00 -4.80,-4.80,12.77,0.00,1.00,-9.60,0.00 -4.80,-9.60,12.75,0.00,1.00,-14.40,-0.00 -9.60,-14.40,12.73,0.00,1.00,-14.40,4.80 -9.60,-14.40,12.71,0.00,1.00,-19.20,-4.80 -14.40,-19.20,12.69,0.00,1.00,-24.00,4.80 -14.40,-24.00,12.67,0.00,1.00,-28.80,-4.80 -19.20,-28.80,12.65,0.00,1.00,-33.60,4.80 -24.00,-33.60,12.62,0.00,1.00,-38.40,-9.60 -28.80,-33.60,12.60,0.00,1.00,-43.20,9.60 -28.80,-38.40,12.58,0.00,1.00,-48.00,-9.60 -33.60,-43.20,12.56,0.00,1.00,-52.80,9.60 -38.40,-43.20,12.54,0.00,1.00,-57.60,-9.60 -48.00,-48.00,12.52,0.00,1.00,-62.40,9.60 -52.80,-52.80,12.50,0.00,1.00,-67.20,-9.60 -57.60,-52.80,12.48,0.00,1.00,-72.00,9.60 -67.20,-57.60,12.45,0.00,1.00,-81.60,-14.40 -76.80,-57.60,12.43,0.00,1.00,-86.40,14.40 -81.60,-57.60,12.41,0.00,1.00,-91.20,-14.40 -91.20,-57.60,12.39,0.00,1.00,-96.00,14.40 -100.80,-57.60,12.37,0.00,1.00,-100.80,-14.40 -110.40,-57.60,12.35,0.00,1.00,-110.40,14.40 -115.20,-52.80,12.33,0.00,1.00,-115.20,-14.40 -124.80,-52.80,12.30,0.00,1.00,-120.00,9.60 -129.60,-48.00,12.28,0.00,1.00,-124.80,-9.60 -139.20,-48.00,12.26,0.00,1.00,-129.60,9.60 -144.00,-43.20,12.24,0.00,1.00,-134.40,-9.60 -148.80,-38.40,12.22,0.00,1.00,-139.20,9.60 -153.60,-38.40,12.20,0.00,1.00,-144.00,-9.60 -153.60,-33.60,12.18,0.00,1.00,-148.80,9.60 -158.40,-28.80,12.15,0.00,1.00,-153.60,-9.60 -163.20,-24.00,12.13,0.00,1.00,-158.40,4.80 -163.20,-24.00,12.11,0.00,1.00,-163.20,-4.80 -168.00,-19.20,12.09,0.00,1.00,-168.00,4.80 -172.80,-14.40,12.07,0.00,1.00,-168.00,-4.80 -172.80,-9.60,12.05,0.00,1.00,-172.80,4.80 -177.60,-4.80,12.03,0.00,1.00,-177.60,-0.00 -177.60,-0.00,12.01,0.00,1.00,177.60,0.00 --177.60,0.00,11.98,0.00,1.00,172.80,0.00 --177.60,4.80,11.96,0.00,1.00,168.00,-0.00 --172.80,9.60,11.94,0.00,1.00,168.00,4.80 --172.80,14.40,11.92,0.00,1.00,163.20,-4.80 --168.00,19.20,11.90,0.00,1.00,158.40,4.80 --163.20,24.00,11.88,0.00,1.00,153.60,-4.80 --163.20,24.00,11.86,0.00,1.00,148.80,4.80 --158.40,28.80,11.83,0.00,1.00,144.00,-9.60 --153.60,33.60,11.81,0.00,1.00,139.20,9.60 --153.60,38.40,11.79,0.00,1.00,134.40,-9.60 --148.80,38.40,11.77,0.00,1.00,129.60,9.60 --144.00,43.20,11.75,0.00,1.00,124.80,-9.60 --139.20,48.00,11.73,0.00,1.00,120.00,9.60 --129.60,48.00,11.71,0.00,1.00,115.20,-9.60 --124.80,52.80,11.68,0.00,1.00,110.40,9.60 --115.20,52.80,11.66,0.00,1.00,100.80,-14.40 --110.40,57.60,11.64,0.00,1.00,96.00,14.40 --100.80,57.60,11.62,0.00,1.00,91.20,-14.40 --91.20,57.60,11.60,0.00,1.00,86.40,14.40 --81.60,57.60,11.58,0.00,1.00,81.60,-14.40 --76.80,57.60,11.56,0.00,1.00,72.00,14.40 --67.20,57.60,11.54,0.00,1.00,67.20,-14.40 --57.60,52.80,11.51,0.00,1.00,62.40,9.60 --52.80,52.80,11.49,0.00,1.00,57.60,-9.60 --48.00,48.00,11.47,0.00,1.00,52.80,9.60 --38.40,43.20,11.45,0.00,1.00,48.00,-9.60 --33.60,43.20,11.43,0.00,1.00,43.20,9.60 --28.80,38.40,11.41,0.00,1.00,38.40,-9.60 --28.80,33.60,11.39,0.00,1.00,33.60,9.60 --24.00,33.60,11.36,0.00,1.00,28.80,-9.60 --19.20,28.80,11.34,0.00,1.00,24.00,4.80 --14.40,24.00,11.32,0.00,1.00,19.20,-4.80 --14.40,19.20,11.30,0.00,1.00,14.40,4.80 --9.60,14.40,11.28,0.00,1.00,14.40,-4.80 --9.60,14.40,11.26,0.00,1.00,9.60,4.80 --4.80,9.60,11.24,0.00,1.00,4.80,-0.00 --4.80,4.80,11.21,0.00,1.00,0.00,0.00 -0.00,0.00,11.19,0.00,1.00,-4.80,0.00 -0.00,-4.80,11.17,0.00,1.00,-9.60,0.00 -4.80,-9.60,11.15,0.00,1.00,-14.40,-4.80 -4.80,-14.40,11.13,0.00,1.00,-19.20,4.80 -9.60,-19.20,11.11,0.00,1.00,-19.20,-4.80 -9.60,-19.20,11.09,0.00,1.00,-24.00,4.80 -14.40,-24.00,11.07,0.00,1.00,-28.80,-9.60 -19.20,-28.80,11.04,0.00,1.00,-33.60,9.60 -19.20,-33.60,11.02,0.00,1.00,-38.40,-9.60 -24.00,-38.40,11.00,0.00,1.00,-43.20,9.60 -28.80,-43.20,10.98,0.00,1.00,-48.00,-14.40 -33.60,-43.20,10.96,0.00,1.00,-52.80,14.40 -38.40,-48.00,10.94,0.00,1.00,-57.60,-14.40 -43.20,-52.80,10.92,0.00,1.00,-62.40,14.40 -48.00,-52.80,10.89,0.00,1.00,-72.00,-14.40 -52.80,-57.60,10.87,0.00,1.00,-76.80,14.40 -62.40,-57.60,10.85,0.00,1.00,-81.60,-19.20 -72.00,-62.40,10.83,0.00,1.00,-86.40,19.20 -81.60,-62.40,10.81,0.00,1.00,-91.20,-19.20 -91.20,-62.40,10.79,0.00,1.00,-96.00,19.20 -100.80,-62.40,10.77,0.00,1.00,-100.80,-19.20 -110.40,-62.40,10.74,0.00,1.00,-105.60,19.20 -120.00,-57.60,10.72,0.00,1.00,-115.20,-14.40 -129.60,-57.60,10.70,0.00,1.00,-120.00,14.40 -134.40,-52.80,10.68,0.00,1.00,-124.80,-14.40 -139.20,-48.00,10.66,0.00,1.00,-129.60,14.40 -144.00,-48.00,10.64,0.00,1.00,-134.40,-14.40 -148.80,-43.20,10.62,0.00,1.00,-139.20,14.40 -153.60,-38.40,10.60,0.00,1.00,-144.00,-14.40 -158.40,-33.60,10.57,0.00,1.00,-148.80,9.60 -163.20,-33.60,10.55,0.00,1.00,-153.60,-9.60 -163.20,-28.80,10.53,0.00,1.00,-158.40,9.60 -168.00,-24.00,10.51,0.00,1.00,-163.20,-9.60 -168.00,-19.20,10.49,0.00,1.00,-163.20,4.80 -172.80,-14.40,10.47,0.00,1.00,-168.00,-4.80 -172.80,-9.60,10.45,0.00,1.00,-172.80,4.80 -177.60,-4.80,10.42,0.00,1.00,-177.60,-0.00 -177.60,-0.00,10.40,0.00,1.00,177.60,0.00 --177.60,0.00,10.38,0.00,1.00,172.80,0.00 --177.60,4.80,10.36,0.00,1.00,168.00,-0.00 --172.80,9.60,10.34,0.00,1.00,163.20,4.80 --172.80,14.40,10.32,0.00,1.00,163.20,-4.80 --168.00,19.20,10.30,0.00,1.00,158.40,4.80 --168.00,24.00,10.28,0.00,1.00,153.60,-9.60 --163.20,28.80,10.25,0.00,1.00,148.80,9.60 --163.20,33.60,10.23,0.00,1.00,144.00,-9.60 --158.40,33.60,10.21,0.00,1.00,139.20,9.60 --153.60,38.40,10.19,0.00,1.00,134.40,-14.40 --148.80,43.20,10.17,0.00,1.00,129.60,14.40 --144.00,48.00,10.15,0.00,1.00,124.80,-14.40 --139.20,48.00,10.13,0.00,1.00,120.00,14.40 --134.40,52.80,10.10,0.00,1.00,115.20,-14.40 --129.60,57.60,10.08,0.00,1.00,105.60,14.40 --120.00,57.60,10.06,0.00,1.00,100.80,-14.40 --110.40,62.40,10.04,0.00,1.00,96.00,19.20 --100.80,62.40,10.02,0.00,1.00,91.20,-19.20 --91.20,62.40,10.00,0.00,1.00,86.40,19.20 --81.60,62.40,9.98,0.00,1.00,81.60,-19.20 --72.00,62.40,9.95,0.00,1.00,76.80,19.20 --62.40,57.60,9.93,0.00,1.00,72.00,-19.20 --52.80,57.60,9.91,0.00,1.00,62.40,14.40 --48.00,52.80,9.89,0.00,1.00,57.60,-14.40 --43.20,52.80,9.87,0.00,1.00,52.80,14.40 --38.40,48.00,9.85,0.00,1.00,48.00,-14.40 --33.60,43.20,9.83,0.00,1.00,43.20,14.40 --28.80,43.20,9.81,0.00,1.00,38.40,-14.40 --24.00,38.40,9.78,0.00,1.00,33.60,9.60 --19.20,33.60,9.76,0.00,1.00,28.80,-9.60 --19.20,28.80,9.74,0.00,1.00,24.00,9.60 --14.40,24.00,9.72,0.00,1.00,19.20,-9.60 --9.60,19.20,9.70,0.00,1.00,19.20,4.80 --9.60,19.20,9.68,0.00,1.00,14.40,-4.80 --4.80,14.40,9.66,0.00,1.00,9.60,4.80 --4.80,9.60,9.63,0.00,1.00,4.80,-4.80 --0.00,4.80,9.61,0.00,1.00,0.00,0.00 -0.00,0.00,9.59,0.00,1.00,-4.80,0.00 -0.00,-4.80,9.57,0.00,1.00,-9.60,0.00 -4.80,-9.60,9.55,0.00,1.00,-14.40,-4.80 -4.80,-14.40,9.53,0.00,1.00,-19.20,4.80 -9.60,-19.20,9.51,0.00,1.00,-24.00,-4.80 -9.60,-24.00,9.48,0.00,1.00,-28.80,9.60 -14.40,-24.00,9.46,0.00,1.00,-33.60,-9.60 -14.40,-28.80,9.44,0.00,1.00,-33.60,14.40 -19.20,-33.60,9.42,0.00,1.00,-38.40,-14.40 -19.20,-38.40,9.40,0.00,1.00,-43.20,14.40 -24.00,-43.20,9.38,0.00,1.00,-48.00,-14.40 -28.80,-48.00,9.36,0.00,1.00,-57.60,19.20 -33.60,-52.80,9.34,0.00,1.00,-62.40,-19.20 -38.40,-52.80,9.31,0.00,1.00,-67.20,19.20 -43.20,-57.60,9.29,0.00,1.00,-72.00,-19.20 -48.00,-62.40,9.27,0.00,1.00,-76.80,19.20 -57.60,-62.40,9.25,0.00,1.00,-81.60,-19.20 -67.20,-67.20,9.23,0.00,1.00,-86.40,24.00 -81.60,-67.20,9.21,0.00,1.00,-91.20,-24.00 -91.20,-67.20,9.19,0.00,1.00,-96.00,24.00 -105.60,-67.20,9.16,0.00,1.00,-100.80,-24.00 -115.20,-67.20,9.14,0.00,1.00,-105.60,24.00 -124.80,-62.40,9.12,0.00,1.00,-110.40,-19.20 -134.40,-57.60,9.10,0.00,1.00,-115.20,19.20 -139.20,-57.60,9.08,0.00,1.00,-120.00,-19.20 -144.00,-52.80,9.06,0.00,1.00,-129.60,19.20 -148.80,-48.00,9.04,0.00,1.00,-134.40,-19.20 -153.60,-43.20,9.01,0.00,1.00,-139.20,19.20 -158.40,-43.20,8.99,0.00,1.00,-144.00,-14.40 -163.20,-38.40,8.97,0.00,1.00,-148.80,14.40 -163.20,-33.60,8.95,0.00,1.00,-148.80,-14.40 -168.00,-28.80,8.93,0.00,1.00,-153.60,9.60 -168.00,-24.00,8.91,0.00,1.00,-158.40,-9.60 -172.80,-19.20,8.89,0.00,1.00,-163.20,9.60 -172.80,-14.40,8.87,0.00,1.00,-168.00,-4.80 -177.60,-9.60,8.84,0.00,1.00,-172.80,4.80 -177.60,-4.80,8.82,0.00,1.00,-177.60,-4.80 -177.60,-0.00,8.80,0.00,1.00,177.60,0.00 --177.60,0.00,8.78,0.00,1.00,172.80,0.00 --177.60,4.80,8.76,0.00,1.00,168.00,-4.80 --177.60,9.60,8.74,0.00,1.00,163.20,4.80 --172.80,14.40,8.72,0.00,1.00,158.40,-4.80 --172.80,19.20,8.69,0.00,1.00,153.60,9.60 --168.00,24.00,8.67,0.00,1.00,148.80,-9.60 --168.00,28.80,8.65,0.00,1.00,148.80,9.60 --163.20,33.60,8.63,0.00,1.00,144.00,-14.40 --163.20,38.40,8.61,0.00,1.00,139.20,14.40 --158.40,43.20,8.59,0.00,1.00,134.40,-14.40 --153.60,43.20,8.57,0.00,1.00,129.60,19.20 --148.80,48.00,8.54,0.00,1.00,120.00,-19.20 --144.00,52.80,8.52,0.00,1.00,115.20,19.20 --139.20,57.60,8.50,0.00,1.00,110.40,-19.20 --134.40,57.60,8.48,0.00,1.00,105.60,19.20 --124.80,62.40,8.46,0.00,1.00,100.80,-19.20 --115.20,67.20,8.44,0.00,1.00,96.00,24.00 --105.60,67.20,8.42,0.00,1.00,91.20,-24.00 --91.20,67.20,8.40,0.00,1.00,86.40,24.00 --81.60,67.20,8.37,0.00,1.00,81.60,-24.00 --67.20,67.20,8.35,0.00,1.00,76.80,24.00 --57.60,62.40,8.33,0.00,1.00,72.00,-19.20 --48.00,62.40,8.31,0.00,1.00,67.20,19.20 --43.20,57.60,8.29,0.00,1.00,62.40,-19.20 --38.40,52.80,8.27,0.00,1.00,57.60,19.20 --33.60,52.80,8.25,0.00,1.00,48.00,-19.20 --28.80,48.00,8.22,0.00,1.00,43.20,19.20 --24.00,43.20,8.20,0.00,1.00,38.40,-14.40 --19.20,38.40,8.18,0.00,1.00,33.60,14.40 --19.20,33.60,8.16,0.00,1.00,33.60,-14.40 --14.40,28.80,8.14,0.00,1.00,28.80,14.40 --14.40,24.00,8.12,0.00,1.00,24.00,-9.60 --9.60,24.00,8.10,0.00,1.00,19.20,9.60 --9.60,19.20,8.07,0.00,1.00,14.40,-4.80 --4.80,14.40,8.05,0.00,1.00,9.60,4.80 --4.80,9.60,8.03,0.00,1.00,4.80,-4.80 --0.00,4.80,8.01,0.00,1.00,0.00,0.00 -0.00,0.00,7.99,0.00,1.00,-4.80,0.00 -0.00,-4.80,7.97,0.00,1.00,-9.60,0.00 -4.80,-9.60,7.95,0.00,1.00,-14.40,-4.80 -4.80,-14.40,7.93,0.00,1.00,-19.20,4.80 -4.80,-19.20,7.90,0.00,1.00,-24.00,-9.60 -9.60,-24.00,7.88,0.00,1.00,-28.80,9.60 -9.60,-28.80,7.86,0.00,1.00,-33.60,-14.40 -9.60,-33.60,7.84,0.00,1.00,-38.40,14.40 -14.40,-38.40,7.82,0.00,1.00,-43.20,-14.40 -14.40,-38.40,7.80,0.00,1.00,-48.00,19.20 -19.20,-43.20,7.78,0.00,1.00,-52.80,-19.20 -24.00,-48.00,7.75,0.00,1.00,-57.60,19.20 -24.00,-52.80,7.73,0.00,1.00,-62.40,-24.00 -28.80,-57.60,7.71,0.00,1.00,-67.20,24.00 -38.40,-62.40,7.69,0.00,1.00,-72.00,-24.00 -43.20,-62.40,7.67,0.00,1.00,-76.80,24.00 -52.80,-67.20,7.65,0.00,1.00,-81.60,-24.00 -62.40,-72.00,7.63,0.00,1.00,-86.40,28.80 -76.80,-72.00,7.60,0.00,1.00,-91.20,-28.80 -96.00,-72.00,7.58,0.00,1.00,-96.00,28.80 -110.40,-72.00,7.56,0.00,1.00,-100.80,-28.80 -120.00,-67.20,7.54,0.00,1.00,-105.60,28.80 -134.40,-67.20,7.52,0.00,1.00,-110.40,-24.00 -139.20,-62.40,7.50,0.00,1.00,-115.20,24.00 -148.80,-57.60,7.48,0.00,1.00,-120.00,-24.00 -153.60,-57.60,7.46,0.00,1.00,-124.80,24.00 -158.40,-52.80,7.43,0.00,1.00,-129.60,-24.00 -158.40,-48.00,7.41,0.00,1.00,-134.40,19.20 -163.20,-43.20,7.39,0.00,1.00,-139.20,-19.20 -163.20,-38.40,7.37,0.00,1.00,-144.00,19.20 -168.00,-33.60,7.35,0.00,1.00,-148.80,-14.40 -168.00,-28.80,7.33,0.00,1.00,-153.60,14.40 -172.80,-24.00,7.31,0.00,1.00,-158.40,-9.60 -172.80,-19.20,7.28,0.00,1.00,-163.20,9.60 -172.80,-14.40,7.26,0.00,1.00,-168.00,-9.60 -177.60,-9.60,7.24,0.00,1.00,-172.80,4.80 -177.60,-4.80,7.22,0.00,1.00,-177.60,-4.80 -177.60,-0.00,7.20,0.00,1.00,177.60,0.00 --177.60,0.00,7.18,0.00,1.00,172.80,0.00 --177.60,4.80,7.16,0.00,1.00,168.00,-4.80 --177.60,9.60,7.13,0.00,1.00,163.20,4.80 --172.80,14.40,7.11,0.00,1.00,158.40,-9.60 --172.80,19.20,7.09,0.00,1.00,153.60,9.60 --172.80,24.00,7.07,0.00,1.00,148.80,-9.60 --168.00,28.80,7.05,0.00,1.00,144.00,14.40 --168.00,33.60,7.03,0.00,1.00,139.20,-14.40 --163.20,38.40,7.01,0.00,1.00,134.40,19.20 --163.20,43.20,6.99,0.00,1.00,129.60,-19.20 --158.40,48.00,6.96,0.00,1.00,124.80,19.20 --158.40,52.80,6.94,0.00,1.00,120.00,-24.00 --153.60,57.60,6.92,0.00,1.00,115.20,24.00 --148.80,57.60,6.90,0.00,1.00,110.40,-24.00 --139.20,62.40,6.88,0.00,1.00,105.60,24.00 --134.40,67.20,6.86,0.00,1.00,100.80,-24.00 --120.00,67.20,6.84,0.00,1.00,96.00,28.80 --110.40,72.00,6.81,0.00,1.00,91.20,-28.80 --96.00,72.00,6.79,0.00,1.00,86.40,28.80 --76.80,72.00,6.77,0.00,1.00,81.60,-28.80 --62.40,72.00,6.75,0.00,1.00,76.80,28.80 --52.80,67.20,6.73,0.00,1.00,72.00,-24.00 --43.20,62.40,6.71,0.00,1.00,67.20,24.00 --38.40,62.40,6.69,0.00,1.00,62.40,-24.00 --28.80,57.60,6.66,0.00,1.00,57.60,24.00 --24.00,52.80,6.64,0.00,1.00,52.80,-24.00 --24.00,48.00,6.62,0.00,1.00,48.00,19.20 --19.20,43.20,6.60,0.00,1.00,43.20,-19.20 --14.40,38.40,6.58,0.00,1.00,38.40,19.20 --14.40,38.40,6.56,0.00,1.00,33.60,-14.40 --9.60,33.60,6.54,0.00,1.00,28.80,14.40 --9.60,28.80,6.52,0.00,1.00,24.00,-14.40 --9.60,24.00,6.49,0.00,1.00,19.20,9.60 --4.80,19.20,6.47,0.00,1.00,14.40,-9.60 --4.80,14.40,6.45,0.00,1.00,9.60,4.80 --4.80,9.60,6.43,0.00,1.00,4.80,-4.80 --0.00,4.80,6.41,0.00,1.00,0.00,0.00 -0.00,0.00,6.39,0.00,1.00,-4.80,0.00 -0.00,-4.80,6.37,0.00,1.00,-9.60,4.80 -0.00,-9.60,6.34,0.00,1.00,-14.40,-4.80 -4.80,-14.40,6.32,0.00,1.00,-19.20,9.60 -4.80,-19.20,6.30,0.00,1.00,-24.00,-9.60 -4.80,-24.00,6.28,0.00,1.00,-28.80,14.40 -4.80,-28.80,6.26,0.00,1.00,-33.60,-14.40 -9.60,-33.60,6.24,0.00,1.00,-38.40,19.20 -9.60,-38.40,6.22,0.00,1.00,-43.20,-19.20 -14.40,-43.20,6.19,0.00,1.00,-48.00,19.20 -14.40,-48.00,6.17,0.00,1.00,-52.80,-24.00 -14.40,-52.80,6.15,0.00,1.00,-57.60,24.00 -19.20,-57.60,6.13,0.00,1.00,-62.40,-28.80 -24.00,-57.60,6.11,0.00,1.00,-67.20,28.80 -28.80,-62.40,6.09,0.00,1.00,-72.00,-28.80 -33.60,-67.20,6.07,0.00,1.00,-76.80,28.80 -43.20,-72.00,6.05,0.00,1.00,-81.60,-28.80 -57.60,-72.00,6.02,0.00,1.00,-86.40,33.60 -76.80,-76.80,6.00,0.00,1.00,-91.20,-33.60 -96.00,-76.80,5.98,0.00,1.00,-96.00,33.60 -115.20,-76.80,5.96,0.00,1.00,-100.80,-33.60 -129.60,-72.00,5.94,0.00,1.00,-105.60,28.80 -139.20,-72.00,5.92,0.00,1.00,-110.40,-28.80 -148.80,-67.20,5.90,0.00,1.00,-115.20,28.80 -153.60,-62.40,5.87,0.00,1.00,-120.00,-28.80 -158.40,-57.60,5.85,0.00,1.00,-124.80,28.80 -163.20,-52.80,5.83,0.00,1.00,-129.60,-24.00 -163.20,-48.00,5.81,0.00,1.00,-134.40,24.00 -168.00,-43.20,5.79,0.00,1.00,-139.20,-24.00 -168.00,-38.40,5.77,0.00,1.00,-144.00,19.20 -172.80,-33.60,5.75,0.00,1.00,-148.80,-19.20 -172.80,-28.80,5.72,0.00,1.00,-153.60,14.40 -172.80,-24.00,5.70,0.00,1.00,-158.40,-14.40 -172.80,-19.20,5.68,0.00,1.00,-163.20,9.60 -177.60,-14.40,5.66,0.00,1.00,-168.00,-9.60 -177.60,-9.60,5.64,0.00,1.00,-172.80,4.80 -177.60,-4.80,5.62,0.00,1.00,-177.60,-4.80 -177.60,-0.00,5.60,0.00,1.00,177.60,0.00 --177.60,0.00,5.58,0.00,1.00,172.80,0.00 --177.60,4.80,5.55,0.00,1.00,168.00,-4.80 --177.60,9.60,5.53,0.00,1.00,163.20,4.80 --177.60,14.40,5.51,0.00,1.00,158.40,-9.60 --172.80,19.20,5.49,0.00,1.00,153.60,9.60 --172.80,24.00,5.47,0.00,1.00,148.80,-14.40 --172.80,28.80,5.45,0.00,1.00,144.00,14.40 --172.80,33.60,5.43,0.00,1.00,139.20,-19.20 --168.00,38.40,5.40,0.00,1.00,134.40,19.20 --168.00,43.20,5.38,0.00,1.00,129.60,-24.00 --163.20,48.00,5.36,0.00,1.00,124.80,24.00 --163.20,52.80,5.34,0.00,1.00,120.00,-24.00 --158.40,57.60,5.32,0.00,1.00,115.20,28.80 --153.60,62.40,5.30,0.00,1.00,110.40,-28.80 --148.80,67.20,5.28,0.00,1.00,105.60,28.80 --139.20,72.00,5.26,0.00,1.00,100.80,-28.80 --129.60,72.00,5.23,0.00,1.00,96.00,28.80 --115.20,76.80,5.21,0.00,1.00,91.20,-33.60 --96.00,76.80,5.19,0.00,1.00,86.40,33.60 --76.80,76.80,5.17,0.00,1.00,81.60,-33.60 --57.60,72.00,5.15,0.00,1.00,76.80,33.60 --43.20,72.00,5.13,0.00,1.00,72.00,-28.80 --33.60,67.20,5.11,0.00,1.00,67.20,28.80 --28.80,62.40,5.08,0.00,1.00,62.40,-28.80 --24.00,57.60,5.06,0.00,1.00,57.60,28.80 --19.20,57.60,5.04,0.00,1.00,52.80,-28.80 --14.40,52.80,5.02,0.00,1.00,48.00,24.00 --14.40,48.00,5.00,0.00,1.00,43.20,-24.00 --14.40,43.20,4.98,0.00,1.00,38.40,19.20 --9.60,38.40,4.96,0.00,1.00,33.60,-19.20 --9.60,33.60,4.93,0.00,1.00,28.80,19.20 --4.80,28.80,4.91,0.00,1.00,24.00,-14.40 --4.80,24.00,4.89,0.00,1.00,19.20,14.40 --4.80,19.20,4.87,0.00,1.00,14.40,-9.60 --4.80,14.40,4.85,0.00,1.00,9.60,9.60 --0.00,9.60,4.83,0.00,1.00,4.80,-4.80 --0.00,4.80,4.81,0.00,1.00,0.00,4.80 -0.00,0.00,4.79,0.00,1.00,-4.80,0.00 -0.00,-4.80,4.76,0.00,1.00,-9.60,4.80 -0.00,-9.60,4.74,0.00,1.00,-14.40,-4.80 -0.00,-14.40,4.72,0.00,1.00,-19.20,9.60 -4.80,-19.20,4.70,0.00,1.00,-24.00,-9.60 -4.80,-24.00,4.68,0.00,1.00,-28.80,14.40 -4.80,-28.80,4.66,0.00,1.00,-33.60,-14.40 -4.80,-33.60,4.64,0.00,1.00,-38.40,19.20 -4.80,-38.40,4.61,0.00,1.00,-43.20,-24.00 -9.60,-43.20,4.59,0.00,1.00,-48.00,24.00 -9.60,-48.00,4.57,0.00,1.00,-52.80,-24.00 -9.60,-52.80,4.55,0.00,1.00,-57.60,28.80 -14.40,-57.60,4.53,0.00,1.00,-62.40,-28.80 -14.40,-62.40,4.51,0.00,1.00,-67.20,33.60 -19.20,-67.20,4.49,0.00,1.00,-72.00,-33.60 -24.00,-72.00,4.46,0.00,1.00,-76.80,33.60 -33.60,-72.00,4.44,0.00,1.00,-81.60,-33.60 -43.20,-76.80,4.42,0.00,1.00,-86.40,38.40 -67.20,-81.60,4.40,0.00,1.00,-91.20,-38.40 -96.00,-81.60,4.38,0.00,1.00,-96.00,38.40 -124.80,-81.60,4.36,0.00,1.00,-100.80,-38.40 -144.00,-76.80,4.34,0.00,1.00,-105.60,33.60 -153.60,-72.00,4.32,0.00,1.00,-110.40,-33.60 -158.40,-67.20,4.29,0.00,1.00,-115.20,33.60 -163.20,-62.40,4.27,0.00,1.00,-120.00,-33.60 -168.00,-57.60,4.25,0.00,1.00,-124.80,28.80 -168.00,-52.80,4.23,0.00,1.00,-129.60,-28.80 -168.00,-48.00,4.21,0.00,1.00,-134.40,28.80 -172.80,-43.20,4.19,0.00,1.00,-139.20,-24.00 -172.80,-38.40,4.17,0.00,1.00,-144.00,24.00 -172.80,-33.60,4.14,0.00,1.00,-148.80,-19.20 -172.80,-28.80,4.12,0.00,1.00,-153.60,19.20 -177.60,-24.00,4.10,0.00,1.00,-158.40,-14.40 -177.60,-19.20,4.08,0.00,1.00,-163.20,14.40 -177.60,-14.40,4.06,0.00,1.00,-168.00,-9.60 -177.60,-9.60,4.04,0.00,1.00,-172.80,4.80 -177.60,-4.80,4.02,0.00,1.00,-177.60,-4.80 -177.60,-0.00,3.99,0.00,1.00,177.60,0.00 --177.60,0.00,3.97,0.00,1.00,172.80,0.00 --177.60,4.80,3.95,0.00,1.00,168.00,-4.80 --177.60,9.60,3.93,0.00,1.00,163.20,4.80 --177.60,14.40,3.91,0.00,1.00,158.40,-9.60 --177.60,19.20,3.89,0.00,1.00,153.60,14.40 --177.60,24.00,3.87,0.00,1.00,148.80,-14.40 --172.80,28.80,3.85,0.00,1.00,144.00,19.20 --172.80,33.60,3.82,0.00,1.00,139.20,-19.20 --172.80,38.40,3.80,0.00,1.00,134.40,24.00 --172.80,43.20,3.78,0.00,1.00,129.60,-24.00 --168.00,48.00,3.76,0.00,1.00,124.80,28.80 --168.00,52.80,3.74,0.00,1.00,120.00,-28.80 --168.00,57.60,3.72,0.00,1.00,115.20,28.80 --163.20,62.40,3.70,0.00,1.00,110.40,-33.60 --158.40,67.20,3.67,0.00,1.00,105.60,33.60 --153.60,72.00,3.65,0.00,1.00,100.80,-33.60 --144.00,76.80,3.63,0.00,1.00,96.00,33.60 --124.80,81.60,3.61,0.00,1.00,91.20,-38.40 --96.00,81.60,3.59,0.00,1.00,86.40,38.40 --67.20,81.60,3.57,0.00,1.00,81.60,-38.40 --43.20,76.80,3.55,0.00,1.00,76.80,38.40 --33.60,72.00,3.52,0.00,1.00,72.00,-33.60 --24.00,72.00,3.50,0.00,1.00,67.20,33.60 --19.20,67.20,3.48,0.00,1.00,62.40,-33.60 --14.40,62.40,3.46,0.00,1.00,57.60,33.60 --14.40,57.60,3.44,0.00,1.00,52.80,-28.80 --9.60,52.80,3.42,0.00,1.00,48.00,28.80 --9.60,48.00,3.40,0.00,1.00,43.20,-24.00 --9.60,43.20,3.38,0.00,1.00,38.40,24.00 --4.80,38.40,3.35,0.00,1.00,33.60,-24.00 --4.80,33.60,3.33,0.00,1.00,28.80,19.20 --4.80,28.80,3.31,0.00,1.00,24.00,-14.40 --4.80,24.00,3.29,0.00,1.00,19.20,14.40 --4.80,19.20,3.27,0.00,1.00,14.40,-9.60 --0.00,14.40,3.25,0.00,1.00,9.60,9.60 --0.00,9.60,3.23,0.00,1.00,4.80,-4.80 --0.00,4.80,3.20,0.00,1.00,0.00,4.80 -0.00,0.00,3.18,0.00,1.00,-4.80,0.00 -0.00,-4.80,3.16,0.00,1.00,-9.60,4.80 -0.00,-9.60,3.14,0.00,1.00,-14.40,-4.80 -0.00,-14.40,3.12,0.00,1.00,-19.20,9.60 -0.00,-19.20,3.10,0.00,1.00,-24.00,-14.40 -0.00,-24.00,3.08,0.00,1.00,-28.80,14.40 -0.00,-28.80,3.05,0.00,1.00,-33.60,-19.20 -0.00,-33.60,3.03,0.00,1.00,-38.40,19.20 -4.80,-38.40,3.01,0.00,1.00,-43.20,-24.00 -4.80,-43.20,2.99,0.00,1.00,-48.00,28.80 -4.80,-48.00,2.97,0.00,1.00,-52.80,-28.80 -4.80,-52.80,2.95,0.00,1.00,-57.60,33.60 -4.80,-57.60,2.93,0.00,1.00,-62.40,-33.60 -4.80,-62.40,2.91,0.00,1.00,-67.20,33.60 -9.60,-67.20,2.88,0.00,1.00,-72.00,-38.40 -9.60,-72.00,2.86,0.00,1.00,-76.80,38.40 -14.40,-76.80,2.84,0.00,1.00,-81.60,-38.40 -24.00,-81.60,2.82,0.00,1.00,-86.40,43.20 -43.20,-86.40,2.80,0.00,1.00,-91.20,-43.20 -110.40,-86.40,2.78,0.00,1.00,-96.00,43.20 -148.80,-81.60,2.76,0.00,1.00,-100.80,-43.20 -163.20,-76.80,2.73,0.00,1.00,-105.60,38.40 -168.00,-72.00,2.71,0.00,1.00,-110.40,-38.40 -172.80,-67.20,2.69,0.00,1.00,-115.20,38.40 -172.80,-62.40,2.67,0.00,1.00,-120.00,-38.40 -172.80,-57.60,2.65,0.00,1.00,-124.80,33.60 -172.80,-52.80,2.63,0.00,1.00,-129.60,-33.60 -177.60,-48.00,2.61,0.00,1.00,-134.40,28.80 -177.60,-43.20,2.58,0.00,1.00,-139.20,-28.80 -177.60,-38.40,2.56,0.00,1.00,-144.00,24.00 -177.60,-33.60,2.54,0.00,1.00,-148.80,-24.00 -177.60,-28.80,2.52,0.00,1.00,-153.60,19.20 -177.60,-24.00,2.50,0.00,1.00,-158.40,-19.20 -177.60,-19.20,2.48,0.00,1.00,-163.20,14.40 -177.60,-14.40,2.46,0.00,1.00,-168.00,-9.60 -177.60,-9.60,2.44,0.00,1.00,-172.80,9.60 -177.60,-4.80,2.41,0.00,1.00,-177.60,-4.80 -177.60,-0.00,2.39,0.00,1.00,177.60,0.00 --177.60,0.00,2.37,0.00,1.00,172.80,0.00 --177.60,4.80,2.35,0.00,1.00,168.00,-4.80 --177.60,9.60,2.33,0.00,1.00,163.20,9.60 --177.60,14.40,2.31,0.00,1.00,158.40,-9.60 --177.60,19.20,2.29,0.00,1.00,153.60,14.40 --177.60,24.00,2.26,0.00,1.00,148.80,-19.20 --177.60,28.80,2.24,0.00,1.00,144.00,19.20 --177.60,33.60,2.22,0.00,1.00,139.20,-24.00 --177.60,38.40,2.20,0.00,1.00,134.40,24.00 --177.60,43.20,2.18,0.00,1.00,129.60,-28.80 --177.60,48.00,2.16,0.00,1.00,124.80,28.80 --172.80,52.80,2.14,0.00,1.00,120.00,-33.60 --172.80,57.60,2.11,0.00,1.00,115.20,33.60 --172.80,62.40,2.09,0.00,1.00,110.40,-38.40 --172.80,67.20,2.07,0.00,1.00,105.60,38.40 --168.00,72.00,2.05,0.00,1.00,100.80,-38.40 --163.20,76.80,2.03,0.00,1.00,96.00,38.40 --148.80,81.60,2.01,0.00,1.00,91.20,-43.20 --110.40,86.40,1.99,0.00,1.00,86.40,43.20 --43.20,86.40,1.97,0.00,1.00,81.60,-43.20 --24.00,81.60,1.94,0.00,1.00,76.80,43.20 --14.40,76.80,1.92,0.00,1.00,72.00,-38.40 --9.60,72.00,1.90,0.00,1.00,67.20,38.40 --9.60,67.20,1.88,0.00,1.00,62.40,-38.40 --4.80,62.40,1.86,0.00,1.00,57.60,33.60 --4.80,57.60,1.84,0.00,1.00,52.80,-33.60 --4.80,52.80,1.82,0.00,1.00,48.00,33.60 --4.80,48.00,1.79,0.00,1.00,43.20,-28.80 --4.80,43.20,1.77,0.00,1.00,38.40,28.80 --4.80,38.40,1.75,0.00,1.00,33.60,-24.00 --0.00,33.60,1.73,0.00,1.00,28.80,19.20 --0.00,28.80,1.71,0.00,1.00,24.00,-19.20 --0.00,24.00,1.69,0.00,1.00,19.20,14.40 --0.00,19.20,1.67,0.00,1.00,14.40,-14.40 --0.00,14.40,1.64,0.00,1.00,9.60,9.60 --0.00,9.60,1.62,0.00,1.00,4.80,-4.80 --0.00,4.80,1.60,0.00,1.00,0.00,4.80 --0.00,0.00,1.58,0.00,1.00,-4.80,0.00 --0.00,-4.80,1.56,0.00,1.00,-9.60,4.80 --0.00,-9.60,1.54,0.00,1.00,-14.40,-4.80 --0.00,-14.40,1.52,0.00,1.00,-19.20,9.60 --0.00,-19.20,1.50,0.00,1.00,-24.00,-14.40 --0.00,-24.00,1.47,0.00,1.00,-28.80,19.20 --0.00,-28.80,1.45,0.00,1.00,-33.60,-19.20 --0.00,-33.60,1.43,0.00,1.00,-38.40,24.00 --0.00,-38.40,1.41,0.00,1.00,-43.20,-28.80 --0.00,-43.20,1.39,0.00,1.00,-48.00,28.80 --0.00,-48.00,1.37,0.00,1.00,-52.80,-33.60 --0.00,-52.80,1.35,0.00,1.00,-57.60,33.60 --0.00,-57.60,1.32,0.00,1.00,-62.40,-38.40 --0.00,-62.40,1.30,0.00,1.00,-67.20,38.40 --4.80,-67.20,1.28,0.00,1.00,-72.00,-43.20 --4.80,-72.00,1.26,0.00,1.00,-76.80,43.20 --4.80,-76.80,1.24,0.00,1.00,-81.60,-43.20 --9.60,-81.60,1.22,0.00,1.00,-86.40,43.20 --19.20,-86.40,1.20,0.00,1.00,-91.20,-48.00 --134.40,-86.40,1.17,0.00,1.00,-96.00,48.00 --168.00,-81.60,1.15,0.00,1.00,-100.80,-48.00 --172.80,-76.80,1.13,0.00,1.00,-105.60,43.20 --177.60,-72.00,1.11,0.00,1.00,-110.40,-43.20 --177.60,-67.20,1.09,0.00,1.00,-115.20,43.20 --177.60,-62.40,1.07,0.00,1.00,-120.00,-38.40 --177.60,-57.60,1.05,0.00,1.00,-124.80,38.40 --177.60,-52.80,1.03,0.00,1.00,-129.60,-38.40 --177.60,-48.00,1.00,0.00,1.00,-134.40,33.60 --177.60,-43.20,0.98,0.00,1.00,-139.20,-28.80 --177.60,-38.40,0.96,0.00,1.00,-144.00,28.80 --177.60,-33.60,0.94,0.00,1.00,-148.80,-24.00 --177.60,-28.80,0.92,0.00,1.00,-153.60,24.00 --177.60,-24.00,0.90,0.00,1.00,-158.40,-19.20 --177.60,-19.20,0.88,0.00,1.00,-163.20,14.40 --177.60,-14.40,0.85,0.00,1.00,-168.00,-14.40 --177.60,-9.60,0.83,0.00,1.00,-172.80,9.60 --177.60,-4.80,0.81,0.00,1.00,-177.60,-4.80 --177.60,-0.00,0.79,0.00,1.00,177.60,0.00 -177.60,0.00,0.77,0.00,1.00,172.80,0.00 -177.60,4.80,0.75,0.00,1.00,168.00,-4.80 -177.60,9.60,0.73,0.00,1.00,163.20,9.60 -177.60,14.40,0.70,0.00,1.00,158.40,-14.40 -177.60,19.20,0.68,0.00,1.00,153.60,14.40 -177.60,24.00,0.66,0.00,1.00,148.80,-19.20 -177.60,28.80,0.64,0.00,1.00,144.00,24.00 -177.60,33.60,0.62,0.00,1.00,139.20,-24.00 -177.60,38.40,0.60,0.00,1.00,134.40,28.80 -177.60,43.20,0.58,0.00,1.00,129.60,-28.80 -177.60,48.00,0.56,0.00,1.00,124.80,33.60 -177.60,52.80,0.53,0.00,1.00,120.00,-38.40 -177.60,57.60,0.51,0.00,1.00,115.20,38.40 -177.60,62.40,0.49,0.00,1.00,110.40,-38.40 -177.60,67.20,0.47,0.00,1.00,105.60,43.20 -177.60,72.00,0.45,0.00,1.00,100.80,-43.20 -172.80,76.80,0.43,0.00,1.00,96.00,43.20 -168.00,81.60,0.41,0.00,1.00,91.20,-48.00 -134.40,86.40,0.38,0.00,1.00,86.40,48.00 -19.20,86.40,0.36,0.00,1.00,81.60,-48.00 -9.60,81.60,0.34,0.00,1.00,76.80,43.20 -4.80,76.80,0.32,0.00,1.00,72.00,-43.20 -4.80,72.00,0.30,0.00,1.00,67.20,43.20 -4.80,67.20,0.28,0.00,1.00,62.40,-43.20 -0.00,62.40,0.26,0.00,1.00,57.60,38.40 -0.00,57.60,0.23,0.00,1.00,52.80,-38.40 -0.00,52.80,0.21,0.00,1.00,48.00,33.60 -0.00,48.00,0.19,0.00,1.00,43.20,-33.60 -0.00,43.20,0.17,0.00,1.00,38.40,28.80 -0.00,38.40,0.15,0.00,1.00,33.60,-28.80 -0.00,33.60,0.13,0.00,1.00,28.80,24.00 -0.00,28.80,0.11,0.00,1.00,24.00,-19.20 -0.00,24.00,0.09,0.00,1.00,19.20,19.20 -0.00,19.20,0.06,0.00,1.00,14.40,-14.40 -0.00,14.40,0.04,0.00,1.00,9.60,9.60 -0.00,9.60,0.02,0.00,1.00,4.80,-4.80 -0.00,4.80,0.00,0.00,1.00,0.00,4.80 +0.00,0.00,0.00,0.00,1.00,0.00,0.00,0 +4.80,0.00,0.02,0.00,1.00,0.00,-4.80,0 +9.60,0.00,0.04,0.00,1.00,0.00,4.80,0 +14.40,0.00,0.06,0.00,1.00,0.00,-9.60,0 +19.20,0.00,0.09,0.00,1.00,0.00,14.40,0 +24.00,0.00,0.11,0.00,1.00,0.00,-14.40,0 +28.80,0.00,0.13,0.00,1.00,0.00,19.20,0 +33.60,0.00,0.15,0.00,1.00,0.00,-24.00,0 +38.40,0.00,0.17,0.00,1.00,0.00,24.00,0 +43.20,0.00,0.19,0.00,1.00,0.00,-28.80,0 +48.00,0.00,0.21,0.00,1.00,0.00,33.60,0 +52.80,0.00,0.23,0.00,1.00,0.00,-33.60,0 +57.60,0.00,0.26,0.00,1.00,0.00,38.40,0 +62.40,0.00,0.28,0.00,1.00,4.80,-38.40,0 +67.20,0.00,0.30,0.00,1.00,4.80,38.40,0 +72.00,0.00,0.32,0.00,1.00,4.80,-43.20,0 +76.80,0.00,0.34,0.00,1.00,9.60,43.20,0 +81.60,0.00,0.36,0.00,1.00,19.20,-43.20,0 +86.40,0.00,0.38,0.00,1.00,134.40,43.20,0 +91.20,0.00,0.41,0.00,1.00,168.00,-43.20,0 +96.00,0.00,0.43,0.00,1.00,172.80,43.20,0 +100.80,0.00,0.45,0.00,1.00,177.60,-43.20,0 +105.60,0.00,0.47,0.00,1.00,177.60,43.20,0 +110.40,0.00,0.49,0.00,1.00,177.60,-43.20,0 +115.20,0.00,0.51,0.00,1.00,177.60,38.40,0 +120.00,0.00,0.53,0.00,1.00,177.60,-38.40,0 +124.80,0.00,0.56,0.00,1.00,177.60,33.60,0 +129.60,0.00,0.58,0.00,1.00,177.60,-33.60,0 +134.40,0.00,0.60,0.00,1.00,177.60,28.80,0 +139.20,0.00,0.62,0.00,1.00,177.60,-28.80,0 +144.00,0.00,0.64,0.00,1.00,177.60,24.00,0 +148.80,0.00,0.66,0.00,1.00,177.60,-19.20,0 +153.60,0.00,0.68,0.00,1.00,177.60,19.20,0 +158.40,0.00,0.70,0.00,1.00,177.60,-14.40,0 +163.20,0.00,0.73,0.00,1.00,177.60,9.60,0 +168.00,0.00,0.75,0.00,1.00,177.60,-9.60,0 +172.80,0.00,0.77,0.00,1.00,177.60,4.80,0 +177.60,0.00,0.79,0.00,1.00,-177.60,-0.00,0 +-177.60,0.00,0.81,0.00,1.00,-177.60,-0.00,0 +-172.80,0.00,0.83,0.00,1.00,-177.60,4.80,0 +-168.00,0.00,0.85,0.00,1.00,-177.60,-9.60,0 +-163.20,0.00,0.88,0.00,1.00,-177.60,9.60,0 +-158.40,0.00,0.90,0.00,1.00,-177.60,-14.40,0 +-153.60,0.00,0.92,0.00,1.00,-177.60,19.20,0 +-148.80,0.00,0.94,0.00,1.00,-177.60,-19.20,0 +-144.00,0.00,0.96,0.00,1.00,-177.60,24.00,0 +-139.20,0.00,0.98,0.00,1.00,-177.60,-28.80,0 +-134.40,0.00,1.00,0.00,1.00,-177.60,28.80,0 +-129.60,0.00,1.03,0.00,1.00,-177.60,-33.60,0 +-124.80,0.00,1.05,0.00,1.00,-177.60,33.60,0 +-120.00,0.00,1.07,0.00,1.00,-177.60,-38.40,0 +-115.20,0.00,1.09,0.00,1.00,-177.60,38.40,0 +-110.40,0.00,1.11,0.00,1.00,-177.60,-43.20,0 +-105.60,0.00,1.13,0.00,1.00,-172.80,43.20,0 +-100.80,0.00,1.15,0.00,1.00,-168.00,-43.20,0 +-96.00,0.00,1.17,0.00,1.00,-134.40,43.20,0 +-91.20,0.00,1.20,0.00,1.00,-19.20,-43.20,0 +-86.40,0.00,1.22,0.00,1.00,-9.60,43.20,0 +-81.60,0.00,1.24,0.00,1.00,-4.80,-43.20,0 +-76.80,0.00,1.26,0.00,1.00,-4.80,43.20,0 +-72.00,0.00,1.28,0.00,1.00,-4.80,-43.20,0 +-67.20,0.00,1.30,0.00,1.00,-0.00,38.40,0 +-62.40,0.00,1.32,0.00,1.00,-0.00,-38.40,0 +-57.60,0.00,1.35,0.00,1.00,-0.00,38.40,0 +-52.80,0.00,1.37,0.00,1.00,-0.00,-33.60,0 +-48.00,0.00,1.39,0.00,1.00,-0.00,33.60,0 +-43.20,0.00,1.41,0.00,1.00,-0.00,-28.80,0 +-38.40,0.00,1.43,0.00,1.00,-0.00,24.00,0 +-33.60,0.00,1.45,0.00,1.00,-0.00,-24.00,0 +-28.80,0.00,1.47,0.00,1.00,-0.00,19.20,0 +-24.00,0.00,1.50,0.00,1.00,-0.00,-14.40,0 +-19.20,0.00,1.52,0.00,1.00,-0.00,14.40,0 +-14.40,0.00,1.54,0.00,1.00,-0.00,-9.60,0 +-9.60,0.00,1.56,0.00,1.00,-0.00,4.80,0 +-4.80,0.00,1.58,0.00,1.00,-0.00,-4.80,0 +0.00,0.00,1.60,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,1.62,0.00,1.00,-0.00,-4.80,0 +9.60,-0.00,1.64,0.00,1.00,-0.00,4.80,0 +14.40,-0.00,1.67,0.00,1.00,-0.00,-9.60,0 +19.20,-0.00,1.69,0.00,1.00,-0.00,14.40,0 +24.00,-0.00,1.71,0.00,1.00,-0.00,-14.40,0 +28.80,-0.00,1.73,0.00,1.00,-0.00,19.20,0 +33.60,-4.80,1.75,0.00,1.00,-4.80,-19.20,0 +38.40,-4.80,1.77,0.00,1.00,-4.80,24.00,0 +43.20,-4.80,1.79,0.00,1.00,-4.80,-24.00,0 +48.00,-4.80,1.82,0.00,1.00,-4.80,28.80,0 +52.80,-4.80,1.84,0.00,1.00,-4.80,-28.80,0 +57.60,-4.80,1.86,0.00,1.00,-4.80,33.60,0 +62.40,-4.80,1.88,0.00,1.00,-9.60,-33.60,0 +67.20,-4.80,1.90,0.00,1.00,-9.60,38.40,0 +72.00,-4.80,1.92,0.00,1.00,-14.40,-38.40,0 +76.80,-4.80,1.94,0.00,1.00,-24.00,38.40,0 +81.60,-4.80,1.97,0.00,1.00,-43.20,-38.40,0 +86.40,-4.80,1.99,0.00,1.00,-110.40,38.40,0 +91.20,-4.80,2.01,0.00,1.00,-148.80,-38.40,0 +96.00,-4.80,2.03,0.00,1.00,-163.20,38.40,0 +100.80,-4.80,2.05,0.00,1.00,-168.00,-38.40,0 +105.60,-4.80,2.07,0.00,1.00,-172.80,38.40,0 +110.40,-4.80,2.09,0.00,1.00,-172.80,-38.40,0 +115.20,-4.80,2.11,0.00,1.00,-172.80,33.60,0 +120.00,-4.80,2.14,0.00,1.00,-172.80,-33.60,0 +124.80,-4.80,2.16,0.00,1.00,-177.60,33.60,0 +129.60,-4.80,2.18,0.00,1.00,-177.60,-28.80,0 +134.40,-4.80,2.20,0.00,1.00,-177.60,28.80,0 +139.20,-4.80,2.22,0.00,1.00,-177.60,-24.00,0 +144.00,-4.80,2.24,0.00,1.00,-177.60,24.00,0 +148.80,-4.80,2.26,0.00,1.00,-177.60,-19.20,0 +153.60,-0.00,2.29,0.00,1.00,-177.60,14.40,0 +158.40,-0.00,2.31,0.00,1.00,-177.60,-14.40,0 +163.20,-0.00,2.33,0.00,1.00,-177.60,9.60,0 +168.00,-0.00,2.35,0.00,1.00,-177.60,-9.60,0 +172.80,-0.00,2.37,0.00,1.00,-177.60,4.80,0 +177.60,-0.00,2.39,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,2.41,0.00,1.00,177.60,-0.00,0 +-172.80,0.00,2.44,0.00,1.00,177.60,4.80,0 +-168.00,0.00,2.46,0.00,1.00,177.60,-9.60,0 +-163.20,0.00,2.48,0.00,1.00,177.60,9.60,0 +-158.40,0.00,2.50,0.00,1.00,177.60,-14.40,0 +-153.60,0.00,2.52,0.00,1.00,177.60,14.40,0 +-148.80,4.80,2.54,0.00,1.00,177.60,-19.20,0 +-144.00,4.80,2.56,0.00,1.00,177.60,24.00,0 +-139.20,4.80,2.58,0.00,1.00,177.60,-24.00,0 +-134.40,4.80,2.61,0.00,1.00,177.60,28.80,0 +-129.60,4.80,2.63,0.00,1.00,172.80,-28.80,0 +-124.80,4.80,2.65,0.00,1.00,172.80,33.60,0 +-120.00,4.80,2.67,0.00,1.00,172.80,-33.60,0 +-115.20,4.80,2.69,0.00,1.00,172.80,33.60,0 +-110.40,4.80,2.71,0.00,1.00,168.00,-38.40,0 +-105.60,4.80,2.73,0.00,1.00,163.20,38.40,0 +-100.80,4.80,2.76,0.00,1.00,148.80,-38.40,0 +-96.00,4.80,2.78,0.00,1.00,110.40,38.40,0 +-91.20,4.80,2.80,0.00,1.00,43.20,-38.40,0 +-86.40,4.80,2.82,0.00,1.00,24.00,38.40,0 +-81.60,4.80,2.84,0.00,1.00,14.40,-38.40,0 +-76.80,4.80,2.86,0.00,1.00,9.60,38.40,0 +-72.00,4.80,2.88,0.00,1.00,9.60,-38.40,0 +-67.20,4.80,2.91,0.00,1.00,4.80,38.40,0 +-62.40,4.80,2.93,0.00,1.00,4.80,-33.60,0 +-57.60,4.80,2.95,0.00,1.00,4.80,33.60,0 +-52.80,4.80,2.97,0.00,1.00,4.80,-28.80,0 +-48.00,4.80,2.99,0.00,1.00,4.80,28.80,0 +-43.20,4.80,3.01,0.00,1.00,4.80,-24.00,0 +-38.40,4.80,3.03,0.00,1.00,0.00,24.00,0 +-33.60,4.80,3.05,0.00,1.00,0.00,-19.20,0 +-28.80,0.00,3.08,0.00,1.00,0.00,19.20,0 +-24.00,0.00,3.10,0.00,1.00,0.00,-14.40,0 +-19.20,0.00,3.12,0.00,1.00,0.00,14.40,0 +-14.40,0.00,3.14,0.00,1.00,0.00,-9.60,0 +-9.60,0.00,3.16,0.00,1.00,0.00,4.80,0 +-4.80,0.00,3.18,0.00,1.00,0.00,-4.80,0 +0.00,0.00,3.20,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,3.23,0.00,1.00,-0.00,-4.80,0 +9.60,-0.00,3.25,0.00,1.00,-0.00,4.80,0 +14.40,-0.00,3.27,0.00,1.00,-4.80,-9.60,0 +19.20,-4.80,3.29,0.00,1.00,-4.80,9.60,0 +24.00,-4.80,3.31,0.00,1.00,-4.80,-14.40,0 +28.80,-4.80,3.33,0.00,1.00,-4.80,14.40,0 +33.60,-4.80,3.35,0.00,1.00,-4.80,-19.20,0 +38.40,-4.80,3.38,0.00,1.00,-9.60,19.20,0 +43.20,-4.80,3.40,0.00,1.00,-9.60,-24.00,0 +48.00,-4.80,3.42,0.00,1.00,-9.60,24.00,0 +52.80,-9.60,3.44,0.00,1.00,-14.40,-28.80,0 +57.60,-9.60,3.46,0.00,1.00,-14.40,28.80,0 +62.40,-9.60,3.48,0.00,1.00,-19.20,-28.80,0 +67.20,-9.60,3.50,0.00,1.00,-24.00,33.60,0 +72.00,-9.60,3.52,0.00,1.00,-33.60,-33.60,0 +76.80,-9.60,3.55,0.00,1.00,-43.20,33.60,0 +81.60,-9.60,3.57,0.00,1.00,-67.20,-33.60,0 +86.40,-9.60,3.59,0.00,1.00,-96.00,33.60,0 +91.20,-9.60,3.61,0.00,1.00,-124.80,-33.60,0 +96.00,-9.60,3.63,0.00,1.00,-144.00,33.60,0 +100.80,-9.60,3.65,0.00,1.00,-153.60,-33.60,0 +105.60,-9.60,3.67,0.00,1.00,-158.40,33.60,0 +110.40,-9.60,3.70,0.00,1.00,-163.20,-33.60,0 +115.20,-9.60,3.72,0.00,1.00,-168.00,33.60,0 +120.00,-9.60,3.74,0.00,1.00,-168.00,-28.80,0 +124.80,-9.60,3.76,0.00,1.00,-168.00,28.80,0 +129.60,-9.60,3.78,0.00,1.00,-172.80,-28.80,0 +134.40,-4.80,3.80,0.00,1.00,-172.80,24.00,0 +139.20,-4.80,3.82,0.00,1.00,-172.80,-24.00,0 +144.00,-4.80,3.85,0.00,1.00,-172.80,19.20,0 +148.80,-4.80,3.87,0.00,1.00,-177.60,-19.20,0 +153.60,-4.80,3.89,0.00,1.00,-177.60,14.40,0 +158.40,-4.80,3.91,0.00,1.00,-177.60,-14.40,0 +163.20,-4.80,3.93,0.00,1.00,-177.60,9.60,0 +168.00,-0.00,3.95,0.00,1.00,-177.60,-4.80,0 +172.80,-0.00,3.97,0.00,1.00,-177.60,4.80,0 +177.60,-0.00,3.99,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,4.02,0.00,1.00,177.60,-0.00,0 +-172.80,0.00,4.04,0.00,1.00,177.60,4.80,0 +-168.00,0.00,4.06,0.00,1.00,177.60,-4.80,0 +-163.20,4.80,4.08,0.00,1.00,177.60,9.60,0 +-158.40,4.80,4.10,0.00,1.00,177.60,-14.40,0 +-153.60,4.80,4.12,0.00,1.00,172.80,14.40,0 +-148.80,4.80,4.14,0.00,1.00,172.80,-19.20,0 +-144.00,4.80,4.17,0.00,1.00,172.80,19.20,0 +-139.20,4.80,4.19,0.00,1.00,172.80,-24.00,0 +-134.40,4.80,4.21,0.00,1.00,168.00,24.00,0 +-129.60,9.60,4.23,0.00,1.00,168.00,-28.80,0 +-124.80,9.60,4.25,0.00,1.00,168.00,28.80,0 +-120.00,9.60,4.27,0.00,1.00,163.20,-28.80,0 +-115.20,9.60,4.29,0.00,1.00,158.40,33.60,0 +-110.40,9.60,4.32,0.00,1.00,153.60,-33.60,0 +-105.60,9.60,4.34,0.00,1.00,144.00,33.60,0 +-100.80,9.60,4.36,0.00,1.00,124.80,-33.60,0 +-96.00,9.60,4.38,0.00,1.00,96.00,33.60,0 +-91.20,9.60,4.40,0.00,1.00,67.20,-33.60,0 +-86.40,9.60,4.42,0.00,1.00,43.20,33.60,0 +-81.60,9.60,4.44,0.00,1.00,33.60,-33.60,0 +-76.80,9.60,4.46,0.00,1.00,24.00,33.60,0 +-72.00,9.60,4.49,0.00,1.00,19.20,-33.60,0 +-67.20,9.60,4.51,0.00,1.00,14.40,33.60,0 +-62.40,9.60,4.53,0.00,1.00,14.40,-28.80,0 +-57.60,9.60,4.55,0.00,1.00,9.60,28.80,0 +-52.80,9.60,4.57,0.00,1.00,9.60,-28.80,0 +-48.00,4.80,4.59,0.00,1.00,9.60,24.00,0 +-43.20,4.80,4.61,0.00,1.00,4.80,-24.00,0 +-38.40,4.80,4.64,0.00,1.00,4.80,19.20,0 +-33.60,4.80,4.66,0.00,1.00,4.80,-19.20,0 +-28.80,4.80,4.68,0.00,1.00,4.80,14.40,0 +-24.00,4.80,4.70,0.00,1.00,4.80,-14.40,0 +-19.20,4.80,4.72,0.00,1.00,0.00,9.60,0 +-14.40,0.00,4.74,0.00,1.00,0.00,-9.60,0 +-9.60,0.00,4.76,0.00,1.00,0.00,4.80,0 +-4.80,0.00,4.79,0.00,1.00,0.00,-4.80,0 +0.00,0.00,4.81,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,4.83,0.00,1.00,-0.00,-4.80,0 +9.60,-0.00,4.85,0.00,1.00,-4.80,4.80,0 +14.40,-4.80,4.87,0.00,1.00,-4.80,-9.60,0 +19.20,-4.80,4.89,0.00,1.00,-4.80,9.60,0 +24.00,-4.80,4.91,0.00,1.00,-4.80,-9.60,0 +28.80,-4.80,4.93,0.00,1.00,-9.60,14.40,0 +33.60,-9.60,4.96,0.00,1.00,-9.60,-14.40,0 +38.40,-9.60,4.98,0.00,1.00,-14.40,19.20,0 +43.20,-9.60,5.00,0.00,1.00,-14.40,-19.20,0 +48.00,-9.60,5.02,0.00,1.00,-14.40,24.00,0 +52.80,-9.60,5.04,0.00,1.00,-19.20,-24.00,0 +57.60,-14.40,5.06,0.00,1.00,-24.00,24.00,0 +62.40,-14.40,5.08,0.00,1.00,-28.80,-28.80,0 +67.20,-14.40,5.11,0.00,1.00,-33.60,28.80,0 +72.00,-14.40,5.13,0.00,1.00,-43.20,-28.80,0 +76.80,-14.40,5.15,0.00,1.00,-57.60,28.80,0 +81.60,-14.40,5.17,0.00,1.00,-76.80,-28.80,0 +86.40,-14.40,5.19,0.00,1.00,-96.00,28.80,0 +91.20,-14.40,5.21,0.00,1.00,-115.20,-28.80,0 +96.00,-14.40,5.23,0.00,1.00,-129.60,28.80,0 +100.80,-14.40,5.26,0.00,1.00,-139.20,-28.80,0 +105.60,-14.40,5.28,0.00,1.00,-148.80,28.80,0 +110.40,-14.40,5.30,0.00,1.00,-153.60,-28.80,0 +115.20,-14.40,5.32,0.00,1.00,-158.40,28.80,0 +120.00,-14.40,5.34,0.00,1.00,-163.20,-24.00,0 +124.80,-9.60,5.36,0.00,1.00,-163.20,24.00,0 +129.60,-9.60,5.38,0.00,1.00,-168.00,-24.00,0 +134.40,-9.60,5.40,0.00,1.00,-168.00,19.20,0 +139.20,-9.60,5.43,0.00,1.00,-172.80,-19.20,0 +144.00,-9.60,5.45,0.00,1.00,-172.80,19.20,0 +148.80,-9.60,5.47,0.00,1.00,-172.80,-14.40,0 +153.60,-4.80,5.49,0.00,1.00,-172.80,14.40,0 +158.40,-4.80,5.51,0.00,1.00,-177.60,-9.60,0 +163.20,-4.80,5.53,0.00,1.00,-177.60,9.60,0 +168.00,-4.80,5.55,0.00,1.00,-177.60,-4.80,0 +172.80,-0.00,5.58,0.00,1.00,-177.60,4.80,0 +177.60,-0.00,5.60,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,5.62,0.00,1.00,177.60,-0.00,0 +-172.80,0.00,5.64,0.00,1.00,177.60,4.80,0 +-168.00,4.80,5.66,0.00,1.00,177.60,-4.80,0 +-163.20,4.80,5.68,0.00,1.00,172.80,9.60,0 +-158.40,4.80,5.70,0.00,1.00,172.80,-9.60,0 +-153.60,4.80,5.72,0.00,1.00,172.80,14.40,0 +-148.80,9.60,5.75,0.00,1.00,172.80,-14.40,0 +-144.00,9.60,5.77,0.00,1.00,168.00,19.20,0 +-139.20,9.60,5.79,0.00,1.00,168.00,-19.20,0 +-134.40,9.60,5.81,0.00,1.00,163.20,19.20,0 +-129.60,9.60,5.83,0.00,1.00,163.20,-24.00,0 +-124.80,9.60,5.85,0.00,1.00,158.40,24.00,0 +-120.00,14.40,5.87,0.00,1.00,153.60,-24.00,0 +-115.20,14.40,5.90,0.00,1.00,148.80,28.80,0 +-110.40,14.40,5.92,0.00,1.00,139.20,-28.80,0 +-105.60,14.40,5.94,0.00,1.00,129.60,28.80,0 +-100.80,14.40,5.96,0.00,1.00,115.20,-28.80,0 +-96.00,14.40,5.98,0.00,1.00,96.00,28.80,0 +-91.20,14.40,6.00,0.00,1.00,76.80,-28.80,0 +-86.40,14.40,6.02,0.00,1.00,57.60,28.80,0 +-81.60,14.40,6.05,0.00,1.00,43.20,-28.80,0 +-76.80,14.40,6.07,0.00,1.00,33.60,28.80,0 +-72.00,14.40,6.09,0.00,1.00,28.80,-28.80,0 +-67.20,14.40,6.11,0.00,1.00,24.00,28.80,0 +-62.40,14.40,6.13,0.00,1.00,19.20,-28.80,0 +-57.60,14.40,6.15,0.00,1.00,14.40,24.00,0 +-52.80,9.60,6.17,0.00,1.00,14.40,-24.00,0 +-48.00,9.60,6.19,0.00,1.00,14.40,24.00,0 +-43.20,9.60,6.22,0.00,1.00,9.60,-19.20,0 +-38.40,9.60,6.24,0.00,1.00,9.60,19.20,0 +-33.60,9.60,6.26,0.00,1.00,4.80,-14.40,0 +-28.80,4.80,6.28,0.00,1.00,4.80,14.40,0 +-24.00,4.80,6.30,0.00,1.00,4.80,-9.60,0 +-19.20,4.80,6.32,0.00,1.00,4.80,9.60,0 +-14.40,4.80,6.34,0.00,1.00,0.00,-9.60,0 +-9.60,0.00,6.37,0.00,1.00,0.00,4.80,0 +-4.80,0.00,6.39,0.00,1.00,0.00,-4.80,0 +0.00,0.00,6.41,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,6.43,0.00,1.00,-4.80,-0.00,0 +9.60,-4.80,6.45,0.00,1.00,-4.80,4.80,0 +14.40,-4.80,6.47,0.00,1.00,-4.80,-4.80,0 +19.20,-4.80,6.49,0.00,1.00,-9.60,9.60,0 +24.00,-9.60,6.52,0.00,1.00,-9.60,-9.60,0 +28.80,-9.60,6.54,0.00,1.00,-9.60,14.40,0 +33.60,-9.60,6.56,0.00,1.00,-14.40,-14.40,0 +38.40,-9.60,6.58,0.00,1.00,-14.40,14.40,0 +43.20,-14.40,6.60,0.00,1.00,-19.20,-19.20,0 +48.00,-14.40,6.62,0.00,1.00,-24.00,19.20,0 +52.80,-14.40,6.64,0.00,1.00,-24.00,-19.20,0 +57.60,-14.40,6.66,0.00,1.00,-28.80,19.20,0 +62.40,-19.20,6.69,0.00,1.00,-38.40,-24.00,0 +67.20,-19.20,6.71,0.00,1.00,-43.20,24.00,0 +72.00,-19.20,6.73,0.00,1.00,-52.80,-24.00,0 +76.80,-19.20,6.75,0.00,1.00,-62.40,24.00,0 +81.60,-19.20,6.77,0.00,1.00,-76.80,-24.00,0 +86.40,-19.20,6.79,0.00,1.00,-96.00,24.00,0 +91.20,-19.20,6.81,0.00,1.00,-110.40,-24.00,0 +96.00,-19.20,6.84,0.00,1.00,-120.00,24.00,0 +100.80,-19.20,6.86,0.00,1.00,-134.40,-24.00,0 +105.60,-19.20,6.88,0.00,1.00,-139.20,24.00,0 +110.40,-19.20,6.90,0.00,1.00,-148.80,-24.00,0 +115.20,-19.20,6.92,0.00,1.00,-153.60,24.00,0 +120.00,-14.40,6.94,0.00,1.00,-158.40,-24.00,0 +124.80,-14.40,6.96,0.00,1.00,-158.40,19.20,0 +129.60,-14.40,6.99,0.00,1.00,-163.20,-19.20,0 +134.40,-14.40,7.01,0.00,1.00,-163.20,19.20,0 +139.20,-14.40,7.03,0.00,1.00,-168.00,-14.40,0 +144.00,-9.60,7.05,0.00,1.00,-168.00,14.40,0 +148.80,-9.60,7.07,0.00,1.00,-172.80,-14.40,0 +153.60,-9.60,7.09,0.00,1.00,-172.80,9.60,0 +158.40,-4.80,7.11,0.00,1.00,-172.80,-9.60,0 +163.20,-4.80,7.13,0.00,1.00,-177.60,9.60,0 +168.00,-4.80,7.16,0.00,1.00,-177.60,-4.80,0 +172.80,-0.00,7.18,0.00,1.00,-177.60,4.80,0 +177.60,-0.00,7.20,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,7.22,0.00,1.00,177.60,-0.00,0 +-172.80,0.00,7.24,0.00,1.00,177.60,4.80,0 +-168.00,4.80,7.26,0.00,1.00,172.80,-4.80,0 +-163.20,4.80,7.28,0.00,1.00,172.80,9.60,0 +-158.40,4.80,7.31,0.00,1.00,172.80,-9.60,0 +-153.60,9.60,7.33,0.00,1.00,168.00,9.60,0 +-148.80,9.60,7.35,0.00,1.00,168.00,-14.40,0 +-144.00,9.60,7.37,0.00,1.00,163.20,14.40,0 +-139.20,14.40,7.39,0.00,1.00,163.20,-14.40,0 +-134.40,14.40,7.41,0.00,1.00,158.40,19.20,0 +-129.60,14.40,7.43,0.00,1.00,158.40,-19.20,0 +-124.80,14.40,7.46,0.00,1.00,153.60,19.20,0 +-120.00,14.40,7.48,0.00,1.00,148.80,-24.00,0 +-115.20,19.20,7.50,0.00,1.00,139.20,24.00,0 +-110.40,19.20,7.52,0.00,1.00,134.40,-24.00,0 +-105.60,19.20,7.54,0.00,1.00,120.00,24.00,0 +-100.80,19.20,7.56,0.00,1.00,110.40,-24.00,0 +-96.00,19.20,7.58,0.00,1.00,96.00,24.00,0 +-91.20,19.20,7.60,0.00,1.00,76.80,-24.00,0 +-86.40,19.20,7.63,0.00,1.00,62.40,24.00,0 +-81.60,19.20,7.65,0.00,1.00,52.80,-24.00,0 +-76.80,19.20,7.67,0.00,1.00,43.20,24.00,0 +-72.00,19.20,7.69,0.00,1.00,38.40,-24.00,0 +-67.20,19.20,7.71,0.00,1.00,28.80,24.00,0 +-62.40,19.20,7.73,0.00,1.00,24.00,-24.00,0 +-57.60,14.40,7.75,0.00,1.00,24.00,19.20,0 +-52.80,14.40,7.78,0.00,1.00,19.20,-19.20,0 +-48.00,14.40,7.80,0.00,1.00,14.40,19.20,0 +-43.20,14.40,7.82,0.00,1.00,14.40,-19.20,0 +-38.40,9.60,7.84,0.00,1.00,9.60,14.40,0 +-33.60,9.60,7.86,0.00,1.00,9.60,-14.40,0 +-28.80,9.60,7.88,0.00,1.00,9.60,14.40,0 +-24.00,9.60,7.90,0.00,1.00,4.80,-9.60,0 +-19.20,4.80,7.93,0.00,1.00,4.80,9.60,0 +-14.40,4.80,7.95,0.00,1.00,4.80,-4.80,0 +-9.60,4.80,7.97,0.00,1.00,0.00,4.80,0 +-4.80,0.00,7.99,0.00,1.00,0.00,-0.00,0 +0.00,0.00,8.01,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,8.03,0.00,1.00,-4.80,-0.00,0 +9.60,-4.80,8.05,0.00,1.00,-4.80,4.80,0 +14.40,-4.80,8.07,0.00,1.00,-9.60,-4.80,0 +19.20,-9.60,8.10,0.00,1.00,-9.60,4.80,0 +24.00,-9.60,8.12,0.00,1.00,-14.40,-9.60,0 +28.80,-9.60,8.14,0.00,1.00,-14.40,9.60,0 +33.60,-14.40,8.16,0.00,1.00,-19.20,-9.60,0 +33.60,-14.40,8.18,0.00,1.00,-19.20,14.40,0 +38.40,-14.40,8.20,0.00,1.00,-24.00,-14.40,0 +43.20,-19.20,8.22,0.00,1.00,-28.80,14.40,0 +48.00,-19.20,8.25,0.00,1.00,-33.60,-14.40,0 +57.60,-19.20,8.27,0.00,1.00,-38.40,19.20,0 +62.40,-19.20,8.29,0.00,1.00,-43.20,-19.20,0 +67.20,-24.00,8.31,0.00,1.00,-48.00,19.20,0 +72.00,-24.00,8.33,0.00,1.00,-57.60,-19.20,0 +76.80,-24.00,8.35,0.00,1.00,-67.20,19.20,0 +81.60,-24.00,8.37,0.00,1.00,-81.60,-19.20,0 +86.40,-24.00,8.40,0.00,1.00,-91.20,19.20,0 +91.20,-24.00,8.42,0.00,1.00,-105.60,-19.20,0 +96.00,-24.00,8.44,0.00,1.00,-115.20,19.20,0 +100.80,-24.00,8.46,0.00,1.00,-124.80,-19.20,0 +105.60,-24.00,8.48,0.00,1.00,-134.40,19.20,0 +110.40,-24.00,8.50,0.00,1.00,-139.20,-19.20,0 +115.20,-19.20,8.52,0.00,1.00,-144.00,19.20,0 +120.00,-19.20,8.54,0.00,1.00,-148.80,-19.20,0 +129.60,-19.20,8.57,0.00,1.00,-153.60,19.20,0 +134.40,-19.20,8.59,0.00,1.00,-158.40,-14.40,0 +139.20,-19.20,8.61,0.00,1.00,-163.20,14.40,0 +144.00,-14.40,8.63,0.00,1.00,-163.20,-14.40,0 +148.80,-14.40,8.65,0.00,1.00,-168.00,14.40,0 +148.80,-14.40,8.67,0.00,1.00,-168.00,-9.60,0 +153.60,-9.60,8.69,0.00,1.00,-172.80,9.60,0 +158.40,-9.60,8.72,0.00,1.00,-172.80,-9.60,0 +163.20,-4.80,8.74,0.00,1.00,-177.60,4.80,0 +168.00,-4.80,8.76,0.00,1.00,-177.60,-4.80,0 +172.80,-4.80,8.78,0.00,1.00,-177.60,4.80,0 +177.60,-0.00,8.80,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,8.82,0.00,1.00,177.60,-0.00,0 +-172.80,4.80,8.84,0.00,1.00,177.60,4.80,0 +-168.00,4.80,8.87,0.00,1.00,172.80,-4.80,0 +-163.20,4.80,8.89,0.00,1.00,172.80,4.80,0 +-158.40,9.60,8.91,0.00,1.00,168.00,-9.60,0 +-153.60,9.60,8.93,0.00,1.00,168.00,9.60,0 +-148.80,14.40,8.95,0.00,1.00,163.20,-9.60,0 +-148.80,14.40,8.97,0.00,1.00,163.20,14.40,0 +-144.00,14.40,8.99,0.00,1.00,158.40,-14.40,0 +-139.20,19.20,9.01,0.00,1.00,153.60,14.40,0 +-134.40,19.20,9.04,0.00,1.00,148.80,-14.40,0 +-129.60,19.20,9.06,0.00,1.00,144.00,19.20,0 +-120.00,19.20,9.08,0.00,1.00,139.20,-19.20,0 +-115.20,19.20,9.10,0.00,1.00,134.40,19.20,0 +-110.40,24.00,9.12,0.00,1.00,124.80,-19.20,0 +-105.60,24.00,9.14,0.00,1.00,115.20,19.20,0 +-100.80,24.00,9.16,0.00,1.00,105.60,-19.20,0 +-96.00,24.00,9.19,0.00,1.00,91.20,19.20,0 +-91.20,24.00,9.21,0.00,1.00,81.60,-19.20,0 +-86.40,24.00,9.23,0.00,1.00,67.20,19.20,0 +-81.60,24.00,9.25,0.00,1.00,57.60,-19.20,0 +-76.80,24.00,9.27,0.00,1.00,48.00,19.20,0 +-72.00,24.00,9.29,0.00,1.00,43.20,-19.20,0 +-67.20,24.00,9.31,0.00,1.00,38.40,19.20,0 +-62.40,19.20,9.34,0.00,1.00,33.60,-19.20,0 +-57.60,19.20,9.36,0.00,1.00,28.80,19.20,0 +-48.00,19.20,9.38,0.00,1.00,24.00,-14.40,0 +-43.20,19.20,9.40,0.00,1.00,19.20,14.40,0 +-38.40,14.40,9.42,0.00,1.00,19.20,-14.40,0 +-33.60,14.40,9.44,0.00,1.00,14.40,14.40,0 +-33.60,14.40,9.46,0.00,1.00,14.40,-9.60,0 +-28.80,9.60,9.48,0.00,1.00,9.60,9.60,0 +-24.00,9.60,9.51,0.00,1.00,9.60,-9.60,0 +-19.20,9.60,9.53,0.00,1.00,4.80,4.80,0 +-14.40,4.80,9.55,0.00,1.00,4.80,-4.80,0 +-9.60,4.80,9.57,0.00,1.00,0.00,4.80,0 +-4.80,0.00,9.59,0.00,1.00,0.00,-0.00,0 +0.00,0.00,9.61,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,9.63,0.00,1.00,-4.80,-0.00,0 +9.60,-4.80,9.66,0.00,1.00,-4.80,4.80,0 +14.40,-4.80,9.68,0.00,1.00,-9.60,-4.80,0 +19.20,-9.60,9.70,0.00,1.00,-9.60,4.80,0 +19.20,-9.60,9.72,0.00,1.00,-14.40,-4.80,0 +24.00,-14.40,9.74,0.00,1.00,-19.20,9.60,0 +28.80,-14.40,9.76,0.00,1.00,-19.20,-9.60,0 +33.60,-19.20,9.78,0.00,1.00,-24.00,9.60,0 +38.40,-19.20,9.81,0.00,1.00,-28.80,-9.60,0 +43.20,-19.20,9.83,0.00,1.00,-33.60,9.60,0 +48.00,-24.00,9.85,0.00,1.00,-38.40,-14.40,0 +52.80,-24.00,9.87,0.00,1.00,-43.20,14.40,0 +57.60,-24.00,9.89,0.00,1.00,-48.00,-14.40,0 +62.40,-24.00,9.91,0.00,1.00,-52.80,14.40,0 +72.00,-28.80,9.93,0.00,1.00,-62.40,-14.40,0 +76.80,-28.80,9.95,0.00,1.00,-72.00,14.40,0 +81.60,-28.80,9.98,0.00,1.00,-81.60,-14.40,0 +86.40,-28.80,10.00,0.00,1.00,-91.20,14.40,0 +91.20,-28.80,10.02,0.00,1.00,-100.80,-14.40,0 +96.00,-28.80,10.04,0.00,1.00,-110.40,14.40,0 +100.80,-28.80,10.06,0.00,1.00,-120.00,-14.40,0 +105.60,-28.80,10.08,0.00,1.00,-129.60,14.40,0 +115.20,-28.80,10.10,0.00,1.00,-134.40,-14.40,0 +120.00,-24.00,10.13,0.00,1.00,-139.20,14.40,0 +124.80,-24.00,10.15,0.00,1.00,-144.00,-14.40,0 +129.60,-24.00,10.17,0.00,1.00,-148.80,14.40,0 +134.40,-24.00,10.19,0.00,1.00,-153.60,-14.40,0 +139.20,-19.20,10.21,0.00,1.00,-158.40,9.60,0 +144.00,-19.20,10.23,0.00,1.00,-163.20,-9.60,0 +148.80,-14.40,10.25,0.00,1.00,-163.20,9.60,0 +153.60,-14.40,10.28,0.00,1.00,-168.00,-9.60,0 +158.40,-14.40,10.30,0.00,1.00,-168.00,4.80,0 +163.20,-9.60,10.32,0.00,1.00,-172.80,-4.80,0 +163.20,-9.60,10.34,0.00,1.00,-172.80,4.80,0 +168.00,-4.80,10.36,0.00,1.00,-177.60,-4.80,0 +172.80,-4.80,10.38,0.00,1.00,-177.60,0.00,0 +177.60,-0.00,10.40,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,10.42,0.00,1.00,177.60,-0.00,0 +-172.80,4.80,10.45,0.00,1.00,172.80,0.00,0 +-168.00,4.80,10.47,0.00,1.00,172.80,-4.80,0 +-163.20,9.60,10.49,0.00,1.00,168.00,4.80,0 +-163.20,9.60,10.51,0.00,1.00,168.00,-4.80,0 +-158.40,14.40,10.53,0.00,1.00,163.20,4.80,0 +-153.60,14.40,10.55,0.00,1.00,163.20,-9.60,0 +-148.80,14.40,10.57,0.00,1.00,158.40,9.60,0 +-144.00,19.20,10.60,0.00,1.00,153.60,-9.60,0 +-139.20,19.20,10.62,0.00,1.00,148.80,9.60,0 +-134.40,24.00,10.64,0.00,1.00,144.00,-14.40,0 +-129.60,24.00,10.66,0.00,1.00,139.20,14.40,0 +-124.80,24.00,10.68,0.00,1.00,134.40,-14.40,0 +-120.00,24.00,10.70,0.00,1.00,129.60,14.40,0 +-115.20,28.80,10.72,0.00,1.00,120.00,-14.40,0 +-105.60,28.80,10.74,0.00,1.00,110.40,14.40,0 +-100.80,28.80,10.77,0.00,1.00,100.80,-14.40,0 +-96.00,28.80,10.79,0.00,1.00,91.20,14.40,0 +-91.20,28.80,10.81,0.00,1.00,81.60,-14.40,0 +-86.40,28.80,10.83,0.00,1.00,72.00,14.40,0 +-81.60,28.80,10.85,0.00,1.00,62.40,-14.40,0 +-76.80,28.80,10.87,0.00,1.00,52.80,14.40,0 +-72.00,28.80,10.89,0.00,1.00,48.00,-14.40,0 +-62.40,24.00,10.92,0.00,1.00,43.20,14.40,0 +-57.60,24.00,10.94,0.00,1.00,38.40,-14.40,0 +-52.80,24.00,10.96,0.00,1.00,33.60,14.40,0 +-48.00,24.00,10.98,0.00,1.00,28.80,-14.40,0 +-43.20,19.20,11.00,0.00,1.00,24.00,9.60,0 +-38.40,19.20,11.02,0.00,1.00,19.20,-9.60,0 +-33.60,19.20,11.04,0.00,1.00,19.20,9.60,0 +-28.80,14.40,11.07,0.00,1.00,14.40,-9.60,0 +-24.00,14.40,11.09,0.00,1.00,9.60,9.60,0 +-19.20,9.60,11.11,0.00,1.00,9.60,-4.80,0 +-19.20,9.60,11.13,0.00,1.00,4.80,4.80,0 +-14.40,4.80,11.15,0.00,1.00,4.80,-4.80,0 +-9.60,4.80,11.17,0.00,1.00,0.00,4.80,0 +-4.80,0.00,11.19,0.00,1.00,0.00,-0.00,0 +0.00,0.00,11.21,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,11.24,0.00,1.00,-4.80,-0.00,0 +9.60,-4.80,11.26,0.00,1.00,-9.60,0.00,0 +14.40,-9.60,11.28,0.00,1.00,-9.60,-4.80,0 +14.40,-9.60,11.30,0.00,1.00,-14.40,4.80,0 +19.20,-14.40,11.32,0.00,1.00,-14.40,-4.80,0 +24.00,-14.40,11.34,0.00,1.00,-19.20,4.80,0 +28.80,-19.20,11.36,0.00,1.00,-24.00,-4.80,0 +33.60,-19.20,11.39,0.00,1.00,-28.80,4.80,0 +38.40,-24.00,11.41,0.00,1.00,-28.80,-9.60,0 +43.20,-24.00,11.43,0.00,1.00,-33.60,9.60,0 +48.00,-24.00,11.45,0.00,1.00,-38.40,-9.60,0 +52.80,-28.80,11.47,0.00,1.00,-48.00,9.60,0 +57.60,-28.80,11.49,0.00,1.00,-52.80,-9.60,0 +62.40,-28.80,11.51,0.00,1.00,-57.60,9.60,0 +67.20,-33.60,11.54,0.00,1.00,-67.20,-9.60,0 +72.00,-33.60,11.56,0.00,1.00,-76.80,9.60,0 +81.60,-33.60,11.58,0.00,1.00,-81.60,-9.60,0 +86.40,-33.60,11.60,0.00,1.00,-91.20,9.60,0 +91.20,-33.60,11.62,0.00,1.00,-100.80,-9.60,0 +96.00,-33.60,11.64,0.00,1.00,-110.40,9.60,0 +100.80,-33.60,11.66,0.00,1.00,-115.20,-9.60,0 +110.40,-33.60,11.68,0.00,1.00,-124.80,9.60,0 +115.20,-33.60,11.71,0.00,1.00,-129.60,-9.60,0 +120.00,-28.80,11.73,0.00,1.00,-139.20,9.60,0 +124.80,-28.80,11.75,0.00,1.00,-144.00,-9.60,0 +129.60,-28.80,11.77,0.00,1.00,-148.80,9.60,0 +134.40,-24.00,11.79,0.00,1.00,-153.60,-9.60,0 +139.20,-24.00,11.81,0.00,1.00,-153.60,9.60,0 +144.00,-19.20,11.83,0.00,1.00,-158.40,-9.60,0 +148.80,-19.20,11.86,0.00,1.00,-163.20,4.80,0 +153.60,-14.40,11.88,0.00,1.00,-163.20,-4.80,0 +158.40,-14.40,11.90,0.00,1.00,-168.00,4.80,0 +163.20,-9.60,11.92,0.00,1.00,-172.80,-4.80,0 +168.00,-9.60,11.94,0.00,1.00,-172.80,4.80,0 +168.00,-4.80,11.96,0.00,1.00,-177.60,-0.00,0 +172.80,-4.80,11.98,0.00,1.00,-177.60,0.00,0 +177.60,-0.00,12.01,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,12.03,0.00,1.00,177.60,-0.00,0 +-172.80,4.80,12.05,0.00,1.00,172.80,0.00,0 +-168.00,4.80,12.07,0.00,1.00,172.80,-0.00,0 +-168.00,9.60,12.09,0.00,1.00,168.00,4.80,0 +-163.20,9.60,12.11,0.00,1.00,163.20,-4.80,0 +-158.40,14.40,12.13,0.00,1.00,163.20,4.80,0 +-153.60,14.40,12.15,0.00,1.00,158.40,-4.80,0 +-148.80,19.20,12.18,0.00,1.00,153.60,4.80,0 +-144.00,19.20,12.20,0.00,1.00,153.60,-9.60,0 +-139.20,24.00,12.22,0.00,1.00,148.80,9.60,0 +-134.40,24.00,12.24,0.00,1.00,144.00,-9.60,0 +-129.60,28.80,12.26,0.00,1.00,139.20,9.60,0 +-124.80,28.80,12.28,0.00,1.00,129.60,-9.60,0 +-120.00,28.80,12.30,0.00,1.00,124.80,9.60,0 +-115.20,33.60,12.33,0.00,1.00,115.20,-9.60,0 +-110.40,33.60,12.35,0.00,1.00,110.40,9.60,0 +-100.80,33.60,12.37,0.00,1.00,100.80,-9.60,0 +-96.00,33.60,12.39,0.00,1.00,91.20,9.60,0 +-91.20,33.60,12.41,0.00,1.00,81.60,-9.60,0 +-86.40,33.60,12.43,0.00,1.00,76.80,9.60,0 +-81.60,33.60,12.45,0.00,1.00,67.20,-9.60,0 +-72.00,33.60,12.48,0.00,1.00,57.60,9.60,0 +-67.20,33.60,12.50,0.00,1.00,52.80,-9.60,0 +-62.40,28.80,12.52,0.00,1.00,48.00,9.60,0 +-57.60,28.80,12.54,0.00,1.00,38.40,-9.60,0 +-52.80,28.80,12.56,0.00,1.00,33.60,9.60,0 +-48.00,24.00,12.58,0.00,1.00,28.80,-9.60,0 +-43.20,24.00,12.60,0.00,1.00,28.80,9.60,0 +-38.40,24.00,12.62,0.00,1.00,24.00,-9.60,0 +-33.60,19.20,12.65,0.00,1.00,19.20,4.80,0 +-28.80,19.20,12.67,0.00,1.00,14.40,-4.80,0 +-24.00,14.40,12.69,0.00,1.00,14.40,4.80,0 +-19.20,14.40,12.71,0.00,1.00,9.60,-4.80,0 +-14.40,9.60,12.73,0.00,1.00,9.60,4.80,0 +-14.40,9.60,12.75,0.00,1.00,4.80,-4.80,0 +-9.60,4.80,12.77,0.00,1.00,4.80,0.00,0 +-4.80,4.80,12.80,0.00,1.00,0.00,-0.00,0 +0.00,0.00,12.82,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,12.84,0.00,1.00,-4.80,-0.00,0 +9.60,-4.80,12.86,0.00,1.00,-9.60,0.00,0 +9.60,-9.60,12.88,0.00,1.00,-9.60,-0.00,0 +14.40,-9.60,12.90,0.00,1.00,-14.40,0.00,0 +19.20,-14.40,12.92,0.00,1.00,-19.20,-4.80,0 +24.00,-19.20,12.95,0.00,1.00,-24.00,4.80,0 +28.80,-19.20,12.97,0.00,1.00,-24.00,-4.80,0 +33.60,-24.00,12.99,0.00,1.00,-28.80,4.80,0 +38.40,-24.00,13.01,0.00,1.00,-33.60,-4.80,0 +43.20,-28.80,13.03,0.00,1.00,-38.40,4.80,0 +48.00,-28.80,13.05,0.00,1.00,-43.20,-4.80,0 +52.80,-33.60,13.07,0.00,1.00,-48.00,4.80,0 +57.60,-33.60,13.09,0.00,1.00,-52.80,-4.80,0 +62.40,-33.60,13.12,0.00,1.00,-62.40,4.80,0 +67.20,-38.40,13.14,0.00,1.00,-67.20,-4.80,0 +72.00,-38.40,13.16,0.00,1.00,-76.80,4.80,0 +81.60,-38.40,13.18,0.00,1.00,-86.40,-4.80,0 +86.40,-38.40,13.20,0.00,1.00,-91.20,4.80,0 +91.20,-38.40,13.22,0.00,1.00,-100.80,-4.80,0 +96.00,-38.40,13.24,0.00,1.00,-105.60,4.80,0 +105.60,-38.40,13.27,0.00,1.00,-115.20,-4.80,0 +110.40,-38.40,13.29,0.00,1.00,-120.00,4.80,0 +115.20,-33.60,13.31,0.00,1.00,-129.60,-4.80,0 +120.00,-33.60,13.33,0.00,1.00,-134.40,4.80,0 +124.80,-33.60,13.35,0.00,1.00,-139.20,-4.80,0 +129.60,-28.80,13.37,0.00,1.00,-144.00,4.80,0 +134.40,-28.80,13.39,0.00,1.00,-148.80,-4.80,0 +139.20,-24.00,13.42,0.00,1.00,-153.60,4.80,0 +144.00,-24.00,13.44,0.00,1.00,-158.40,-4.80,0 +148.80,-19.20,13.46,0.00,1.00,-158.40,4.80,0 +153.60,-19.20,13.48,0.00,1.00,-163.20,-4.80,0 +158.40,-14.40,13.50,0.00,1.00,-168.00,4.80,0 +163.20,-14.40,13.52,0.00,1.00,-168.00,-4.80,0 +168.00,-9.60,13.54,0.00,1.00,-172.80,0.00,0 +172.80,-9.60,13.56,0.00,1.00,-177.60,-0.00,0 +172.80,-4.80,13.59,0.00,1.00,-177.60,0.00,0 +177.60,-0.00,13.61,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,13.63,0.00,1.00,177.60,-0.00,0 +-172.80,4.80,13.65,0.00,1.00,172.80,0.00,0 +-172.80,9.60,13.67,0.00,1.00,168.00,-0.00,0 +-168.00,9.60,13.69,0.00,1.00,168.00,0.00,0 +-163.20,14.40,13.71,0.00,1.00,163.20,-4.80,0 +-158.40,14.40,13.74,0.00,1.00,158.40,4.80,0 +-153.60,19.20,13.76,0.00,1.00,158.40,-4.80,0 +-148.80,19.20,13.78,0.00,1.00,153.60,4.80,0 +-144.00,24.00,13.80,0.00,1.00,148.80,-4.80,0 +-139.20,24.00,13.82,0.00,1.00,144.00,4.80,0 +-134.40,28.80,13.84,0.00,1.00,139.20,-4.80,0 +-129.60,28.80,13.86,0.00,1.00,134.40,4.80,0 +-124.80,33.60,13.89,0.00,1.00,129.60,-4.80,0 +-120.00,33.60,13.91,0.00,1.00,120.00,4.80,0 +-115.20,33.60,13.93,0.00,1.00,115.20,-4.80,0 +-110.40,38.40,13.95,0.00,1.00,105.60,4.80,0 +-105.60,38.40,13.97,0.00,1.00,100.80,-4.80,0 +-96.00,38.40,13.99,0.00,1.00,91.20,4.80,0 +-91.20,38.40,14.01,0.00,1.00,86.40,-4.80,0 +-86.40,38.40,14.03,0.00,1.00,76.80,4.80,0 +-81.60,38.40,14.06,0.00,1.00,67.20,-4.80,0 +-72.00,38.40,14.08,0.00,1.00,62.40,4.80,0 +-67.20,38.40,14.10,0.00,1.00,52.80,-4.80,0 +-62.40,33.60,14.12,0.00,1.00,48.00,4.80,0 +-57.60,33.60,14.14,0.00,1.00,43.20,-4.80,0 +-52.80,33.60,14.16,0.00,1.00,38.40,4.80,0 +-48.00,28.80,14.18,0.00,1.00,33.60,-4.80,0 +-43.20,28.80,14.21,0.00,1.00,28.80,4.80,0 +-38.40,24.00,14.23,0.00,1.00,24.00,-4.80,0 +-33.60,24.00,14.25,0.00,1.00,24.00,4.80,0 +-28.80,19.20,14.27,0.00,1.00,19.20,-4.80,0 +-24.00,19.20,14.29,0.00,1.00,14.40,4.80,0 +-19.20,14.40,14.31,0.00,1.00,9.60,-4.80,0 +-14.40,9.60,14.33,0.00,1.00,9.60,0.00,0 +-9.60,9.60,14.36,0.00,1.00,4.80,-0.00,0 +-9.60,4.80,14.38,0.00,1.00,4.80,0.00,0 +-4.80,4.80,14.40,0.00,1.00,0.00,-0.00,0 +0.00,0.00,14.42,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,14.44,0.00,1.00,-4.80,-0.00,0 +4.80,-4.80,14.46,0.00,1.00,-9.60,0.00,0 +9.60,-9.60,14.48,0.00,1.00,-14.40,-0.00,0 +14.40,-14.40,14.50,0.00,1.00,-14.40,0.00,0 +19.20,-14.40,14.53,0.00,1.00,-19.20,-0.00,0 +24.00,-19.20,14.55,0.00,1.00,-24.00,0.00,0 +24.00,-24.00,14.57,0.00,1.00,-28.80,-0.00,0 +28.80,-24.00,14.59,0.00,1.00,-33.60,0.00,0 +33.60,-28.80,14.61,0.00,1.00,-38.40,-0.00,0 +38.40,-28.80,14.63,0.00,1.00,-43.20,0.00,0 +43.20,-33.60,14.65,0.00,1.00,-48.00,-0.00,0 +48.00,-33.60,14.68,0.00,1.00,-52.80,0.00,0 +52.80,-38.40,14.70,0.00,1.00,-57.60,-0.00,0 +62.40,-38.40,14.72,0.00,1.00,-62.40,0.00,0 +67.20,-38.40,14.74,0.00,1.00,-72.00,-0.00,0 +72.00,-43.20,14.76,0.00,1.00,-76.80,0.00,0 +76.80,-43.20,14.78,0.00,1.00,-86.40,-0.00,0 +86.40,-43.20,14.80,0.00,1.00,-91.20,0.00,0 +91.20,-43.20,14.83,0.00,1.00,-100.80,-0.00,0 +96.00,-43.20,14.85,0.00,1.00,-105.60,0.00,0 +105.60,-43.20,14.87,0.00,1.00,-110.40,-0.00,0 +110.40,-43.20,14.89,0.00,1.00,-120.00,0.00,0 +115.20,-38.40,14.91,0.00,1.00,-124.80,-0.00,0 +124.80,-38.40,14.93,0.00,1.00,-129.60,0.00,0 +129.60,-38.40,14.95,0.00,1.00,-134.40,-0.00,0 +134.40,-33.60,14.97,0.00,1.00,-139.20,0.00,0 +139.20,-33.60,15.00,0.00,1.00,-144.00,-0.00,0 +144.00,-28.80,15.02,0.00,1.00,-148.80,0.00,0 +148.80,-28.80,15.04,0.00,1.00,-153.60,-0.00,0 +153.60,-24.00,15.06,0.00,1.00,-158.40,0.00,0 +158.40,-19.20,15.08,0.00,1.00,-163.20,-0.00,0 +158.40,-19.20,15.10,0.00,1.00,-163.20,0.00,0 +163.20,-14.40,15.12,0.00,1.00,-168.00,-0.00,0 +168.00,-9.60,15.15,0.00,1.00,-172.80,0.00,0 +172.80,-9.60,15.17,0.00,1.00,-172.80,-0.00,0 +172.80,-4.80,15.19,0.00,1.00,-177.60,0.00,0 +177.60,-0.00,15.21,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,15.23,0.00,1.00,172.80,-0.00,0 +-172.80,4.80,15.25,0.00,1.00,172.80,0.00,0 +-172.80,9.60,15.27,0.00,1.00,168.00,-0.00,0 +-168.00,9.60,15.30,0.00,1.00,163.20,0.00,0 +-163.20,14.40,15.32,0.00,1.00,163.20,-0.00,0 +-158.40,19.20,15.34,0.00,1.00,158.40,0.00,0 +-158.40,19.20,15.36,0.00,1.00,153.60,-0.00,0 +-153.60,24.00,15.38,0.00,1.00,148.80,0.00,0 +-148.80,28.80,15.40,0.00,1.00,144.00,-0.00,0 +-144.00,28.80,15.42,0.00,1.00,139.20,0.00,0 +-139.20,33.60,15.44,0.00,1.00,134.40,-0.00,0 +-134.40,33.60,15.47,0.00,1.00,129.60,0.00,0 +-129.60,38.40,15.49,0.00,1.00,124.80,-0.00,0 +-124.80,38.40,15.51,0.00,1.00,120.00,0.00,0 +-115.20,38.40,15.53,0.00,1.00,110.40,-0.00,0 +-110.40,43.20,15.55,0.00,1.00,105.60,0.00,0 +-105.60,43.20,15.57,0.00,1.00,100.80,-0.00,0 +-96.00,43.20,15.59,0.00,1.00,91.20,0.00,0 +-91.20,43.20,15.62,0.00,1.00,86.40,-0.00,0 +-86.40,43.20,15.64,0.00,1.00,76.80,0.00,0 +-76.80,43.20,15.66,0.00,1.00,72.00,-0.00,0 +-72.00,43.20,15.68,0.00,1.00,62.40,0.00,0 +-67.20,38.40,15.70,0.00,1.00,57.60,-0.00,0 +-62.40,38.40,15.72,0.00,1.00,52.80,0.00,0 +-52.80,38.40,15.74,0.00,1.00,48.00,-0.00,0 +-48.00,33.60,15.77,0.00,1.00,43.20,0.00,0 +-43.20,33.60,15.79,0.00,1.00,38.40,-0.00,0 +-38.40,28.80,15.81,0.00,1.00,33.60,0.00,0 +-33.60,28.80,15.83,0.00,1.00,28.80,-0.00,0 +-28.80,24.00,15.85,0.00,1.00,24.00,0.00,0 +-24.00,24.00,15.87,0.00,1.00,19.20,-0.00,0 +-24.00,19.20,15.89,0.00,1.00,14.40,0.00,0 +-19.20,14.40,15.91,0.00,1.00,14.40,-0.00,0 +-14.40,14.40,15.94,0.00,1.00,9.60,0.00,0 +-9.60,9.60,15.96,0.00,1.00,4.80,-0.00,0 +-4.80,4.80,15.98,0.00,1.00,4.80,0.00,0 +-4.80,4.80,16.00,0.00,1.00,0.00,-0.00,0 +0.00,0.00,16.00,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,15.98,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,15.96,0.00,1.00,-9.60,-0.00,0 +9.60,-9.60,15.94,0.00,1.00,-14.40,0.00,0 +14.40,-14.40,15.91,0.00,1.00,-19.20,-0.00,0 +14.40,-19.20,15.89,0.00,1.00,-24.00,0.00,0 +19.20,-19.20,15.87,0.00,1.00,-24.00,-0.00,0 +24.00,-24.00,15.85,0.00,1.00,-28.80,0.00,0 +28.80,-28.80,15.83,0.00,1.00,-33.60,-0.00,0 +33.60,-28.80,15.81,0.00,1.00,-38.40,0.00,0 +38.40,-33.60,15.79,0.00,1.00,-43.20,-0.00,0 +43.20,-38.40,15.77,0.00,1.00,-48.00,0.00,0 +48.00,-38.40,15.74,0.00,1.00,-52.80,-4.80,0 +52.80,-43.20,15.72,0.00,1.00,-62.40,4.80,0 +57.60,-43.20,15.70,0.00,1.00,-67.20,-4.80,0 +62.40,-43.20,15.68,0.00,1.00,-72.00,4.80,0 +72.00,-48.00,15.66,0.00,1.00,-76.80,-4.80,0 +76.80,-48.00,15.64,0.00,1.00,-86.40,4.80,0 +86.40,-48.00,15.62,0.00,1.00,-91.20,-4.80,0 +91.20,-48.00,15.59,0.00,1.00,-96.00,4.80,0 +100.80,-48.00,15.57,0.00,1.00,-105.60,-4.80,0 +105.60,-48.00,15.55,0.00,1.00,-110.40,4.80,0 +110.40,-48.00,15.53,0.00,1.00,-115.20,-4.80,0 +120.00,-43.20,15.51,0.00,1.00,-124.80,4.80,0 +124.80,-43.20,15.49,0.00,1.00,-129.60,-4.80,0 +129.60,-38.40,15.47,0.00,1.00,-134.40,4.80,0 +134.40,-38.40,15.44,0.00,1.00,-139.20,-4.80,0 +139.20,-33.60,15.42,0.00,1.00,-144.00,0.00,0 +144.00,-33.60,15.40,0.00,1.00,-148.80,-0.00,0 +148.80,-28.80,15.38,0.00,1.00,-153.60,0.00,0 +153.60,-24.00,15.36,0.00,1.00,-158.40,-0.00,0 +158.40,-24.00,15.34,0.00,1.00,-158.40,0.00,0 +163.20,-19.20,15.32,0.00,1.00,-163.20,-0.00,0 +163.20,-14.40,15.30,0.00,1.00,-168.00,0.00,0 +168.00,-14.40,15.27,0.00,1.00,-172.80,-0.00,0 +172.80,-9.60,15.25,0.00,1.00,-172.80,0.00,0 +172.80,-4.80,15.23,0.00,1.00,-177.60,-0.00,0 +177.60,-0.00,15.21,0.00,1.00,177.60,0.00,0 +-177.60,0.00,15.19,0.00,1.00,172.80,0.00,0 +-172.80,4.80,15.17,0.00,1.00,172.80,-0.00,0 +-172.80,9.60,15.15,0.00,1.00,168.00,0.00,0 +-168.00,14.40,15.12,0.00,1.00,163.20,-0.00,0 +-163.20,14.40,15.10,0.00,1.00,158.40,0.00,0 +-163.20,19.20,15.08,0.00,1.00,158.40,-0.00,0 +-158.40,24.00,15.06,0.00,1.00,153.60,0.00,0 +-153.60,24.00,15.04,0.00,1.00,148.80,-0.00,0 +-148.80,28.80,15.02,0.00,1.00,144.00,0.00,0 +-144.00,33.60,15.00,0.00,1.00,139.20,-0.00,0 +-139.20,33.60,14.97,0.00,1.00,134.40,0.00,0 +-134.40,38.40,14.95,0.00,1.00,129.60,-4.80,0 +-129.60,38.40,14.93,0.00,1.00,124.80,4.80,0 +-124.80,43.20,14.91,0.00,1.00,115.20,-4.80,0 +-120.00,43.20,14.89,0.00,1.00,110.40,4.80,0 +-110.40,48.00,14.87,0.00,1.00,105.60,-4.80,0 +-105.60,48.00,14.85,0.00,1.00,96.00,4.80,0 +-100.80,48.00,14.83,0.00,1.00,91.20,-4.80,0 +-91.20,48.00,14.80,0.00,1.00,86.40,4.80,0 +-86.40,48.00,14.78,0.00,1.00,76.80,-4.80,0 +-76.80,48.00,14.76,0.00,1.00,72.00,4.80,0 +-72.00,48.00,14.74,0.00,1.00,67.20,-4.80,0 +-62.40,43.20,14.72,0.00,1.00,62.40,4.80,0 +-57.60,43.20,14.70,0.00,1.00,52.80,-4.80,0 +-52.80,43.20,14.68,0.00,1.00,48.00,4.80,0 +-48.00,38.40,14.65,0.00,1.00,43.20,-4.80,0 +-43.20,38.40,14.63,0.00,1.00,38.40,0.00,0 +-38.40,33.60,14.61,0.00,1.00,33.60,-0.00,0 +-33.60,28.80,14.59,0.00,1.00,28.80,0.00,0 +-28.80,28.80,14.57,0.00,1.00,24.00,-0.00,0 +-24.00,24.00,14.55,0.00,1.00,24.00,0.00,0 +-19.20,19.20,14.53,0.00,1.00,19.20,-0.00,0 +-14.40,19.20,14.50,0.00,1.00,14.40,0.00,0 +-14.40,14.40,14.48,0.00,1.00,9.60,-0.00,0 +-9.60,9.60,14.46,0.00,1.00,4.80,0.00,0 +-4.80,4.80,14.44,0.00,1.00,4.80,-0.00,0 +-4.80,4.80,14.42,0.00,1.00,0.00,0.00,0 +0.00,0.00,14.40,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,14.38,0.00,1.00,-9.60,0.00,0 +4.80,-9.60,14.36,0.00,1.00,-9.60,-0.00,0 +9.60,-9.60,14.33,0.00,1.00,-14.40,0.00,0 +9.60,-14.40,14.31,0.00,1.00,-19.20,-4.80,0 +14.40,-19.20,14.29,0.00,1.00,-24.00,4.80,0 +19.20,-24.00,14.27,0.00,1.00,-28.80,-4.80,0 +24.00,-24.00,14.25,0.00,1.00,-33.60,4.80,0 +24.00,-28.80,14.23,0.00,1.00,-38.40,-4.80,0 +28.80,-33.60,14.21,0.00,1.00,-43.20,4.80,0 +33.60,-38.40,14.18,0.00,1.00,-48.00,-4.80,0 +38.40,-38.40,14.16,0.00,1.00,-52.80,4.80,0 +43.20,-43.20,14.14,0.00,1.00,-57.60,-4.80,0 +48.00,-43.20,14.12,0.00,1.00,-62.40,4.80,0 +52.80,-48.00,14.10,0.00,1.00,-67.20,-4.80,0 +62.40,-48.00,14.08,0.00,1.00,-72.00,9.60,0 +67.20,-52.80,14.06,0.00,1.00,-81.60,-9.60,0 +76.80,-52.80,14.03,0.00,1.00,-86.40,9.60,0 +86.40,-52.80,14.01,0.00,1.00,-91.20,-9.60,0 +91.20,-52.80,13.99,0.00,1.00,-96.00,9.60,0 +100.80,-52.80,13.97,0.00,1.00,-105.60,-9.60,0 +105.60,-52.80,13.95,0.00,1.00,-110.40,9.60,0 +115.20,-48.00,13.93,0.00,1.00,-115.20,-9.60,0 +120.00,-48.00,13.91,0.00,1.00,-120.00,9.60,0 +129.60,-48.00,13.89,0.00,1.00,-124.80,-4.80,0 +134.40,-43.20,13.86,0.00,1.00,-129.60,4.80,0 +139.20,-43.20,13.84,0.00,1.00,-134.40,-4.80,0 +144.00,-38.40,13.82,0.00,1.00,-139.20,4.80,0 +148.80,-33.60,13.80,0.00,1.00,-144.00,-4.80,0 +153.60,-33.60,13.78,0.00,1.00,-148.80,4.80,0 +158.40,-28.80,13.76,0.00,1.00,-153.60,-4.80,0 +158.40,-24.00,13.74,0.00,1.00,-158.40,4.80,0 +163.20,-19.20,13.71,0.00,1.00,-163.20,-4.80,0 +168.00,-19.20,13.69,0.00,1.00,-168.00,4.80,0 +168.00,-14.40,13.67,0.00,1.00,-172.80,-0.00,0 +172.80,-9.60,13.65,0.00,1.00,-172.80,0.00,0 +177.60,-4.80,13.63,0.00,1.00,-177.60,-0.00,0 +177.60,-0.00,13.61,0.00,1.00,177.60,0.00,0 +-177.60,0.00,13.59,0.00,1.00,172.80,0.00,0 +-177.60,4.80,13.56,0.00,1.00,172.80,-0.00,0 +-172.80,9.60,13.54,0.00,1.00,168.00,0.00,0 +-168.00,14.40,13.52,0.00,1.00,163.20,-0.00,0 +-168.00,19.20,13.50,0.00,1.00,158.40,4.80,0 +-163.20,19.20,13.48,0.00,1.00,153.60,-4.80,0 +-158.40,24.00,13.46,0.00,1.00,148.80,4.80,0 +-158.40,28.80,13.44,0.00,1.00,144.00,-4.80,0 +-153.60,33.60,13.42,0.00,1.00,139.20,4.80,0 +-148.80,33.60,13.39,0.00,1.00,134.40,-4.80,0 +-144.00,38.40,13.37,0.00,1.00,129.60,4.80,0 +-139.20,43.20,13.35,0.00,1.00,124.80,-4.80,0 +-134.40,43.20,13.33,0.00,1.00,120.00,4.80,0 +-129.60,48.00,13.31,0.00,1.00,115.20,-4.80,0 +-120.00,48.00,13.29,0.00,1.00,110.40,9.60,0 +-115.20,48.00,13.27,0.00,1.00,105.60,-9.60,0 +-105.60,52.80,13.24,0.00,1.00,96.00,9.60,0 +-100.80,52.80,13.22,0.00,1.00,91.20,-9.60,0 +-91.20,52.80,13.20,0.00,1.00,86.40,9.60,0 +-86.40,52.80,13.18,0.00,1.00,81.60,-9.60,0 +-76.80,52.80,13.16,0.00,1.00,72.00,9.60,0 +-67.20,52.80,13.14,0.00,1.00,67.20,-9.60,0 +-62.40,48.00,13.12,0.00,1.00,62.40,9.60,0 +-52.80,48.00,13.09,0.00,1.00,57.60,-4.80,0 +-48.00,43.20,13.07,0.00,1.00,52.80,4.80,0 +-43.20,43.20,13.05,0.00,1.00,48.00,-4.80,0 +-38.40,38.40,13.03,0.00,1.00,43.20,4.80,0 +-33.60,38.40,13.01,0.00,1.00,38.40,-4.80,0 +-28.80,33.60,12.99,0.00,1.00,33.60,4.80,0 +-24.00,28.80,12.97,0.00,1.00,28.80,-4.80,0 +-24.00,24.00,12.95,0.00,1.00,24.00,4.80,0 +-19.20,24.00,12.92,0.00,1.00,19.20,-4.80,0 +-14.40,19.20,12.90,0.00,1.00,14.40,4.80,0 +-9.60,14.40,12.88,0.00,1.00,9.60,-4.80,0 +-9.60,9.60,12.86,0.00,1.00,9.60,0.00,0 +-4.80,9.60,12.84,0.00,1.00,4.80,-0.00,0 +-4.80,4.80,12.82,0.00,1.00,0.00,0.00,0 +0.00,0.00,12.80,0.00,1.00,-4.80,0.00,0 +4.80,-4.80,12.77,0.00,1.00,-9.60,0.00,0 +4.80,-9.60,12.75,0.00,1.00,-14.40,-0.00,0 +9.60,-14.40,12.73,0.00,1.00,-14.40,4.80,0 +9.60,-14.40,12.71,0.00,1.00,-19.20,-4.80,0 +14.40,-19.20,12.69,0.00,1.00,-24.00,4.80,0 +14.40,-24.00,12.67,0.00,1.00,-28.80,-4.80,0 +19.20,-28.80,12.65,0.00,1.00,-33.60,4.80,0 +24.00,-33.60,12.62,0.00,1.00,-38.40,-9.60,0 +28.80,-33.60,12.60,0.00,1.00,-43.20,9.60,0 +28.80,-38.40,12.58,0.00,1.00,-48.00,-9.60,0 +33.60,-43.20,12.56,0.00,1.00,-52.80,9.60,0 +38.40,-43.20,12.54,0.00,1.00,-57.60,-9.60,0 +48.00,-48.00,12.52,0.00,1.00,-62.40,9.60,0 +52.80,-52.80,12.50,0.00,1.00,-67.20,-9.60,0 +57.60,-52.80,12.48,0.00,1.00,-72.00,9.60,0 +67.20,-57.60,12.45,0.00,1.00,-81.60,-14.40,0 +76.80,-57.60,12.43,0.00,1.00,-86.40,14.40,0 +81.60,-57.60,12.41,0.00,1.00,-91.20,-14.40,0 +91.20,-57.60,12.39,0.00,1.00,-96.00,14.40,0 +100.80,-57.60,12.37,0.00,1.00,-100.80,-14.40,0 +110.40,-57.60,12.35,0.00,1.00,-110.40,14.40,0 +115.20,-52.80,12.33,0.00,1.00,-115.20,-14.40,0 +124.80,-52.80,12.30,0.00,1.00,-120.00,9.60,0 +129.60,-48.00,12.28,0.00,1.00,-124.80,-9.60,0 +139.20,-48.00,12.26,0.00,1.00,-129.60,9.60,0 +144.00,-43.20,12.24,0.00,1.00,-134.40,-9.60,0 +148.80,-38.40,12.22,0.00,1.00,-139.20,9.60,0 +153.60,-38.40,12.20,0.00,1.00,-144.00,-9.60,0 +153.60,-33.60,12.18,0.00,1.00,-148.80,9.60,0 +158.40,-28.80,12.15,0.00,1.00,-153.60,-9.60,0 +163.20,-24.00,12.13,0.00,1.00,-158.40,4.80,0 +163.20,-24.00,12.11,0.00,1.00,-163.20,-4.80,0 +168.00,-19.20,12.09,0.00,1.00,-168.00,4.80,0 +172.80,-14.40,12.07,0.00,1.00,-168.00,-4.80,0 +172.80,-9.60,12.05,0.00,1.00,-172.80,4.80,0 +177.60,-4.80,12.03,0.00,1.00,-177.60,-0.00,0 +177.60,-0.00,12.01,0.00,1.00,177.60,0.00,0 +-177.60,0.00,11.98,0.00,1.00,172.80,0.00,0 +-177.60,4.80,11.96,0.00,1.00,168.00,-0.00,0 +-172.80,9.60,11.94,0.00,1.00,168.00,4.80,0 +-172.80,14.40,11.92,0.00,1.00,163.20,-4.80,0 +-168.00,19.20,11.90,0.00,1.00,158.40,4.80,0 +-163.20,24.00,11.88,0.00,1.00,153.60,-4.80,0 +-163.20,24.00,11.86,0.00,1.00,148.80,4.80,0 +-158.40,28.80,11.83,0.00,1.00,144.00,-9.60,0 +-153.60,33.60,11.81,0.00,1.00,139.20,9.60,0 +-153.60,38.40,11.79,0.00,1.00,134.40,-9.60,0 +-148.80,38.40,11.77,0.00,1.00,129.60,9.60,0 +-144.00,43.20,11.75,0.00,1.00,124.80,-9.60,0 +-139.20,48.00,11.73,0.00,1.00,120.00,9.60,0 +-129.60,48.00,11.71,0.00,1.00,115.20,-9.60,0 +-124.80,52.80,11.68,0.00,1.00,110.40,9.60,0 +-115.20,52.80,11.66,0.00,1.00,100.80,-14.40,0 +-110.40,57.60,11.64,0.00,1.00,96.00,14.40,0 +-100.80,57.60,11.62,0.00,1.00,91.20,-14.40,0 +-91.20,57.60,11.60,0.00,1.00,86.40,14.40,0 +-81.60,57.60,11.58,0.00,1.00,81.60,-14.40,0 +-76.80,57.60,11.56,0.00,1.00,72.00,14.40,0 +-67.20,57.60,11.54,0.00,1.00,67.20,-14.40,0 +-57.60,52.80,11.51,0.00,1.00,62.40,9.60,0 +-52.80,52.80,11.49,0.00,1.00,57.60,-9.60,0 +-48.00,48.00,11.47,0.00,1.00,52.80,9.60,0 +-38.40,43.20,11.45,0.00,1.00,48.00,-9.60,0 +-33.60,43.20,11.43,0.00,1.00,43.20,9.60,0 +-28.80,38.40,11.41,0.00,1.00,38.40,-9.60,0 +-28.80,33.60,11.39,0.00,1.00,33.60,9.60,0 +-24.00,33.60,11.36,0.00,1.00,28.80,-9.60,0 +-19.20,28.80,11.34,0.00,1.00,24.00,4.80,0 +-14.40,24.00,11.32,0.00,1.00,19.20,-4.80,0 +-14.40,19.20,11.30,0.00,1.00,14.40,4.80,0 +-9.60,14.40,11.28,0.00,1.00,14.40,-4.80,0 +-9.60,14.40,11.26,0.00,1.00,9.60,4.80,0 +-4.80,9.60,11.24,0.00,1.00,4.80,-0.00,0 +-4.80,4.80,11.21,0.00,1.00,0.00,0.00,0 +0.00,0.00,11.19,0.00,1.00,-4.80,0.00,0 +0.00,-4.80,11.17,0.00,1.00,-9.60,0.00,0 +4.80,-9.60,11.15,0.00,1.00,-14.40,-4.80,0 +4.80,-14.40,11.13,0.00,1.00,-19.20,4.80,0 +9.60,-19.20,11.11,0.00,1.00,-19.20,-4.80,0 +9.60,-19.20,11.09,0.00,1.00,-24.00,4.80,0 +14.40,-24.00,11.07,0.00,1.00,-28.80,-9.60,0 +19.20,-28.80,11.04,0.00,1.00,-33.60,9.60,0 +19.20,-33.60,11.02,0.00,1.00,-38.40,-9.60,0 +24.00,-38.40,11.00,0.00,1.00,-43.20,9.60,0 +28.80,-43.20,10.98,0.00,1.00,-48.00,-14.40,0 +33.60,-43.20,10.96,0.00,1.00,-52.80,14.40,0 +38.40,-48.00,10.94,0.00,1.00,-57.60,-14.40,0 +43.20,-52.80,10.92,0.00,1.00,-62.40,14.40,0 +48.00,-52.80,10.89,0.00,1.00,-72.00,-14.40,0 +52.80,-57.60,10.87,0.00,1.00,-76.80,14.40,0 +62.40,-57.60,10.85,0.00,1.00,-81.60,-19.20,0 +72.00,-62.40,10.83,0.00,1.00,-86.40,19.20,0 +81.60,-62.40,10.81,0.00,1.00,-91.20,-19.20,0 +91.20,-62.40,10.79,0.00,1.00,-96.00,19.20,0 +100.80,-62.40,10.77,0.00,1.00,-100.80,-19.20,0 +110.40,-62.40,10.74,0.00,1.00,-105.60,19.20,0 +120.00,-57.60,10.72,0.00,1.00,-115.20,-14.40,0 +129.60,-57.60,10.70,0.00,1.00,-120.00,14.40,0 +134.40,-52.80,10.68,0.00,1.00,-124.80,-14.40,0 +139.20,-48.00,10.66,0.00,1.00,-129.60,14.40,0 +144.00,-48.00,10.64,0.00,1.00,-134.40,-14.40,0 +148.80,-43.20,10.62,0.00,1.00,-139.20,14.40,0 +153.60,-38.40,10.60,0.00,1.00,-144.00,-14.40,0 +158.40,-33.60,10.57,0.00,1.00,-148.80,9.60,0 +163.20,-33.60,10.55,0.00,1.00,-153.60,-9.60,0 +163.20,-28.80,10.53,0.00,1.00,-158.40,9.60,0 +168.00,-24.00,10.51,0.00,1.00,-163.20,-9.60,0 +168.00,-19.20,10.49,0.00,1.00,-163.20,4.80,0 +172.80,-14.40,10.47,0.00,1.00,-168.00,-4.80,0 +172.80,-9.60,10.45,0.00,1.00,-172.80,4.80,0 +177.60,-4.80,10.42,0.00,1.00,-177.60,-0.00,0 +177.60,-0.00,10.40,0.00,1.00,177.60,0.00,0 +-177.60,0.00,10.38,0.00,1.00,172.80,0.00,0 +-177.60,4.80,10.36,0.00,1.00,168.00,-0.00,0 +-172.80,9.60,10.34,0.00,1.00,163.20,4.80,0 +-172.80,14.40,10.32,0.00,1.00,163.20,-4.80,0 +-168.00,19.20,10.30,0.00,1.00,158.40,4.80,0 +-168.00,24.00,10.28,0.00,1.00,153.60,-9.60,0 +-163.20,28.80,10.25,0.00,1.00,148.80,9.60,0 +-163.20,33.60,10.23,0.00,1.00,144.00,-9.60,0 +-158.40,33.60,10.21,0.00,1.00,139.20,9.60,0 +-153.60,38.40,10.19,0.00,1.00,134.40,-14.40,0 +-148.80,43.20,10.17,0.00,1.00,129.60,14.40,0 +-144.00,48.00,10.15,0.00,1.00,124.80,-14.40,0 +-139.20,48.00,10.13,0.00,1.00,120.00,14.40,0 +-134.40,52.80,10.10,0.00,1.00,115.20,-14.40,0 +-129.60,57.60,10.08,0.00,1.00,105.60,14.40,0 +-120.00,57.60,10.06,0.00,1.00,100.80,-14.40,0 +-110.40,62.40,10.04,0.00,1.00,96.00,19.20,0 +-100.80,62.40,10.02,0.00,1.00,91.20,-19.20,0 +-91.20,62.40,10.00,0.00,1.00,86.40,19.20,0 +-81.60,62.40,9.98,0.00,1.00,81.60,-19.20,0 +-72.00,62.40,9.95,0.00,1.00,76.80,19.20,0 +-62.40,57.60,9.93,0.00,1.00,72.00,-19.20,0 +-52.80,57.60,9.91,0.00,1.00,62.40,14.40,0 +-48.00,52.80,9.89,0.00,1.00,57.60,-14.40,0 +-43.20,52.80,9.87,0.00,1.00,52.80,14.40,0 +-38.40,48.00,9.85,0.00,1.00,48.00,-14.40,0 +-33.60,43.20,9.83,0.00,1.00,43.20,14.40,0 +-28.80,43.20,9.81,0.00,1.00,38.40,-14.40,0 +-24.00,38.40,9.78,0.00,1.00,33.60,9.60,0 +-19.20,33.60,9.76,0.00,1.00,28.80,-9.60,0 +-19.20,28.80,9.74,0.00,1.00,24.00,9.60,0 +-14.40,24.00,9.72,0.00,1.00,19.20,-9.60,0 +-9.60,19.20,9.70,0.00,1.00,19.20,4.80,0 +-9.60,19.20,9.68,0.00,1.00,14.40,-4.80,0 +-4.80,14.40,9.66,0.00,1.00,9.60,4.80,0 +-4.80,9.60,9.63,0.00,1.00,4.80,-4.80,0 +-0.00,4.80,9.61,0.00,1.00,0.00,0.00,0 +0.00,0.00,9.59,0.00,1.00,-4.80,0.00,0 +0.00,-4.80,9.57,0.00,1.00,-9.60,0.00,0 +4.80,-9.60,9.55,0.00,1.00,-14.40,-4.80,0 +4.80,-14.40,9.53,0.00,1.00,-19.20,4.80,0 +9.60,-19.20,9.51,0.00,1.00,-24.00,-4.80,0 +9.60,-24.00,9.48,0.00,1.00,-28.80,9.60,0 +14.40,-24.00,9.46,0.00,1.00,-33.60,-9.60,0 +14.40,-28.80,9.44,0.00,1.00,-33.60,14.40,0 +19.20,-33.60,9.42,0.00,1.00,-38.40,-14.40,0 +19.20,-38.40,9.40,0.00,1.00,-43.20,14.40,0 +24.00,-43.20,9.38,0.00,1.00,-48.00,-14.40,0 +28.80,-48.00,9.36,0.00,1.00,-57.60,19.20,0 +33.60,-52.80,9.34,0.00,1.00,-62.40,-19.20,0 +38.40,-52.80,9.31,0.00,1.00,-67.20,19.20,0 +43.20,-57.60,9.29,0.00,1.00,-72.00,-19.20,0 +48.00,-62.40,9.27,0.00,1.00,-76.80,19.20,0 +57.60,-62.40,9.25,0.00,1.00,-81.60,-19.20,0 +67.20,-67.20,9.23,0.00,1.00,-86.40,24.00,0 +81.60,-67.20,9.21,0.00,1.00,-91.20,-24.00,0 +91.20,-67.20,9.19,0.00,1.00,-96.00,24.00,0 +105.60,-67.20,9.16,0.00,1.00,-100.80,-24.00,0 +115.20,-67.20,9.14,0.00,1.00,-105.60,24.00,0 +124.80,-62.40,9.12,0.00,1.00,-110.40,-19.20,0 +134.40,-57.60,9.10,0.00,1.00,-115.20,19.20,0 +139.20,-57.60,9.08,0.00,1.00,-120.00,-19.20,0 +144.00,-52.80,9.06,0.00,1.00,-129.60,19.20,0 +148.80,-48.00,9.04,0.00,1.00,-134.40,-19.20,0 +153.60,-43.20,9.01,0.00,1.00,-139.20,19.20,0 +158.40,-43.20,8.99,0.00,1.00,-144.00,-14.40,0 +163.20,-38.40,8.97,0.00,1.00,-148.80,14.40,0 +163.20,-33.60,8.95,0.00,1.00,-148.80,-14.40,0 +168.00,-28.80,8.93,0.00,1.00,-153.60,9.60,0 +168.00,-24.00,8.91,0.00,1.00,-158.40,-9.60,0 +172.80,-19.20,8.89,0.00,1.00,-163.20,9.60,0 +172.80,-14.40,8.87,0.00,1.00,-168.00,-4.80,0 +177.60,-9.60,8.84,0.00,1.00,-172.80,4.80,0 +177.60,-4.80,8.82,0.00,1.00,-177.60,-4.80,0 +177.60,-0.00,8.80,0.00,1.00,177.60,0.00,0 +-177.60,0.00,8.78,0.00,1.00,172.80,0.00,0 +-177.60,4.80,8.76,0.00,1.00,168.00,-4.80,0 +-177.60,9.60,8.74,0.00,1.00,163.20,4.80,0 +-172.80,14.40,8.72,0.00,1.00,158.40,-4.80,0 +-172.80,19.20,8.69,0.00,1.00,153.60,9.60,0 +-168.00,24.00,8.67,0.00,1.00,148.80,-9.60,0 +-168.00,28.80,8.65,0.00,1.00,148.80,9.60,0 +-163.20,33.60,8.63,0.00,1.00,144.00,-14.40,0 +-163.20,38.40,8.61,0.00,1.00,139.20,14.40,0 +-158.40,43.20,8.59,0.00,1.00,134.40,-14.40,0 +-153.60,43.20,8.57,0.00,1.00,129.60,19.20,0 +-148.80,48.00,8.54,0.00,1.00,120.00,-19.20,0 +-144.00,52.80,8.52,0.00,1.00,115.20,19.20,0 +-139.20,57.60,8.50,0.00,1.00,110.40,-19.20,0 +-134.40,57.60,8.48,0.00,1.00,105.60,19.20,0 +-124.80,62.40,8.46,0.00,1.00,100.80,-19.20,0 +-115.20,67.20,8.44,0.00,1.00,96.00,24.00,0 +-105.60,67.20,8.42,0.00,1.00,91.20,-24.00,0 +-91.20,67.20,8.40,0.00,1.00,86.40,24.00,0 +-81.60,67.20,8.37,0.00,1.00,81.60,-24.00,0 +-67.20,67.20,8.35,0.00,1.00,76.80,24.00,0 +-57.60,62.40,8.33,0.00,1.00,72.00,-19.20,0 +-48.00,62.40,8.31,0.00,1.00,67.20,19.20,0 +-43.20,57.60,8.29,0.00,1.00,62.40,-19.20,0 +-38.40,52.80,8.27,0.00,1.00,57.60,19.20,0 +-33.60,52.80,8.25,0.00,1.00,48.00,-19.20,0 +-28.80,48.00,8.22,0.00,1.00,43.20,19.20,0 +-24.00,43.20,8.20,0.00,1.00,38.40,-14.40,0 +-19.20,38.40,8.18,0.00,1.00,33.60,14.40,0 +-19.20,33.60,8.16,0.00,1.00,33.60,-14.40,0 +-14.40,28.80,8.14,0.00,1.00,28.80,14.40,0 +-14.40,24.00,8.12,0.00,1.00,24.00,-9.60,0 +-9.60,24.00,8.10,0.00,1.00,19.20,9.60,0 +-9.60,19.20,8.07,0.00,1.00,14.40,-4.80,0 +-4.80,14.40,8.05,0.00,1.00,9.60,4.80,0 +-4.80,9.60,8.03,0.00,1.00,4.80,-4.80,0 +-0.00,4.80,8.01,0.00,1.00,0.00,0.00,0 +0.00,0.00,7.99,0.00,1.00,-4.80,0.00,0 +0.00,-4.80,7.97,0.00,1.00,-9.60,0.00,0 +4.80,-9.60,7.95,0.00,1.00,-14.40,-4.80,0 +4.80,-14.40,7.93,0.00,1.00,-19.20,4.80,0 +4.80,-19.20,7.90,0.00,1.00,-24.00,-9.60,0 +9.60,-24.00,7.88,0.00,1.00,-28.80,9.60,0 +9.60,-28.80,7.86,0.00,1.00,-33.60,-14.40,0 +9.60,-33.60,7.84,0.00,1.00,-38.40,14.40,0 +14.40,-38.40,7.82,0.00,1.00,-43.20,-14.40,0 +14.40,-38.40,7.80,0.00,1.00,-48.00,19.20,0 +19.20,-43.20,7.78,0.00,1.00,-52.80,-19.20,0 +24.00,-48.00,7.75,0.00,1.00,-57.60,19.20,0 +24.00,-52.80,7.73,0.00,1.00,-62.40,-24.00,0 +28.80,-57.60,7.71,0.00,1.00,-67.20,24.00,0 +38.40,-62.40,7.69,0.00,1.00,-72.00,-24.00,0 +43.20,-62.40,7.67,0.00,1.00,-76.80,24.00,0 +52.80,-67.20,7.65,0.00,1.00,-81.60,-24.00,0 +62.40,-72.00,7.63,0.00,1.00,-86.40,28.80,0 +76.80,-72.00,7.60,0.00,1.00,-91.20,-28.80,0 +96.00,-72.00,7.58,0.00,1.00,-96.00,28.80,0 +110.40,-72.00,7.56,0.00,1.00,-100.80,-28.80,0 +120.00,-67.20,7.54,0.00,1.00,-105.60,28.80,0 +134.40,-67.20,7.52,0.00,1.00,-110.40,-24.00,0 +139.20,-62.40,7.50,0.00,1.00,-115.20,24.00,0 +148.80,-57.60,7.48,0.00,1.00,-120.00,-24.00,0 +153.60,-57.60,7.46,0.00,1.00,-124.80,24.00,0 +158.40,-52.80,7.43,0.00,1.00,-129.60,-24.00,0 +158.40,-48.00,7.41,0.00,1.00,-134.40,19.20,0 +163.20,-43.20,7.39,0.00,1.00,-139.20,-19.20,0 +163.20,-38.40,7.37,0.00,1.00,-144.00,19.20,0 +168.00,-33.60,7.35,0.00,1.00,-148.80,-14.40,0 +168.00,-28.80,7.33,0.00,1.00,-153.60,14.40,0 +172.80,-24.00,7.31,0.00,1.00,-158.40,-9.60,0 +172.80,-19.20,7.28,0.00,1.00,-163.20,9.60,0 +172.80,-14.40,7.26,0.00,1.00,-168.00,-9.60,0 +177.60,-9.60,7.24,0.00,1.00,-172.80,4.80,0 +177.60,-4.80,7.22,0.00,1.00,-177.60,-4.80,0 +177.60,-0.00,7.20,0.00,1.00,177.60,0.00,0 +-177.60,0.00,7.18,0.00,1.00,172.80,0.00,0 +-177.60,4.80,7.16,0.00,1.00,168.00,-4.80,0 +-177.60,9.60,7.13,0.00,1.00,163.20,4.80,0 +-172.80,14.40,7.11,0.00,1.00,158.40,-9.60,0 +-172.80,19.20,7.09,0.00,1.00,153.60,9.60,0 +-172.80,24.00,7.07,0.00,1.00,148.80,-9.60,0 +-168.00,28.80,7.05,0.00,1.00,144.00,14.40,0 +-168.00,33.60,7.03,0.00,1.00,139.20,-14.40,0 +-163.20,38.40,7.01,0.00,1.00,134.40,19.20,0 +-163.20,43.20,6.99,0.00,1.00,129.60,-19.20,0 +-158.40,48.00,6.96,0.00,1.00,124.80,19.20,0 +-158.40,52.80,6.94,0.00,1.00,120.00,-24.00,0 +-153.60,57.60,6.92,0.00,1.00,115.20,24.00,0 +-148.80,57.60,6.90,0.00,1.00,110.40,-24.00,0 +-139.20,62.40,6.88,0.00,1.00,105.60,24.00,0 +-134.40,67.20,6.86,0.00,1.00,100.80,-24.00,0 +-120.00,67.20,6.84,0.00,1.00,96.00,28.80,0 +-110.40,72.00,6.81,0.00,1.00,91.20,-28.80,0 +-96.00,72.00,6.79,0.00,1.00,86.40,28.80,0 +-76.80,72.00,6.77,0.00,1.00,81.60,-28.80,0 +-62.40,72.00,6.75,0.00,1.00,76.80,28.80,0 +-52.80,67.20,6.73,0.00,1.00,72.00,-24.00,0 +-43.20,62.40,6.71,0.00,1.00,67.20,24.00,0 +-38.40,62.40,6.69,0.00,1.00,62.40,-24.00,0 +-28.80,57.60,6.66,0.00,1.00,57.60,24.00,0 +-24.00,52.80,6.64,0.00,1.00,52.80,-24.00,0 +-24.00,48.00,6.62,0.00,1.00,48.00,19.20,0 +-19.20,43.20,6.60,0.00,1.00,43.20,-19.20,0 +-14.40,38.40,6.58,0.00,1.00,38.40,19.20,0 +-14.40,38.40,6.56,0.00,1.00,33.60,-14.40,0 +-9.60,33.60,6.54,0.00,1.00,28.80,14.40,0 +-9.60,28.80,6.52,0.00,1.00,24.00,-14.40,0 +-9.60,24.00,6.49,0.00,1.00,19.20,9.60,0 +-4.80,19.20,6.47,0.00,1.00,14.40,-9.60,0 +-4.80,14.40,6.45,0.00,1.00,9.60,4.80,0 +-4.80,9.60,6.43,0.00,1.00,4.80,-4.80,0 +-0.00,4.80,6.41,0.00,1.00,0.00,0.00,0 +0.00,0.00,6.39,0.00,1.00,-4.80,0.00,0 +0.00,-4.80,6.37,0.00,1.00,-9.60,4.80,0 +0.00,-9.60,6.34,0.00,1.00,-14.40,-4.80,0 +4.80,-14.40,6.32,0.00,1.00,-19.20,9.60,0 +4.80,-19.20,6.30,0.00,1.00,-24.00,-9.60,0 +4.80,-24.00,6.28,0.00,1.00,-28.80,14.40,0 +4.80,-28.80,6.26,0.00,1.00,-33.60,-14.40,0 +9.60,-33.60,6.24,0.00,1.00,-38.40,19.20,0 +9.60,-38.40,6.22,0.00,1.00,-43.20,-19.20,0 +14.40,-43.20,6.19,0.00,1.00,-48.00,19.20,0 +14.40,-48.00,6.17,0.00,1.00,-52.80,-24.00,0 +14.40,-52.80,6.15,0.00,1.00,-57.60,24.00,0 +19.20,-57.60,6.13,0.00,1.00,-62.40,-28.80,0 +24.00,-57.60,6.11,0.00,1.00,-67.20,28.80,0 +28.80,-62.40,6.09,0.00,1.00,-72.00,-28.80,0 +33.60,-67.20,6.07,0.00,1.00,-76.80,28.80,0 +43.20,-72.00,6.05,0.00,1.00,-81.60,-28.80,0 +57.60,-72.00,6.02,0.00,1.00,-86.40,33.60,0 +76.80,-76.80,6.00,0.00,1.00,-91.20,-33.60,0 +96.00,-76.80,5.98,0.00,1.00,-96.00,33.60,0 +115.20,-76.80,5.96,0.00,1.00,-100.80,-33.60,0 +129.60,-72.00,5.94,0.00,1.00,-105.60,28.80,0 +139.20,-72.00,5.92,0.00,1.00,-110.40,-28.80,0 +148.80,-67.20,5.90,0.00,1.00,-115.20,28.80,0 +153.60,-62.40,5.87,0.00,1.00,-120.00,-28.80,0 +158.40,-57.60,5.85,0.00,1.00,-124.80,28.80,0 +163.20,-52.80,5.83,0.00,1.00,-129.60,-24.00,0 +163.20,-48.00,5.81,0.00,1.00,-134.40,24.00,0 +168.00,-43.20,5.79,0.00,1.00,-139.20,-24.00,0 +168.00,-38.40,5.77,0.00,1.00,-144.00,19.20,0 +172.80,-33.60,5.75,0.00,1.00,-148.80,-19.20,0 +172.80,-28.80,5.72,0.00,1.00,-153.60,14.40,0 +172.80,-24.00,5.70,0.00,1.00,-158.40,-14.40,0 +172.80,-19.20,5.68,0.00,1.00,-163.20,9.60,0 +177.60,-14.40,5.66,0.00,1.00,-168.00,-9.60,0 +177.60,-9.60,5.64,0.00,1.00,-172.80,4.80,0 +177.60,-4.80,5.62,0.00,1.00,-177.60,-4.80,0 +177.60,-0.00,5.60,0.00,1.00,177.60,0.00,0 +-177.60,0.00,5.58,0.00,1.00,172.80,0.00,0 +-177.60,4.80,5.55,0.00,1.00,168.00,-4.80,0 +-177.60,9.60,5.53,0.00,1.00,163.20,4.80,0 +-177.60,14.40,5.51,0.00,1.00,158.40,-9.60,0 +-172.80,19.20,5.49,0.00,1.00,153.60,9.60,0 +-172.80,24.00,5.47,0.00,1.00,148.80,-14.40,0 +-172.80,28.80,5.45,0.00,1.00,144.00,14.40,0 +-172.80,33.60,5.43,0.00,1.00,139.20,-19.20,0 +-168.00,38.40,5.40,0.00,1.00,134.40,19.20,0 +-168.00,43.20,5.38,0.00,1.00,129.60,-24.00,0 +-163.20,48.00,5.36,0.00,1.00,124.80,24.00,0 +-163.20,52.80,5.34,0.00,1.00,120.00,-24.00,0 +-158.40,57.60,5.32,0.00,1.00,115.20,28.80,0 +-153.60,62.40,5.30,0.00,1.00,110.40,-28.80,0 +-148.80,67.20,5.28,0.00,1.00,105.60,28.80,0 +-139.20,72.00,5.26,0.00,1.00,100.80,-28.80,0 +-129.60,72.00,5.23,0.00,1.00,96.00,28.80,0 +-115.20,76.80,5.21,0.00,1.00,91.20,-33.60,0 +-96.00,76.80,5.19,0.00,1.00,86.40,33.60,0 +-76.80,76.80,5.17,0.00,1.00,81.60,-33.60,0 +-57.60,72.00,5.15,0.00,1.00,76.80,33.60,0 +-43.20,72.00,5.13,0.00,1.00,72.00,-28.80,0 +-33.60,67.20,5.11,0.00,1.00,67.20,28.80,0 +-28.80,62.40,5.08,0.00,1.00,62.40,-28.80,0 +-24.00,57.60,5.06,0.00,1.00,57.60,28.80,0 +-19.20,57.60,5.04,0.00,1.00,52.80,-28.80,0 +-14.40,52.80,5.02,0.00,1.00,48.00,24.00,0 +-14.40,48.00,5.00,0.00,1.00,43.20,-24.00,0 +-14.40,43.20,4.98,0.00,1.00,38.40,19.20,0 +-9.60,38.40,4.96,0.00,1.00,33.60,-19.20,0 +-9.60,33.60,4.93,0.00,1.00,28.80,19.20,0 +-4.80,28.80,4.91,0.00,1.00,24.00,-14.40,0 +-4.80,24.00,4.89,0.00,1.00,19.20,14.40,0 +-4.80,19.20,4.87,0.00,1.00,14.40,-9.60,0 +-4.80,14.40,4.85,0.00,1.00,9.60,9.60,0 +-0.00,9.60,4.83,0.00,1.00,4.80,-4.80,0 +-0.00,4.80,4.81,0.00,1.00,0.00,4.80,0 +0.00,0.00,4.79,0.00,1.00,-4.80,0.00,0 +0.00,-4.80,4.76,0.00,1.00,-9.60,4.80,0 +0.00,-9.60,4.74,0.00,1.00,-14.40,-4.80,0 +0.00,-14.40,4.72,0.00,1.00,-19.20,9.60,0 +4.80,-19.20,4.70,0.00,1.00,-24.00,-9.60,0 +4.80,-24.00,4.68,0.00,1.00,-28.80,14.40,0 +4.80,-28.80,4.66,0.00,1.00,-33.60,-14.40,0 +4.80,-33.60,4.64,0.00,1.00,-38.40,19.20,0 +4.80,-38.40,4.61,0.00,1.00,-43.20,-24.00,0 +9.60,-43.20,4.59,0.00,1.00,-48.00,24.00,0 +9.60,-48.00,4.57,0.00,1.00,-52.80,-24.00,0 +9.60,-52.80,4.55,0.00,1.00,-57.60,28.80,0 +14.40,-57.60,4.53,0.00,1.00,-62.40,-28.80,0 +14.40,-62.40,4.51,0.00,1.00,-67.20,33.60,0 +19.20,-67.20,4.49,0.00,1.00,-72.00,-33.60,0 +24.00,-72.00,4.46,0.00,1.00,-76.80,33.60,0 +33.60,-72.00,4.44,0.00,1.00,-81.60,-33.60,0 +43.20,-76.80,4.42,0.00,1.00,-86.40,38.40,0 +67.20,-81.60,4.40,0.00,1.00,-91.20,-38.40,0 +96.00,-81.60,4.38,0.00,1.00,-96.00,38.40,0 +124.80,-81.60,4.36,0.00,1.00,-100.80,-38.40,0 +144.00,-76.80,4.34,0.00,1.00,-105.60,33.60,0 +153.60,-72.00,4.32,0.00,1.00,-110.40,-33.60,0 +158.40,-67.20,4.29,0.00,1.00,-115.20,33.60,0 +163.20,-62.40,4.27,0.00,1.00,-120.00,-33.60,0 +168.00,-57.60,4.25,0.00,1.00,-124.80,28.80,0 +168.00,-52.80,4.23,0.00,1.00,-129.60,-28.80,0 +168.00,-48.00,4.21,0.00,1.00,-134.40,28.80,0 +172.80,-43.20,4.19,0.00,1.00,-139.20,-24.00,0 +172.80,-38.40,4.17,0.00,1.00,-144.00,24.00,0 +172.80,-33.60,4.14,0.00,1.00,-148.80,-19.20,0 +172.80,-28.80,4.12,0.00,1.00,-153.60,19.20,0 +177.60,-24.00,4.10,0.00,1.00,-158.40,-14.40,0 +177.60,-19.20,4.08,0.00,1.00,-163.20,14.40,0 +177.60,-14.40,4.06,0.00,1.00,-168.00,-9.60,0 +177.60,-9.60,4.04,0.00,1.00,-172.80,4.80,0 +177.60,-4.80,4.02,0.00,1.00,-177.60,-4.80,0 +177.60,-0.00,3.99,0.00,1.00,177.60,0.00,0 +-177.60,0.00,3.97,0.00,1.00,172.80,0.00,0 +-177.60,4.80,3.95,0.00,1.00,168.00,-4.80,0 +-177.60,9.60,3.93,0.00,1.00,163.20,4.80,0 +-177.60,14.40,3.91,0.00,1.00,158.40,-9.60,0 +-177.60,19.20,3.89,0.00,1.00,153.60,14.40,0 +-177.60,24.00,3.87,0.00,1.00,148.80,-14.40,0 +-172.80,28.80,3.85,0.00,1.00,144.00,19.20,0 +-172.80,33.60,3.82,0.00,1.00,139.20,-19.20,0 +-172.80,38.40,3.80,0.00,1.00,134.40,24.00,0 +-172.80,43.20,3.78,0.00,1.00,129.60,-24.00,0 +-168.00,48.00,3.76,0.00,1.00,124.80,28.80,0 +-168.00,52.80,3.74,0.00,1.00,120.00,-28.80,0 +-168.00,57.60,3.72,0.00,1.00,115.20,28.80,0 +-163.20,62.40,3.70,0.00,1.00,110.40,-33.60,0 +-158.40,67.20,3.67,0.00,1.00,105.60,33.60,0 +-153.60,72.00,3.65,0.00,1.00,100.80,-33.60,0 +-144.00,76.80,3.63,0.00,1.00,96.00,33.60,0 +-124.80,81.60,3.61,0.00,1.00,91.20,-38.40,0 +-96.00,81.60,3.59,0.00,1.00,86.40,38.40,0 +-67.20,81.60,3.57,0.00,1.00,81.60,-38.40,0 +-43.20,76.80,3.55,0.00,1.00,76.80,38.40,0 +-33.60,72.00,3.52,0.00,1.00,72.00,-33.60,0 +-24.00,72.00,3.50,0.00,1.00,67.20,33.60,0 +-19.20,67.20,3.48,0.00,1.00,62.40,-33.60,0 +-14.40,62.40,3.46,0.00,1.00,57.60,33.60,0 +-14.40,57.60,3.44,0.00,1.00,52.80,-28.80,0 +-9.60,52.80,3.42,0.00,1.00,48.00,28.80,0 +-9.60,48.00,3.40,0.00,1.00,43.20,-24.00,0 +-9.60,43.20,3.38,0.00,1.00,38.40,24.00,0 +-4.80,38.40,3.35,0.00,1.00,33.60,-24.00,0 +-4.80,33.60,3.33,0.00,1.00,28.80,19.20,0 +-4.80,28.80,3.31,0.00,1.00,24.00,-14.40,0 +-4.80,24.00,3.29,0.00,1.00,19.20,14.40,0 +-4.80,19.20,3.27,0.00,1.00,14.40,-9.60,0 +-0.00,14.40,3.25,0.00,1.00,9.60,9.60,0 +-0.00,9.60,3.23,0.00,1.00,4.80,-4.80,0 +-0.00,4.80,3.20,0.00,1.00,0.00,4.80,0 +0.00,0.00,3.18,0.00,1.00,-4.80,0.00,0 +0.00,-4.80,3.16,0.00,1.00,-9.60,4.80,0 +0.00,-9.60,3.14,0.00,1.00,-14.40,-4.80,0 +0.00,-14.40,3.12,0.00,1.00,-19.20,9.60,0 +0.00,-19.20,3.10,0.00,1.00,-24.00,-14.40,0 +0.00,-24.00,3.08,0.00,1.00,-28.80,14.40,0 +0.00,-28.80,3.05,0.00,1.00,-33.60,-19.20,0 +0.00,-33.60,3.03,0.00,1.00,-38.40,19.20,0 +4.80,-38.40,3.01,0.00,1.00,-43.20,-24.00,0 +4.80,-43.20,2.99,0.00,1.00,-48.00,28.80,0 +4.80,-48.00,2.97,0.00,1.00,-52.80,-28.80,0 +4.80,-52.80,2.95,0.00,1.00,-57.60,33.60,0 +4.80,-57.60,2.93,0.00,1.00,-62.40,-33.60,0 +4.80,-62.40,2.91,0.00,1.00,-67.20,33.60,0 +9.60,-67.20,2.88,0.00,1.00,-72.00,-38.40,0 +9.60,-72.00,2.86,0.00,1.00,-76.80,38.40,0 +14.40,-76.80,2.84,0.00,1.00,-81.60,-38.40,0 +24.00,-81.60,2.82,0.00,1.00,-86.40,43.20,0 +43.20,-86.40,2.80,0.00,1.00,-91.20,-43.20,0 +110.40,-86.40,2.78,0.00,1.00,-96.00,43.20,0 +148.80,-81.60,2.76,0.00,1.00,-100.80,-43.20,0 +163.20,-76.80,2.73,0.00,1.00,-105.60,38.40,0 +168.00,-72.00,2.71,0.00,1.00,-110.40,-38.40,0 +172.80,-67.20,2.69,0.00,1.00,-115.20,38.40,0 +172.80,-62.40,2.67,0.00,1.00,-120.00,-38.40,0 +172.80,-57.60,2.65,0.00,1.00,-124.80,33.60,0 +172.80,-52.80,2.63,0.00,1.00,-129.60,-33.60,0 +177.60,-48.00,2.61,0.00,1.00,-134.40,28.80,0 +177.60,-43.20,2.58,0.00,1.00,-139.20,-28.80,0 +177.60,-38.40,2.56,0.00,1.00,-144.00,24.00,0 +177.60,-33.60,2.54,0.00,1.00,-148.80,-24.00,0 +177.60,-28.80,2.52,0.00,1.00,-153.60,19.20,0 +177.60,-24.00,2.50,0.00,1.00,-158.40,-19.20,0 +177.60,-19.20,2.48,0.00,1.00,-163.20,14.40,0 +177.60,-14.40,2.46,0.00,1.00,-168.00,-9.60,0 +177.60,-9.60,2.44,0.00,1.00,-172.80,9.60,0 +177.60,-4.80,2.41,0.00,1.00,-177.60,-4.80,0 +177.60,-0.00,2.39,0.00,1.00,177.60,0.00,0 +-177.60,0.00,2.37,0.00,1.00,172.80,0.00,0 +-177.60,4.80,2.35,0.00,1.00,168.00,-4.80,0 +-177.60,9.60,2.33,0.00,1.00,163.20,9.60,0 +-177.60,14.40,2.31,0.00,1.00,158.40,-9.60,0 +-177.60,19.20,2.29,0.00,1.00,153.60,14.40,0 +-177.60,24.00,2.26,0.00,1.00,148.80,-19.20,0 +-177.60,28.80,2.24,0.00,1.00,144.00,19.20,0 +-177.60,33.60,2.22,0.00,1.00,139.20,-24.00,0 +-177.60,38.40,2.20,0.00,1.00,134.40,24.00,0 +-177.60,43.20,2.18,0.00,1.00,129.60,-28.80,0 +-177.60,48.00,2.16,0.00,1.00,124.80,28.80,0 +-172.80,52.80,2.14,0.00,1.00,120.00,-33.60,0 +-172.80,57.60,2.11,0.00,1.00,115.20,33.60,0 +-172.80,62.40,2.09,0.00,1.00,110.40,-38.40,0 +-172.80,67.20,2.07,0.00,1.00,105.60,38.40,0 +-168.00,72.00,2.05,0.00,1.00,100.80,-38.40,0 +-163.20,76.80,2.03,0.00,1.00,96.00,38.40,0 +-148.80,81.60,2.01,0.00,1.00,91.20,-43.20,0 +-110.40,86.40,1.99,0.00,1.00,86.40,43.20,0 +-43.20,86.40,1.97,0.00,1.00,81.60,-43.20,0 +-24.00,81.60,1.94,0.00,1.00,76.80,43.20,0 +-14.40,76.80,1.92,0.00,1.00,72.00,-38.40,0 +-9.60,72.00,1.90,0.00,1.00,67.20,38.40,0 +-9.60,67.20,1.88,0.00,1.00,62.40,-38.40,0 +-4.80,62.40,1.86,0.00,1.00,57.60,33.60,0 +-4.80,57.60,1.84,0.00,1.00,52.80,-33.60,0 +-4.80,52.80,1.82,0.00,1.00,48.00,33.60,0 +-4.80,48.00,1.79,0.00,1.00,43.20,-28.80,0 +-4.80,43.20,1.77,0.00,1.00,38.40,28.80,0 +-4.80,38.40,1.75,0.00,1.00,33.60,-24.00,0 +-0.00,33.60,1.73,0.00,1.00,28.80,19.20,0 +-0.00,28.80,1.71,0.00,1.00,24.00,-19.20,0 +-0.00,24.00,1.69,0.00,1.00,19.20,14.40,0 +-0.00,19.20,1.67,0.00,1.00,14.40,-14.40,0 +-0.00,14.40,1.64,0.00,1.00,9.60,9.60,0 +-0.00,9.60,1.62,0.00,1.00,4.80,-4.80,0 +-0.00,4.80,1.60,0.00,1.00,0.00,4.80,0 +-0.00,0.00,1.58,0.00,1.00,-4.80,0.00,0 +-0.00,-4.80,1.56,0.00,1.00,-9.60,4.80,0 +-0.00,-9.60,1.54,0.00,1.00,-14.40,-4.80,0 +-0.00,-14.40,1.52,0.00,1.00,-19.20,9.60,0 +-0.00,-19.20,1.50,0.00,1.00,-24.00,-14.40,0 +-0.00,-24.00,1.47,0.00,1.00,-28.80,19.20,0 +-0.00,-28.80,1.45,0.00,1.00,-33.60,-19.20,0 +-0.00,-33.60,1.43,0.00,1.00,-38.40,24.00,0 +-0.00,-38.40,1.41,0.00,1.00,-43.20,-28.80,0 +-0.00,-43.20,1.39,0.00,1.00,-48.00,28.80,0 +-0.00,-48.00,1.37,0.00,1.00,-52.80,-33.60,0 +-0.00,-52.80,1.35,0.00,1.00,-57.60,33.60,0 +-0.00,-57.60,1.32,0.00,1.00,-62.40,-38.40,0 +-0.00,-62.40,1.30,0.00,1.00,-67.20,38.40,0 +-4.80,-67.20,1.28,0.00,1.00,-72.00,-43.20,0 +-4.80,-72.00,1.26,0.00,1.00,-76.80,43.20,0 +-4.80,-76.80,1.24,0.00,1.00,-81.60,-43.20,0 +-9.60,-81.60,1.22,0.00,1.00,-86.40,43.20,0 +-19.20,-86.40,1.20,0.00,1.00,-91.20,-48.00,0 +-134.40,-86.40,1.17,0.00,1.00,-96.00,48.00,0 +-168.00,-81.60,1.15,0.00,1.00,-100.80,-48.00,0 +-172.80,-76.80,1.13,0.00,1.00,-105.60,43.20,0 +-177.60,-72.00,1.11,0.00,1.00,-110.40,-43.20,0 +-177.60,-67.20,1.09,0.00,1.00,-115.20,43.20,0 +-177.60,-62.40,1.07,0.00,1.00,-120.00,-38.40,0 +-177.60,-57.60,1.05,0.00,1.00,-124.80,38.40,0 +-177.60,-52.80,1.03,0.00,1.00,-129.60,-38.40,0 +-177.60,-48.00,1.00,0.00,1.00,-134.40,33.60,0 +-177.60,-43.20,0.98,0.00,1.00,-139.20,-28.80,0 +-177.60,-38.40,0.96,0.00,1.00,-144.00,28.80,0 +-177.60,-33.60,0.94,0.00,1.00,-148.80,-24.00,0 +-177.60,-28.80,0.92,0.00,1.00,-153.60,24.00,0 +-177.60,-24.00,0.90,0.00,1.00,-158.40,-19.20,0 +-177.60,-19.20,0.88,0.00,1.00,-163.20,14.40,0 +-177.60,-14.40,0.85,0.00,1.00,-168.00,-14.40,0 +-177.60,-9.60,0.83,0.00,1.00,-172.80,9.60,0 +-177.60,-4.80,0.81,0.00,1.00,-177.60,-4.80,0 +-177.60,-0.00,0.79,0.00,1.00,177.60,0.00,0 +177.60,0.00,0.77,0.00,1.00,172.80,0.00,0 +177.60,4.80,0.75,0.00,1.00,168.00,-4.80,0 +177.60,9.60,0.73,0.00,1.00,163.20,9.60,0 +177.60,14.40,0.70,0.00,1.00,158.40,-14.40,0 +177.60,19.20,0.68,0.00,1.00,153.60,14.40,0 +177.60,24.00,0.66,0.00,1.00,148.80,-19.20,0 +177.60,28.80,0.64,0.00,1.00,144.00,24.00,0 +177.60,33.60,0.62,0.00,1.00,139.20,-24.00,0 +177.60,38.40,0.60,0.00,1.00,134.40,28.80,0 +177.60,43.20,0.58,0.00,1.00,129.60,-28.80,0 +177.60,48.00,0.56,0.00,1.00,124.80,33.60,0 +177.60,52.80,0.53,0.00,1.00,120.00,-38.40,0 +177.60,57.60,0.51,0.00,1.00,115.20,38.40,0 +177.60,62.40,0.49,0.00,1.00,110.40,-38.40,0 +177.60,67.20,0.47,0.00,1.00,105.60,43.20,0 +177.60,72.00,0.45,0.00,1.00,100.80,-43.20,0 +172.80,76.80,0.43,0.00,1.00,96.00,43.20,0 +168.00,81.60,0.41,0.00,1.00,91.20,-48.00,0 +134.40,86.40,0.38,0.00,1.00,86.40,48.00,0 +19.20,86.40,0.36,0.00,1.00,81.60,-48.00,0 +9.60,81.60,0.34,0.00,1.00,76.80,43.20,0 +4.80,76.80,0.32,0.00,1.00,72.00,-43.20,0 +4.80,72.00,0.30,0.00,1.00,67.20,43.20,0 +4.80,67.20,0.28,0.00,1.00,62.40,-43.20,0 +0.00,62.40,0.26,0.00,1.00,57.60,38.40,0 +0.00,57.60,0.23,0.00,1.00,52.80,-38.40,0 +0.00,52.80,0.21,0.00,1.00,48.00,33.60,0 +0.00,48.00,0.19,0.00,1.00,43.20,-33.60,0 +0.00,43.20,0.17,0.00,1.00,38.40,28.80,0 +0.00,38.40,0.15,0.00,1.00,33.60,-28.80,0 +0.00,33.60,0.13,0.00,1.00,28.80,24.00,0 +0.00,28.80,0.11,0.00,1.00,24.00,-19.20,0 +0.00,24.00,0.09,0.00,1.00,19.20,19.20,0 +0.00,19.20,0.06,0.00,1.00,14.40,-14.40,0 +0.00,14.40,0.04,0.00,1.00,9.60,9.60,0 +0.00,9.60,0.02,0.00,1.00,4.80,-4.80,0 +0.00,4.80,0.00,0.00,1.00,0.00,4.80,0 diff --git a/scripts/testv/stvISM2.csv b/scripts/testv/stvISM2.csv index 35698d046f9653a7d051af70111c426ca461355d..f5c6b1f25e71755e1b34e7ce7f6a8913f3e1a85f 100644 --- a/scripts/testv/stvISM2.csv +++ b/scripts/testv/stvISM2.csv @@ -1,1500 +1,1500 @@ -0.00,4.80,16.00,0.00,1.00,0.00,0.00 -0.00,9.60,15.98,0.00,1.00,-177.60,4.80 -0.00,14.40,15.96,0.00,1.00,4.80,9.60 -0.00,19.20,15.94,0.00,1.00,-168.00,14.40 -0.00,24.00,15.91,0.00,1.00,14.40,19.20 -0.00,28.80,15.89,0.00,1.00,-163.20,24.00 -0.00,33.60,15.87,0.00,1.00,19.20,28.80 -0.00,38.40,15.85,0.00,1.00,-153.60,33.60 -0.00,43.20,15.83,0.00,1.00,28.80,38.40 -0.00,48.00,15.81,0.00,1.00,-148.80,43.20 -0.00,52.80,15.79,0.00,1.00,38.40,48.00 -0.00,57.60,15.77,0.00,1.00,-139.20,52.80 -0.00,62.40,15.74,0.00,1.00,48.00,57.60 -4.80,67.20,15.72,0.00,1.00,-124.80,62.40 -4.80,72.00,15.70,0.00,1.00,57.60,67.20 -4.80,76.80,15.68,0.00,1.00,-115.20,72.00 -9.60,81.60,15.66,0.00,1.00,72.00,76.80 -19.20,86.40,15.64,0.00,1.00,-100.80,81.60 -134.40,86.40,15.62,0.00,1.00,86.40,86.40 -168.00,81.60,15.59,0.00,1.00,-86.40,89.20 -172.80,76.80,15.57,0.00,1.00,100.80,86.40 -177.60,72.00,15.55,0.00,1.00,-76.80,81.60 -177.60,67.20,15.53,0.00,1.00,110.40,76.80 -177.60,62.40,15.51,0.00,1.00,-62.40,72.00 -177.60,57.60,15.49,0.00,1.00,124.80,67.20 -177.60,52.80,15.47,0.00,1.00,-52.80,62.40 -177.60,48.00,15.44,0.00,1.00,134.40,57.60 -177.60,43.20,15.42,0.00,1.00,-38.40,52.80 -177.60,38.40,15.40,0.00,1.00,144.00,48.00 -177.60,33.60,15.38,0.00,1.00,-33.60,43.20 -177.60,28.80,15.36,0.00,1.00,153.60,38.40 -177.60,24.00,15.34,0.00,1.00,-24.00,33.60 -177.60,19.20,15.32,0.00,1.00,158.40,28.80 -177.60,14.40,15.30,0.00,1.00,-14.40,24.00 -177.60,9.60,15.27,0.00,1.00,168.00,19.20 -177.60,4.80,15.25,0.00,1.00,-9.60,14.40 -177.60,0.00,15.23,0.00,1.00,172.80,9.60 --177.60,-0.00,15.21,0.00,1.00,-0.00,4.80 --177.60,-4.80,15.19,0.00,1.00,-177.60,-0.00 --177.60,-9.60,15.17,0.00,1.00,4.80,-4.80 --177.60,-14.40,15.15,0.00,1.00,-172.80,-9.60 --177.60,-19.20,15.12,0.00,1.00,14.40,-14.40 --177.60,-24.00,15.10,0.00,1.00,-163.20,-19.20 --177.60,-28.80,15.08,0.00,1.00,19.20,-24.00 --177.60,-33.60,15.06,0.00,1.00,-158.40,-28.80 --177.60,-38.40,15.04,0.00,1.00,28.80,-33.60 --177.60,-43.20,15.02,0.00,1.00,-148.80,-38.40 --177.60,-48.00,15.00,0.00,1.00,33.60,-48.00 --177.60,-52.80,14.97,0.00,1.00,-139.20,-48.00 --177.60,-57.60,14.95,0.00,1.00,43.20,-52.80 --177.60,-62.40,14.93,0.00,1.00,-129.60,-57.60 --177.60,-67.20,14.91,0.00,1.00,57.60,-62.40 --177.60,-72.00,14.89,0.00,1.00,-120.00,-67.20 --172.80,-76.80,14.87,0.00,1.00,67.20,-76.80 --168.00,-81.60,14.85,0.00,1.00,-105.60,-76.80 --134.40,-86.40,14.83,0.00,1.00,81.60,-86.40 --19.20,-86.40,14.80,0.00,1.00,-91.20,-89.20 --9.60,-81.60,14.78,0.00,1.00,96.00,-86.40 --4.80,-76.80,14.76,0.00,1.00,-76.80,-81.60 --4.80,-72.00,14.74,0.00,1.00,110.40,-76.80 --4.80,-67.20,14.72,0.00,1.00,-67.20,-72.00 --0.00,-62.40,14.70,0.00,1.00,120.00,-67.20 --0.00,-57.60,14.68,0.00,1.00,-52.80,-62.40 --0.00,-52.80,14.65,0.00,1.00,129.60,-57.60 --0.00,-48.00,14.63,0.00,1.00,-43.20,-52.80 --0.00,-43.20,14.61,0.00,1.00,144.00,-48.00 --0.00,-38.40,14.59,0.00,1.00,-33.60,-43.20 --0.00,-33.60,14.57,0.00,1.00,148.80,-38.40 --0.00,-28.80,14.55,0.00,1.00,-24.00,-33.60 --0.00,-24.00,14.53,0.00,1.00,158.40,-28.80 --0.00,-19.20,14.50,0.00,1.00,-19.20,-24.00 --0.00,-14.40,14.48,0.00,1.00,168.00,-19.20 --0.00,-9.60,14.46,0.00,1.00,-9.60,-14.40 --0.00,-4.80,14.44,0.00,1.00,172.80,-9.60 --0.00,0.00,14.42,0.00,1.00,-4.80,-4.80 --0.00,4.80,14.40,0.00,1.00,0.00,0.00 --0.00,9.60,14.38,0.00,1.00,-177.60,4.80 --0.00,14.40,14.36,0.00,1.00,9.60,9.60 --0.00,19.20,14.33,0.00,1.00,-168.00,14.40 --0.00,24.00,14.31,0.00,1.00,14.40,19.20 --0.00,28.80,14.29,0.00,1.00,-163.20,24.00 --0.00,33.60,14.27,0.00,1.00,24.00,28.80 --4.80,38.40,14.25,0.00,1.00,-153.60,33.60 --4.80,43.20,14.23,0.00,1.00,28.80,38.40 --4.80,48.00,14.21,0.00,1.00,-144.00,43.20 --4.80,52.80,14.18,0.00,1.00,38.40,48.00 --4.80,57.60,14.16,0.00,1.00,-134.40,52.80 --4.80,62.40,14.14,0.00,1.00,48.00,57.60 --9.60,67.20,14.12,0.00,1.00,-124.80,62.40 --9.60,72.00,14.10,0.00,1.00,62.40,67.20 --14.40,76.80,14.08,0.00,1.00,-115.20,72.00 --24.00,81.60,14.06,0.00,1.00,72.00,76.80 --43.20,86.40,14.03,0.00,1.00,-100.80,81.60 --110.40,86.40,14.01,0.00,1.00,86.40,86.40 --148.80,81.60,13.99,0.00,1.00,-86.40,86.40 --163.20,76.80,13.97,0.00,1.00,96.00,81.60 --168.00,72.00,13.95,0.00,1.00,-76.80,76.80 --172.80,67.20,13.93,0.00,1.00,110.40,72.00 --172.80,62.40,13.91,0.00,1.00,-62.40,67.20 --172.80,57.60,13.89,0.00,1.00,120.00,62.40 --172.80,52.80,13.86,0.00,1.00,-52.80,57.60 --177.60,48.00,13.84,0.00,1.00,134.40,52.80 --177.60,43.20,13.82,0.00,1.00,-43.20,48.00 --177.60,38.40,13.80,0.00,1.00,144.00,43.20 --177.60,33.60,13.78,0.00,1.00,-33.60,38.40 --177.60,28.80,13.76,0.00,1.00,148.80,33.60 --177.60,24.00,13.74,0.00,1.00,-24.00,28.80 --177.60,19.20,13.71,0.00,1.00,158.40,24.00 --177.60,14.40,13.69,0.00,1.00,-19.20,19.20 --177.60,9.60,13.67,0.00,1.00,168.00,14.40 --177.60,4.80,13.65,0.00,1.00,-9.60,9.60 --177.60,0.00,13.63,0.00,1.00,172.80,4.80 -177.60,-0.00,13.61,0.00,1.00,-0.00,0.00 -177.60,-4.80,13.59,0.00,1.00,-177.60,-0.00 -177.60,-9.60,13.56,0.00,1.00,4.80,-4.80 -177.60,-14.40,13.54,0.00,1.00,-172.80,-9.60 -177.60,-19.20,13.52,0.00,1.00,14.40,-14.40 -177.60,-24.00,13.50,0.00,1.00,-163.20,-19.20 -177.60,-28.80,13.48,0.00,1.00,19.20,-24.00 -177.60,-33.60,13.46,0.00,1.00,-153.60,-28.80 -177.60,-38.40,13.44,0.00,1.00,28.80,-33.60 -177.60,-43.20,13.42,0.00,1.00,-148.80,-38.40 -177.60,-48.00,13.39,0.00,1.00,38.40,-43.20 -172.80,-52.80,13.37,0.00,1.00,-139.20,-48.00 -172.80,-57.60,13.35,0.00,1.00,48.00,-52.80 -172.80,-62.40,13.33,0.00,1.00,-124.80,-57.60 -172.80,-67.20,13.31,0.00,1.00,57.60,-62.40 -168.00,-72.00,13.29,0.00,1.00,-115.20,-67.20 -163.20,-76.80,13.27,0.00,1.00,72.00,-72.00 -148.80,-81.60,13.24,0.00,1.00,-105.60,-76.80 -110.40,-86.40,13.22,0.00,1.00,81.60,-81.60 -43.20,-86.40,13.20,0.00,1.00,-91.20,-86.40 -24.00,-81.60,13.18,0.00,1.00,96.00,-86.40 -14.40,-76.80,13.16,0.00,1.00,-76.80,-81.60 -9.60,-72.00,13.14,0.00,1.00,105.60,-76.80 -9.60,-67.20,13.12,0.00,1.00,-67.20,-72.00 -4.80,-62.40,13.09,0.00,1.00,120.00,-67.20 -4.80,-57.60,13.07,0.00,1.00,-57.60,-62.40 -4.80,-52.80,13.05,0.00,1.00,129.60,-57.60 -4.80,-48.00,13.03,0.00,1.00,-43.20,-52.80 -4.80,-43.20,13.01,0.00,1.00,139.20,-48.00 -4.80,-38.40,12.99,0.00,1.00,-33.60,-43.20 -0.00,-33.60,12.97,0.00,1.00,148.80,-38.40 -0.00,-28.80,12.95,0.00,1.00,-28.80,-33.60 -0.00,-24.00,12.92,0.00,1.00,158.40,-28.80 -0.00,-19.20,12.90,0.00,1.00,-19.20,-24.00 -0.00,-14.40,12.88,0.00,1.00,163.20,-19.20 -0.00,-9.60,12.86,0.00,1.00,-9.60,-14.40 -0.00,-4.80,12.84,0.00,1.00,172.80,-9.60 -0.00,0.00,12.82,0.00,1.00,-4.80,-4.80 --0.00,4.80,12.80,0.00,1.00,0.00,0.00 --0.00,9.60,12.77,0.00,1.00,-177.60,4.80 --0.00,14.40,12.75,0.00,1.00,9.60,9.60 --4.80,19.20,12.73,0.00,1.00,-168.00,14.40 --4.80,24.00,12.71,0.00,1.00,14.40,19.20 --4.80,28.80,12.69,0.00,1.00,-158.40,24.00 --4.80,33.60,12.67,0.00,1.00,24.00,28.80 --4.80,38.40,12.65,0.00,1.00,-153.60,33.60 --9.60,43.20,12.62,0.00,1.00,33.60,38.40 --9.60,48.00,12.60,0.00,1.00,-144.00,43.20 --9.60,52.80,12.58,0.00,1.00,43.20,48.00 --14.40,57.60,12.56,0.00,1.00,-134.40,52.80 --14.40,62.40,12.54,0.00,1.00,52.80,57.60 --19.20,67.20,12.52,0.00,1.00,-124.80,62.40 --24.00,72.00,12.50,0.00,1.00,62.40,67.20 --33.60,72.00,12.48,0.00,1.00,-110.40,72.00 --43.20,76.80,12.45,0.00,1.00,72.00,72.00 --67.20,81.60,12.43,0.00,1.00,-100.80,76.80 --96.00,81.60,12.41,0.00,1.00,86.40,81.60 --124.80,81.60,12.39,0.00,1.00,-86.40,81.60 --144.00,76.80,12.37,0.00,1.00,96.00,76.80 --153.60,72.00,12.35,0.00,1.00,-76.80,76.80 --158.40,67.20,12.33,0.00,1.00,110.40,72.00 --163.20,62.40,12.30,0.00,1.00,-67.20,67.20 --168.00,57.60,12.28,0.00,1.00,120.00,62.40 --168.00,52.80,12.26,0.00,1.00,-52.80,57.60 --168.00,48.00,12.24,0.00,1.00,129.60,52.80 --172.80,43.20,12.22,0.00,1.00,-43.20,48.00 --172.80,38.40,12.20,0.00,1.00,139.20,43.20 --172.80,33.60,12.18,0.00,1.00,-33.60,38.40 --172.80,28.80,12.15,0.00,1.00,148.80,33.60 --177.60,24.00,12.13,0.00,1.00,-24.00,28.80 --177.60,19.20,12.11,0.00,1.00,158.40,24.00 --177.60,14.40,12.09,0.00,1.00,-19.20,19.20 --177.60,9.60,12.07,0.00,1.00,168.00,14.40 --177.60,4.80,12.05,0.00,1.00,-9.60,9.60 --177.60,0.00,12.03,0.00,1.00,172.80,4.80 -177.60,-0.00,12.01,0.00,1.00,-0.00,0.00 -177.60,-4.80,11.98,0.00,1.00,-177.60,-0.00 -177.60,-9.60,11.96,0.00,1.00,4.80,-4.80 -177.60,-14.40,11.94,0.00,1.00,-168.00,-9.60 -177.60,-19.20,11.92,0.00,1.00,14.40,-14.40 -177.60,-24.00,11.90,0.00,1.00,-163.20,-19.20 -172.80,-28.80,11.88,0.00,1.00,24.00,-24.00 -172.80,-33.60,11.86,0.00,1.00,-153.60,-28.80 -172.80,-38.40,11.83,0.00,1.00,28.80,-33.60 -172.80,-43.20,11.81,0.00,1.00,-144.00,-38.40 -168.00,-48.00,11.79,0.00,1.00,38.40,-43.20 -168.00,-52.80,11.77,0.00,1.00,-134.40,-48.00 -168.00,-57.60,11.75,0.00,1.00,48.00,-52.80 -163.20,-62.40,11.73,0.00,1.00,-124.80,-57.60 -158.40,-67.20,11.71,0.00,1.00,62.40,-62.40 -153.60,-72.00,11.68,0.00,1.00,-115.20,-67.20 -144.00,-76.80,11.66,0.00,1.00,72.00,-72.00 -124.80,-81.60,11.64,0.00,1.00,-100.80,-76.80 -96.00,-81.60,11.62,0.00,1.00,81.60,-76.80 -67.20,-81.60,11.60,0.00,1.00,-91.20,-81.60 -43.20,-76.80,11.58,0.00,1.00,96.00,-81.60 -33.60,-72.00,11.56,0.00,1.00,-81.60,-76.80 -24.00,-72.00,11.54,0.00,1.00,105.60,-72.00 -19.20,-67.20,11.51,0.00,1.00,-67.20,-72.00 -14.40,-62.40,11.49,0.00,1.00,115.20,-67.20 -14.40,-57.60,11.47,0.00,1.00,-57.60,-62.40 -9.60,-52.80,11.45,0.00,1.00,129.60,-57.60 -9.60,-48.00,11.43,0.00,1.00,-48.00,-52.80 -9.60,-43.20,11.41,0.00,1.00,139.20,-48.00 -4.80,-38.40,11.39,0.00,1.00,-38.40,-43.20 -4.80,-33.60,11.36,0.00,1.00,148.80,-38.40 -4.80,-28.80,11.34,0.00,1.00,-28.80,-33.60 -4.80,-24.00,11.32,0.00,1.00,153.60,-28.80 -4.80,-19.20,11.30,0.00,1.00,-19.20,-24.00 -0.00,-14.40,11.28,0.00,1.00,163.20,-19.20 -0.00,-9.60,11.26,0.00,1.00,-9.60,-14.40 -0.00,-4.80,11.24,0.00,1.00,172.80,-9.60 -0.00,0.00,11.21,0.00,1.00,-4.80,-4.80 --0.00,4.80,11.19,0.00,1.00,0.00,0.00 --0.00,9.60,11.17,0.00,1.00,-177.60,4.80 --4.80,14.40,11.15,0.00,1.00,9.60,9.60 --4.80,19.20,11.13,0.00,1.00,-168.00,14.40 --4.80,24.00,11.11,0.00,1.00,14.40,19.20 --4.80,28.80,11.09,0.00,1.00,-158.40,24.00 --9.60,33.60,11.07,0.00,1.00,24.00,28.80 --9.60,38.40,11.04,0.00,1.00,-148.80,33.60 --14.40,43.20,11.02,0.00,1.00,33.60,38.40 --14.40,48.00,11.00,0.00,1.00,-139.20,43.20 --14.40,52.80,10.98,0.00,1.00,43.20,48.00 --19.20,57.60,10.96,0.00,1.00,-129.60,52.80 --24.00,57.60,10.94,0.00,1.00,52.80,52.80 --28.80,62.40,10.92,0.00,1.00,-120.00,57.60 --33.60,67.20,10.89,0.00,1.00,62.40,62.40 --43.20,72.00,10.87,0.00,1.00,-110.40,67.20 --57.60,72.00,10.85,0.00,1.00,76.80,72.00 --76.80,76.80,10.83,0.00,1.00,-100.80,72.00 --96.00,76.80,10.81,0.00,1.00,86.40,76.80 --115.20,76.80,10.79,0.00,1.00,-86.40,76.80 --129.60,72.00,10.77,0.00,1.00,96.00,76.80 --139.20,72.00,10.74,0.00,1.00,-76.80,72.00 --148.80,67.20,10.72,0.00,1.00,105.60,67.20 --153.60,62.40,10.70,0.00,1.00,-67.20,67.20 --158.40,57.60,10.68,0.00,1.00,120.00,62.40 --163.20,52.80,10.66,0.00,1.00,-57.60,57.60 --163.20,48.00,10.64,0.00,1.00,129.60,52.80 --168.00,43.20,10.62,0.00,1.00,-48.00,48.00 --168.00,38.40,10.60,0.00,1.00,139.20,43.20 --172.80,33.60,10.57,0.00,1.00,-38.40,38.40 --172.80,28.80,10.55,0.00,1.00,148.80,33.60 --172.80,24.00,10.53,0.00,1.00,-28.80,28.80 --172.80,19.20,10.51,0.00,1.00,158.40,24.00 --177.60,14.40,10.49,0.00,1.00,-19.20,19.20 --177.60,9.60,10.47,0.00,1.00,163.20,14.40 --177.60,4.80,10.45,0.00,1.00,-9.60,9.60 --177.60,0.00,10.42,0.00,1.00,172.80,4.80 -177.60,-0.00,10.40,0.00,1.00,-0.00,0.00 -177.60,-4.80,10.38,0.00,1.00,-177.60,-0.00 -177.60,-9.60,10.36,0.00,1.00,4.80,-4.80 -177.60,-14.40,10.34,0.00,1.00,-168.00,-9.60 -172.80,-19.20,10.32,0.00,1.00,14.40,-14.40 -172.80,-24.00,10.30,0.00,1.00,-163.20,-19.20 -172.80,-28.80,10.28,0.00,1.00,24.00,-24.00 -172.80,-33.60,10.25,0.00,1.00,-153.60,-28.80 -168.00,-38.40,10.23,0.00,1.00,33.60,-33.60 -168.00,-43.20,10.21,0.00,1.00,-144.00,-38.40 -163.20,-48.00,10.19,0.00,1.00,43.20,-43.20 -163.20,-52.80,10.17,0.00,1.00,-134.40,-48.00 -158.40,-57.60,10.15,0.00,1.00,52.80,-52.80 -153.60,-62.40,10.13,0.00,1.00,-124.80,-57.60 -148.80,-67.20,10.10,0.00,1.00,62.40,-62.40 -139.20,-72.00,10.08,0.00,1.00,-115.20,-67.20 -129.60,-72.00,10.06,0.00,1.00,72.00,-67.20 -115.20,-76.80,10.04,0.00,1.00,-100.80,-72.00 -96.00,-76.80,10.02,0.00,1.00,81.60,-76.80 -76.80,-76.80,10.00,0.00,1.00,-91.20,-76.80 -57.60,-72.00,9.98,0.00,1.00,96.00,-76.80 -43.20,-72.00,9.95,0.00,1.00,-81.60,-72.00 -33.60,-67.20,9.93,0.00,1.00,105.60,-72.00 -28.80,-62.40,9.91,0.00,1.00,-67.20,-67.20 -24.00,-57.60,9.89,0.00,1.00,115.20,-62.40 -19.20,-57.60,9.87,0.00,1.00,-57.60,-57.60 -14.40,-52.80,9.85,0.00,1.00,124.80,-52.80 -14.40,-48.00,9.83,0.00,1.00,-48.00,-52.80 -14.40,-43.20,9.81,0.00,1.00,134.40,-48.00 -9.60,-38.40,9.78,0.00,1.00,-38.40,-43.20 -9.60,-33.60,9.76,0.00,1.00,144.00,-38.40 -4.80,-28.80,9.74,0.00,1.00,-28.80,-33.60 -4.80,-24.00,9.72,0.00,1.00,153.60,-28.80 -4.80,-19.20,9.70,0.00,1.00,-19.20,-24.00 -4.80,-14.40,9.68,0.00,1.00,163.20,-19.20 -0.00,-9.60,9.66,0.00,1.00,-14.40,-14.40 -0.00,-4.80,9.63,0.00,1.00,172.80,-9.60 -0.00,0.00,9.61,0.00,1.00,-4.80,-4.80 --0.00,4.80,9.59,0.00,1.00,0.00,0.00 --4.80,9.60,9.57,0.00,1.00,-177.60,4.80 --4.80,14.40,9.55,0.00,1.00,9.60,9.60 --4.80,19.20,9.53,0.00,1.00,-168.00,14.40 --9.60,24.00,9.51,0.00,1.00,19.20,19.20 --9.60,28.80,9.48,0.00,1.00,-158.40,24.00 --9.60,33.60,9.46,0.00,1.00,24.00,28.80 --14.40,38.40,9.44,0.00,1.00,-148.80,33.60 --14.40,38.40,9.42,0.00,1.00,33.60,33.60 --19.20,43.20,9.40,0.00,1.00,-139.20,38.40 --24.00,48.00,9.38,0.00,1.00,43.20,43.20 --24.00,52.80,9.36,0.00,1.00,-129.60,48.00 --28.80,57.60,9.34,0.00,1.00,52.80,52.80 --38.40,62.40,9.31,0.00,1.00,-120.00,57.60 --43.20,62.40,9.29,0.00,1.00,67.20,62.40 --52.80,67.20,9.27,0.00,1.00,-110.40,62.40 --62.40,72.00,9.25,0.00,1.00,76.80,67.20 --76.80,72.00,9.23,0.00,1.00,-100.80,67.20 --96.00,72.00,9.21,0.00,1.00,86.40,72.00 --110.40,72.00,9.19,0.00,1.00,-86.40,72.00 --120.00,67.20,9.16,0.00,1.00,96.00,72.00 --134.40,67.20,9.14,0.00,1.00,-76.80,67.20 --139.20,62.40,9.12,0.00,1.00,105.60,67.20 --148.80,57.60,9.10,0.00,1.00,-67.20,62.40 --153.60,57.60,9.08,0.00,1.00,115.20,57.60 --158.40,52.80,9.06,0.00,1.00,-57.60,52.80 --158.40,48.00,9.04,0.00,1.00,129.60,52.80 --163.20,43.20,9.01,0.00,1.00,-48.00,48.00 --163.20,38.40,8.99,0.00,1.00,139.20,43.20 --168.00,33.60,8.97,0.00,1.00,-38.40,38.40 --168.00,28.80,8.95,0.00,1.00,148.80,33.60 --172.80,24.00,8.93,0.00,1.00,-28.80,28.80 --172.80,19.20,8.91,0.00,1.00,153.60,24.00 --172.80,14.40,8.89,0.00,1.00,-19.20,19.20 --177.60,9.60,8.87,0.00,1.00,163.20,14.40 --177.60,4.80,8.84,0.00,1.00,-9.60,9.60 --177.60,0.00,8.82,0.00,1.00,172.80,4.80 -177.60,-0.00,8.80,0.00,1.00,-0.00,0.00 -177.60,-4.80,8.78,0.00,1.00,-177.60,-0.00 -177.60,-9.60,8.76,0.00,1.00,4.80,-4.80 -172.80,-14.40,8.74,0.00,1.00,-168.00,-9.60 -172.80,-19.20,8.72,0.00,1.00,14.40,-14.40 -172.80,-24.00,8.69,0.00,1.00,-158.40,-19.20 -168.00,-28.80,8.67,0.00,1.00,24.00,-24.00 -168.00,-33.60,8.65,0.00,1.00,-153.60,-28.80 -163.20,-38.40,8.63,0.00,1.00,33.60,-33.60 -163.20,-43.20,8.61,0.00,1.00,-144.00,-38.40 -158.40,-48.00,8.59,0.00,1.00,43.20,-43.20 -158.40,-52.80,8.57,0.00,1.00,-134.40,-48.00 -153.60,-57.60,8.54,0.00,1.00,52.80,-52.80 -148.80,-57.60,8.52,0.00,1.00,-124.80,-52.80 -139.20,-62.40,8.50,0.00,1.00,62.40,-57.60 -134.40,-67.20,8.48,0.00,1.00,-110.40,-62.40 -120.00,-67.20,8.46,0.00,1.00,72.00,-67.20 -110.40,-72.00,8.44,0.00,1.00,-100.80,-67.20 -96.00,-72.00,8.42,0.00,1.00,81.60,-72.00 -76.80,-72.00,8.40,0.00,1.00,-91.20,-72.00 -62.40,-72.00,8.37,0.00,1.00,96.00,-72.00 -52.80,-67.20,8.35,0.00,1.00,-81.60,-67.20 -43.20,-62.40,8.33,0.00,1.00,105.60,-67.20 -38.40,-62.40,8.31,0.00,1.00,-72.00,-62.40 -28.80,-57.60,8.29,0.00,1.00,115.20,-62.40 -24.00,-52.80,8.27,0.00,1.00,-57.60,-57.60 -24.00,-48.00,8.25,0.00,1.00,124.80,-52.80 -19.20,-43.20,8.22,0.00,1.00,-48.00,-48.00 -14.40,-38.40,8.20,0.00,1.00,134.40,-43.20 -14.40,-38.40,8.18,0.00,1.00,-38.40,-38.40 -9.60,-33.60,8.16,0.00,1.00,144.00,-33.60 -9.60,-28.80,8.14,0.00,1.00,-28.80,-33.60 -9.60,-24.00,8.12,0.00,1.00,153.60,-28.80 -4.80,-19.20,8.10,0.00,1.00,-24.00,-24.00 -4.80,-14.40,8.07,0.00,1.00,163.20,-19.20 -4.80,-9.60,8.05,0.00,1.00,-14.40,-14.40 -0.00,-4.80,8.03,0.00,1.00,172.80,-9.60 -0.00,0.00,8.01,0.00,1.00,-4.80,-4.80 --0.00,4.80,7.99,0.00,1.00,0.00,0.00 --4.80,9.60,7.97,0.00,1.00,-177.60,4.80 --4.80,14.40,7.95,0.00,1.00,9.60,9.60 --9.60,19.20,7.93,0.00,1.00,-168.00,14.40 --9.60,24.00,7.90,0.00,1.00,19.20,19.20 --14.40,24.00,7.88,0.00,1.00,-158.40,24.00 --14.40,28.80,7.86,0.00,1.00,28.80,24.00 --19.20,33.60,7.84,0.00,1.00,-148.80,28.80 --19.20,38.40,7.82,0.00,1.00,38.40,33.60 --24.00,43.20,7.80,0.00,1.00,-139.20,38.40 --28.80,48.00,7.78,0.00,1.00,48.00,43.20 --33.60,52.80,7.75,0.00,1.00,-129.60,48.00 --38.40,52.80,7.73,0.00,1.00,57.60,52.80 --43.20,57.60,7.71,0.00,1.00,-120.00,52.80 --48.00,62.40,7.69,0.00,1.00,67.20,57.60 --57.60,62.40,7.67,0.00,1.00,-110.40,62.40 --67.20,67.20,7.65,0.00,1.00,76.80,62.40 --81.60,67.20,7.63,0.00,1.00,-100.80,62.40 --91.20,67.20,7.60,0.00,1.00,86.40,67.20 --105.60,67.20,7.58,0.00,1.00,-86.40,67.20 --115.20,67.20,7.56,0.00,1.00,96.00,67.20 --124.80,62.40,7.54,0.00,1.00,-76.80,62.40 --134.40,57.60,7.52,0.00,1.00,105.60,62.40 --139.20,57.60,7.50,0.00,1.00,-67.20,57.60 --144.00,52.80,7.48,0.00,1.00,115.20,57.60 --148.80,48.00,7.46,0.00,1.00,-57.60,52.80 --153.60,43.20,7.43,0.00,1.00,124.80,48.00 --158.40,43.20,7.41,0.00,1.00,-48.00,43.20 --163.20,38.40,7.39,0.00,1.00,134.40,38.40 --163.20,33.60,7.37,0.00,1.00,-38.40,38.40 --168.00,28.80,7.35,0.00,1.00,144.00,33.60 --168.00,24.00,7.33,0.00,1.00,-28.80,28.80 --172.80,19.20,7.31,0.00,1.00,153.60,24.00 --172.80,14.40,7.28,0.00,1.00,-19.20,19.20 --177.60,9.60,7.26,0.00,1.00,163.20,14.40 --177.60,4.80,7.24,0.00,1.00,-9.60,9.60 --177.60,0.00,7.22,0.00,1.00,172.80,4.80 -177.60,-0.00,7.20,0.00,1.00,-0.00,0.00 -177.60,-4.80,7.18,0.00,1.00,-177.60,-0.00 -177.60,-9.60,7.16,0.00,1.00,4.80,-4.80 -172.80,-14.40,7.13,0.00,1.00,-168.00,-9.60 -172.80,-19.20,7.11,0.00,1.00,14.40,-14.40 -168.00,-24.00,7.09,0.00,1.00,-158.40,-19.20 -168.00,-28.80,7.07,0.00,1.00,24.00,-24.00 -163.20,-33.60,7.05,0.00,1.00,-148.80,-28.80 -163.20,-38.40,7.03,0.00,1.00,33.60,-33.60 -158.40,-43.20,7.01,0.00,1.00,-139.20,-38.40 -153.60,-43.20,6.99,0.00,1.00,43.20,-38.40 -148.80,-48.00,6.96,0.00,1.00,-129.60,-43.20 -144.00,-52.80,6.94,0.00,1.00,52.80,-48.00 -139.20,-57.60,6.92,0.00,1.00,-120.00,-52.80 -134.40,-57.60,6.90,0.00,1.00,62.40,-57.60 -124.80,-62.40,6.88,0.00,1.00,-110.40,-57.60 -115.20,-67.20,6.86,0.00,1.00,72.00,-62.40 -105.60,-67.20,6.84,0.00,1.00,-100.80,-62.40 -91.20,-67.20,6.81,0.00,1.00,81.60,-67.20 -81.60,-67.20,6.79,0.00,1.00,-91.20,-67.20 -67.20,-67.20,6.77,0.00,1.00,96.00,-67.20 -57.60,-62.40,6.75,0.00,1.00,-81.60,-62.40 -48.00,-62.40,6.73,0.00,1.00,105.60,-62.40 -43.20,-57.60,6.71,0.00,1.00,-72.00,-62.40 -38.40,-52.80,6.69,0.00,1.00,115.20,-57.60 -33.60,-52.80,6.66,0.00,1.00,-62.40,-52.80 -28.80,-48.00,6.64,0.00,1.00,124.80,-52.80 -24.00,-43.20,6.62,0.00,1.00,-52.80,-48.00 -19.20,-38.40,6.60,0.00,1.00,134.40,-43.20 -19.20,-33.60,6.58,0.00,1.00,-43.20,-38.40 -14.40,-28.80,6.56,0.00,1.00,144.00,-33.60 -14.40,-24.00,6.54,0.00,1.00,-33.60,-28.80 -9.60,-24.00,6.52,0.00,1.00,153.60,-24.00 -9.60,-19.20,6.49,0.00,1.00,-24.00,-24.00 -4.80,-14.40,6.47,0.00,1.00,163.20,-19.20 -4.80,-9.60,6.45,0.00,1.00,-14.40,-14.40 -0.00,-4.80,6.43,0.00,1.00,172.80,-9.60 -0.00,0.00,6.41,0.00,1.00,-4.80,-4.80 --0.00,4.80,6.39,0.00,1.00,0.00,0.00 --4.80,9.60,6.37,0.00,1.00,-177.60,4.80 --4.80,14.40,6.34,0.00,1.00,9.60,9.60 --9.60,19.20,6.32,0.00,1.00,-168.00,14.40 --9.60,19.20,6.30,0.00,1.00,19.20,14.40 --14.40,24.00,6.28,0.00,1.00,-158.40,19.20 --19.20,28.80,6.26,0.00,1.00,28.80,24.00 --19.20,33.60,6.24,0.00,1.00,-148.80,28.80 --24.00,38.40,6.22,0.00,1.00,38.40,33.60 --28.80,43.20,6.19,0.00,1.00,-139.20,38.40 --33.60,43.20,6.17,0.00,1.00,48.00,38.40 --38.40,48.00,6.15,0.00,1.00,-129.60,43.20 --43.20,52.80,6.13,0.00,1.00,57.60,48.00 --48.00,52.80,6.11,0.00,1.00,-120.00,52.80 --52.80,57.60,6.09,0.00,1.00,67.20,52.80 --62.40,57.60,6.07,0.00,1.00,-110.40,57.60 --72.00,62.40,6.05,0.00,1.00,76.80,57.60 --81.60,62.40,6.02,0.00,1.00,-100.80,62.40 --91.20,62.40,6.00,0.00,1.00,86.40,62.40 --100.80,62.40,5.98,0.00,1.00,-86.40,62.40 --110.40,62.40,5.96,0.00,1.00,96.00,62.40 --120.00,57.60,5.94,0.00,1.00,-76.80,57.60 --129.60,57.60,5.92,0.00,1.00,105.60,57.60 --134.40,52.80,5.90,0.00,1.00,-67.20,57.60 --139.20,48.00,5.87,0.00,1.00,115.20,52.80 --144.00,48.00,5.85,0.00,1.00,-57.60,48.00 --148.80,43.20,5.83,0.00,1.00,124.80,48.00 --153.60,38.40,5.81,0.00,1.00,-48.00,43.20 --158.40,33.60,5.79,0.00,1.00,134.40,38.40 --163.20,33.60,5.77,0.00,1.00,-38.40,33.60 --163.20,28.80,5.75,0.00,1.00,144.00,28.80 --168.00,24.00,5.72,0.00,1.00,-28.80,28.80 --168.00,19.20,5.70,0.00,1.00,153.60,24.00 --172.80,14.40,5.68,0.00,1.00,-19.20,19.20 --172.80,9.60,5.66,0.00,1.00,163.20,14.40 --177.60,4.80,5.64,0.00,1.00,-9.60,9.60 --177.60,0.00,5.62,0.00,1.00,172.80,4.80 -177.60,-0.00,5.60,0.00,1.00,-0.00,0.00 -177.60,-4.80,5.58,0.00,1.00,-177.60,-0.00 -172.80,-9.60,5.55,0.00,1.00,4.80,-4.80 -172.80,-14.40,5.53,0.00,1.00,-168.00,-9.60 -168.00,-19.20,5.51,0.00,1.00,14.40,-14.40 -168.00,-24.00,5.49,0.00,1.00,-158.40,-19.20 -163.20,-28.80,5.47,0.00,1.00,24.00,-24.00 -163.20,-33.60,5.45,0.00,1.00,-148.80,-28.80 -158.40,-33.60,5.43,0.00,1.00,33.60,-28.80 -153.60,-38.40,5.40,0.00,1.00,-139.20,-33.60 -148.80,-43.20,5.38,0.00,1.00,43.20,-38.40 -144.00,-48.00,5.36,0.00,1.00,-129.60,-43.20 -139.20,-48.00,5.34,0.00,1.00,52.80,-48.00 -134.40,-52.80,5.32,0.00,1.00,-120.00,-48.00 -129.60,-57.60,5.30,0.00,1.00,62.40,-52.80 -120.00,-57.60,5.28,0.00,1.00,-110.40,-57.60 -110.40,-62.40,5.26,0.00,1.00,72.00,-57.60 -100.80,-62.40,5.23,0.00,1.00,-100.80,-57.60 -91.20,-62.40,5.21,0.00,1.00,81.60,-62.40 -81.60,-62.40,5.19,0.00,1.00,-91.20,-62.40 -72.00,-62.40,5.17,0.00,1.00,96.00,-62.40 -62.40,-57.60,5.15,0.00,1.00,-81.60,-62.40 -52.80,-57.60,5.13,0.00,1.00,105.60,-57.60 -48.00,-52.80,5.11,0.00,1.00,-72.00,-57.60 -43.20,-52.80,5.08,0.00,1.00,115.20,-52.80 -38.40,-48.00,5.06,0.00,1.00,-62.40,-52.80 -33.60,-43.20,5.04,0.00,1.00,124.80,-48.00 -28.80,-43.20,5.02,0.00,1.00,-52.80,-43.20 -24.00,-38.40,5.00,0.00,1.00,134.40,-38.40 -19.20,-33.60,4.98,0.00,1.00,-43.20,-38.40 -19.20,-28.80,4.96,0.00,1.00,144.00,-33.60 -14.40,-24.00,4.93,0.00,1.00,-33.60,-28.80 -9.60,-19.20,4.91,0.00,1.00,153.60,-24.00 -9.60,-19.20,4.89,0.00,1.00,-24.00,-19.20 -4.80,-14.40,4.87,0.00,1.00,163.20,-14.40 -4.80,-9.60,4.85,0.00,1.00,-14.40,-14.40 -0.00,-4.80,4.83,0.00,1.00,172.80,-9.60 -0.00,0.00,4.81,0.00,1.00,-4.80,-4.80 --4.80,4.80,4.79,0.00,1.00,0.00,0.00 --4.80,9.60,4.76,0.00,1.00,-177.60,4.80 --9.60,14.40,4.74,0.00,1.00,9.60,9.60 --9.60,14.40,4.72,0.00,1.00,-168.00,9.60 --14.40,19.20,4.70,0.00,1.00,19.20,14.40 --14.40,24.00,4.68,0.00,1.00,-158.40,19.20 --19.20,28.80,4.66,0.00,1.00,28.80,24.00 --24.00,33.60,4.64,0.00,1.00,-148.80,28.80 --28.80,33.60,4.61,0.00,1.00,38.40,28.80 --28.80,38.40,4.59,0.00,1.00,-139.20,33.60 --33.60,43.20,4.57,0.00,1.00,48.00,38.40 --38.40,43.20,4.55,0.00,1.00,-129.60,43.20 --48.00,48.00,4.53,0.00,1.00,57.60,43.20 --52.80,52.80,4.51,0.00,1.00,-120.00,48.00 --57.60,52.80,4.49,0.00,1.00,67.20,48.00 --67.20,57.60,4.46,0.00,1.00,-110.40,52.80 --76.80,57.60,4.44,0.00,1.00,76.80,52.80 --81.60,57.60,4.42,0.00,1.00,-100.80,57.60 --91.20,57.60,4.40,0.00,1.00,86.40,57.60 --100.80,57.60,4.38,0.00,1.00,-86.40,57.60 --110.40,57.60,4.36,0.00,1.00,96.00,57.60 --115.20,52.80,4.34,0.00,1.00,-76.80,52.80 --124.80,52.80,4.32,0.00,1.00,105.60,52.80 --129.60,48.00,4.29,0.00,1.00,-67.20,52.80 --139.20,48.00,4.27,0.00,1.00,115.20,48.00 --144.00,43.20,4.25,0.00,1.00,-57.60,48.00 --148.80,38.40,4.23,0.00,1.00,124.80,43.20 --153.60,38.40,4.21,0.00,1.00,-48.00,38.40 --153.60,33.60,4.19,0.00,1.00,134.40,38.40 --158.40,28.80,4.17,0.00,1.00,-38.40,33.60 --163.20,24.00,4.14,0.00,1.00,144.00,28.80 --163.20,24.00,4.12,0.00,1.00,-28.80,24.00 --168.00,19.20,4.10,0.00,1.00,153.60,24.00 --172.80,14.40,4.08,0.00,1.00,-19.20,19.20 --172.80,9.60,4.06,0.00,1.00,163.20,14.40 --177.60,4.80,4.04,0.00,1.00,-9.60,9.60 --177.60,0.00,4.02,0.00,1.00,172.80,4.80 -177.60,-0.00,3.99,0.00,1.00,-0.00,0.00 -177.60,-4.80,3.97,0.00,1.00,-177.60,-0.00 -172.80,-9.60,3.95,0.00,1.00,4.80,-4.80 -172.80,-14.40,3.93,0.00,1.00,-168.00,-9.60 -168.00,-19.20,3.91,0.00,1.00,14.40,-14.40 -163.20,-24.00,3.89,0.00,1.00,-158.40,-19.20 -163.20,-24.00,3.87,0.00,1.00,24.00,-24.00 -158.40,-28.80,3.85,0.00,1.00,-148.80,-24.00 -153.60,-33.60,3.82,0.00,1.00,33.60,-28.80 -153.60,-38.40,3.80,0.00,1.00,-139.20,-33.60 -148.80,-38.40,3.78,0.00,1.00,43.20,-38.40 -144.00,-43.20,3.76,0.00,1.00,-129.60,-38.40 -139.20,-48.00,3.74,0.00,1.00,52.80,-43.20 -129.60,-48.00,3.72,0.00,1.00,-120.00,-48.00 -124.80,-52.80,3.70,0.00,1.00,62.40,-48.00 -115.20,-52.80,3.67,0.00,1.00,-110.40,-52.80 -110.40,-57.60,3.65,0.00,1.00,72.00,-52.80 -100.80,-57.60,3.63,0.00,1.00,-100.80,-52.80 -91.20,-57.60,3.61,0.00,1.00,81.60,-57.60 -81.60,-57.60,3.59,0.00,1.00,-91.20,-57.60 -76.80,-57.60,3.57,0.00,1.00,96.00,-57.60 -67.20,-57.60,3.55,0.00,1.00,-81.60,-57.60 -57.60,-52.80,3.52,0.00,1.00,105.60,-52.80 -52.80,-52.80,3.50,0.00,1.00,-72.00,-52.80 -48.00,-48.00,3.48,0.00,1.00,115.20,-48.00 -38.40,-43.20,3.46,0.00,1.00,-62.40,-48.00 -33.60,-43.20,3.44,0.00,1.00,124.80,-43.20 -28.80,-38.40,3.42,0.00,1.00,-52.80,-43.20 -28.80,-33.60,3.40,0.00,1.00,134.40,-38.40 -24.00,-33.60,3.38,0.00,1.00,-43.20,-33.60 -19.20,-28.80,3.35,0.00,1.00,144.00,-28.80 -14.40,-24.00,3.33,0.00,1.00,-33.60,-28.80 -14.40,-19.20,3.31,0.00,1.00,153.60,-24.00 -9.60,-14.40,3.29,0.00,1.00,-24.00,-19.20 -9.60,-14.40,3.27,0.00,1.00,163.20,-14.40 -4.80,-9.60,3.25,0.00,1.00,-14.40,-9.60 -4.80,-4.80,3.23,0.00,1.00,172.80,-9.60 -0.00,0.00,3.20,0.00,1.00,-4.80,-4.80 --4.80,4.80,3.18,0.00,1.00,0.00,0.00 --4.80,9.60,3.16,0.00,1.00,-177.60,4.80 --9.60,9.60,3.14,0.00,1.00,9.60,9.60 --9.60,14.40,3.12,0.00,1.00,-168.00,9.60 --14.40,19.20,3.10,0.00,1.00,19.20,14.40 --19.20,24.00,3.08,0.00,1.00,-158.40,19.20 --24.00,24.00,3.05,0.00,1.00,28.80,24.00 --24.00,28.80,3.03,0.00,1.00,-148.80,24.00 --28.80,33.60,3.01,0.00,1.00,38.40,28.80 --33.60,38.40,2.99,0.00,1.00,-139.20,33.60 --38.40,38.40,2.97,0.00,1.00,48.00,33.60 --43.20,43.20,2.95,0.00,1.00,-129.60,38.40 --48.00,43.20,2.93,0.00,1.00,57.60,43.20 --52.80,48.00,2.91,0.00,1.00,-120.00,43.20 --62.40,48.00,2.88,0.00,1.00,67.20,48.00 --67.20,52.80,2.86,0.00,1.00,-110.40,48.00 --76.80,52.80,2.84,0.00,1.00,76.80,48.00 --86.40,52.80,2.82,0.00,1.00,-100.80,52.80 --91.20,52.80,2.80,0.00,1.00,86.40,52.80 --100.80,52.80,2.78,0.00,1.00,-86.40,52.80 --105.60,52.80,2.76,0.00,1.00,96.00,52.80 --115.20,48.00,2.73,0.00,1.00,-76.80,48.00 --120.00,48.00,2.71,0.00,1.00,105.60,48.00 --129.60,48.00,2.69,0.00,1.00,-67.20,48.00 --134.40,43.20,2.67,0.00,1.00,115.20,43.20 --139.20,43.20,2.65,0.00,1.00,-57.60,43.20 --144.00,38.40,2.63,0.00,1.00,124.80,38.40 --148.80,33.60,2.61,0.00,1.00,-48.00,38.40 --153.60,33.60,2.58,0.00,1.00,134.40,33.60 --158.40,28.80,2.56,0.00,1.00,-38.40,28.80 --158.40,24.00,2.54,0.00,1.00,144.00,28.80 --163.20,19.20,2.52,0.00,1.00,-28.80,24.00 --168.00,19.20,2.50,0.00,1.00,153.60,19.20 --168.00,14.40,2.48,0.00,1.00,-19.20,14.40 --172.80,9.60,2.46,0.00,1.00,163.20,14.40 --177.60,4.80,2.44,0.00,1.00,-9.60,9.60 --177.60,0.00,2.41,0.00,1.00,172.80,4.80 -177.60,-0.00,2.39,0.00,1.00,-0.00,0.00 -177.60,-4.80,2.37,0.00,1.00,-177.60,-0.00 -172.80,-9.60,2.35,0.00,1.00,4.80,-4.80 -168.00,-14.40,2.33,0.00,1.00,-168.00,-9.60 -168.00,-19.20,2.31,0.00,1.00,14.40,-14.40 -163.20,-19.20,2.29,0.00,1.00,-158.40,-14.40 -158.40,-24.00,2.26,0.00,1.00,24.00,-19.20 -158.40,-28.80,2.24,0.00,1.00,-148.80,-24.00 -153.60,-33.60,2.22,0.00,1.00,33.60,-28.80 -148.80,-33.60,2.20,0.00,1.00,-139.20,-28.80 -144.00,-38.40,2.18,0.00,1.00,43.20,-33.60 -139.20,-43.20,2.16,0.00,1.00,-129.60,-38.40 -134.40,-43.20,2.14,0.00,1.00,52.80,-38.40 -129.60,-48.00,2.11,0.00,1.00,-120.00,-43.20 -120.00,-48.00,2.09,0.00,1.00,62.40,-43.20 -115.20,-48.00,2.07,0.00,1.00,-110.40,-48.00 -105.60,-52.80,2.05,0.00,1.00,72.00,-48.00 -100.80,-52.80,2.03,0.00,1.00,-100.80,-48.00 -91.20,-52.80,2.01,0.00,1.00,81.60,-52.80 -86.40,-52.80,1.99,0.00,1.00,-91.20,-52.80 -76.80,-52.80,1.97,0.00,1.00,96.00,-52.80 -67.20,-52.80,1.94,0.00,1.00,-81.60,-52.80 -62.40,-48.00,1.92,0.00,1.00,105.60,-48.00 -52.80,-48.00,1.90,0.00,1.00,-72.00,-48.00 -48.00,-43.20,1.88,0.00,1.00,115.20,-48.00 -43.20,-43.20,1.86,0.00,1.00,-62.40,-43.20 -38.40,-38.40,1.84,0.00,1.00,124.80,-43.20 -33.60,-38.40,1.82,0.00,1.00,-52.80,-38.40 -28.80,-33.60,1.79,0.00,1.00,134.40,-33.60 -24.00,-28.80,1.77,0.00,1.00,-43.20,-33.60 -24.00,-24.00,1.75,0.00,1.00,144.00,-28.80 -19.20,-24.00,1.73,0.00,1.00,-33.60,-24.00 -14.40,-19.20,1.71,0.00,1.00,153.60,-24.00 -9.60,-14.40,1.69,0.00,1.00,-24.00,-19.20 -9.60,-9.60,1.67,0.00,1.00,163.20,-14.40 -4.80,-9.60,1.64,0.00,1.00,-14.40,-9.60 -4.80,-4.80,1.62,0.00,1.00,172.80,-9.60 -0.00,0.00,1.60,0.00,1.00,-4.80,-4.80 --4.80,4.80,1.58,0.00,1.00,0.00,0.00 --4.80,4.80,1.56,0.00,1.00,-177.60,4.80 --9.60,9.60,1.54,0.00,1.00,9.60,4.80 --14.40,14.40,1.52,0.00,1.00,-168.00,9.60 --14.40,19.20,1.50,0.00,1.00,19.20,14.40 --19.20,19.20,1.47,0.00,1.00,-158.40,19.20 --24.00,24.00,1.45,0.00,1.00,28.80,19.20 --28.80,28.80,1.43,0.00,1.00,-148.80,24.00 --33.60,28.80,1.41,0.00,1.00,38.40,28.80 --38.40,33.60,1.39,0.00,1.00,-139.20,28.80 --43.20,38.40,1.37,0.00,1.00,48.00,33.60 --48.00,38.40,1.35,0.00,1.00,-129.60,33.60 --52.80,43.20,1.32,0.00,1.00,57.60,38.40 --57.60,43.20,1.30,0.00,1.00,-120.00,38.40 --62.40,43.20,1.28,0.00,1.00,67.20,43.20 --72.00,48.00,1.26,0.00,1.00,-110.40,43.20 --76.80,48.00,1.24,0.00,1.00,76.80,43.20 --86.40,48.00,1.22,0.00,1.00,-100.80,48.00 --91.20,48.00,1.20,0.00,1.00,86.40,48.00 --100.80,48.00,1.17,0.00,1.00,-86.40,48.00 --105.60,48.00,1.15,0.00,1.00,96.00,48.00 --110.40,48.00,1.13,0.00,1.00,-76.80,48.00 --120.00,43.20,1.11,0.00,1.00,105.60,43.20 --124.80,43.20,1.09,0.00,1.00,-67.20,43.20 --129.60,38.40,1.07,0.00,1.00,115.20,43.20 --134.40,38.40,1.05,0.00,1.00,-57.60,38.40 --139.20,33.60,1.03,0.00,1.00,124.80,38.40 --144.00,33.60,1.00,0.00,1.00,-48.00,33.60 --148.80,28.80,0.98,0.00,1.00,134.40,33.60 --153.60,24.00,0.96,0.00,1.00,-38.40,28.80 --158.40,24.00,0.94,0.00,1.00,144.00,24.00 --163.20,19.20,0.92,0.00,1.00,-28.80,24.00 --163.20,14.40,0.90,0.00,1.00,153.60,19.20 --168.00,14.40,0.88,0.00,1.00,-19.20,14.40 --172.80,9.60,0.85,0.00,1.00,163.20,14.40 --172.80,4.80,0.83,0.00,1.00,-9.60,9.60 --177.60,0.00,0.81,0.00,1.00,172.80,4.80 -177.60,-0.00,0.79,0.00,1.00,-0.00,0.00 -172.80,-4.80,0.77,0.00,1.00,-177.60,-0.00 -172.80,-9.60,0.75,0.00,1.00,4.80,-4.80 -168.00,-14.40,0.73,0.00,1.00,-168.00,-9.60 -163.20,-14.40,0.70,0.00,1.00,14.40,-14.40 -163.20,-19.20,0.68,0.00,1.00,-158.40,-14.40 -158.40,-24.00,0.66,0.00,1.00,24.00,-19.20 -153.60,-24.00,0.64,0.00,1.00,-148.80,-24.00 -148.80,-28.80,0.62,0.00,1.00,33.60,-24.00 -144.00,-33.60,0.60,0.00,1.00,-139.20,-28.80 -139.20,-33.60,0.58,0.00,1.00,43.20,-33.60 -134.40,-38.40,0.56,0.00,1.00,-129.60,-33.60 -129.60,-38.40,0.53,0.00,1.00,52.80,-38.40 -124.80,-43.20,0.51,0.00,1.00,-120.00,-38.40 -120.00,-43.20,0.49,0.00,1.00,62.40,-43.20 -110.40,-48.00,0.47,0.00,1.00,-110.40,-43.20 -105.60,-48.00,0.45,0.00,1.00,72.00,-43.20 -100.80,-48.00,0.43,0.00,1.00,-100.80,-48.00 -91.20,-48.00,0.41,0.00,1.00,81.60,-48.00 -86.40,-48.00,0.38,0.00,1.00,-91.20,-48.00 -76.80,-48.00,0.36,0.00,1.00,96.00,-48.00 -72.00,-48.00,0.34,0.00,1.00,-81.60,-48.00 -62.40,-43.20,0.32,0.00,1.00,105.60,-43.20 -57.60,-43.20,0.30,0.00,1.00,-72.00,-43.20 -52.80,-43.20,0.28,0.00,1.00,115.20,-43.20 -48.00,-38.40,0.26,0.00,1.00,-62.40,-38.40 -43.20,-38.40,0.23,0.00,1.00,124.80,-38.40 -38.40,-33.60,0.21,0.00,1.00,-52.80,-33.60 -33.60,-28.80,0.19,0.00,1.00,134.40,-33.60 -28.80,-28.80,0.17,0.00,1.00,-43.20,-28.80 -24.00,-24.00,0.15,0.00,1.00,144.00,-28.80 -19.20,-19.20,0.13,0.00,1.00,-33.60,-24.00 -14.40,-19.20,0.11,0.00,1.00,153.60,-19.20 -14.40,-14.40,0.09,0.00,1.00,-24.00,-19.20 -9.60,-9.60,0.06,0.00,1.00,163.20,-14.40 -4.80,-4.80,0.04,0.00,1.00,-14.40,-9.60 -4.80,-4.80,0.02,0.00,1.00,172.80,-4.80 -0.00,0.00,0.00,0.00,1.00,-4.80,-4.80 --4.80,4.80,0.00,0.00,1.00,0.00,0.00 --4.80,4.80,0.02,0.00,1.00,-177.60,4.80 --9.60,9.60,0.04,0.00,1.00,9.60,4.80 --14.40,14.40,0.06,0.00,1.00,-168.00,9.60 --19.20,14.40,0.09,0.00,1.00,19.20,14.40 --24.00,19.20,0.11,0.00,1.00,-158.40,14.40 --24.00,24.00,0.13,0.00,1.00,28.80,19.20 --28.80,24.00,0.15,0.00,1.00,-148.80,24.00 --33.60,28.80,0.17,0.00,1.00,38.40,24.00 --38.40,28.80,0.19,0.00,1.00,-139.20,28.80 --43.20,33.60,0.21,0.00,1.00,48.00,28.80 --48.00,33.60,0.23,0.00,1.00,-129.60,33.60 --52.80,38.40,0.26,0.00,1.00,57.60,33.60 --62.40,38.40,0.28,0.00,1.00,-120.00,38.40 --67.20,38.40,0.30,0.00,1.00,67.20,38.40 --72.00,43.20,0.32,0.00,1.00,-110.40,38.40 --76.80,43.20,0.34,0.00,1.00,76.80,38.40 --86.40,43.20,0.36,0.00,1.00,-100.80,43.20 --91.20,43.20,0.38,0.00,1.00,86.40,43.20 --96.00,43.20,0.41,0.00,1.00,-86.40,43.20 --105.60,43.20,0.43,0.00,1.00,96.00,43.20 --110.40,43.20,0.45,0.00,1.00,-76.80,43.20 --115.20,38.40,0.47,0.00,1.00,105.60,38.40 --124.80,38.40,0.49,0.00,1.00,-67.20,38.40 --129.60,38.40,0.51,0.00,1.00,115.20,38.40 --134.40,33.60,0.53,0.00,1.00,-57.60,33.60 --139.20,33.60,0.56,0.00,1.00,124.80,33.60 --144.00,28.80,0.58,0.00,1.00,-48.00,28.80 --148.80,28.80,0.60,0.00,1.00,134.40,28.80 --153.60,24.00,0.62,0.00,1.00,-38.40,24.00 --158.40,19.20,0.64,0.00,1.00,144.00,24.00 --158.40,19.20,0.66,0.00,1.00,-28.80,19.20 --163.20,14.40,0.68,0.00,1.00,153.60,19.20 --168.00,9.60,0.70,0.00,1.00,-19.20,14.40 --172.80,9.60,0.73,0.00,1.00,163.20,9.60 --172.80,4.80,0.75,0.00,1.00,-9.60,9.60 --177.60,0.00,0.77,0.00,1.00,172.80,4.80 -177.60,-0.00,0.79,0.00,1.00,-0.00,0.00 -172.80,-4.80,0.81,0.00,1.00,-177.60,-0.00 -172.80,-9.60,0.83,0.00,1.00,4.80,-4.80 -168.00,-9.60,0.85,0.00,1.00,-168.00,-9.60 -163.20,-14.40,0.88,0.00,1.00,14.40,-9.60 -158.40,-19.20,0.90,0.00,1.00,-158.40,-14.40 -158.40,-19.20,0.92,0.00,1.00,24.00,-19.20 -153.60,-24.00,0.94,0.00,1.00,-148.80,-19.20 -148.80,-28.80,0.96,0.00,1.00,33.60,-24.00 -144.00,-28.80,0.98,0.00,1.00,-139.20,-24.00 -139.20,-33.60,1.00,0.00,1.00,43.20,-28.80 -134.40,-33.60,1.03,0.00,1.00,-129.60,-28.80 -129.60,-38.40,1.05,0.00,1.00,52.80,-33.60 -124.80,-38.40,1.07,0.00,1.00,-120.00,-33.60 -115.20,-38.40,1.09,0.00,1.00,62.40,-38.40 -110.40,-43.20,1.11,0.00,1.00,-110.40,-38.40 -105.60,-43.20,1.13,0.00,1.00,72.00,-38.40 -96.00,-43.20,1.15,0.00,1.00,-100.80,-43.20 -91.20,-43.20,1.17,0.00,1.00,81.60,-43.20 -86.40,-43.20,1.20,0.00,1.00,-91.20,-43.20 -76.80,-43.20,1.22,0.00,1.00,96.00,-43.20 -72.00,-43.20,1.24,0.00,1.00,-81.60,-43.20 -67.20,-38.40,1.26,0.00,1.00,105.60,-38.40 -62.40,-38.40,1.28,0.00,1.00,-72.00,-38.40 -52.80,-38.40,1.30,0.00,1.00,115.20,-38.40 -48.00,-33.60,1.32,0.00,1.00,-62.40,-38.40 -43.20,-33.60,1.35,0.00,1.00,124.80,-33.60 -38.40,-28.80,1.37,0.00,1.00,-52.80,-33.60 -33.60,-28.80,1.39,0.00,1.00,134.40,-28.80 -28.80,-24.00,1.41,0.00,1.00,-43.20,-28.80 -24.00,-24.00,1.43,0.00,1.00,144.00,-24.00 -24.00,-19.20,1.45,0.00,1.00,-33.60,-24.00 -19.20,-14.40,1.47,0.00,1.00,153.60,-19.20 -14.40,-14.40,1.50,0.00,1.00,-24.00,-14.40 -9.60,-9.60,1.52,0.00,1.00,163.20,-14.40 -4.80,-4.80,1.54,0.00,1.00,-14.40,-9.60 -4.80,-4.80,1.56,0.00,1.00,172.80,-4.80 -0.00,0.00,1.58,0.00,1.00,-4.80,-4.80 --4.80,4.80,1.60,0.00,1.00,0.00,0.00 --9.60,4.80,1.62,0.00,1.00,-177.60,4.80 --9.60,9.60,1.64,0.00,1.00,9.60,4.80 --14.40,9.60,1.67,0.00,1.00,-168.00,9.60 --19.20,14.40,1.69,0.00,1.00,19.20,9.60 --24.00,19.20,1.71,0.00,1.00,-158.40,14.40 --28.80,19.20,1.73,0.00,1.00,28.80,19.20 --33.60,24.00,1.75,0.00,1.00,-148.80,19.20 --38.40,24.00,1.77,0.00,1.00,38.40,24.00 --43.20,28.80,1.79,0.00,1.00,-139.20,24.00 --48.00,28.80,1.82,0.00,1.00,48.00,28.80 --52.80,33.60,1.84,0.00,1.00,-129.60,28.80 --57.60,33.60,1.86,0.00,1.00,57.60,28.80 --62.40,33.60,1.88,0.00,1.00,-120.00,33.60 --67.20,38.40,1.90,0.00,1.00,67.20,33.60 --72.00,38.40,1.92,0.00,1.00,-110.40,33.60 --81.60,38.40,1.94,0.00,1.00,76.80,38.40 --86.40,38.40,1.97,0.00,1.00,-100.80,38.40 --91.20,38.40,1.99,0.00,1.00,86.40,38.40 --96.00,38.40,2.01,0.00,1.00,-86.40,38.40 --105.60,38.40,2.03,0.00,1.00,96.00,38.40 --110.40,38.40,2.05,0.00,1.00,-76.80,38.40 --115.20,33.60,2.07,0.00,1.00,105.60,33.60 --120.00,33.60,2.09,0.00,1.00,-67.20,33.60 --124.80,33.60,2.11,0.00,1.00,115.20,33.60 --129.60,28.80,2.14,0.00,1.00,-57.60,33.60 --134.40,28.80,2.16,0.00,1.00,124.80,28.80 --139.20,24.00,2.18,0.00,1.00,-48.00,28.80 --144.00,24.00,2.20,0.00,1.00,134.40,24.00 --148.80,19.20,2.22,0.00,1.00,-38.40,24.00 --153.60,19.20,2.24,0.00,1.00,144.00,19.20 --158.40,14.40,2.26,0.00,1.00,-28.80,19.20 --163.20,14.40,2.29,0.00,1.00,153.60,14.40 --168.00,9.60,2.31,0.00,1.00,-19.20,14.40 --172.80,9.60,2.33,0.00,1.00,163.20,9.60 --172.80,4.80,2.35,0.00,1.00,-9.60,9.60 --177.60,0.00,2.37,0.00,1.00,172.80,4.80 -177.60,-0.00,2.39,0.00,1.00,-0.00,0.00 -172.80,-4.80,2.41,0.00,1.00,-177.60,-0.00 -172.80,-9.60,2.44,0.00,1.00,4.80,-4.80 -168.00,-9.60,2.46,0.00,1.00,-168.00,-9.60 -163.20,-14.40,2.48,0.00,1.00,14.40,-9.60 -158.40,-14.40,2.50,0.00,1.00,-158.40,-14.40 -153.60,-19.20,2.52,0.00,1.00,24.00,-14.40 -148.80,-19.20,2.54,0.00,1.00,-148.80,-19.20 -144.00,-24.00,2.56,0.00,1.00,33.60,-19.20 -139.20,-24.00,2.58,0.00,1.00,-139.20,-24.00 -134.40,-28.80,2.61,0.00,1.00,43.20,-24.00 -129.60,-28.80,2.63,0.00,1.00,-129.60,-28.80 -124.80,-33.60,2.65,0.00,1.00,52.80,-28.80 -120.00,-33.60,2.67,0.00,1.00,-120.00,-33.60 -115.20,-33.60,2.69,0.00,1.00,62.40,-33.60 -110.40,-38.40,2.71,0.00,1.00,-110.40,-33.60 -105.60,-38.40,2.73,0.00,1.00,72.00,-33.60 -96.00,-38.40,2.76,0.00,1.00,-100.80,-38.40 -91.20,-38.40,2.78,0.00,1.00,81.60,-38.40 -86.40,-38.40,2.80,0.00,1.00,-91.20,-38.40 -81.60,-38.40,2.82,0.00,1.00,96.00,-38.40 -72.00,-38.40,2.84,0.00,1.00,-81.60,-38.40 -67.20,-38.40,2.86,0.00,1.00,105.60,-38.40 -62.40,-33.60,2.88,0.00,1.00,-72.00,-33.60 -57.60,-33.60,2.91,0.00,1.00,115.20,-33.60 -52.80,-33.60,2.93,0.00,1.00,-62.40,-33.60 -48.00,-28.80,2.95,0.00,1.00,124.80,-28.80 -43.20,-28.80,2.97,0.00,1.00,-52.80,-28.80 -38.40,-24.00,2.99,0.00,1.00,134.40,-28.80 -33.60,-24.00,3.01,0.00,1.00,-43.20,-24.00 -28.80,-19.20,3.03,0.00,1.00,144.00,-24.00 -24.00,-19.20,3.05,0.00,1.00,-33.60,-19.20 -19.20,-14.40,3.08,0.00,1.00,153.60,-19.20 -14.40,-9.60,3.10,0.00,1.00,-24.00,-14.40 -9.60,-9.60,3.12,0.00,1.00,163.20,-9.60 -9.60,-4.80,3.14,0.00,1.00,-14.40,-9.60 -4.80,-4.80,3.16,0.00,1.00,172.80,-4.80 -0.00,0.00,3.18,0.00,1.00,-4.80,-4.80 --4.80,4.80,3.20,0.00,1.00,0.00,0.00 --9.60,4.80,3.23,0.00,1.00,-177.60,4.80 --14.40,9.60,3.25,0.00,1.00,9.60,4.80 --14.40,9.60,3.27,0.00,1.00,-168.00,9.60 --19.20,14.40,3.29,0.00,1.00,19.20,9.60 --24.00,14.40,3.31,0.00,1.00,-158.40,14.40 --28.80,19.20,3.33,0.00,1.00,28.80,14.40 --33.60,19.20,3.35,0.00,1.00,-148.80,19.20 --38.40,24.00,3.38,0.00,1.00,38.40,19.20 --43.20,24.00,3.40,0.00,1.00,-139.20,19.20 --48.00,24.00,3.42,0.00,1.00,48.00,24.00 --52.80,28.80,3.44,0.00,1.00,-129.60,24.00 --57.60,28.80,3.46,0.00,1.00,57.60,28.80 --62.40,28.80,3.48,0.00,1.00,-120.00,28.80 --67.20,33.60,3.50,0.00,1.00,67.20,28.80 --72.00,33.60,3.52,0.00,1.00,-110.40,28.80 --81.60,33.60,3.55,0.00,1.00,76.80,33.60 --86.40,33.60,3.57,0.00,1.00,-100.80,33.60 --91.20,33.60,3.59,0.00,1.00,86.40,33.60 --96.00,33.60,3.61,0.00,1.00,-86.40,33.60 --100.80,33.60,3.63,0.00,1.00,96.00,33.60 --110.40,33.60,3.65,0.00,1.00,-76.80,33.60 --115.20,33.60,3.67,0.00,1.00,105.60,28.80 --120.00,28.80,3.70,0.00,1.00,-67.20,28.80 --124.80,28.80,3.72,0.00,1.00,115.20,28.80 --129.60,28.80,3.74,0.00,1.00,-57.60,28.80 --134.40,24.00,3.76,0.00,1.00,124.80,24.00 --139.20,24.00,3.78,0.00,1.00,-48.00,24.00 --144.00,19.20,3.80,0.00,1.00,134.40,24.00 --148.80,19.20,3.82,0.00,1.00,-38.40,19.20 --153.60,14.40,3.85,0.00,1.00,144.00,19.20 --158.40,14.40,3.87,0.00,1.00,-28.80,14.40 --163.20,9.60,3.89,0.00,1.00,153.60,14.40 --168.00,9.60,3.91,0.00,1.00,-19.20,9.60 --168.00,4.80,3.93,0.00,1.00,163.20,9.60 --172.80,4.80,3.95,0.00,1.00,-9.60,4.80 --177.60,0.00,3.97,0.00,1.00,172.80,4.80 -177.60,-0.00,3.99,0.00,1.00,-0.00,0.00 -172.80,-4.80,4.02,0.00,1.00,-177.60,-0.00 -168.00,-4.80,4.04,0.00,1.00,4.80,-4.80 -168.00,-9.60,4.06,0.00,1.00,-168.00,-4.80 -163.20,-9.60,4.08,0.00,1.00,14.40,-9.60 -158.40,-14.40,4.10,0.00,1.00,-158.40,-9.60 -153.60,-14.40,4.12,0.00,1.00,24.00,-14.40 -148.80,-19.20,4.14,0.00,1.00,-148.80,-14.40 -144.00,-19.20,4.17,0.00,1.00,33.60,-19.20 -139.20,-24.00,4.19,0.00,1.00,-139.20,-19.20 -134.40,-24.00,4.21,0.00,1.00,43.20,-24.00 -129.60,-28.80,4.23,0.00,1.00,-129.60,-24.00 -124.80,-28.80,4.25,0.00,1.00,52.80,-24.00 -120.00,-28.80,4.27,0.00,1.00,-120.00,-28.80 -115.20,-33.60,4.29,0.00,1.00,62.40,-28.80 -110.40,-33.60,4.32,0.00,1.00,-110.40,-28.80 -100.80,-33.60,4.34,0.00,1.00,72.00,-28.80 -96.00,-33.60,4.36,0.00,1.00,-100.80,-33.60 -91.20,-33.60,4.38,0.00,1.00,81.60,-33.60 -86.40,-33.60,4.40,0.00,1.00,-91.20,-33.60 -81.60,-33.60,4.42,0.00,1.00,96.00,-33.60 -72.00,-33.60,4.44,0.00,1.00,-81.60,-33.60 -67.20,-33.60,4.46,0.00,1.00,105.60,-33.60 -62.40,-28.80,4.49,0.00,1.00,-72.00,-28.80 -57.60,-28.80,4.51,0.00,1.00,115.20,-28.80 -52.80,-28.80,4.53,0.00,1.00,-62.40,-28.80 -48.00,-24.00,4.55,0.00,1.00,124.80,-28.80 -43.20,-24.00,4.57,0.00,1.00,-52.80,-24.00 -38.40,-24.00,4.59,0.00,1.00,134.40,-24.00 -33.60,-19.20,4.61,0.00,1.00,-43.20,-19.20 -28.80,-19.20,4.64,0.00,1.00,144.00,-19.20 -24.00,-14.40,4.66,0.00,1.00,-33.60,-19.20 -19.20,-14.40,4.68,0.00,1.00,153.60,-14.40 -14.40,-9.60,4.70,0.00,1.00,-24.00,-14.40 -14.40,-9.60,4.72,0.00,1.00,163.20,-9.60 -9.60,-4.80,4.74,0.00,1.00,-14.40,-9.60 -4.80,-4.80,4.76,0.00,1.00,172.80,-4.80 -0.00,0.00,4.79,0.00,1.00,-4.80,-4.80 --4.80,0.00,4.81,0.00,1.00,0.00,0.00 --9.60,4.80,4.83,0.00,1.00,-177.60,0.00 --14.40,4.80,4.85,0.00,1.00,9.60,4.80 --19.20,9.60,4.87,0.00,1.00,-168.00,4.80 --19.20,9.60,4.89,0.00,1.00,19.20,9.60 --24.00,14.40,4.91,0.00,1.00,-158.40,9.60 --28.80,14.40,4.93,0.00,1.00,28.80,14.40 --33.60,19.20,4.96,0.00,1.00,-148.80,14.40 --38.40,19.20,4.98,0.00,1.00,38.40,14.40 --43.20,19.20,5.00,0.00,1.00,-139.20,19.20 --48.00,24.00,5.02,0.00,1.00,48.00,19.20 --52.80,24.00,5.04,0.00,1.00,-129.60,24.00 --57.60,24.00,5.06,0.00,1.00,57.60,24.00 --62.40,24.00,5.08,0.00,1.00,-120.00,24.00 --72.00,28.80,5.11,0.00,1.00,67.20,24.00 --76.80,28.80,5.13,0.00,1.00,-110.40,24.00 --81.60,28.80,5.15,0.00,1.00,76.80,28.80 --86.40,28.80,5.17,0.00,1.00,-100.80,28.80 --91.20,28.80,5.19,0.00,1.00,86.40,28.80 --96.00,28.80,5.21,0.00,1.00,-86.40,28.80 --100.80,28.80,5.23,0.00,1.00,96.00,28.80 --105.60,28.80,5.26,0.00,1.00,-76.80,28.80 --115.20,28.80,5.28,0.00,1.00,105.60,28.80 --120.00,24.00,5.30,0.00,1.00,-67.20,24.00 --124.80,24.00,5.32,0.00,1.00,115.20,24.00 --129.60,24.00,5.34,0.00,1.00,-57.60,24.00 --134.40,24.00,5.36,0.00,1.00,124.80,24.00 --139.20,19.20,5.38,0.00,1.00,-48.00,19.20 --144.00,19.20,5.40,0.00,1.00,134.40,19.20 --148.80,14.40,5.43,0.00,1.00,-38.40,19.20 --153.60,14.40,5.45,0.00,1.00,144.00,14.40 --158.40,14.40,5.47,0.00,1.00,-28.80,14.40 --163.20,9.60,5.49,0.00,1.00,153.60,9.60 --163.20,9.60,5.51,0.00,1.00,-19.20,9.60 --168.00,4.80,5.53,0.00,1.00,163.20,9.60 --172.80,4.80,5.55,0.00,1.00,-9.60,4.80 --177.60,0.00,5.58,0.00,1.00,172.80,4.80 -177.60,-0.00,5.60,0.00,1.00,-0.00,0.00 -172.80,-4.80,5.62,0.00,1.00,-177.60,-0.00 -168.00,-4.80,5.64,0.00,1.00,4.80,-4.80 -163.20,-9.60,5.66,0.00,1.00,-168.00,-4.80 -163.20,-9.60,5.68,0.00,1.00,14.40,-9.60 -158.40,-14.40,5.70,0.00,1.00,-158.40,-9.60 -153.60,-14.40,5.72,0.00,1.00,24.00,-9.60 -148.80,-14.40,5.75,0.00,1.00,-148.80,-14.40 -144.00,-19.20,5.77,0.00,1.00,33.60,-14.40 -139.20,-19.20,5.79,0.00,1.00,-139.20,-19.20 -134.40,-24.00,5.81,0.00,1.00,43.20,-19.20 -129.60,-24.00,5.83,0.00,1.00,-129.60,-19.20 -124.80,-24.00,5.85,0.00,1.00,52.80,-24.00 -120.00,-24.00,5.87,0.00,1.00,-120.00,-24.00 -115.20,-28.80,5.90,0.00,1.00,62.40,-24.00 -105.60,-28.80,5.92,0.00,1.00,-110.40,-24.00 -100.80,-28.80,5.94,0.00,1.00,72.00,-28.80 -96.00,-28.80,5.96,0.00,1.00,-100.80,-28.80 -91.20,-28.80,5.98,0.00,1.00,81.60,-28.80 -86.40,-28.80,6.00,0.00,1.00,-91.20,-28.80 -81.60,-28.80,6.02,0.00,1.00,96.00,-28.80 -76.80,-28.80,6.05,0.00,1.00,-81.60,-28.80 -72.00,-28.80,6.07,0.00,1.00,105.60,-28.80 -62.40,-24.00,6.09,0.00,1.00,-72.00,-24.00 -57.60,-24.00,6.11,0.00,1.00,115.20,-24.00 -52.80,-24.00,6.13,0.00,1.00,-62.40,-24.00 -48.00,-24.00,6.15,0.00,1.00,124.80,-24.00 -43.20,-19.20,6.17,0.00,1.00,-52.80,-24.00 -38.40,-19.20,6.19,0.00,1.00,134.40,-19.20 -33.60,-19.20,6.22,0.00,1.00,-43.20,-19.20 -28.80,-14.40,6.24,0.00,1.00,144.00,-14.40 -24.00,-14.40,6.26,0.00,1.00,-33.60,-14.40 -19.20,-9.60,6.28,0.00,1.00,153.60,-14.40 -19.20,-9.60,6.30,0.00,1.00,-24.00,-9.60 -14.40,-4.80,6.32,0.00,1.00,163.20,-9.60 -9.60,-4.80,6.34,0.00,1.00,-14.40,-4.80 -4.80,-0.00,6.37,0.00,1.00,172.80,-4.80 -0.00,0.00,6.39,0.00,1.00,-4.80,-0.00 --4.80,0.00,6.41,0.00,1.00,0.00,0.00 --9.60,4.80,6.43,0.00,1.00,-177.60,0.00 --14.40,4.80,6.45,0.00,1.00,9.60,4.80 --19.20,9.60,6.47,0.00,1.00,-168.00,4.80 --24.00,9.60,6.49,0.00,1.00,19.20,9.60 --28.80,9.60,6.52,0.00,1.00,-158.40,9.60 --33.60,14.40,6.54,0.00,1.00,28.80,9.60 --33.60,14.40,6.56,0.00,1.00,-148.80,14.40 --38.40,14.40,6.58,0.00,1.00,38.40,14.40 --43.20,19.20,6.60,0.00,1.00,-139.20,14.40 --48.00,19.20,6.62,0.00,1.00,48.00,14.40 --57.60,19.20,6.64,0.00,1.00,-129.60,19.20 --62.40,19.20,6.66,0.00,1.00,57.60,19.20 --67.20,24.00,6.69,0.00,1.00,-120.00,19.20 --72.00,24.00,6.71,0.00,1.00,67.20,19.20 --76.80,24.00,6.73,0.00,1.00,-110.40,24.00 --81.60,24.00,6.75,0.00,1.00,76.80,24.00 --86.40,24.00,6.77,0.00,1.00,-100.80,24.00 --91.20,24.00,6.79,0.00,1.00,86.40,24.00 --96.00,24.00,6.81,0.00,1.00,-86.40,24.00 --100.80,24.00,6.84,0.00,1.00,96.00,24.00 --105.60,24.00,6.86,0.00,1.00,-76.80,24.00 --110.40,24.00,6.88,0.00,1.00,105.60,24.00 --115.20,19.20,6.90,0.00,1.00,-67.20,19.20 --120.00,19.20,6.92,0.00,1.00,115.20,19.20 --129.60,19.20,6.94,0.00,1.00,-57.60,19.20 --134.40,19.20,6.96,0.00,1.00,124.80,19.20 --139.20,19.20,6.99,0.00,1.00,-48.00,19.20 --144.00,14.40,7.01,0.00,1.00,134.40,14.40 --148.80,14.40,7.03,0.00,1.00,-38.40,14.40 --148.80,14.40,7.05,0.00,1.00,144.00,14.40 --153.60,9.60,7.07,0.00,1.00,-28.80,9.60 --158.40,9.60,7.09,0.00,1.00,153.60,9.60 --163.20,4.80,7.11,0.00,1.00,-19.20,9.60 --168.00,4.80,7.13,0.00,1.00,163.20,4.80 --172.80,4.80,7.16,0.00,1.00,-9.60,4.80 --177.60,0.00,7.18,0.00,1.00,172.80,4.80 -177.60,-0.00,7.20,0.00,1.00,-0.00,0.00 -172.80,-4.80,7.22,0.00,1.00,-177.60,-0.00 -168.00,-4.80,7.24,0.00,1.00,4.80,-4.80 -163.20,-4.80,7.26,0.00,1.00,-168.00,-4.80 -158.40,-9.60,7.28,0.00,1.00,14.40,-4.80 -153.60,-9.60,7.31,0.00,1.00,-158.40,-9.60 -148.80,-14.40,7.33,0.00,1.00,24.00,-9.60 -148.80,-14.40,7.35,0.00,1.00,-148.80,-9.60 -144.00,-14.40,7.37,0.00,1.00,33.60,-14.40 -139.20,-19.20,7.39,0.00,1.00,-139.20,-14.40 -134.40,-19.20,7.41,0.00,1.00,43.20,-14.40 -129.60,-19.20,7.43,0.00,1.00,-129.60,-19.20 -120.00,-19.20,7.46,0.00,1.00,52.80,-19.20 -115.20,-19.20,7.48,0.00,1.00,-120.00,-19.20 -110.40,-24.00,7.50,0.00,1.00,62.40,-19.20 -105.60,-24.00,7.52,0.00,1.00,-110.40,-19.20 -100.80,-24.00,7.54,0.00,1.00,72.00,-24.00 -96.00,-24.00,7.56,0.00,1.00,-100.80,-24.00 -91.20,-24.00,7.58,0.00,1.00,81.60,-24.00 -86.40,-24.00,7.60,0.00,1.00,-91.20,-24.00 -81.60,-24.00,7.63,0.00,1.00,96.00,-24.00 -76.80,-24.00,7.65,0.00,1.00,-81.60,-24.00 -72.00,-24.00,7.67,0.00,1.00,105.60,-24.00 -67.20,-24.00,7.69,0.00,1.00,-72.00,-24.00 -62.40,-19.20,7.71,0.00,1.00,115.20,-19.20 -57.60,-19.20,7.73,0.00,1.00,-62.40,-19.20 -48.00,-19.20,7.75,0.00,1.00,124.80,-19.20 -43.20,-19.20,7.78,0.00,1.00,-52.80,-19.20 -38.40,-14.40,7.80,0.00,1.00,134.40,-14.40 -33.60,-14.40,7.82,0.00,1.00,-43.20,-14.40 -33.60,-14.40,7.84,0.00,1.00,144.00,-14.40 -28.80,-9.60,7.86,0.00,1.00,-33.60,-14.40 -24.00,-9.60,7.88,0.00,1.00,153.60,-9.60 -19.20,-9.60,7.90,0.00,1.00,-24.00,-9.60 -14.40,-4.80,7.93,0.00,1.00,163.20,-9.60 -9.60,-4.80,7.95,0.00,1.00,-14.40,-4.80 -4.80,-0.00,7.97,0.00,1.00,172.80,-4.80 -0.00,0.00,7.99,0.00,1.00,-4.80,-0.00 --4.80,0.00,8.01,0.00,1.00,0.00,0.00 --9.60,4.80,8.03,0.00,1.00,-177.60,0.00 --14.40,4.80,8.05,0.00,1.00,9.60,4.80 --19.20,4.80,8.07,0.00,1.00,-168.00,4.80 --24.00,9.60,8.10,0.00,1.00,19.20,4.80 --28.80,9.60,8.12,0.00,1.00,-158.40,9.60 --33.60,9.60,8.14,0.00,1.00,24.00,9.60 --38.40,9.60,8.16,0.00,1.00,-148.80,9.60 --43.20,14.40,8.18,0.00,1.00,33.60,9.60 --48.00,14.40,8.20,0.00,1.00,-139.20,14.40 --52.80,14.40,8.22,0.00,1.00,43.20,14.40 --57.60,14.40,8.25,0.00,1.00,-129.60,14.40 --62.40,19.20,8.27,0.00,1.00,52.80,14.40 --67.20,19.20,8.29,0.00,1.00,-120.00,14.40 --72.00,19.20,8.31,0.00,1.00,62.40,14.40 --76.80,19.20,8.33,0.00,1.00,-110.40,19.20 --81.60,19.20,8.35,0.00,1.00,76.80,19.20 --86.40,19.20,8.37,0.00,1.00,-100.80,19.20 --91.20,19.20,8.40,0.00,1.00,86.40,19.20 --96.00,19.20,8.42,0.00,1.00,-86.40,19.20 --100.80,19.20,8.44,0.00,1.00,96.00,19.20 --105.60,19.20,8.46,0.00,1.00,-76.80,19.20 --110.40,19.20,8.48,0.00,1.00,105.60,19.20 --115.20,19.20,8.50,0.00,1.00,-67.20,19.20 --120.00,14.40,8.52,0.00,1.00,120.00,14.40 --124.80,14.40,8.54,0.00,1.00,-57.60,14.40 --129.60,14.40,8.57,0.00,1.00,129.60,14.40 --134.40,14.40,8.59,0.00,1.00,-48.00,14.40 --139.20,14.40,8.61,0.00,1.00,139.20,14.40 --144.00,9.60,8.63,0.00,1.00,-38.40,9.60 --148.80,9.60,8.65,0.00,1.00,148.80,9.60 --153.60,9.60,8.67,0.00,1.00,-28.80,9.60 --158.40,4.80,8.69,0.00,1.00,158.40,9.60 --163.20,4.80,8.72,0.00,1.00,-19.20,4.80 --168.00,4.80,8.74,0.00,1.00,163.20,4.80 --172.80,0.00,8.76,0.00,1.00,-9.60,4.80 --177.60,0.00,8.78,0.00,1.00,172.80,0.00 -177.60,-0.00,8.80,0.00,1.00,-0.00,0.00 -172.80,-0.00,8.82,0.00,1.00,-177.60,-0.00 -168.00,-4.80,8.84,0.00,1.00,4.80,-0.00 -163.20,-4.80,8.87,0.00,1.00,-168.00,-4.80 -158.40,-4.80,8.89,0.00,1.00,14.40,-4.80 -153.60,-9.60,8.91,0.00,1.00,-158.40,-4.80 -148.80,-9.60,8.93,0.00,1.00,24.00,-9.60 -144.00,-9.60,8.95,0.00,1.00,-153.60,-9.60 -139.20,-14.40,8.97,0.00,1.00,33.60,-9.60 -134.40,-14.40,8.99,0.00,1.00,-144.00,-9.60 -129.60,-14.40,9.01,0.00,1.00,43.20,-14.40 -124.80,-14.40,9.04,0.00,1.00,-134.40,-14.40 -120.00,-14.40,9.06,0.00,1.00,52.80,-14.40 -115.20,-19.20,9.08,0.00,1.00,-124.80,-14.40 -110.40,-19.20,9.10,0.00,1.00,62.40,-14.40 -105.60,-19.20,9.12,0.00,1.00,-110.40,-19.20 -100.80,-19.20,9.14,0.00,1.00,72.00,-19.20 -96.00,-19.20,9.16,0.00,1.00,-100.80,-19.20 -91.20,-19.20,9.19,0.00,1.00,81.60,-19.20 -86.40,-19.20,9.21,0.00,1.00,-91.20,-19.20 -81.60,-19.20,9.23,0.00,1.00,96.00,-19.20 -76.80,-19.20,9.25,0.00,1.00,-81.60,-19.20 -72.00,-19.20,9.27,0.00,1.00,105.60,-19.20 -67.20,-19.20,9.29,0.00,1.00,-72.00,-19.20 -62.40,-19.20,9.31,0.00,1.00,115.20,-14.40 -57.60,-14.40,9.34,0.00,1.00,-57.60,-14.40 -52.80,-14.40,9.36,0.00,1.00,124.80,-14.40 -48.00,-14.40,9.38,0.00,1.00,-48.00,-14.40 -43.20,-14.40,9.40,0.00,1.00,134.40,-14.40 -38.40,-9.60,9.42,0.00,1.00,-38.40,-14.40 -33.60,-9.60,9.44,0.00,1.00,144.00,-9.60 -28.80,-9.60,9.46,0.00,1.00,-28.80,-9.60 -24.00,-9.60,9.48,0.00,1.00,153.60,-9.60 -19.20,-4.80,9.51,0.00,1.00,-24.00,-9.60 -14.40,-4.80,9.53,0.00,1.00,163.20,-4.80 -9.60,-4.80,9.55,0.00,1.00,-14.40,-4.80 -4.80,-0.00,9.57,0.00,1.00,172.80,-4.80 -0.00,0.00,9.59,0.00,1.00,-4.80,-0.00 --4.80,0.00,9.61,0.00,1.00,0.00,0.00 --9.60,0.00,9.63,0.00,1.00,-177.60,0.00 --14.40,4.80,9.66,0.00,1.00,9.60,0.00 --19.20,4.80,9.68,0.00,1.00,-168.00,4.80 --24.00,4.80,9.70,0.00,1.00,14.40,4.80 --28.80,4.80,9.72,0.00,1.00,-158.40,4.80 --33.60,9.60,9.74,0.00,1.00,24.00,4.80 --38.40,9.60,9.76,0.00,1.00,-148.80,9.60 --43.20,9.60,9.78,0.00,1.00,33.60,9.60 --48.00,9.60,9.81,0.00,1.00,-139.20,9.60 --52.80,9.60,9.83,0.00,1.00,43.20,9.60 --57.60,14.40,9.85,0.00,1.00,-129.60,9.60 --62.40,14.40,9.87,0.00,1.00,52.80,9.60 --67.20,14.40,9.89,0.00,1.00,-120.00,9.60 --72.00,14.40,9.91,0.00,1.00,62.40,14.40 --76.80,14.40,9.93,0.00,1.00,-110.40,14.40 --81.60,14.40,9.95,0.00,1.00,76.80,14.40 --86.40,14.40,9.98,0.00,1.00,-100.80,14.40 --91.20,14.40,10.00,0.00,1.00,86.40,14.40 --96.00,14.40,10.02,0.00,1.00,-86.40,14.40 --100.80,14.40,10.04,0.00,1.00,96.00,14.40 --105.60,14.40,10.06,0.00,1.00,-76.80,14.40 --110.40,14.40,10.08,0.00,1.00,110.40,14.40 --115.20,14.40,10.10,0.00,1.00,-67.20,14.40 --120.00,14.40,10.13,0.00,1.00,120.00,9.60 --124.80,9.60,10.15,0.00,1.00,-57.60,9.60 --129.60,9.60,10.17,0.00,1.00,129.60,9.60 --134.40,9.60,10.19,0.00,1.00,-48.00,9.60 --139.20,9.60,10.21,0.00,1.00,139.20,9.60 --144.00,9.60,10.23,0.00,1.00,-38.40,9.60 --148.80,9.60,10.25,0.00,1.00,148.80,9.60 --153.60,4.80,10.28,0.00,1.00,-28.80,4.80 --158.40,4.80,10.30,0.00,1.00,158.40,4.80 --163.20,4.80,10.32,0.00,1.00,-19.20,4.80 --168.00,4.80,10.34,0.00,1.00,168.00,4.80 --172.80,0.00,10.36,0.00,1.00,-9.60,4.80 --177.60,0.00,10.38,0.00,1.00,172.80,0.00 -177.60,-0.00,10.40,0.00,1.00,-0.00,0.00 -172.80,-0.00,10.42,0.00,1.00,-177.60,-0.00 -168.00,-4.80,10.45,0.00,1.00,4.80,-0.00 -163.20,-4.80,10.47,0.00,1.00,-168.00,-4.80 -158.40,-4.80,10.49,0.00,1.00,14.40,-4.80 -153.60,-4.80,10.51,0.00,1.00,-163.20,-4.80 -148.80,-9.60,10.53,0.00,1.00,24.00,-4.80 -144.00,-9.60,10.55,0.00,1.00,-153.60,-4.80 -139.20,-9.60,10.57,0.00,1.00,33.60,-9.60 -134.40,-9.60,10.60,0.00,1.00,-144.00,-9.60 -129.60,-9.60,10.62,0.00,1.00,43.20,-9.60 -124.80,-9.60,10.64,0.00,1.00,-134.40,-9.60 -120.00,-14.40,10.66,0.00,1.00,52.80,-9.60 -115.20,-14.40,10.68,0.00,1.00,-124.80,-9.60 -110.40,-14.40,10.70,0.00,1.00,62.40,-9.60 -105.60,-14.40,10.72,0.00,1.00,-115.20,-14.40 -100.80,-14.40,10.74,0.00,1.00,72.00,-14.40 -96.00,-14.40,10.77,0.00,1.00,-100.80,-14.40 -91.20,-14.40,10.79,0.00,1.00,81.60,-14.40 -86.40,-14.40,10.81,0.00,1.00,-91.20,-14.40 -81.60,-14.40,10.83,0.00,1.00,96.00,-14.40 -76.80,-14.40,10.85,0.00,1.00,-81.60,-14.40 -72.00,-14.40,10.87,0.00,1.00,105.60,-14.40 -67.20,-14.40,10.89,0.00,1.00,-67.20,-14.40 -62.40,-14.40,10.92,0.00,1.00,115.20,-14.40 -57.60,-14.40,10.94,0.00,1.00,-57.60,-9.60 -52.80,-9.60,10.96,0.00,1.00,124.80,-9.60 -48.00,-9.60,10.98,0.00,1.00,-48.00,-9.60 -43.20,-9.60,11.00,0.00,1.00,134.40,-9.60 -38.40,-9.60,11.02,0.00,1.00,-38.40,-9.60 -33.60,-9.60,11.04,0.00,1.00,144.00,-9.60 -28.80,-4.80,11.07,0.00,1.00,-28.80,-9.60 -24.00,-4.80,11.09,0.00,1.00,153.60,-4.80 -19.20,-4.80,11.11,0.00,1.00,-19.20,-4.80 -14.40,-4.80,11.13,0.00,1.00,163.20,-4.80 -9.60,-0.00,11.15,0.00,1.00,-14.40,-4.80 -4.80,-0.00,11.17,0.00,1.00,172.80,-0.00 -0.00,0.00,11.19,0.00,1.00,-4.80,-0.00 --4.80,0.00,11.21,0.00,1.00,0.00,0.00 --9.60,0.00,11.24,0.00,1.00,-177.60,0.00 --14.40,0.00,11.26,0.00,1.00,9.60,0.00 --19.20,4.80,11.28,0.00,1.00,-168.00,0.00 --24.00,4.80,11.30,0.00,1.00,14.40,4.80 --28.80,4.80,11.32,0.00,1.00,-158.40,4.80 --33.60,4.80,11.34,0.00,1.00,24.00,4.80 --38.40,4.80,11.36,0.00,1.00,-153.60,4.80 --43.20,4.80,11.39,0.00,1.00,33.60,4.80 --48.00,4.80,11.41,0.00,1.00,-144.00,4.80 --52.80,9.60,11.43,0.00,1.00,43.20,4.80 --57.60,9.60,11.45,0.00,1.00,-134.40,4.80 --62.40,9.60,11.47,0.00,1.00,52.80,4.80 --67.20,9.60,11.49,0.00,1.00,-124.80,9.60 --72.00,9.60,11.51,0.00,1.00,62.40,9.60 --76.80,9.60,11.54,0.00,1.00,-110.40,9.60 --81.60,9.60,11.56,0.00,1.00,72.00,9.60 --86.40,9.60,11.58,0.00,1.00,-100.80,9.60 --91.20,9.60,11.60,0.00,1.00,86.40,9.60 --96.00,9.60,11.62,0.00,1.00,-86.40,9.60 --100.80,9.60,11.64,0.00,1.00,96.00,9.60 --105.60,9.60,11.66,0.00,1.00,-76.80,9.60 --110.40,9.60,11.68,0.00,1.00,110.40,9.60 --115.20,9.60,11.71,0.00,1.00,-67.20,9.60 --120.00,9.60,11.73,0.00,1.00,120.00,9.60 --124.80,9.60,11.75,0.00,1.00,-52.80,9.60 --129.60,9.60,11.77,0.00,1.00,129.60,4.80 --134.40,4.80,11.79,0.00,1.00,-43.20,4.80 --139.20,4.80,11.81,0.00,1.00,139.20,4.80 --144.00,4.80,11.83,0.00,1.00,-33.60,4.80 --148.80,4.80,11.86,0.00,1.00,148.80,4.80 --153.60,4.80,11.88,0.00,1.00,-24.00,4.80 --158.40,4.80,11.90,0.00,1.00,158.40,4.80 --163.20,4.80,11.92,0.00,1.00,-19.20,4.80 --168.00,0.00,11.94,0.00,1.00,168.00,4.80 --172.80,0.00,11.96,0.00,1.00,-9.60,0.00 --177.60,0.00,11.98,0.00,1.00,172.80,0.00 -177.60,-0.00,12.01,0.00,1.00,-0.00,0.00 -172.80,-0.00,12.03,0.00,1.00,-177.60,-0.00 -168.00,-0.00,12.05,0.00,1.00,4.80,-0.00 -163.20,-4.80,12.07,0.00,1.00,-168.00,-0.00 -158.40,-4.80,12.09,0.00,1.00,14.40,-4.80 -153.60,-4.80,12.11,0.00,1.00,-163.20,-4.80 -148.80,-4.80,12.13,0.00,1.00,24.00,-4.80 -144.00,-4.80,12.15,0.00,1.00,-153.60,-4.80 -139.20,-4.80,12.18,0.00,1.00,28.80,-4.80 -134.40,-4.80,12.20,0.00,1.00,-144.00,-4.80 -129.60,-9.60,12.22,0.00,1.00,38.40,-4.80 -124.80,-9.60,12.24,0.00,1.00,-134.40,-4.80 -120.00,-9.60,12.26,0.00,1.00,48.00,-4.80 -115.20,-9.60,12.28,0.00,1.00,-124.80,-9.60 -110.40,-9.60,12.30,0.00,1.00,57.60,-9.60 -105.60,-9.60,12.33,0.00,1.00,-115.20,-9.60 -100.80,-9.60,12.35,0.00,1.00,72.00,-9.60 -96.00,-9.60,12.37,0.00,1.00,-105.60,-9.60 -91.20,-9.60,12.39,0.00,1.00,81.60,-9.60 -86.40,-9.60,12.41,0.00,1.00,-91.20,-9.60 -81.60,-9.60,12.43,0.00,1.00,96.00,-9.60 -76.80,-9.60,12.45,0.00,1.00,-81.60,-9.60 -72.00,-9.60,12.48,0.00,1.00,105.60,-9.60 -67.20,-9.60,12.50,0.00,1.00,-67.20,-9.60 -62.40,-9.60,12.52,0.00,1.00,120.00,-9.60 -57.60,-9.60,12.54,0.00,1.00,-57.60,-9.60 -52.80,-9.60,12.56,0.00,1.00,129.60,-4.80 -48.00,-4.80,12.58,0.00,1.00,-48.00,-4.80 -43.20,-4.80,12.60,0.00,1.00,139.20,-4.80 -38.40,-4.80,12.62,0.00,1.00,-38.40,-4.80 -33.60,-4.80,12.65,0.00,1.00,148.80,-4.80 -28.80,-4.80,12.67,0.00,1.00,-28.80,-4.80 -24.00,-4.80,12.69,0.00,1.00,158.40,-4.80 -19.20,-4.80,12.71,0.00,1.00,-19.20,-4.80 -14.40,-0.00,12.73,0.00,1.00,163.20,-4.80 -9.60,-0.00,12.75,0.00,1.00,-9.60,-0.00 -4.80,-0.00,12.77,0.00,1.00,172.80,-0.00 -0.00,0.00,12.80,0.00,1.00,-4.80,-0.00 --4.80,0.00,12.82,0.00,1.00,0.00,0.00 --9.60,0.00,12.84,0.00,1.00,-177.60,0.00 --14.40,0.00,12.86,0.00,1.00,9.60,0.00 --19.20,0.00,12.88,0.00,1.00,-168.00,0.00 --24.00,0.00,12.90,0.00,1.00,14.40,0.00 --28.80,0.00,12.92,0.00,1.00,-163.20,0.00 --33.60,4.80,12.95,0.00,1.00,24.00,0.00 --38.40,4.80,12.97,0.00,1.00,-153.60,0.00 --43.20,4.80,12.99,0.00,1.00,28.80,0.00 --48.00,4.80,13.01,0.00,1.00,-144.00,4.80 --52.80,4.80,13.03,0.00,1.00,38.40,4.80 --57.60,4.80,13.05,0.00,1.00,-134.40,4.80 --62.40,4.80,13.07,0.00,1.00,48.00,4.80 --67.20,4.80,13.09,0.00,1.00,-124.80,4.80 --72.00,4.80,13.12,0.00,1.00,62.40,4.80 --76.80,4.80,13.14,0.00,1.00,-115.20,4.80 --81.60,4.80,13.16,0.00,1.00,72.00,4.80 --86.40,4.80,13.18,0.00,1.00,-100.80,4.80 --91.20,4.80,13.20,0.00,1.00,86.40,4.80 --96.00,4.80,13.22,0.00,1.00,-86.40,4.80 --100.80,4.80,13.24,0.00,1.00,96.00,4.80 --105.60,4.80,13.27,0.00,1.00,-76.80,4.80 --110.40,4.80,13.29,0.00,1.00,110.40,4.80 --115.20,4.80,13.31,0.00,1.00,-62.40,4.80 --120.00,4.80,13.33,0.00,1.00,120.00,4.80 --124.80,4.80,13.35,0.00,1.00,-52.80,4.80 --129.60,4.80,13.37,0.00,1.00,134.40,4.80 --134.40,4.80,13.39,0.00,1.00,-43.20,4.80 --139.20,4.80,13.42,0.00,1.00,144.00,4.80 --144.00,4.80,13.44,0.00,1.00,-33.60,0.00 --148.80,4.80,13.46,0.00,1.00,153.60,0.00 --153.60,0.00,13.48,0.00,1.00,-24.00,0.00 --158.40,0.00,13.50,0.00,1.00,158.40,0.00 --163.20,0.00,13.52,0.00,1.00,-14.40,0.00 --168.00,0.00,13.54,0.00,1.00,168.00,0.00 --172.80,0.00,13.56,0.00,1.00,-9.60,0.00 --177.60,0.00,13.59,0.00,1.00,172.80,0.00 -177.60,-0.00,13.61,0.00,1.00,-0.00,0.00 -172.80,-0.00,13.63,0.00,1.00,-177.60,-0.00 -168.00,-0.00,13.65,0.00,1.00,4.80,-0.00 -163.20,-0.00,13.67,0.00,1.00,-172.80,-0.00 -158.40,-0.00,13.69,0.00,1.00,14.40,-0.00 -153.60,-0.00,13.71,0.00,1.00,-163.20,-0.00 -148.80,-4.80,13.74,0.00,1.00,19.20,-0.00 -144.00,-4.80,13.76,0.00,1.00,-153.60,-0.00 -139.20,-4.80,13.78,0.00,1.00,28.80,-0.00 -134.40,-4.80,13.80,0.00,1.00,-148.80,-0.00 -129.60,-4.80,13.82,0.00,1.00,38.40,-4.80 -124.80,-4.80,13.84,0.00,1.00,-139.20,-4.80 -120.00,-4.80,13.86,0.00,1.00,48.00,-4.80 -115.20,-4.80,13.89,0.00,1.00,-129.60,-4.80 -110.40,-4.80,13.91,0.00,1.00,57.60,-4.80 -105.60,-4.80,13.93,0.00,1.00,-115.20,-4.80 -100.80,-4.80,13.95,0.00,1.00,67.20,-4.80 -96.00,-4.80,13.97,0.00,1.00,-105.60,-4.80 -91.20,-4.80,13.99,0.00,1.00,81.60,-4.80 -86.40,-4.80,14.01,0.00,1.00,-91.20,-4.80 -81.60,-4.80,14.03,0.00,1.00,96.00,-4.80 -76.80,-4.80,14.06,0.00,1.00,-76.80,-4.80 -72.00,-4.80,14.08,0.00,1.00,105.60,-4.80 -67.20,-4.80,14.10,0.00,1.00,-67.20,-4.80 -62.40,-4.80,14.12,0.00,1.00,120.00,-4.80 -57.60,-4.80,14.14,0.00,1.00,-52.80,-4.80 -52.80,-4.80,14.16,0.00,1.00,129.60,-4.80 -48.00,-4.80,14.18,0.00,1.00,-43.20,-4.80 -43.20,-4.80,14.21,0.00,1.00,139.20,-4.80 -38.40,-4.80,14.23,0.00,1.00,-33.60,-4.80 -33.60,-4.80,14.25,0.00,1.00,148.80,-0.00 -28.80,-0.00,14.27,0.00,1.00,-28.80,-0.00 -24.00,-0.00,14.29,0.00,1.00,158.40,-0.00 -19.20,-0.00,14.31,0.00,1.00,-19.20,-0.00 -14.40,-0.00,14.33,0.00,1.00,163.20,-0.00 -9.60,-0.00,14.36,0.00,1.00,-9.60,-0.00 -4.80,-0.00,14.38,0.00,1.00,172.80,-0.00 -0.00,0.00,14.40,0.00,1.00,-4.80,-0.00 --4.80,0.00,14.42,0.00,1.00,0.00,0.00 --9.60,0.00,14.44,0.00,1.00,-177.60,-0.00 --14.40,0.00,14.46,0.00,1.00,4.80,-0.00 --19.20,0.00,14.48,0.00,1.00,-168.00,-0.00 --24.00,0.00,14.50,0.00,1.00,14.40,-0.00 --28.80,0.00,14.53,0.00,1.00,-163.20,-0.00 --33.60,0.00,14.55,0.00,1.00,19.20,-0.00 --38.40,0.00,14.57,0.00,1.00,-153.60,-0.00 --43.20,0.00,14.59,0.00,1.00,28.80,-0.00 --48.00,0.00,14.61,0.00,1.00,-148.80,-0.00 --52.80,0.00,14.63,0.00,1.00,38.40,-0.00 --57.60,0.00,14.65,0.00,1.00,-139.20,-0.00 --62.40,0.00,14.68,0.00,1.00,48.00,-0.00 --67.20,0.00,14.70,0.00,1.00,-124.80,-0.00 --72.00,0.00,14.72,0.00,1.00,57.60,-0.00 --76.80,0.00,14.74,0.00,1.00,-115.20,-0.00 --81.60,0.00,14.76,0.00,1.00,72.00,-0.00 --86.40,0.00,14.78,0.00,1.00,-100.80,-0.00 --91.20,0.00,14.80,0.00,1.00,86.40,-0.00 --96.00,0.00,14.83,0.00,1.00,-86.40,-0.00 --100.80,0.00,14.85,0.00,1.00,100.80,-0.00 --105.60,0.00,14.87,0.00,1.00,-76.80,-0.00 --110.40,0.00,14.89,0.00,1.00,110.40,-0.00 --115.20,0.00,14.91,0.00,1.00,-62.40,-0.00 --120.00,0.00,14.93,0.00,1.00,124.80,-0.00 --124.80,0.00,14.95,0.00,1.00,-48.00,-0.00 --129.60,0.00,14.97,0.00,1.00,134.40,-0.00 --134.40,0.00,15.00,0.00,1.00,-38.40,-0.00 --139.20,0.00,15.02,0.00,1.00,144.00,-0.00 --144.00,0.00,15.04,0.00,1.00,-28.80,-0.00 --148.80,0.00,15.06,0.00,1.00,153.60,-0.00 --153.60,0.00,15.08,0.00,1.00,-24.00,-0.00 --158.40,0.00,15.10,0.00,1.00,163.20,-0.00 --163.20,0.00,15.12,0.00,1.00,-14.40,-0.00 --168.00,0.00,15.15,0.00,1.00,168.00,-0.00 --172.80,0.00,15.17,0.00,1.00,-9.60,-0.00 --177.60,0.00,15.19,0.00,1.00,172.80,-0.00 -177.60,0.00,15.21,0.00,1.00,-0.00,-0.00 -172.80,0.00,15.23,0.00,1.00,-177.60,0.00 -168.00,0.00,15.25,0.00,1.00,4.80,0.00 -163.20,0.00,15.27,0.00,1.00,-172.80,0.00 -158.40,0.00,15.30,0.00,1.00,9.60,0.00 -153.60,0.00,15.32,0.00,1.00,-163.20,0.00 -148.80,0.00,15.34,0.00,1.00,19.20,0.00 -144.00,0.00,15.36,0.00,1.00,-158.40,0.00 -139.20,0.00,15.38,0.00,1.00,28.80,0.00 -134.40,0.00,15.40,0.00,1.00,-148.80,0.00 -129.60,0.00,15.42,0.00,1.00,33.60,0.00 -124.80,0.00,15.44,0.00,1.00,-139.20,0.00 -120.00,0.00,15.47,0.00,1.00,43.20,0.00 -115.20,0.00,15.49,0.00,1.00,-129.60,0.00 -110.40,0.00,15.51,0.00,1.00,57.60,0.00 -105.60,0.00,15.53,0.00,1.00,-120.00,0.00 -100.80,0.00,15.55,0.00,1.00,67.20,0.00 -96.00,0.00,15.57,0.00,1.00,-105.60,0.00 -91.20,0.00,15.59,0.00,1.00,81.60,0.00 -86.40,0.00,15.62,0.00,1.00,-91.20,0.00 -81.60,0.00,15.64,0.00,1.00,96.00,0.00 -76.80,0.00,15.66,0.00,1.00,-76.80,0.00 -72.00,0.00,15.68,0.00,1.00,110.40,0.00 -67.20,0.00,15.70,0.00,1.00,-67.20,0.00 -62.40,0.00,15.72,0.00,1.00,120.00,0.00 -57.60,0.00,15.74,0.00,1.00,-52.80,0.00 -52.80,0.00,15.77,0.00,1.00,134.40,0.00 -48.00,0.00,15.79,0.00,1.00,-43.20,0.00 -43.20,0.00,15.81,0.00,1.00,144.00,0.00 -38.40,0.00,15.83,0.00,1.00,-33.60,0.00 -33.60,0.00,15.85,0.00,1.00,153.60,0.00 -28.80,0.00,15.87,0.00,1.00,-24.00,0.00 -24.00,0.00,15.89,0.00,1.00,158.40,0.00 -19.20,0.00,15.91,0.00,1.00,-19.20,0.00 -14.40,0.00,15.94,0.00,1.00,168.00,0.00 -9.60,0.00,15.96,0.00,1.00,-9.60,0.00 -4.80,0.00,15.98,0.00,1.00,172.80,0.00 -0.00,0.00,16.00,0.00,1.00,-4.80,0.00 +0.00,4.80,16.00,0.00,1.00,0.00,0.00,0 +0.00,9.60,15.98,0.00,1.00,-177.60,4.80,0 +0.00,14.40,15.96,0.00,1.00,4.80,9.60,0 +0.00,19.20,15.94,0.00,1.00,-168.00,14.40,0 +0.00,24.00,15.91,0.00,1.00,14.40,19.20,0 +0.00,28.80,15.89,0.00,1.00,-163.20,24.00,0 +0.00,33.60,15.87,0.00,1.00,19.20,28.80,0 +0.00,38.40,15.85,0.00,1.00,-153.60,33.60,0 +0.00,43.20,15.83,0.00,1.00,28.80,38.40,0 +0.00,48.00,15.81,0.00,1.00,-148.80,43.20,0 +0.00,52.80,15.79,0.00,1.00,38.40,48.00,0 +0.00,57.60,15.77,0.00,1.00,-139.20,52.80,0 +0.00,62.40,15.74,0.00,1.00,48.00,57.60,0 +4.80,67.20,15.72,0.00,1.00,-124.80,62.40,0 +4.80,72.00,15.70,0.00,1.00,57.60,67.20,0 +4.80,76.80,15.68,0.00,1.00,-115.20,72.00,0 +9.60,81.60,15.66,0.00,1.00,72.00,76.80,0 +19.20,86.40,15.64,0.00,1.00,-100.80,81.60,0 +134.40,86.40,15.62,0.00,1.00,86.40,86.40,0 +168.00,81.60,15.59,0.00,1.00,-86.40,89.20,0 +172.80,76.80,15.57,0.00,1.00,100.80,86.40,0 +177.60,72.00,15.55,0.00,1.00,-76.80,81.60,0 +177.60,67.20,15.53,0.00,1.00,110.40,76.80,0 +177.60,62.40,15.51,0.00,1.00,-62.40,72.00,0 +177.60,57.60,15.49,0.00,1.00,124.80,67.20,0 +177.60,52.80,15.47,0.00,1.00,-52.80,62.40,0 +177.60,48.00,15.44,0.00,1.00,134.40,57.60,0 +177.60,43.20,15.42,0.00,1.00,-38.40,52.80,0 +177.60,38.40,15.40,0.00,1.00,144.00,48.00,0 +177.60,33.60,15.38,0.00,1.00,-33.60,43.20,0 +177.60,28.80,15.36,0.00,1.00,153.60,38.40,0 +177.60,24.00,15.34,0.00,1.00,-24.00,33.60,0 +177.60,19.20,15.32,0.00,1.00,158.40,28.80,0 +177.60,14.40,15.30,0.00,1.00,-14.40,24.00,0 +177.60,9.60,15.27,0.00,1.00,168.00,19.20,0 +177.60,4.80,15.25,0.00,1.00,-9.60,14.40,0 +177.60,0.00,15.23,0.00,1.00,172.80,9.60,0 +-177.60,-0.00,15.21,0.00,1.00,-0.00,4.80,0 +-177.60,-4.80,15.19,0.00,1.00,-177.60,-0.00,0 +-177.60,-9.60,15.17,0.00,1.00,4.80,-4.80,0 +-177.60,-14.40,15.15,0.00,1.00,-172.80,-9.60,0 +-177.60,-19.20,15.12,0.00,1.00,14.40,-14.40,0 +-177.60,-24.00,15.10,0.00,1.00,-163.20,-19.20,0 +-177.60,-28.80,15.08,0.00,1.00,19.20,-24.00,0 +-177.60,-33.60,15.06,0.00,1.00,-158.40,-28.80,0 +-177.60,-38.40,15.04,0.00,1.00,28.80,-33.60,0 +-177.60,-43.20,15.02,0.00,1.00,-148.80,-38.40,0 +-177.60,-48.00,15.00,0.00,1.00,33.60,-48.00,0 +-177.60,-52.80,14.97,0.00,1.00,-139.20,-48.00,0 +-177.60,-57.60,14.95,0.00,1.00,43.20,-52.80,0 +-177.60,-62.40,14.93,0.00,1.00,-129.60,-57.60,0 +-177.60,-67.20,14.91,0.00,1.00,57.60,-62.40,0 +-177.60,-72.00,14.89,0.00,1.00,-120.00,-67.20,0 +-172.80,-76.80,14.87,0.00,1.00,67.20,-76.80,0 +-168.00,-81.60,14.85,0.00,1.00,-105.60,-76.80,0 +-134.40,-86.40,14.83,0.00,1.00,81.60,-86.40,0 +-19.20,-86.40,14.80,0.00,1.00,-91.20,-89.20,0 +-9.60,-81.60,14.78,0.00,1.00,96.00,-86.40,0 +-4.80,-76.80,14.76,0.00,1.00,-76.80,-81.60,0 +-4.80,-72.00,14.74,0.00,1.00,110.40,-76.80,0 +-4.80,-67.20,14.72,0.00,1.00,-67.20,-72.00,0 +-0.00,-62.40,14.70,0.00,1.00,120.00,-67.20,0 +-0.00,-57.60,14.68,0.00,1.00,-52.80,-62.40,0 +-0.00,-52.80,14.65,0.00,1.00,129.60,-57.60,0 +-0.00,-48.00,14.63,0.00,1.00,-43.20,-52.80,0 +-0.00,-43.20,14.61,0.00,1.00,144.00,-48.00,0 +-0.00,-38.40,14.59,0.00,1.00,-33.60,-43.20,0 +-0.00,-33.60,14.57,0.00,1.00,148.80,-38.40,0 +-0.00,-28.80,14.55,0.00,1.00,-24.00,-33.60,0 +-0.00,-24.00,14.53,0.00,1.00,158.40,-28.80,0 +-0.00,-19.20,14.50,0.00,1.00,-19.20,-24.00,0 +-0.00,-14.40,14.48,0.00,1.00,168.00,-19.20,0 +-0.00,-9.60,14.46,0.00,1.00,-9.60,-14.40,0 +-0.00,-4.80,14.44,0.00,1.00,172.80,-9.60,0 +-0.00,0.00,14.42,0.00,1.00,-4.80,-4.80,0 +-0.00,4.80,14.40,0.00,1.00,0.00,0.00,0 +-0.00,9.60,14.38,0.00,1.00,-177.60,4.80,0 +-0.00,14.40,14.36,0.00,1.00,9.60,9.60,0 +-0.00,19.20,14.33,0.00,1.00,-168.00,14.40,0 +-0.00,24.00,14.31,0.00,1.00,14.40,19.20,0 +-0.00,28.80,14.29,0.00,1.00,-163.20,24.00,0 +-0.00,33.60,14.27,0.00,1.00,24.00,28.80,0 +-4.80,38.40,14.25,0.00,1.00,-153.60,33.60,0 +-4.80,43.20,14.23,0.00,1.00,28.80,38.40,0 +-4.80,48.00,14.21,0.00,1.00,-144.00,43.20,0 +-4.80,52.80,14.18,0.00,1.00,38.40,48.00,0 +-4.80,57.60,14.16,0.00,1.00,-134.40,52.80,0 +-4.80,62.40,14.14,0.00,1.00,48.00,57.60,0 +-9.60,67.20,14.12,0.00,1.00,-124.80,62.40,0 +-9.60,72.00,14.10,0.00,1.00,62.40,67.20,0 +-14.40,76.80,14.08,0.00,1.00,-115.20,72.00,0 +-24.00,81.60,14.06,0.00,1.00,72.00,76.80,0 +-43.20,86.40,14.03,0.00,1.00,-100.80,81.60,0 +-110.40,86.40,14.01,0.00,1.00,86.40,86.40,0 +-148.80,81.60,13.99,0.00,1.00,-86.40,86.40,0 +-163.20,76.80,13.97,0.00,1.00,96.00,81.60,0 +-168.00,72.00,13.95,0.00,1.00,-76.80,76.80,0 +-172.80,67.20,13.93,0.00,1.00,110.40,72.00,0 +-172.80,62.40,13.91,0.00,1.00,-62.40,67.20,0 +-172.80,57.60,13.89,0.00,1.00,120.00,62.40,0 +-172.80,52.80,13.86,0.00,1.00,-52.80,57.60,0 +-177.60,48.00,13.84,0.00,1.00,134.40,52.80,0 +-177.60,43.20,13.82,0.00,1.00,-43.20,48.00,0 +-177.60,38.40,13.80,0.00,1.00,144.00,43.20,0 +-177.60,33.60,13.78,0.00,1.00,-33.60,38.40,0 +-177.60,28.80,13.76,0.00,1.00,148.80,33.60,0 +-177.60,24.00,13.74,0.00,1.00,-24.00,28.80,0 +-177.60,19.20,13.71,0.00,1.00,158.40,24.00,0 +-177.60,14.40,13.69,0.00,1.00,-19.20,19.20,0 +-177.60,9.60,13.67,0.00,1.00,168.00,14.40,0 +-177.60,4.80,13.65,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,13.63,0.00,1.00,172.80,4.80,0 +177.60,-0.00,13.61,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,13.59,0.00,1.00,-177.60,-0.00,0 +177.60,-9.60,13.56,0.00,1.00,4.80,-4.80,0 +177.60,-14.40,13.54,0.00,1.00,-172.80,-9.60,0 +177.60,-19.20,13.52,0.00,1.00,14.40,-14.40,0 +177.60,-24.00,13.50,0.00,1.00,-163.20,-19.20,0 +177.60,-28.80,13.48,0.00,1.00,19.20,-24.00,0 +177.60,-33.60,13.46,0.00,1.00,-153.60,-28.80,0 +177.60,-38.40,13.44,0.00,1.00,28.80,-33.60,0 +177.60,-43.20,13.42,0.00,1.00,-148.80,-38.40,0 +177.60,-48.00,13.39,0.00,1.00,38.40,-43.20,0 +172.80,-52.80,13.37,0.00,1.00,-139.20,-48.00,0 +172.80,-57.60,13.35,0.00,1.00,48.00,-52.80,0 +172.80,-62.40,13.33,0.00,1.00,-124.80,-57.60,0 +172.80,-67.20,13.31,0.00,1.00,57.60,-62.40,0 +168.00,-72.00,13.29,0.00,1.00,-115.20,-67.20,0 +163.20,-76.80,13.27,0.00,1.00,72.00,-72.00,0 +148.80,-81.60,13.24,0.00,1.00,-105.60,-76.80,0 +110.40,-86.40,13.22,0.00,1.00,81.60,-81.60,0 +43.20,-86.40,13.20,0.00,1.00,-91.20,-86.40,0 +24.00,-81.60,13.18,0.00,1.00,96.00,-86.40,0 +14.40,-76.80,13.16,0.00,1.00,-76.80,-81.60,0 +9.60,-72.00,13.14,0.00,1.00,105.60,-76.80,0 +9.60,-67.20,13.12,0.00,1.00,-67.20,-72.00,0 +4.80,-62.40,13.09,0.00,1.00,120.00,-67.20,0 +4.80,-57.60,13.07,0.00,1.00,-57.60,-62.40,0 +4.80,-52.80,13.05,0.00,1.00,129.60,-57.60,0 +4.80,-48.00,13.03,0.00,1.00,-43.20,-52.80,0 +4.80,-43.20,13.01,0.00,1.00,139.20,-48.00,0 +4.80,-38.40,12.99,0.00,1.00,-33.60,-43.20,0 +0.00,-33.60,12.97,0.00,1.00,148.80,-38.40,0 +0.00,-28.80,12.95,0.00,1.00,-28.80,-33.60,0 +0.00,-24.00,12.92,0.00,1.00,158.40,-28.80,0 +0.00,-19.20,12.90,0.00,1.00,-19.20,-24.00,0 +0.00,-14.40,12.88,0.00,1.00,163.20,-19.20,0 +0.00,-9.60,12.86,0.00,1.00,-9.60,-14.40,0 +0.00,-4.80,12.84,0.00,1.00,172.80,-9.60,0 +0.00,0.00,12.82,0.00,1.00,-4.80,-4.80,0 +-0.00,4.80,12.80,0.00,1.00,0.00,0.00,0 +-0.00,9.60,12.77,0.00,1.00,-177.60,4.80,0 +-0.00,14.40,12.75,0.00,1.00,9.60,9.60,0 +-4.80,19.20,12.73,0.00,1.00,-168.00,14.40,0 +-4.80,24.00,12.71,0.00,1.00,14.40,19.20,0 +-4.80,28.80,12.69,0.00,1.00,-158.40,24.00,0 +-4.80,33.60,12.67,0.00,1.00,24.00,28.80,0 +-4.80,38.40,12.65,0.00,1.00,-153.60,33.60,0 +-9.60,43.20,12.62,0.00,1.00,33.60,38.40,0 +-9.60,48.00,12.60,0.00,1.00,-144.00,43.20,0 +-9.60,52.80,12.58,0.00,1.00,43.20,48.00,0 +-14.40,57.60,12.56,0.00,1.00,-134.40,52.80,0 +-14.40,62.40,12.54,0.00,1.00,52.80,57.60,0 +-19.20,67.20,12.52,0.00,1.00,-124.80,62.40,0 +-24.00,72.00,12.50,0.00,1.00,62.40,67.20,0 +-33.60,72.00,12.48,0.00,1.00,-110.40,72.00,0 +-43.20,76.80,12.45,0.00,1.00,72.00,72.00,0 +-67.20,81.60,12.43,0.00,1.00,-100.80,76.80,0 +-96.00,81.60,12.41,0.00,1.00,86.40,81.60,0 +-124.80,81.60,12.39,0.00,1.00,-86.40,81.60,0 +-144.00,76.80,12.37,0.00,1.00,96.00,76.80,0 +-153.60,72.00,12.35,0.00,1.00,-76.80,76.80,0 +-158.40,67.20,12.33,0.00,1.00,110.40,72.00,0 +-163.20,62.40,12.30,0.00,1.00,-67.20,67.20,0 +-168.00,57.60,12.28,0.00,1.00,120.00,62.40,0 +-168.00,52.80,12.26,0.00,1.00,-52.80,57.60,0 +-168.00,48.00,12.24,0.00,1.00,129.60,52.80,0 +-172.80,43.20,12.22,0.00,1.00,-43.20,48.00,0 +-172.80,38.40,12.20,0.00,1.00,139.20,43.20,0 +-172.80,33.60,12.18,0.00,1.00,-33.60,38.40,0 +-172.80,28.80,12.15,0.00,1.00,148.80,33.60,0 +-177.60,24.00,12.13,0.00,1.00,-24.00,28.80,0 +-177.60,19.20,12.11,0.00,1.00,158.40,24.00,0 +-177.60,14.40,12.09,0.00,1.00,-19.20,19.20,0 +-177.60,9.60,12.07,0.00,1.00,168.00,14.40,0 +-177.60,4.80,12.05,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,12.03,0.00,1.00,172.80,4.80,0 +177.60,-0.00,12.01,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,11.98,0.00,1.00,-177.60,-0.00,0 +177.60,-9.60,11.96,0.00,1.00,4.80,-4.80,0 +177.60,-14.40,11.94,0.00,1.00,-168.00,-9.60,0 +177.60,-19.20,11.92,0.00,1.00,14.40,-14.40,0 +177.60,-24.00,11.90,0.00,1.00,-163.20,-19.20,0 +172.80,-28.80,11.88,0.00,1.00,24.00,-24.00,0 +172.80,-33.60,11.86,0.00,1.00,-153.60,-28.80,0 +172.80,-38.40,11.83,0.00,1.00,28.80,-33.60,0 +172.80,-43.20,11.81,0.00,1.00,-144.00,-38.40,0 +168.00,-48.00,11.79,0.00,1.00,38.40,-43.20,0 +168.00,-52.80,11.77,0.00,1.00,-134.40,-48.00,0 +168.00,-57.60,11.75,0.00,1.00,48.00,-52.80,0 +163.20,-62.40,11.73,0.00,1.00,-124.80,-57.60,0 +158.40,-67.20,11.71,0.00,1.00,62.40,-62.40,0 +153.60,-72.00,11.68,0.00,1.00,-115.20,-67.20,0 +144.00,-76.80,11.66,0.00,1.00,72.00,-72.00,0 +124.80,-81.60,11.64,0.00,1.00,-100.80,-76.80,0 +96.00,-81.60,11.62,0.00,1.00,81.60,-76.80,0 +67.20,-81.60,11.60,0.00,1.00,-91.20,-81.60,0 +43.20,-76.80,11.58,0.00,1.00,96.00,-81.60,0 +33.60,-72.00,11.56,0.00,1.00,-81.60,-76.80,0 +24.00,-72.00,11.54,0.00,1.00,105.60,-72.00,0 +19.20,-67.20,11.51,0.00,1.00,-67.20,-72.00,0 +14.40,-62.40,11.49,0.00,1.00,115.20,-67.20,0 +14.40,-57.60,11.47,0.00,1.00,-57.60,-62.40,0 +9.60,-52.80,11.45,0.00,1.00,129.60,-57.60,0 +9.60,-48.00,11.43,0.00,1.00,-48.00,-52.80,0 +9.60,-43.20,11.41,0.00,1.00,139.20,-48.00,0 +4.80,-38.40,11.39,0.00,1.00,-38.40,-43.20,0 +4.80,-33.60,11.36,0.00,1.00,148.80,-38.40,0 +4.80,-28.80,11.34,0.00,1.00,-28.80,-33.60,0 +4.80,-24.00,11.32,0.00,1.00,153.60,-28.80,0 +4.80,-19.20,11.30,0.00,1.00,-19.20,-24.00,0 +0.00,-14.40,11.28,0.00,1.00,163.20,-19.20,0 +0.00,-9.60,11.26,0.00,1.00,-9.60,-14.40,0 +0.00,-4.80,11.24,0.00,1.00,172.80,-9.60,0 +0.00,0.00,11.21,0.00,1.00,-4.80,-4.80,0 +-0.00,4.80,11.19,0.00,1.00,0.00,0.00,0 +-0.00,9.60,11.17,0.00,1.00,-177.60,4.80,0 +-4.80,14.40,11.15,0.00,1.00,9.60,9.60,0 +-4.80,19.20,11.13,0.00,1.00,-168.00,14.40,0 +-4.80,24.00,11.11,0.00,1.00,14.40,19.20,0 +-4.80,28.80,11.09,0.00,1.00,-158.40,24.00,0 +-9.60,33.60,11.07,0.00,1.00,24.00,28.80,0 +-9.60,38.40,11.04,0.00,1.00,-148.80,33.60,0 +-14.40,43.20,11.02,0.00,1.00,33.60,38.40,0 +-14.40,48.00,11.00,0.00,1.00,-139.20,43.20,0 +-14.40,52.80,10.98,0.00,1.00,43.20,48.00,0 +-19.20,57.60,10.96,0.00,1.00,-129.60,52.80,0 +-24.00,57.60,10.94,0.00,1.00,52.80,52.80,0 +-28.80,62.40,10.92,0.00,1.00,-120.00,57.60,0 +-33.60,67.20,10.89,0.00,1.00,62.40,62.40,0 +-43.20,72.00,10.87,0.00,1.00,-110.40,67.20,0 +-57.60,72.00,10.85,0.00,1.00,76.80,72.00,0 +-76.80,76.80,10.83,0.00,1.00,-100.80,72.00,0 +-96.00,76.80,10.81,0.00,1.00,86.40,76.80,0 +-115.20,76.80,10.79,0.00,1.00,-86.40,76.80,0 +-129.60,72.00,10.77,0.00,1.00,96.00,76.80,0 +-139.20,72.00,10.74,0.00,1.00,-76.80,72.00,0 +-148.80,67.20,10.72,0.00,1.00,105.60,67.20,0 +-153.60,62.40,10.70,0.00,1.00,-67.20,67.20,0 +-158.40,57.60,10.68,0.00,1.00,120.00,62.40,0 +-163.20,52.80,10.66,0.00,1.00,-57.60,57.60,0 +-163.20,48.00,10.64,0.00,1.00,129.60,52.80,0 +-168.00,43.20,10.62,0.00,1.00,-48.00,48.00,0 +-168.00,38.40,10.60,0.00,1.00,139.20,43.20,0 +-172.80,33.60,10.57,0.00,1.00,-38.40,38.40,0 +-172.80,28.80,10.55,0.00,1.00,148.80,33.60,0 +-172.80,24.00,10.53,0.00,1.00,-28.80,28.80,0 +-172.80,19.20,10.51,0.00,1.00,158.40,24.00,0 +-177.60,14.40,10.49,0.00,1.00,-19.20,19.20,0 +-177.60,9.60,10.47,0.00,1.00,163.20,14.40,0 +-177.60,4.80,10.45,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,10.42,0.00,1.00,172.80,4.80,0 +177.60,-0.00,10.40,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,10.38,0.00,1.00,-177.60,-0.00,0 +177.60,-9.60,10.36,0.00,1.00,4.80,-4.80,0 +177.60,-14.40,10.34,0.00,1.00,-168.00,-9.60,0 +172.80,-19.20,10.32,0.00,1.00,14.40,-14.40,0 +172.80,-24.00,10.30,0.00,1.00,-163.20,-19.20,0 +172.80,-28.80,10.28,0.00,1.00,24.00,-24.00,0 +172.80,-33.60,10.25,0.00,1.00,-153.60,-28.80,0 +168.00,-38.40,10.23,0.00,1.00,33.60,-33.60,0 +168.00,-43.20,10.21,0.00,1.00,-144.00,-38.40,0 +163.20,-48.00,10.19,0.00,1.00,43.20,-43.20,0 +163.20,-52.80,10.17,0.00,1.00,-134.40,-48.00,0 +158.40,-57.60,10.15,0.00,1.00,52.80,-52.80,0 +153.60,-62.40,10.13,0.00,1.00,-124.80,-57.60,0 +148.80,-67.20,10.10,0.00,1.00,62.40,-62.40,0 +139.20,-72.00,10.08,0.00,1.00,-115.20,-67.20,0 +129.60,-72.00,10.06,0.00,1.00,72.00,-67.20,0 +115.20,-76.80,10.04,0.00,1.00,-100.80,-72.00,0 +96.00,-76.80,10.02,0.00,1.00,81.60,-76.80,0 +76.80,-76.80,10.00,0.00,1.00,-91.20,-76.80,0 +57.60,-72.00,9.98,0.00,1.00,96.00,-76.80,0 +43.20,-72.00,9.95,0.00,1.00,-81.60,-72.00,0 +33.60,-67.20,9.93,0.00,1.00,105.60,-72.00,0 +28.80,-62.40,9.91,0.00,1.00,-67.20,-67.20,0 +24.00,-57.60,9.89,0.00,1.00,115.20,-62.40,0 +19.20,-57.60,9.87,0.00,1.00,-57.60,-57.60,0 +14.40,-52.80,9.85,0.00,1.00,124.80,-52.80,0 +14.40,-48.00,9.83,0.00,1.00,-48.00,-52.80,0 +14.40,-43.20,9.81,0.00,1.00,134.40,-48.00,0 +9.60,-38.40,9.78,0.00,1.00,-38.40,-43.20,0 +9.60,-33.60,9.76,0.00,1.00,144.00,-38.40,0 +4.80,-28.80,9.74,0.00,1.00,-28.80,-33.60,0 +4.80,-24.00,9.72,0.00,1.00,153.60,-28.80,0 +4.80,-19.20,9.70,0.00,1.00,-19.20,-24.00,0 +4.80,-14.40,9.68,0.00,1.00,163.20,-19.20,0 +0.00,-9.60,9.66,0.00,1.00,-14.40,-14.40,0 +0.00,-4.80,9.63,0.00,1.00,172.80,-9.60,0 +0.00,0.00,9.61,0.00,1.00,-4.80,-4.80,0 +-0.00,4.80,9.59,0.00,1.00,0.00,0.00,0 +-4.80,9.60,9.57,0.00,1.00,-177.60,4.80,0 +-4.80,14.40,9.55,0.00,1.00,9.60,9.60,0 +-4.80,19.20,9.53,0.00,1.00,-168.00,14.40,0 +-9.60,24.00,9.51,0.00,1.00,19.20,19.20,0 +-9.60,28.80,9.48,0.00,1.00,-158.40,24.00,0 +-9.60,33.60,9.46,0.00,1.00,24.00,28.80,0 +-14.40,38.40,9.44,0.00,1.00,-148.80,33.60,0 +-14.40,38.40,9.42,0.00,1.00,33.60,33.60,0 +-19.20,43.20,9.40,0.00,1.00,-139.20,38.40,0 +-24.00,48.00,9.38,0.00,1.00,43.20,43.20,0 +-24.00,52.80,9.36,0.00,1.00,-129.60,48.00,0 +-28.80,57.60,9.34,0.00,1.00,52.80,52.80,0 +-38.40,62.40,9.31,0.00,1.00,-120.00,57.60,0 +-43.20,62.40,9.29,0.00,1.00,67.20,62.40,0 +-52.80,67.20,9.27,0.00,1.00,-110.40,62.40,0 +-62.40,72.00,9.25,0.00,1.00,76.80,67.20,0 +-76.80,72.00,9.23,0.00,1.00,-100.80,67.20,0 +-96.00,72.00,9.21,0.00,1.00,86.40,72.00,0 +-110.40,72.00,9.19,0.00,1.00,-86.40,72.00,0 +-120.00,67.20,9.16,0.00,1.00,96.00,72.00,0 +-134.40,67.20,9.14,0.00,1.00,-76.80,67.20,0 +-139.20,62.40,9.12,0.00,1.00,105.60,67.20,0 +-148.80,57.60,9.10,0.00,1.00,-67.20,62.40,0 +-153.60,57.60,9.08,0.00,1.00,115.20,57.60,0 +-158.40,52.80,9.06,0.00,1.00,-57.60,52.80,0 +-158.40,48.00,9.04,0.00,1.00,129.60,52.80,0 +-163.20,43.20,9.01,0.00,1.00,-48.00,48.00,0 +-163.20,38.40,8.99,0.00,1.00,139.20,43.20,0 +-168.00,33.60,8.97,0.00,1.00,-38.40,38.40,0 +-168.00,28.80,8.95,0.00,1.00,148.80,33.60,0 +-172.80,24.00,8.93,0.00,1.00,-28.80,28.80,0 +-172.80,19.20,8.91,0.00,1.00,153.60,24.00,0 +-172.80,14.40,8.89,0.00,1.00,-19.20,19.20,0 +-177.60,9.60,8.87,0.00,1.00,163.20,14.40,0 +-177.60,4.80,8.84,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,8.82,0.00,1.00,172.80,4.80,0 +177.60,-0.00,8.80,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,8.78,0.00,1.00,-177.60,-0.00,0 +177.60,-9.60,8.76,0.00,1.00,4.80,-4.80,0 +172.80,-14.40,8.74,0.00,1.00,-168.00,-9.60,0 +172.80,-19.20,8.72,0.00,1.00,14.40,-14.40,0 +172.80,-24.00,8.69,0.00,1.00,-158.40,-19.20,0 +168.00,-28.80,8.67,0.00,1.00,24.00,-24.00,0 +168.00,-33.60,8.65,0.00,1.00,-153.60,-28.80,0 +163.20,-38.40,8.63,0.00,1.00,33.60,-33.60,0 +163.20,-43.20,8.61,0.00,1.00,-144.00,-38.40,0 +158.40,-48.00,8.59,0.00,1.00,43.20,-43.20,0 +158.40,-52.80,8.57,0.00,1.00,-134.40,-48.00,0 +153.60,-57.60,8.54,0.00,1.00,52.80,-52.80,0 +148.80,-57.60,8.52,0.00,1.00,-124.80,-52.80,0 +139.20,-62.40,8.50,0.00,1.00,62.40,-57.60,0 +134.40,-67.20,8.48,0.00,1.00,-110.40,-62.40,0 +120.00,-67.20,8.46,0.00,1.00,72.00,-67.20,0 +110.40,-72.00,8.44,0.00,1.00,-100.80,-67.20,0 +96.00,-72.00,8.42,0.00,1.00,81.60,-72.00,0 +76.80,-72.00,8.40,0.00,1.00,-91.20,-72.00,0 +62.40,-72.00,8.37,0.00,1.00,96.00,-72.00,0 +52.80,-67.20,8.35,0.00,1.00,-81.60,-67.20,0 +43.20,-62.40,8.33,0.00,1.00,105.60,-67.20,0 +38.40,-62.40,8.31,0.00,1.00,-72.00,-62.40,0 +28.80,-57.60,8.29,0.00,1.00,115.20,-62.40,0 +24.00,-52.80,8.27,0.00,1.00,-57.60,-57.60,0 +24.00,-48.00,8.25,0.00,1.00,124.80,-52.80,0 +19.20,-43.20,8.22,0.00,1.00,-48.00,-48.00,0 +14.40,-38.40,8.20,0.00,1.00,134.40,-43.20,0 +14.40,-38.40,8.18,0.00,1.00,-38.40,-38.40,0 +9.60,-33.60,8.16,0.00,1.00,144.00,-33.60,0 +9.60,-28.80,8.14,0.00,1.00,-28.80,-33.60,0 +9.60,-24.00,8.12,0.00,1.00,153.60,-28.80,0 +4.80,-19.20,8.10,0.00,1.00,-24.00,-24.00,0 +4.80,-14.40,8.07,0.00,1.00,163.20,-19.20,0 +4.80,-9.60,8.05,0.00,1.00,-14.40,-14.40,0 +0.00,-4.80,8.03,0.00,1.00,172.80,-9.60,0 +0.00,0.00,8.01,0.00,1.00,-4.80,-4.80,0 +-0.00,4.80,7.99,0.00,1.00,0.00,0.00,0 +-4.80,9.60,7.97,0.00,1.00,-177.60,4.80,0 +-4.80,14.40,7.95,0.00,1.00,9.60,9.60,0 +-9.60,19.20,7.93,0.00,1.00,-168.00,14.40,0 +-9.60,24.00,7.90,0.00,1.00,19.20,19.20,0 +-14.40,24.00,7.88,0.00,1.00,-158.40,24.00,0 +-14.40,28.80,7.86,0.00,1.00,28.80,24.00,0 +-19.20,33.60,7.84,0.00,1.00,-148.80,28.80,0 +-19.20,38.40,7.82,0.00,1.00,38.40,33.60,0 +-24.00,43.20,7.80,0.00,1.00,-139.20,38.40,0 +-28.80,48.00,7.78,0.00,1.00,48.00,43.20,0 +-33.60,52.80,7.75,0.00,1.00,-129.60,48.00,0 +-38.40,52.80,7.73,0.00,1.00,57.60,52.80,0 +-43.20,57.60,7.71,0.00,1.00,-120.00,52.80,0 +-48.00,62.40,7.69,0.00,1.00,67.20,57.60,0 +-57.60,62.40,7.67,0.00,1.00,-110.40,62.40,0 +-67.20,67.20,7.65,0.00,1.00,76.80,62.40,0 +-81.60,67.20,7.63,0.00,1.00,-100.80,62.40,0 +-91.20,67.20,7.60,0.00,1.00,86.40,67.20,0 +-105.60,67.20,7.58,0.00,1.00,-86.40,67.20,0 +-115.20,67.20,7.56,0.00,1.00,96.00,67.20,0 +-124.80,62.40,7.54,0.00,1.00,-76.80,62.40,0 +-134.40,57.60,7.52,0.00,1.00,105.60,62.40,0 +-139.20,57.60,7.50,0.00,1.00,-67.20,57.60,0 +-144.00,52.80,7.48,0.00,1.00,115.20,57.60,0 +-148.80,48.00,7.46,0.00,1.00,-57.60,52.80,0 +-153.60,43.20,7.43,0.00,1.00,124.80,48.00,0 +-158.40,43.20,7.41,0.00,1.00,-48.00,43.20,0 +-163.20,38.40,7.39,0.00,1.00,134.40,38.40,0 +-163.20,33.60,7.37,0.00,1.00,-38.40,38.40,0 +-168.00,28.80,7.35,0.00,1.00,144.00,33.60,0 +-168.00,24.00,7.33,0.00,1.00,-28.80,28.80,0 +-172.80,19.20,7.31,0.00,1.00,153.60,24.00,0 +-172.80,14.40,7.28,0.00,1.00,-19.20,19.20,0 +-177.60,9.60,7.26,0.00,1.00,163.20,14.40,0 +-177.60,4.80,7.24,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,7.22,0.00,1.00,172.80,4.80,0 +177.60,-0.00,7.20,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,7.18,0.00,1.00,-177.60,-0.00,0 +177.60,-9.60,7.16,0.00,1.00,4.80,-4.80,0 +172.80,-14.40,7.13,0.00,1.00,-168.00,-9.60,0 +172.80,-19.20,7.11,0.00,1.00,14.40,-14.40,0 +168.00,-24.00,7.09,0.00,1.00,-158.40,-19.20,0 +168.00,-28.80,7.07,0.00,1.00,24.00,-24.00,0 +163.20,-33.60,7.05,0.00,1.00,-148.80,-28.80,0 +163.20,-38.40,7.03,0.00,1.00,33.60,-33.60,0 +158.40,-43.20,7.01,0.00,1.00,-139.20,-38.40,0 +153.60,-43.20,6.99,0.00,1.00,43.20,-38.40,0 +148.80,-48.00,6.96,0.00,1.00,-129.60,-43.20,0 +144.00,-52.80,6.94,0.00,1.00,52.80,-48.00,0 +139.20,-57.60,6.92,0.00,1.00,-120.00,-52.80,0 +134.40,-57.60,6.90,0.00,1.00,62.40,-57.60,0 +124.80,-62.40,6.88,0.00,1.00,-110.40,-57.60,0 +115.20,-67.20,6.86,0.00,1.00,72.00,-62.40,0 +105.60,-67.20,6.84,0.00,1.00,-100.80,-62.40,0 +91.20,-67.20,6.81,0.00,1.00,81.60,-67.20,0 +81.60,-67.20,6.79,0.00,1.00,-91.20,-67.20,0 +67.20,-67.20,6.77,0.00,1.00,96.00,-67.20,0 +57.60,-62.40,6.75,0.00,1.00,-81.60,-62.40,0 +48.00,-62.40,6.73,0.00,1.00,105.60,-62.40,0 +43.20,-57.60,6.71,0.00,1.00,-72.00,-62.40,0 +38.40,-52.80,6.69,0.00,1.00,115.20,-57.60,0 +33.60,-52.80,6.66,0.00,1.00,-62.40,-52.80,0 +28.80,-48.00,6.64,0.00,1.00,124.80,-52.80,0 +24.00,-43.20,6.62,0.00,1.00,-52.80,-48.00,0 +19.20,-38.40,6.60,0.00,1.00,134.40,-43.20,0 +19.20,-33.60,6.58,0.00,1.00,-43.20,-38.40,0 +14.40,-28.80,6.56,0.00,1.00,144.00,-33.60,0 +14.40,-24.00,6.54,0.00,1.00,-33.60,-28.80,0 +9.60,-24.00,6.52,0.00,1.00,153.60,-24.00,0 +9.60,-19.20,6.49,0.00,1.00,-24.00,-24.00,0 +4.80,-14.40,6.47,0.00,1.00,163.20,-19.20,0 +4.80,-9.60,6.45,0.00,1.00,-14.40,-14.40,0 +0.00,-4.80,6.43,0.00,1.00,172.80,-9.60,0 +0.00,0.00,6.41,0.00,1.00,-4.80,-4.80,0 +-0.00,4.80,6.39,0.00,1.00,0.00,0.00,0 +-4.80,9.60,6.37,0.00,1.00,-177.60,4.80,0 +-4.80,14.40,6.34,0.00,1.00,9.60,9.60,0 +-9.60,19.20,6.32,0.00,1.00,-168.00,14.40,0 +-9.60,19.20,6.30,0.00,1.00,19.20,14.40,0 +-14.40,24.00,6.28,0.00,1.00,-158.40,19.20,0 +-19.20,28.80,6.26,0.00,1.00,28.80,24.00,0 +-19.20,33.60,6.24,0.00,1.00,-148.80,28.80,0 +-24.00,38.40,6.22,0.00,1.00,38.40,33.60,0 +-28.80,43.20,6.19,0.00,1.00,-139.20,38.40,0 +-33.60,43.20,6.17,0.00,1.00,48.00,38.40,0 +-38.40,48.00,6.15,0.00,1.00,-129.60,43.20,0 +-43.20,52.80,6.13,0.00,1.00,57.60,48.00,0 +-48.00,52.80,6.11,0.00,1.00,-120.00,52.80,0 +-52.80,57.60,6.09,0.00,1.00,67.20,52.80,0 +-62.40,57.60,6.07,0.00,1.00,-110.40,57.60,0 +-72.00,62.40,6.05,0.00,1.00,76.80,57.60,0 +-81.60,62.40,6.02,0.00,1.00,-100.80,62.40,0 +-91.20,62.40,6.00,0.00,1.00,86.40,62.40,0 +-100.80,62.40,5.98,0.00,1.00,-86.40,62.40,0 +-110.40,62.40,5.96,0.00,1.00,96.00,62.40,0 +-120.00,57.60,5.94,0.00,1.00,-76.80,57.60,0 +-129.60,57.60,5.92,0.00,1.00,105.60,57.60,0 +-134.40,52.80,5.90,0.00,1.00,-67.20,57.60,0 +-139.20,48.00,5.87,0.00,1.00,115.20,52.80,0 +-144.00,48.00,5.85,0.00,1.00,-57.60,48.00,0 +-148.80,43.20,5.83,0.00,1.00,124.80,48.00,0 +-153.60,38.40,5.81,0.00,1.00,-48.00,43.20,0 +-158.40,33.60,5.79,0.00,1.00,134.40,38.40,0 +-163.20,33.60,5.77,0.00,1.00,-38.40,33.60,0 +-163.20,28.80,5.75,0.00,1.00,144.00,28.80,0 +-168.00,24.00,5.72,0.00,1.00,-28.80,28.80,0 +-168.00,19.20,5.70,0.00,1.00,153.60,24.00,0 +-172.80,14.40,5.68,0.00,1.00,-19.20,19.20,0 +-172.80,9.60,5.66,0.00,1.00,163.20,14.40,0 +-177.60,4.80,5.64,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,5.62,0.00,1.00,172.80,4.80,0 +177.60,-0.00,5.60,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,5.58,0.00,1.00,-177.60,-0.00,0 +172.80,-9.60,5.55,0.00,1.00,4.80,-4.80,0 +172.80,-14.40,5.53,0.00,1.00,-168.00,-9.60,0 +168.00,-19.20,5.51,0.00,1.00,14.40,-14.40,0 +168.00,-24.00,5.49,0.00,1.00,-158.40,-19.20,0 +163.20,-28.80,5.47,0.00,1.00,24.00,-24.00,0 +163.20,-33.60,5.45,0.00,1.00,-148.80,-28.80,0 +158.40,-33.60,5.43,0.00,1.00,33.60,-28.80,0 +153.60,-38.40,5.40,0.00,1.00,-139.20,-33.60,0 +148.80,-43.20,5.38,0.00,1.00,43.20,-38.40,0 +144.00,-48.00,5.36,0.00,1.00,-129.60,-43.20,0 +139.20,-48.00,5.34,0.00,1.00,52.80,-48.00,0 +134.40,-52.80,5.32,0.00,1.00,-120.00,-48.00,0 +129.60,-57.60,5.30,0.00,1.00,62.40,-52.80,0 +120.00,-57.60,5.28,0.00,1.00,-110.40,-57.60,0 +110.40,-62.40,5.26,0.00,1.00,72.00,-57.60,0 +100.80,-62.40,5.23,0.00,1.00,-100.80,-57.60,0 +91.20,-62.40,5.21,0.00,1.00,81.60,-62.40,0 +81.60,-62.40,5.19,0.00,1.00,-91.20,-62.40,0 +72.00,-62.40,5.17,0.00,1.00,96.00,-62.40,0 +62.40,-57.60,5.15,0.00,1.00,-81.60,-62.40,0 +52.80,-57.60,5.13,0.00,1.00,105.60,-57.60,0 +48.00,-52.80,5.11,0.00,1.00,-72.00,-57.60,0 +43.20,-52.80,5.08,0.00,1.00,115.20,-52.80,0 +38.40,-48.00,5.06,0.00,1.00,-62.40,-52.80,0 +33.60,-43.20,5.04,0.00,1.00,124.80,-48.00,0 +28.80,-43.20,5.02,0.00,1.00,-52.80,-43.20,0 +24.00,-38.40,5.00,0.00,1.00,134.40,-38.40,0 +19.20,-33.60,4.98,0.00,1.00,-43.20,-38.40,0 +19.20,-28.80,4.96,0.00,1.00,144.00,-33.60,0 +14.40,-24.00,4.93,0.00,1.00,-33.60,-28.80,0 +9.60,-19.20,4.91,0.00,1.00,153.60,-24.00,0 +9.60,-19.20,4.89,0.00,1.00,-24.00,-19.20,0 +4.80,-14.40,4.87,0.00,1.00,163.20,-14.40,0 +4.80,-9.60,4.85,0.00,1.00,-14.40,-14.40,0 +0.00,-4.80,4.83,0.00,1.00,172.80,-9.60,0 +0.00,0.00,4.81,0.00,1.00,-4.80,-4.80,0 +-4.80,4.80,4.79,0.00,1.00,0.00,0.00,0 +-4.80,9.60,4.76,0.00,1.00,-177.60,4.80,0 +-9.60,14.40,4.74,0.00,1.00,9.60,9.60,0 +-9.60,14.40,4.72,0.00,1.00,-168.00,9.60,0 +-14.40,19.20,4.70,0.00,1.00,19.20,14.40,0 +-14.40,24.00,4.68,0.00,1.00,-158.40,19.20,0 +-19.20,28.80,4.66,0.00,1.00,28.80,24.00,0 +-24.00,33.60,4.64,0.00,1.00,-148.80,28.80,0 +-28.80,33.60,4.61,0.00,1.00,38.40,28.80,0 +-28.80,38.40,4.59,0.00,1.00,-139.20,33.60,0 +-33.60,43.20,4.57,0.00,1.00,48.00,38.40,0 +-38.40,43.20,4.55,0.00,1.00,-129.60,43.20,0 +-48.00,48.00,4.53,0.00,1.00,57.60,43.20,0 +-52.80,52.80,4.51,0.00,1.00,-120.00,48.00,0 +-57.60,52.80,4.49,0.00,1.00,67.20,48.00,0 +-67.20,57.60,4.46,0.00,1.00,-110.40,52.80,0 +-76.80,57.60,4.44,0.00,1.00,76.80,52.80,0 +-81.60,57.60,4.42,0.00,1.00,-100.80,57.60,0 +-91.20,57.60,4.40,0.00,1.00,86.40,57.60,0 +-100.80,57.60,4.38,0.00,1.00,-86.40,57.60,0 +-110.40,57.60,4.36,0.00,1.00,96.00,57.60,0 +-115.20,52.80,4.34,0.00,1.00,-76.80,52.80,0 +-124.80,52.80,4.32,0.00,1.00,105.60,52.80,0 +-129.60,48.00,4.29,0.00,1.00,-67.20,52.80,0 +-139.20,48.00,4.27,0.00,1.00,115.20,48.00,0 +-144.00,43.20,4.25,0.00,1.00,-57.60,48.00,0 +-148.80,38.40,4.23,0.00,1.00,124.80,43.20,0 +-153.60,38.40,4.21,0.00,1.00,-48.00,38.40,0 +-153.60,33.60,4.19,0.00,1.00,134.40,38.40,0 +-158.40,28.80,4.17,0.00,1.00,-38.40,33.60,0 +-163.20,24.00,4.14,0.00,1.00,144.00,28.80,0 +-163.20,24.00,4.12,0.00,1.00,-28.80,24.00,0 +-168.00,19.20,4.10,0.00,1.00,153.60,24.00,0 +-172.80,14.40,4.08,0.00,1.00,-19.20,19.20,0 +-172.80,9.60,4.06,0.00,1.00,163.20,14.40,0 +-177.60,4.80,4.04,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,4.02,0.00,1.00,172.80,4.80,0 +177.60,-0.00,3.99,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,3.97,0.00,1.00,-177.60,-0.00,0 +172.80,-9.60,3.95,0.00,1.00,4.80,-4.80,0 +172.80,-14.40,3.93,0.00,1.00,-168.00,-9.60,0 +168.00,-19.20,3.91,0.00,1.00,14.40,-14.40,0 +163.20,-24.00,3.89,0.00,1.00,-158.40,-19.20,0 +163.20,-24.00,3.87,0.00,1.00,24.00,-24.00,0 +158.40,-28.80,3.85,0.00,1.00,-148.80,-24.00,0 +153.60,-33.60,3.82,0.00,1.00,33.60,-28.80,0 +153.60,-38.40,3.80,0.00,1.00,-139.20,-33.60,0 +148.80,-38.40,3.78,0.00,1.00,43.20,-38.40,0 +144.00,-43.20,3.76,0.00,1.00,-129.60,-38.40,0 +139.20,-48.00,3.74,0.00,1.00,52.80,-43.20,0 +129.60,-48.00,3.72,0.00,1.00,-120.00,-48.00,0 +124.80,-52.80,3.70,0.00,1.00,62.40,-48.00,0 +115.20,-52.80,3.67,0.00,1.00,-110.40,-52.80,0 +110.40,-57.60,3.65,0.00,1.00,72.00,-52.80,0 +100.80,-57.60,3.63,0.00,1.00,-100.80,-52.80,0 +91.20,-57.60,3.61,0.00,1.00,81.60,-57.60,0 +81.60,-57.60,3.59,0.00,1.00,-91.20,-57.60,0 +76.80,-57.60,3.57,0.00,1.00,96.00,-57.60,0 +67.20,-57.60,3.55,0.00,1.00,-81.60,-57.60,0 +57.60,-52.80,3.52,0.00,1.00,105.60,-52.80,0 +52.80,-52.80,3.50,0.00,1.00,-72.00,-52.80,0 +48.00,-48.00,3.48,0.00,1.00,115.20,-48.00,0 +38.40,-43.20,3.46,0.00,1.00,-62.40,-48.00,0 +33.60,-43.20,3.44,0.00,1.00,124.80,-43.20,0 +28.80,-38.40,3.42,0.00,1.00,-52.80,-43.20,0 +28.80,-33.60,3.40,0.00,1.00,134.40,-38.40,0 +24.00,-33.60,3.38,0.00,1.00,-43.20,-33.60,0 +19.20,-28.80,3.35,0.00,1.00,144.00,-28.80,0 +14.40,-24.00,3.33,0.00,1.00,-33.60,-28.80,0 +14.40,-19.20,3.31,0.00,1.00,153.60,-24.00,0 +9.60,-14.40,3.29,0.00,1.00,-24.00,-19.20,0 +9.60,-14.40,3.27,0.00,1.00,163.20,-14.40,0 +4.80,-9.60,3.25,0.00,1.00,-14.40,-9.60,0 +4.80,-4.80,3.23,0.00,1.00,172.80,-9.60,0 +0.00,0.00,3.20,0.00,1.00,-4.80,-4.80,0 +-4.80,4.80,3.18,0.00,1.00,0.00,0.00,0 +-4.80,9.60,3.16,0.00,1.00,-177.60,4.80,0 +-9.60,9.60,3.14,0.00,1.00,9.60,9.60,0 +-9.60,14.40,3.12,0.00,1.00,-168.00,9.60,0 +-14.40,19.20,3.10,0.00,1.00,19.20,14.40,0 +-19.20,24.00,3.08,0.00,1.00,-158.40,19.20,0 +-24.00,24.00,3.05,0.00,1.00,28.80,24.00,0 +-24.00,28.80,3.03,0.00,1.00,-148.80,24.00,0 +-28.80,33.60,3.01,0.00,1.00,38.40,28.80,0 +-33.60,38.40,2.99,0.00,1.00,-139.20,33.60,0 +-38.40,38.40,2.97,0.00,1.00,48.00,33.60,0 +-43.20,43.20,2.95,0.00,1.00,-129.60,38.40,0 +-48.00,43.20,2.93,0.00,1.00,57.60,43.20,0 +-52.80,48.00,2.91,0.00,1.00,-120.00,43.20,0 +-62.40,48.00,2.88,0.00,1.00,67.20,48.00,0 +-67.20,52.80,2.86,0.00,1.00,-110.40,48.00,0 +-76.80,52.80,2.84,0.00,1.00,76.80,48.00,0 +-86.40,52.80,2.82,0.00,1.00,-100.80,52.80,0 +-91.20,52.80,2.80,0.00,1.00,86.40,52.80,0 +-100.80,52.80,2.78,0.00,1.00,-86.40,52.80,0 +-105.60,52.80,2.76,0.00,1.00,96.00,52.80,0 +-115.20,48.00,2.73,0.00,1.00,-76.80,48.00,0 +-120.00,48.00,2.71,0.00,1.00,105.60,48.00,0 +-129.60,48.00,2.69,0.00,1.00,-67.20,48.00,0 +-134.40,43.20,2.67,0.00,1.00,115.20,43.20,0 +-139.20,43.20,2.65,0.00,1.00,-57.60,43.20,0 +-144.00,38.40,2.63,0.00,1.00,124.80,38.40,0 +-148.80,33.60,2.61,0.00,1.00,-48.00,38.40,0 +-153.60,33.60,2.58,0.00,1.00,134.40,33.60,0 +-158.40,28.80,2.56,0.00,1.00,-38.40,28.80,0 +-158.40,24.00,2.54,0.00,1.00,144.00,28.80,0 +-163.20,19.20,2.52,0.00,1.00,-28.80,24.00,0 +-168.00,19.20,2.50,0.00,1.00,153.60,19.20,0 +-168.00,14.40,2.48,0.00,1.00,-19.20,14.40,0 +-172.80,9.60,2.46,0.00,1.00,163.20,14.40,0 +-177.60,4.80,2.44,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,2.41,0.00,1.00,172.80,4.80,0 +177.60,-0.00,2.39,0.00,1.00,-0.00,0.00,0 +177.60,-4.80,2.37,0.00,1.00,-177.60,-0.00,0 +172.80,-9.60,2.35,0.00,1.00,4.80,-4.80,0 +168.00,-14.40,2.33,0.00,1.00,-168.00,-9.60,0 +168.00,-19.20,2.31,0.00,1.00,14.40,-14.40,0 +163.20,-19.20,2.29,0.00,1.00,-158.40,-14.40,0 +158.40,-24.00,2.26,0.00,1.00,24.00,-19.20,0 +158.40,-28.80,2.24,0.00,1.00,-148.80,-24.00,0 +153.60,-33.60,2.22,0.00,1.00,33.60,-28.80,0 +148.80,-33.60,2.20,0.00,1.00,-139.20,-28.80,0 +144.00,-38.40,2.18,0.00,1.00,43.20,-33.60,0 +139.20,-43.20,2.16,0.00,1.00,-129.60,-38.40,0 +134.40,-43.20,2.14,0.00,1.00,52.80,-38.40,0 +129.60,-48.00,2.11,0.00,1.00,-120.00,-43.20,0 +120.00,-48.00,2.09,0.00,1.00,62.40,-43.20,0 +115.20,-48.00,2.07,0.00,1.00,-110.40,-48.00,0 +105.60,-52.80,2.05,0.00,1.00,72.00,-48.00,0 +100.80,-52.80,2.03,0.00,1.00,-100.80,-48.00,0 +91.20,-52.80,2.01,0.00,1.00,81.60,-52.80,0 +86.40,-52.80,1.99,0.00,1.00,-91.20,-52.80,0 +76.80,-52.80,1.97,0.00,1.00,96.00,-52.80,0 +67.20,-52.80,1.94,0.00,1.00,-81.60,-52.80,0 +62.40,-48.00,1.92,0.00,1.00,105.60,-48.00,0 +52.80,-48.00,1.90,0.00,1.00,-72.00,-48.00,0 +48.00,-43.20,1.88,0.00,1.00,115.20,-48.00,0 +43.20,-43.20,1.86,0.00,1.00,-62.40,-43.20,0 +38.40,-38.40,1.84,0.00,1.00,124.80,-43.20,0 +33.60,-38.40,1.82,0.00,1.00,-52.80,-38.40,0 +28.80,-33.60,1.79,0.00,1.00,134.40,-33.60,0 +24.00,-28.80,1.77,0.00,1.00,-43.20,-33.60,0 +24.00,-24.00,1.75,0.00,1.00,144.00,-28.80,0 +19.20,-24.00,1.73,0.00,1.00,-33.60,-24.00,0 +14.40,-19.20,1.71,0.00,1.00,153.60,-24.00,0 +9.60,-14.40,1.69,0.00,1.00,-24.00,-19.20,0 +9.60,-9.60,1.67,0.00,1.00,163.20,-14.40,0 +4.80,-9.60,1.64,0.00,1.00,-14.40,-9.60,0 +4.80,-4.80,1.62,0.00,1.00,172.80,-9.60,0 +0.00,0.00,1.60,0.00,1.00,-4.80,-4.80,0 +-4.80,4.80,1.58,0.00,1.00,0.00,0.00,0 +-4.80,4.80,1.56,0.00,1.00,-177.60,4.80,0 +-9.60,9.60,1.54,0.00,1.00,9.60,4.80,0 +-14.40,14.40,1.52,0.00,1.00,-168.00,9.60,0 +-14.40,19.20,1.50,0.00,1.00,19.20,14.40,0 +-19.20,19.20,1.47,0.00,1.00,-158.40,19.20,0 +-24.00,24.00,1.45,0.00,1.00,28.80,19.20,0 +-28.80,28.80,1.43,0.00,1.00,-148.80,24.00,0 +-33.60,28.80,1.41,0.00,1.00,38.40,28.80,0 +-38.40,33.60,1.39,0.00,1.00,-139.20,28.80,0 +-43.20,38.40,1.37,0.00,1.00,48.00,33.60,0 +-48.00,38.40,1.35,0.00,1.00,-129.60,33.60,0 +-52.80,43.20,1.32,0.00,1.00,57.60,38.40,0 +-57.60,43.20,1.30,0.00,1.00,-120.00,38.40,0 +-62.40,43.20,1.28,0.00,1.00,67.20,43.20,0 +-72.00,48.00,1.26,0.00,1.00,-110.40,43.20,0 +-76.80,48.00,1.24,0.00,1.00,76.80,43.20,0 +-86.40,48.00,1.22,0.00,1.00,-100.80,48.00,0 +-91.20,48.00,1.20,0.00,1.00,86.40,48.00,0 +-100.80,48.00,1.17,0.00,1.00,-86.40,48.00,0 +-105.60,48.00,1.15,0.00,1.00,96.00,48.00,0 +-110.40,48.00,1.13,0.00,1.00,-76.80,48.00,0 +-120.00,43.20,1.11,0.00,1.00,105.60,43.20,0 +-124.80,43.20,1.09,0.00,1.00,-67.20,43.20,0 +-129.60,38.40,1.07,0.00,1.00,115.20,43.20,0 +-134.40,38.40,1.05,0.00,1.00,-57.60,38.40,0 +-139.20,33.60,1.03,0.00,1.00,124.80,38.40,0 +-144.00,33.60,1.00,0.00,1.00,-48.00,33.60,0 +-148.80,28.80,0.98,0.00,1.00,134.40,33.60,0 +-153.60,24.00,0.96,0.00,1.00,-38.40,28.80,0 +-158.40,24.00,0.94,0.00,1.00,144.00,24.00,0 +-163.20,19.20,0.92,0.00,1.00,-28.80,24.00,0 +-163.20,14.40,0.90,0.00,1.00,153.60,19.20,0 +-168.00,14.40,0.88,0.00,1.00,-19.20,14.40,0 +-172.80,9.60,0.85,0.00,1.00,163.20,14.40,0 +-172.80,4.80,0.83,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,0.81,0.00,1.00,172.80,4.80,0 +177.60,-0.00,0.79,0.00,1.00,-0.00,0.00,0 +172.80,-4.80,0.77,0.00,1.00,-177.60,-0.00,0 +172.80,-9.60,0.75,0.00,1.00,4.80,-4.80,0 +168.00,-14.40,0.73,0.00,1.00,-168.00,-9.60,0 +163.20,-14.40,0.70,0.00,1.00,14.40,-14.40,0 +163.20,-19.20,0.68,0.00,1.00,-158.40,-14.40,0 +158.40,-24.00,0.66,0.00,1.00,24.00,-19.20,0 +153.60,-24.00,0.64,0.00,1.00,-148.80,-24.00,0 +148.80,-28.80,0.62,0.00,1.00,33.60,-24.00,0 +144.00,-33.60,0.60,0.00,1.00,-139.20,-28.80,0 +139.20,-33.60,0.58,0.00,1.00,43.20,-33.60,0 +134.40,-38.40,0.56,0.00,1.00,-129.60,-33.60,0 +129.60,-38.40,0.53,0.00,1.00,52.80,-38.40,0 +124.80,-43.20,0.51,0.00,1.00,-120.00,-38.40,0 +120.00,-43.20,0.49,0.00,1.00,62.40,-43.20,0 +110.40,-48.00,0.47,0.00,1.00,-110.40,-43.20,0 +105.60,-48.00,0.45,0.00,1.00,72.00,-43.20,0 +100.80,-48.00,0.43,0.00,1.00,-100.80,-48.00,0 +91.20,-48.00,0.41,0.00,1.00,81.60,-48.00,0 +86.40,-48.00,0.38,0.00,1.00,-91.20,-48.00,0 +76.80,-48.00,0.36,0.00,1.00,96.00,-48.00,0 +72.00,-48.00,0.34,0.00,1.00,-81.60,-48.00,0 +62.40,-43.20,0.32,0.00,1.00,105.60,-43.20,0 +57.60,-43.20,0.30,0.00,1.00,-72.00,-43.20,0 +52.80,-43.20,0.28,0.00,1.00,115.20,-43.20,0 +48.00,-38.40,0.26,0.00,1.00,-62.40,-38.40,0 +43.20,-38.40,0.23,0.00,1.00,124.80,-38.40,0 +38.40,-33.60,0.21,0.00,1.00,-52.80,-33.60,0 +33.60,-28.80,0.19,0.00,1.00,134.40,-33.60,0 +28.80,-28.80,0.17,0.00,1.00,-43.20,-28.80,0 +24.00,-24.00,0.15,0.00,1.00,144.00,-28.80,0 +19.20,-19.20,0.13,0.00,1.00,-33.60,-24.00,0 +14.40,-19.20,0.11,0.00,1.00,153.60,-19.20,0 +14.40,-14.40,0.09,0.00,1.00,-24.00,-19.20,0 +9.60,-9.60,0.06,0.00,1.00,163.20,-14.40,0 +4.80,-4.80,0.04,0.00,1.00,-14.40,-9.60,0 +4.80,-4.80,0.02,0.00,1.00,172.80,-4.80,0 +0.00,0.00,0.00,0.00,1.00,-4.80,-4.80,0 +-4.80,4.80,0.00,0.00,1.00,0.00,0.00,0 +-4.80,4.80,0.02,0.00,1.00,-177.60,4.80,0 +-9.60,9.60,0.04,0.00,1.00,9.60,4.80,0 +-14.40,14.40,0.06,0.00,1.00,-168.00,9.60,0 +-19.20,14.40,0.09,0.00,1.00,19.20,14.40,0 +-24.00,19.20,0.11,0.00,1.00,-158.40,14.40,0 +-24.00,24.00,0.13,0.00,1.00,28.80,19.20,0 +-28.80,24.00,0.15,0.00,1.00,-148.80,24.00,0 +-33.60,28.80,0.17,0.00,1.00,38.40,24.00,0 +-38.40,28.80,0.19,0.00,1.00,-139.20,28.80,0 +-43.20,33.60,0.21,0.00,1.00,48.00,28.80,0 +-48.00,33.60,0.23,0.00,1.00,-129.60,33.60,0 +-52.80,38.40,0.26,0.00,1.00,57.60,33.60,0 +-62.40,38.40,0.28,0.00,1.00,-120.00,38.40,0 +-67.20,38.40,0.30,0.00,1.00,67.20,38.40,0 +-72.00,43.20,0.32,0.00,1.00,-110.40,38.40,0 +-76.80,43.20,0.34,0.00,1.00,76.80,38.40,0 +-86.40,43.20,0.36,0.00,1.00,-100.80,43.20,0 +-91.20,43.20,0.38,0.00,1.00,86.40,43.20,0 +-96.00,43.20,0.41,0.00,1.00,-86.40,43.20,0 +-105.60,43.20,0.43,0.00,1.00,96.00,43.20,0 +-110.40,43.20,0.45,0.00,1.00,-76.80,43.20,0 +-115.20,38.40,0.47,0.00,1.00,105.60,38.40,0 +-124.80,38.40,0.49,0.00,1.00,-67.20,38.40,0 +-129.60,38.40,0.51,0.00,1.00,115.20,38.40,0 +-134.40,33.60,0.53,0.00,1.00,-57.60,33.60,0 +-139.20,33.60,0.56,0.00,1.00,124.80,33.60,0 +-144.00,28.80,0.58,0.00,1.00,-48.00,28.80,0 +-148.80,28.80,0.60,0.00,1.00,134.40,28.80,0 +-153.60,24.00,0.62,0.00,1.00,-38.40,24.00,0 +-158.40,19.20,0.64,0.00,1.00,144.00,24.00,0 +-158.40,19.20,0.66,0.00,1.00,-28.80,19.20,0 +-163.20,14.40,0.68,0.00,1.00,153.60,19.20,0 +-168.00,9.60,0.70,0.00,1.00,-19.20,14.40,0 +-172.80,9.60,0.73,0.00,1.00,163.20,9.60,0 +-172.80,4.80,0.75,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,0.77,0.00,1.00,172.80,4.80,0 +177.60,-0.00,0.79,0.00,1.00,-0.00,0.00,0 +172.80,-4.80,0.81,0.00,1.00,-177.60,-0.00,0 +172.80,-9.60,0.83,0.00,1.00,4.80,-4.80,0 +168.00,-9.60,0.85,0.00,1.00,-168.00,-9.60,0 +163.20,-14.40,0.88,0.00,1.00,14.40,-9.60,0 +158.40,-19.20,0.90,0.00,1.00,-158.40,-14.40,0 +158.40,-19.20,0.92,0.00,1.00,24.00,-19.20,0 +153.60,-24.00,0.94,0.00,1.00,-148.80,-19.20,0 +148.80,-28.80,0.96,0.00,1.00,33.60,-24.00,0 +144.00,-28.80,0.98,0.00,1.00,-139.20,-24.00,0 +139.20,-33.60,1.00,0.00,1.00,43.20,-28.80,0 +134.40,-33.60,1.03,0.00,1.00,-129.60,-28.80,0 +129.60,-38.40,1.05,0.00,1.00,52.80,-33.60,0 +124.80,-38.40,1.07,0.00,1.00,-120.00,-33.60,0 +115.20,-38.40,1.09,0.00,1.00,62.40,-38.40,0 +110.40,-43.20,1.11,0.00,1.00,-110.40,-38.40,0 +105.60,-43.20,1.13,0.00,1.00,72.00,-38.40,0 +96.00,-43.20,1.15,0.00,1.00,-100.80,-43.20,0 +91.20,-43.20,1.17,0.00,1.00,81.60,-43.20,0 +86.40,-43.20,1.20,0.00,1.00,-91.20,-43.20,0 +76.80,-43.20,1.22,0.00,1.00,96.00,-43.20,0 +72.00,-43.20,1.24,0.00,1.00,-81.60,-43.20,0 +67.20,-38.40,1.26,0.00,1.00,105.60,-38.40,0 +62.40,-38.40,1.28,0.00,1.00,-72.00,-38.40,0 +52.80,-38.40,1.30,0.00,1.00,115.20,-38.40,0 +48.00,-33.60,1.32,0.00,1.00,-62.40,-38.40,0 +43.20,-33.60,1.35,0.00,1.00,124.80,-33.60,0 +38.40,-28.80,1.37,0.00,1.00,-52.80,-33.60,0 +33.60,-28.80,1.39,0.00,1.00,134.40,-28.80,0 +28.80,-24.00,1.41,0.00,1.00,-43.20,-28.80,0 +24.00,-24.00,1.43,0.00,1.00,144.00,-24.00,0 +24.00,-19.20,1.45,0.00,1.00,-33.60,-24.00,0 +19.20,-14.40,1.47,0.00,1.00,153.60,-19.20,0 +14.40,-14.40,1.50,0.00,1.00,-24.00,-14.40,0 +9.60,-9.60,1.52,0.00,1.00,163.20,-14.40,0 +4.80,-4.80,1.54,0.00,1.00,-14.40,-9.60,0 +4.80,-4.80,1.56,0.00,1.00,172.80,-4.80,0 +0.00,0.00,1.58,0.00,1.00,-4.80,-4.80,0 +-4.80,4.80,1.60,0.00,1.00,0.00,0.00,0 +-9.60,4.80,1.62,0.00,1.00,-177.60,4.80,0 +-9.60,9.60,1.64,0.00,1.00,9.60,4.80,0 +-14.40,9.60,1.67,0.00,1.00,-168.00,9.60,0 +-19.20,14.40,1.69,0.00,1.00,19.20,9.60,0 +-24.00,19.20,1.71,0.00,1.00,-158.40,14.40,0 +-28.80,19.20,1.73,0.00,1.00,28.80,19.20,0 +-33.60,24.00,1.75,0.00,1.00,-148.80,19.20,0 +-38.40,24.00,1.77,0.00,1.00,38.40,24.00,0 +-43.20,28.80,1.79,0.00,1.00,-139.20,24.00,0 +-48.00,28.80,1.82,0.00,1.00,48.00,28.80,0 +-52.80,33.60,1.84,0.00,1.00,-129.60,28.80,0 +-57.60,33.60,1.86,0.00,1.00,57.60,28.80,0 +-62.40,33.60,1.88,0.00,1.00,-120.00,33.60,0 +-67.20,38.40,1.90,0.00,1.00,67.20,33.60,0 +-72.00,38.40,1.92,0.00,1.00,-110.40,33.60,0 +-81.60,38.40,1.94,0.00,1.00,76.80,38.40,0 +-86.40,38.40,1.97,0.00,1.00,-100.80,38.40,0 +-91.20,38.40,1.99,0.00,1.00,86.40,38.40,0 +-96.00,38.40,2.01,0.00,1.00,-86.40,38.40,0 +-105.60,38.40,2.03,0.00,1.00,96.00,38.40,0 +-110.40,38.40,2.05,0.00,1.00,-76.80,38.40,0 +-115.20,33.60,2.07,0.00,1.00,105.60,33.60,0 +-120.00,33.60,2.09,0.00,1.00,-67.20,33.60,0 +-124.80,33.60,2.11,0.00,1.00,115.20,33.60,0 +-129.60,28.80,2.14,0.00,1.00,-57.60,33.60,0 +-134.40,28.80,2.16,0.00,1.00,124.80,28.80,0 +-139.20,24.00,2.18,0.00,1.00,-48.00,28.80,0 +-144.00,24.00,2.20,0.00,1.00,134.40,24.00,0 +-148.80,19.20,2.22,0.00,1.00,-38.40,24.00,0 +-153.60,19.20,2.24,0.00,1.00,144.00,19.20,0 +-158.40,14.40,2.26,0.00,1.00,-28.80,19.20,0 +-163.20,14.40,2.29,0.00,1.00,153.60,14.40,0 +-168.00,9.60,2.31,0.00,1.00,-19.20,14.40,0 +-172.80,9.60,2.33,0.00,1.00,163.20,9.60,0 +-172.80,4.80,2.35,0.00,1.00,-9.60,9.60,0 +-177.60,0.00,2.37,0.00,1.00,172.80,4.80,0 +177.60,-0.00,2.39,0.00,1.00,-0.00,0.00,0 +172.80,-4.80,2.41,0.00,1.00,-177.60,-0.00,0 +172.80,-9.60,2.44,0.00,1.00,4.80,-4.80,0 +168.00,-9.60,2.46,0.00,1.00,-168.00,-9.60,0 +163.20,-14.40,2.48,0.00,1.00,14.40,-9.60,0 +158.40,-14.40,2.50,0.00,1.00,-158.40,-14.40,0 +153.60,-19.20,2.52,0.00,1.00,24.00,-14.40,0 +148.80,-19.20,2.54,0.00,1.00,-148.80,-19.20,0 +144.00,-24.00,2.56,0.00,1.00,33.60,-19.20,0 +139.20,-24.00,2.58,0.00,1.00,-139.20,-24.00,0 +134.40,-28.80,2.61,0.00,1.00,43.20,-24.00,0 +129.60,-28.80,2.63,0.00,1.00,-129.60,-28.80,0 +124.80,-33.60,2.65,0.00,1.00,52.80,-28.80,0 +120.00,-33.60,2.67,0.00,1.00,-120.00,-33.60,0 +115.20,-33.60,2.69,0.00,1.00,62.40,-33.60,0 +110.40,-38.40,2.71,0.00,1.00,-110.40,-33.60,0 +105.60,-38.40,2.73,0.00,1.00,72.00,-33.60,0 +96.00,-38.40,2.76,0.00,1.00,-100.80,-38.40,0 +91.20,-38.40,2.78,0.00,1.00,81.60,-38.40,0 +86.40,-38.40,2.80,0.00,1.00,-91.20,-38.40,0 +81.60,-38.40,2.82,0.00,1.00,96.00,-38.40,0 +72.00,-38.40,2.84,0.00,1.00,-81.60,-38.40,0 +67.20,-38.40,2.86,0.00,1.00,105.60,-38.40,0 +62.40,-33.60,2.88,0.00,1.00,-72.00,-33.60,0 +57.60,-33.60,2.91,0.00,1.00,115.20,-33.60,0 +52.80,-33.60,2.93,0.00,1.00,-62.40,-33.60,0 +48.00,-28.80,2.95,0.00,1.00,124.80,-28.80,0 +43.20,-28.80,2.97,0.00,1.00,-52.80,-28.80,0 +38.40,-24.00,2.99,0.00,1.00,134.40,-28.80,0 +33.60,-24.00,3.01,0.00,1.00,-43.20,-24.00,0 +28.80,-19.20,3.03,0.00,1.00,144.00,-24.00,0 +24.00,-19.20,3.05,0.00,1.00,-33.60,-19.20,0 +19.20,-14.40,3.08,0.00,1.00,153.60,-19.20,0 +14.40,-9.60,3.10,0.00,1.00,-24.00,-14.40,0 +9.60,-9.60,3.12,0.00,1.00,163.20,-9.60,0 +9.60,-4.80,3.14,0.00,1.00,-14.40,-9.60,0 +4.80,-4.80,3.16,0.00,1.00,172.80,-4.80,0 +0.00,0.00,3.18,0.00,1.00,-4.80,-4.80,0 +-4.80,4.80,3.20,0.00,1.00,0.00,0.00,0 +-9.60,4.80,3.23,0.00,1.00,-177.60,4.80,0 +-14.40,9.60,3.25,0.00,1.00,9.60,4.80,0 +-14.40,9.60,3.27,0.00,1.00,-168.00,9.60,0 +-19.20,14.40,3.29,0.00,1.00,19.20,9.60,0 +-24.00,14.40,3.31,0.00,1.00,-158.40,14.40,0 +-28.80,19.20,3.33,0.00,1.00,28.80,14.40,0 +-33.60,19.20,3.35,0.00,1.00,-148.80,19.20,0 +-38.40,24.00,3.38,0.00,1.00,38.40,19.20,0 +-43.20,24.00,3.40,0.00,1.00,-139.20,19.20,0 +-48.00,24.00,3.42,0.00,1.00,48.00,24.00,0 +-52.80,28.80,3.44,0.00,1.00,-129.60,24.00,0 +-57.60,28.80,3.46,0.00,1.00,57.60,28.80,0 +-62.40,28.80,3.48,0.00,1.00,-120.00,28.80,0 +-67.20,33.60,3.50,0.00,1.00,67.20,28.80,0 +-72.00,33.60,3.52,0.00,1.00,-110.40,28.80,0 +-81.60,33.60,3.55,0.00,1.00,76.80,33.60,0 +-86.40,33.60,3.57,0.00,1.00,-100.80,33.60,0 +-91.20,33.60,3.59,0.00,1.00,86.40,33.60,0 +-96.00,33.60,3.61,0.00,1.00,-86.40,33.60,0 +-100.80,33.60,3.63,0.00,1.00,96.00,33.60,0 +-110.40,33.60,3.65,0.00,1.00,-76.80,33.60,0 +-115.20,33.60,3.67,0.00,1.00,105.60,28.80,0 +-120.00,28.80,3.70,0.00,1.00,-67.20,28.80,0 +-124.80,28.80,3.72,0.00,1.00,115.20,28.80,0 +-129.60,28.80,3.74,0.00,1.00,-57.60,28.80,0 +-134.40,24.00,3.76,0.00,1.00,124.80,24.00,0 +-139.20,24.00,3.78,0.00,1.00,-48.00,24.00,0 +-144.00,19.20,3.80,0.00,1.00,134.40,24.00,0 +-148.80,19.20,3.82,0.00,1.00,-38.40,19.20,0 +-153.60,14.40,3.85,0.00,1.00,144.00,19.20,0 +-158.40,14.40,3.87,0.00,1.00,-28.80,14.40,0 +-163.20,9.60,3.89,0.00,1.00,153.60,14.40,0 +-168.00,9.60,3.91,0.00,1.00,-19.20,9.60,0 +-168.00,4.80,3.93,0.00,1.00,163.20,9.60,0 +-172.80,4.80,3.95,0.00,1.00,-9.60,4.80,0 +-177.60,0.00,3.97,0.00,1.00,172.80,4.80,0 +177.60,-0.00,3.99,0.00,1.00,-0.00,0.00,0 +172.80,-4.80,4.02,0.00,1.00,-177.60,-0.00,0 +168.00,-4.80,4.04,0.00,1.00,4.80,-4.80,0 +168.00,-9.60,4.06,0.00,1.00,-168.00,-4.80,0 +163.20,-9.60,4.08,0.00,1.00,14.40,-9.60,0 +158.40,-14.40,4.10,0.00,1.00,-158.40,-9.60,0 +153.60,-14.40,4.12,0.00,1.00,24.00,-14.40,0 +148.80,-19.20,4.14,0.00,1.00,-148.80,-14.40,0 +144.00,-19.20,4.17,0.00,1.00,33.60,-19.20,0 +139.20,-24.00,4.19,0.00,1.00,-139.20,-19.20,0 +134.40,-24.00,4.21,0.00,1.00,43.20,-24.00,0 +129.60,-28.80,4.23,0.00,1.00,-129.60,-24.00,0 +124.80,-28.80,4.25,0.00,1.00,52.80,-24.00,0 +120.00,-28.80,4.27,0.00,1.00,-120.00,-28.80,0 +115.20,-33.60,4.29,0.00,1.00,62.40,-28.80,0 +110.40,-33.60,4.32,0.00,1.00,-110.40,-28.80,0 +100.80,-33.60,4.34,0.00,1.00,72.00,-28.80,0 +96.00,-33.60,4.36,0.00,1.00,-100.80,-33.60,0 +91.20,-33.60,4.38,0.00,1.00,81.60,-33.60,0 +86.40,-33.60,4.40,0.00,1.00,-91.20,-33.60,0 +81.60,-33.60,4.42,0.00,1.00,96.00,-33.60,0 +72.00,-33.60,4.44,0.00,1.00,-81.60,-33.60,0 +67.20,-33.60,4.46,0.00,1.00,105.60,-33.60,0 +62.40,-28.80,4.49,0.00,1.00,-72.00,-28.80,0 +57.60,-28.80,4.51,0.00,1.00,115.20,-28.80,0 +52.80,-28.80,4.53,0.00,1.00,-62.40,-28.80,0 +48.00,-24.00,4.55,0.00,1.00,124.80,-28.80,0 +43.20,-24.00,4.57,0.00,1.00,-52.80,-24.00,0 +38.40,-24.00,4.59,0.00,1.00,134.40,-24.00,0 +33.60,-19.20,4.61,0.00,1.00,-43.20,-19.20,0 +28.80,-19.20,4.64,0.00,1.00,144.00,-19.20,0 +24.00,-14.40,4.66,0.00,1.00,-33.60,-19.20,0 +19.20,-14.40,4.68,0.00,1.00,153.60,-14.40,0 +14.40,-9.60,4.70,0.00,1.00,-24.00,-14.40,0 +14.40,-9.60,4.72,0.00,1.00,163.20,-9.60,0 +9.60,-4.80,4.74,0.00,1.00,-14.40,-9.60,0 +4.80,-4.80,4.76,0.00,1.00,172.80,-4.80,0 +0.00,0.00,4.79,0.00,1.00,-4.80,-4.80,0 +-4.80,0.00,4.81,0.00,1.00,0.00,0.00,0 +-9.60,4.80,4.83,0.00,1.00,-177.60,0.00,0 +-14.40,4.80,4.85,0.00,1.00,9.60,4.80,0 +-19.20,9.60,4.87,0.00,1.00,-168.00,4.80,0 +-19.20,9.60,4.89,0.00,1.00,19.20,9.60,0 +-24.00,14.40,4.91,0.00,1.00,-158.40,9.60,0 +-28.80,14.40,4.93,0.00,1.00,28.80,14.40,0 +-33.60,19.20,4.96,0.00,1.00,-148.80,14.40,0 +-38.40,19.20,4.98,0.00,1.00,38.40,14.40,0 +-43.20,19.20,5.00,0.00,1.00,-139.20,19.20,0 +-48.00,24.00,5.02,0.00,1.00,48.00,19.20,0 +-52.80,24.00,5.04,0.00,1.00,-129.60,24.00,0 +-57.60,24.00,5.06,0.00,1.00,57.60,24.00,0 +-62.40,24.00,5.08,0.00,1.00,-120.00,24.00,0 +-72.00,28.80,5.11,0.00,1.00,67.20,24.00,0 +-76.80,28.80,5.13,0.00,1.00,-110.40,24.00,0 +-81.60,28.80,5.15,0.00,1.00,76.80,28.80,0 +-86.40,28.80,5.17,0.00,1.00,-100.80,28.80,0 +-91.20,28.80,5.19,0.00,1.00,86.40,28.80,0 +-96.00,28.80,5.21,0.00,1.00,-86.40,28.80,0 +-100.80,28.80,5.23,0.00,1.00,96.00,28.80,0 +-105.60,28.80,5.26,0.00,1.00,-76.80,28.80,0 +-115.20,28.80,5.28,0.00,1.00,105.60,28.80,0 +-120.00,24.00,5.30,0.00,1.00,-67.20,24.00,0 +-124.80,24.00,5.32,0.00,1.00,115.20,24.00,0 +-129.60,24.00,5.34,0.00,1.00,-57.60,24.00,0 +-134.40,24.00,5.36,0.00,1.00,124.80,24.00,0 +-139.20,19.20,5.38,0.00,1.00,-48.00,19.20,0 +-144.00,19.20,5.40,0.00,1.00,134.40,19.20,0 +-148.80,14.40,5.43,0.00,1.00,-38.40,19.20,0 +-153.60,14.40,5.45,0.00,1.00,144.00,14.40,0 +-158.40,14.40,5.47,0.00,1.00,-28.80,14.40,0 +-163.20,9.60,5.49,0.00,1.00,153.60,9.60,0 +-163.20,9.60,5.51,0.00,1.00,-19.20,9.60,0 +-168.00,4.80,5.53,0.00,1.00,163.20,9.60,0 +-172.80,4.80,5.55,0.00,1.00,-9.60,4.80,0 +-177.60,0.00,5.58,0.00,1.00,172.80,4.80,0 +177.60,-0.00,5.60,0.00,1.00,-0.00,0.00,0 +172.80,-4.80,5.62,0.00,1.00,-177.60,-0.00,0 +168.00,-4.80,5.64,0.00,1.00,4.80,-4.80,0 +163.20,-9.60,5.66,0.00,1.00,-168.00,-4.80,0 +163.20,-9.60,5.68,0.00,1.00,14.40,-9.60,0 +158.40,-14.40,5.70,0.00,1.00,-158.40,-9.60,0 +153.60,-14.40,5.72,0.00,1.00,24.00,-9.60,0 +148.80,-14.40,5.75,0.00,1.00,-148.80,-14.40,0 +144.00,-19.20,5.77,0.00,1.00,33.60,-14.40,0 +139.20,-19.20,5.79,0.00,1.00,-139.20,-19.20,0 +134.40,-24.00,5.81,0.00,1.00,43.20,-19.20,0 +129.60,-24.00,5.83,0.00,1.00,-129.60,-19.20,0 +124.80,-24.00,5.85,0.00,1.00,52.80,-24.00,0 +120.00,-24.00,5.87,0.00,1.00,-120.00,-24.00,0 +115.20,-28.80,5.90,0.00,1.00,62.40,-24.00,0 +105.60,-28.80,5.92,0.00,1.00,-110.40,-24.00,0 +100.80,-28.80,5.94,0.00,1.00,72.00,-28.80,0 +96.00,-28.80,5.96,0.00,1.00,-100.80,-28.80,0 +91.20,-28.80,5.98,0.00,1.00,81.60,-28.80,0 +86.40,-28.80,6.00,0.00,1.00,-91.20,-28.80,0 +81.60,-28.80,6.02,0.00,1.00,96.00,-28.80,0 +76.80,-28.80,6.05,0.00,1.00,-81.60,-28.80,0 +72.00,-28.80,6.07,0.00,1.00,105.60,-28.80,0 +62.40,-24.00,6.09,0.00,1.00,-72.00,-24.00,0 +57.60,-24.00,6.11,0.00,1.00,115.20,-24.00,0 +52.80,-24.00,6.13,0.00,1.00,-62.40,-24.00,0 +48.00,-24.00,6.15,0.00,1.00,124.80,-24.00,0 +43.20,-19.20,6.17,0.00,1.00,-52.80,-24.00,0 +38.40,-19.20,6.19,0.00,1.00,134.40,-19.20,0 +33.60,-19.20,6.22,0.00,1.00,-43.20,-19.20,0 +28.80,-14.40,6.24,0.00,1.00,144.00,-14.40,0 +24.00,-14.40,6.26,0.00,1.00,-33.60,-14.40,0 +19.20,-9.60,6.28,0.00,1.00,153.60,-14.40,0 +19.20,-9.60,6.30,0.00,1.00,-24.00,-9.60,0 +14.40,-4.80,6.32,0.00,1.00,163.20,-9.60,0 +9.60,-4.80,6.34,0.00,1.00,-14.40,-4.80,0 +4.80,-0.00,6.37,0.00,1.00,172.80,-4.80,0 +0.00,0.00,6.39,0.00,1.00,-4.80,-0.00,0 +-4.80,0.00,6.41,0.00,1.00,0.00,0.00,0 +-9.60,4.80,6.43,0.00,1.00,-177.60,0.00,0 +-14.40,4.80,6.45,0.00,1.00,9.60,4.80,0 +-19.20,9.60,6.47,0.00,1.00,-168.00,4.80,0 +-24.00,9.60,6.49,0.00,1.00,19.20,9.60,0 +-28.80,9.60,6.52,0.00,1.00,-158.40,9.60,0 +-33.60,14.40,6.54,0.00,1.00,28.80,9.60,0 +-33.60,14.40,6.56,0.00,1.00,-148.80,14.40,0 +-38.40,14.40,6.58,0.00,1.00,38.40,14.40,0 +-43.20,19.20,6.60,0.00,1.00,-139.20,14.40,0 +-48.00,19.20,6.62,0.00,1.00,48.00,14.40,0 +-57.60,19.20,6.64,0.00,1.00,-129.60,19.20,0 +-62.40,19.20,6.66,0.00,1.00,57.60,19.20,0 +-67.20,24.00,6.69,0.00,1.00,-120.00,19.20,0 +-72.00,24.00,6.71,0.00,1.00,67.20,19.20,0 +-76.80,24.00,6.73,0.00,1.00,-110.40,24.00,0 +-81.60,24.00,6.75,0.00,1.00,76.80,24.00,0 +-86.40,24.00,6.77,0.00,1.00,-100.80,24.00,0 +-91.20,24.00,6.79,0.00,1.00,86.40,24.00,0 +-96.00,24.00,6.81,0.00,1.00,-86.40,24.00,0 +-100.80,24.00,6.84,0.00,1.00,96.00,24.00,0 +-105.60,24.00,6.86,0.00,1.00,-76.80,24.00,0 +-110.40,24.00,6.88,0.00,1.00,105.60,24.00,0 +-115.20,19.20,6.90,0.00,1.00,-67.20,19.20,0 +-120.00,19.20,6.92,0.00,1.00,115.20,19.20,0 +-129.60,19.20,6.94,0.00,1.00,-57.60,19.20,0 +-134.40,19.20,6.96,0.00,1.00,124.80,19.20,0 +-139.20,19.20,6.99,0.00,1.00,-48.00,19.20,0 +-144.00,14.40,7.01,0.00,1.00,134.40,14.40,0 +-148.80,14.40,7.03,0.00,1.00,-38.40,14.40,0 +-148.80,14.40,7.05,0.00,1.00,144.00,14.40,0 +-153.60,9.60,7.07,0.00,1.00,-28.80,9.60,0 +-158.40,9.60,7.09,0.00,1.00,153.60,9.60,0 +-163.20,4.80,7.11,0.00,1.00,-19.20,9.60,0 +-168.00,4.80,7.13,0.00,1.00,163.20,4.80,0 +-172.80,4.80,7.16,0.00,1.00,-9.60,4.80,0 +-177.60,0.00,7.18,0.00,1.00,172.80,4.80,0 +177.60,-0.00,7.20,0.00,1.00,-0.00,0.00,0 +172.80,-4.80,7.22,0.00,1.00,-177.60,-0.00,0 +168.00,-4.80,7.24,0.00,1.00,4.80,-4.80,0 +163.20,-4.80,7.26,0.00,1.00,-168.00,-4.80,0 +158.40,-9.60,7.28,0.00,1.00,14.40,-4.80,0 +153.60,-9.60,7.31,0.00,1.00,-158.40,-9.60,0 +148.80,-14.40,7.33,0.00,1.00,24.00,-9.60,0 +148.80,-14.40,7.35,0.00,1.00,-148.80,-9.60,0 +144.00,-14.40,7.37,0.00,1.00,33.60,-14.40,0 +139.20,-19.20,7.39,0.00,1.00,-139.20,-14.40,0 +134.40,-19.20,7.41,0.00,1.00,43.20,-14.40,0 +129.60,-19.20,7.43,0.00,1.00,-129.60,-19.20,0 +120.00,-19.20,7.46,0.00,1.00,52.80,-19.20,0 +115.20,-19.20,7.48,0.00,1.00,-120.00,-19.20,0 +110.40,-24.00,7.50,0.00,1.00,62.40,-19.20,0 +105.60,-24.00,7.52,0.00,1.00,-110.40,-19.20,0 +100.80,-24.00,7.54,0.00,1.00,72.00,-24.00,0 +96.00,-24.00,7.56,0.00,1.00,-100.80,-24.00,0 +91.20,-24.00,7.58,0.00,1.00,81.60,-24.00,0 +86.40,-24.00,7.60,0.00,1.00,-91.20,-24.00,0 +81.60,-24.00,7.63,0.00,1.00,96.00,-24.00,0 +76.80,-24.00,7.65,0.00,1.00,-81.60,-24.00,0 +72.00,-24.00,7.67,0.00,1.00,105.60,-24.00,0 +67.20,-24.00,7.69,0.00,1.00,-72.00,-24.00,0 +62.40,-19.20,7.71,0.00,1.00,115.20,-19.20,0 +57.60,-19.20,7.73,0.00,1.00,-62.40,-19.20,0 +48.00,-19.20,7.75,0.00,1.00,124.80,-19.20,0 +43.20,-19.20,7.78,0.00,1.00,-52.80,-19.20,0 +38.40,-14.40,7.80,0.00,1.00,134.40,-14.40,0 +33.60,-14.40,7.82,0.00,1.00,-43.20,-14.40,0 +33.60,-14.40,7.84,0.00,1.00,144.00,-14.40,0 +28.80,-9.60,7.86,0.00,1.00,-33.60,-14.40,0 +24.00,-9.60,7.88,0.00,1.00,153.60,-9.60,0 +19.20,-9.60,7.90,0.00,1.00,-24.00,-9.60,0 +14.40,-4.80,7.93,0.00,1.00,163.20,-9.60,0 +9.60,-4.80,7.95,0.00,1.00,-14.40,-4.80,0 +4.80,-0.00,7.97,0.00,1.00,172.80,-4.80,0 +0.00,0.00,7.99,0.00,1.00,-4.80,-0.00,0 +-4.80,0.00,8.01,0.00,1.00,0.00,0.00,0 +-9.60,4.80,8.03,0.00,1.00,-177.60,0.00,0 +-14.40,4.80,8.05,0.00,1.00,9.60,4.80,0 +-19.20,4.80,8.07,0.00,1.00,-168.00,4.80,0 +-24.00,9.60,8.10,0.00,1.00,19.20,4.80,0 +-28.80,9.60,8.12,0.00,1.00,-158.40,9.60,0 +-33.60,9.60,8.14,0.00,1.00,24.00,9.60,0 +-38.40,9.60,8.16,0.00,1.00,-148.80,9.60,0 +-43.20,14.40,8.18,0.00,1.00,33.60,9.60,0 +-48.00,14.40,8.20,0.00,1.00,-139.20,14.40,0 +-52.80,14.40,8.22,0.00,1.00,43.20,14.40,0 +-57.60,14.40,8.25,0.00,1.00,-129.60,14.40,0 +-62.40,19.20,8.27,0.00,1.00,52.80,14.40,0 +-67.20,19.20,8.29,0.00,1.00,-120.00,14.40,0 +-72.00,19.20,8.31,0.00,1.00,62.40,14.40,0 +-76.80,19.20,8.33,0.00,1.00,-110.40,19.20,0 +-81.60,19.20,8.35,0.00,1.00,76.80,19.20,0 +-86.40,19.20,8.37,0.00,1.00,-100.80,19.20,0 +-91.20,19.20,8.40,0.00,1.00,86.40,19.20,0 +-96.00,19.20,8.42,0.00,1.00,-86.40,19.20,0 +-100.80,19.20,8.44,0.00,1.00,96.00,19.20,0 +-105.60,19.20,8.46,0.00,1.00,-76.80,19.20,0 +-110.40,19.20,8.48,0.00,1.00,105.60,19.20,0 +-115.20,19.20,8.50,0.00,1.00,-67.20,19.20,0 +-120.00,14.40,8.52,0.00,1.00,120.00,14.40,0 +-124.80,14.40,8.54,0.00,1.00,-57.60,14.40,0 +-129.60,14.40,8.57,0.00,1.00,129.60,14.40,0 +-134.40,14.40,8.59,0.00,1.00,-48.00,14.40,0 +-139.20,14.40,8.61,0.00,1.00,139.20,14.40,0 +-144.00,9.60,8.63,0.00,1.00,-38.40,9.60,0 +-148.80,9.60,8.65,0.00,1.00,148.80,9.60,0 +-153.60,9.60,8.67,0.00,1.00,-28.80,9.60,0 +-158.40,4.80,8.69,0.00,1.00,158.40,9.60,0 +-163.20,4.80,8.72,0.00,1.00,-19.20,4.80,0 +-168.00,4.80,8.74,0.00,1.00,163.20,4.80,0 +-172.80,0.00,8.76,0.00,1.00,-9.60,4.80,0 +-177.60,0.00,8.78,0.00,1.00,172.80,0.00,0 +177.60,-0.00,8.80,0.00,1.00,-0.00,0.00,0 +172.80,-0.00,8.82,0.00,1.00,-177.60,-0.00,0 +168.00,-4.80,8.84,0.00,1.00,4.80,-0.00,0 +163.20,-4.80,8.87,0.00,1.00,-168.00,-4.80,0 +158.40,-4.80,8.89,0.00,1.00,14.40,-4.80,0 +153.60,-9.60,8.91,0.00,1.00,-158.40,-4.80,0 +148.80,-9.60,8.93,0.00,1.00,24.00,-9.60,0 +144.00,-9.60,8.95,0.00,1.00,-153.60,-9.60,0 +139.20,-14.40,8.97,0.00,1.00,33.60,-9.60,0 +134.40,-14.40,8.99,0.00,1.00,-144.00,-9.60,0 +129.60,-14.40,9.01,0.00,1.00,43.20,-14.40,0 +124.80,-14.40,9.04,0.00,1.00,-134.40,-14.40,0 +120.00,-14.40,9.06,0.00,1.00,52.80,-14.40,0 +115.20,-19.20,9.08,0.00,1.00,-124.80,-14.40,0 +110.40,-19.20,9.10,0.00,1.00,62.40,-14.40,0 +105.60,-19.20,9.12,0.00,1.00,-110.40,-19.20,0 +100.80,-19.20,9.14,0.00,1.00,72.00,-19.20,0 +96.00,-19.20,9.16,0.00,1.00,-100.80,-19.20,0 +91.20,-19.20,9.19,0.00,1.00,81.60,-19.20,0 +86.40,-19.20,9.21,0.00,1.00,-91.20,-19.20,0 +81.60,-19.20,9.23,0.00,1.00,96.00,-19.20,0 +76.80,-19.20,9.25,0.00,1.00,-81.60,-19.20,0 +72.00,-19.20,9.27,0.00,1.00,105.60,-19.20,0 +67.20,-19.20,9.29,0.00,1.00,-72.00,-19.20,0 +62.40,-19.20,9.31,0.00,1.00,115.20,-14.40,0 +57.60,-14.40,9.34,0.00,1.00,-57.60,-14.40,0 +52.80,-14.40,9.36,0.00,1.00,124.80,-14.40,0 +48.00,-14.40,9.38,0.00,1.00,-48.00,-14.40,0 +43.20,-14.40,9.40,0.00,1.00,134.40,-14.40,0 +38.40,-9.60,9.42,0.00,1.00,-38.40,-14.40,0 +33.60,-9.60,9.44,0.00,1.00,144.00,-9.60,0 +28.80,-9.60,9.46,0.00,1.00,-28.80,-9.60,0 +24.00,-9.60,9.48,0.00,1.00,153.60,-9.60,0 +19.20,-4.80,9.51,0.00,1.00,-24.00,-9.60,0 +14.40,-4.80,9.53,0.00,1.00,163.20,-4.80,0 +9.60,-4.80,9.55,0.00,1.00,-14.40,-4.80,0 +4.80,-0.00,9.57,0.00,1.00,172.80,-4.80,0 +0.00,0.00,9.59,0.00,1.00,-4.80,-0.00,0 +-4.80,0.00,9.61,0.00,1.00,0.00,0.00,0 +-9.60,0.00,9.63,0.00,1.00,-177.60,0.00,0 +-14.40,4.80,9.66,0.00,1.00,9.60,0.00,0 +-19.20,4.80,9.68,0.00,1.00,-168.00,4.80,0 +-24.00,4.80,9.70,0.00,1.00,14.40,4.80,0 +-28.80,4.80,9.72,0.00,1.00,-158.40,4.80,0 +-33.60,9.60,9.74,0.00,1.00,24.00,4.80,0 +-38.40,9.60,9.76,0.00,1.00,-148.80,9.60,0 +-43.20,9.60,9.78,0.00,1.00,33.60,9.60,0 +-48.00,9.60,9.81,0.00,1.00,-139.20,9.60,0 +-52.80,9.60,9.83,0.00,1.00,43.20,9.60,0 +-57.60,14.40,9.85,0.00,1.00,-129.60,9.60,0 +-62.40,14.40,9.87,0.00,1.00,52.80,9.60,0 +-67.20,14.40,9.89,0.00,1.00,-120.00,9.60,0 +-72.00,14.40,9.91,0.00,1.00,62.40,14.40,0 +-76.80,14.40,9.93,0.00,1.00,-110.40,14.40,0 +-81.60,14.40,9.95,0.00,1.00,76.80,14.40,0 +-86.40,14.40,9.98,0.00,1.00,-100.80,14.40,0 +-91.20,14.40,10.00,0.00,1.00,86.40,14.40,0 +-96.00,14.40,10.02,0.00,1.00,-86.40,14.40,0 +-100.80,14.40,10.04,0.00,1.00,96.00,14.40,0 +-105.60,14.40,10.06,0.00,1.00,-76.80,14.40,0 +-110.40,14.40,10.08,0.00,1.00,110.40,14.40,0 +-115.20,14.40,10.10,0.00,1.00,-67.20,14.40,0 +-120.00,14.40,10.13,0.00,1.00,120.00,9.60,0 +-124.80,9.60,10.15,0.00,1.00,-57.60,9.60,0 +-129.60,9.60,10.17,0.00,1.00,129.60,9.60,0 +-134.40,9.60,10.19,0.00,1.00,-48.00,9.60,0 +-139.20,9.60,10.21,0.00,1.00,139.20,9.60,0 +-144.00,9.60,10.23,0.00,1.00,-38.40,9.60,0 +-148.80,9.60,10.25,0.00,1.00,148.80,9.60,0 +-153.60,4.80,10.28,0.00,1.00,-28.80,4.80,0 +-158.40,4.80,10.30,0.00,1.00,158.40,4.80,0 +-163.20,4.80,10.32,0.00,1.00,-19.20,4.80,0 +-168.00,4.80,10.34,0.00,1.00,168.00,4.80,0 +-172.80,0.00,10.36,0.00,1.00,-9.60,4.80,0 +-177.60,0.00,10.38,0.00,1.00,172.80,0.00,0 +177.60,-0.00,10.40,0.00,1.00,-0.00,0.00,0 +172.80,-0.00,10.42,0.00,1.00,-177.60,-0.00,0 +168.00,-4.80,10.45,0.00,1.00,4.80,-0.00,0 +163.20,-4.80,10.47,0.00,1.00,-168.00,-4.80,0 +158.40,-4.80,10.49,0.00,1.00,14.40,-4.80,0 +153.60,-4.80,10.51,0.00,1.00,-163.20,-4.80,0 +148.80,-9.60,10.53,0.00,1.00,24.00,-4.80,0 +144.00,-9.60,10.55,0.00,1.00,-153.60,-4.80,0 +139.20,-9.60,10.57,0.00,1.00,33.60,-9.60,0 +134.40,-9.60,10.60,0.00,1.00,-144.00,-9.60,0 +129.60,-9.60,10.62,0.00,1.00,43.20,-9.60,0 +124.80,-9.60,10.64,0.00,1.00,-134.40,-9.60,0 +120.00,-14.40,10.66,0.00,1.00,52.80,-9.60,0 +115.20,-14.40,10.68,0.00,1.00,-124.80,-9.60,0 +110.40,-14.40,10.70,0.00,1.00,62.40,-9.60,0 +105.60,-14.40,10.72,0.00,1.00,-115.20,-14.40,0 +100.80,-14.40,10.74,0.00,1.00,72.00,-14.40,0 +96.00,-14.40,10.77,0.00,1.00,-100.80,-14.40,0 +91.20,-14.40,10.79,0.00,1.00,81.60,-14.40,0 +86.40,-14.40,10.81,0.00,1.00,-91.20,-14.40,0 +81.60,-14.40,10.83,0.00,1.00,96.00,-14.40,0 +76.80,-14.40,10.85,0.00,1.00,-81.60,-14.40,0 +72.00,-14.40,10.87,0.00,1.00,105.60,-14.40,0 +67.20,-14.40,10.89,0.00,1.00,-67.20,-14.40,0 +62.40,-14.40,10.92,0.00,1.00,115.20,-14.40,0 +57.60,-14.40,10.94,0.00,1.00,-57.60,-9.60,0 +52.80,-9.60,10.96,0.00,1.00,124.80,-9.60,0 +48.00,-9.60,10.98,0.00,1.00,-48.00,-9.60,0 +43.20,-9.60,11.00,0.00,1.00,134.40,-9.60,0 +38.40,-9.60,11.02,0.00,1.00,-38.40,-9.60,0 +33.60,-9.60,11.04,0.00,1.00,144.00,-9.60,0 +28.80,-4.80,11.07,0.00,1.00,-28.80,-9.60,0 +24.00,-4.80,11.09,0.00,1.00,153.60,-4.80,0 +19.20,-4.80,11.11,0.00,1.00,-19.20,-4.80,0 +14.40,-4.80,11.13,0.00,1.00,163.20,-4.80,0 +9.60,-0.00,11.15,0.00,1.00,-14.40,-4.80,0 +4.80,-0.00,11.17,0.00,1.00,172.80,-0.00,0 +0.00,0.00,11.19,0.00,1.00,-4.80,-0.00,0 +-4.80,0.00,11.21,0.00,1.00,0.00,0.00,0 +-9.60,0.00,11.24,0.00,1.00,-177.60,0.00,0 +-14.40,0.00,11.26,0.00,1.00,9.60,0.00,0 +-19.20,4.80,11.28,0.00,1.00,-168.00,0.00,0 +-24.00,4.80,11.30,0.00,1.00,14.40,4.80,0 +-28.80,4.80,11.32,0.00,1.00,-158.40,4.80,0 +-33.60,4.80,11.34,0.00,1.00,24.00,4.80,0 +-38.40,4.80,11.36,0.00,1.00,-153.60,4.80,0 +-43.20,4.80,11.39,0.00,1.00,33.60,4.80,0 +-48.00,4.80,11.41,0.00,1.00,-144.00,4.80,0 +-52.80,9.60,11.43,0.00,1.00,43.20,4.80,0 +-57.60,9.60,11.45,0.00,1.00,-134.40,4.80,0 +-62.40,9.60,11.47,0.00,1.00,52.80,4.80,0 +-67.20,9.60,11.49,0.00,1.00,-124.80,9.60,0 +-72.00,9.60,11.51,0.00,1.00,62.40,9.60,0 +-76.80,9.60,11.54,0.00,1.00,-110.40,9.60,0 +-81.60,9.60,11.56,0.00,1.00,72.00,9.60,0 +-86.40,9.60,11.58,0.00,1.00,-100.80,9.60,0 +-91.20,9.60,11.60,0.00,1.00,86.40,9.60,0 +-96.00,9.60,11.62,0.00,1.00,-86.40,9.60,0 +-100.80,9.60,11.64,0.00,1.00,96.00,9.60,0 +-105.60,9.60,11.66,0.00,1.00,-76.80,9.60,0 +-110.40,9.60,11.68,0.00,1.00,110.40,9.60,0 +-115.20,9.60,11.71,0.00,1.00,-67.20,9.60,0 +-120.00,9.60,11.73,0.00,1.00,120.00,9.60,0 +-124.80,9.60,11.75,0.00,1.00,-52.80,9.60,0 +-129.60,9.60,11.77,0.00,1.00,129.60,4.80,0 +-134.40,4.80,11.79,0.00,1.00,-43.20,4.80,0 +-139.20,4.80,11.81,0.00,1.00,139.20,4.80,0 +-144.00,4.80,11.83,0.00,1.00,-33.60,4.80,0 +-148.80,4.80,11.86,0.00,1.00,148.80,4.80,0 +-153.60,4.80,11.88,0.00,1.00,-24.00,4.80,0 +-158.40,4.80,11.90,0.00,1.00,158.40,4.80,0 +-163.20,4.80,11.92,0.00,1.00,-19.20,4.80,0 +-168.00,0.00,11.94,0.00,1.00,168.00,4.80,0 +-172.80,0.00,11.96,0.00,1.00,-9.60,0.00,0 +-177.60,0.00,11.98,0.00,1.00,172.80,0.00,0 +177.60,-0.00,12.01,0.00,1.00,-0.00,0.00,0 +172.80,-0.00,12.03,0.00,1.00,-177.60,-0.00,0 +168.00,-0.00,12.05,0.00,1.00,4.80,-0.00,0 +163.20,-4.80,12.07,0.00,1.00,-168.00,-0.00,0 +158.40,-4.80,12.09,0.00,1.00,14.40,-4.80,0 +153.60,-4.80,12.11,0.00,1.00,-163.20,-4.80,0 +148.80,-4.80,12.13,0.00,1.00,24.00,-4.80,0 +144.00,-4.80,12.15,0.00,1.00,-153.60,-4.80,0 +139.20,-4.80,12.18,0.00,1.00,28.80,-4.80,0 +134.40,-4.80,12.20,0.00,1.00,-144.00,-4.80,0 +129.60,-9.60,12.22,0.00,1.00,38.40,-4.80,0 +124.80,-9.60,12.24,0.00,1.00,-134.40,-4.80,0 +120.00,-9.60,12.26,0.00,1.00,48.00,-4.80,0 +115.20,-9.60,12.28,0.00,1.00,-124.80,-9.60,0 +110.40,-9.60,12.30,0.00,1.00,57.60,-9.60,0 +105.60,-9.60,12.33,0.00,1.00,-115.20,-9.60,0 +100.80,-9.60,12.35,0.00,1.00,72.00,-9.60,0 +96.00,-9.60,12.37,0.00,1.00,-105.60,-9.60,0 +91.20,-9.60,12.39,0.00,1.00,81.60,-9.60,0 +86.40,-9.60,12.41,0.00,1.00,-91.20,-9.60,0 +81.60,-9.60,12.43,0.00,1.00,96.00,-9.60,0 +76.80,-9.60,12.45,0.00,1.00,-81.60,-9.60,0 +72.00,-9.60,12.48,0.00,1.00,105.60,-9.60,0 +67.20,-9.60,12.50,0.00,1.00,-67.20,-9.60,0 +62.40,-9.60,12.52,0.00,1.00,120.00,-9.60,0 +57.60,-9.60,12.54,0.00,1.00,-57.60,-9.60,0 +52.80,-9.60,12.56,0.00,1.00,129.60,-4.80,0 +48.00,-4.80,12.58,0.00,1.00,-48.00,-4.80,0 +43.20,-4.80,12.60,0.00,1.00,139.20,-4.80,0 +38.40,-4.80,12.62,0.00,1.00,-38.40,-4.80,0 +33.60,-4.80,12.65,0.00,1.00,148.80,-4.80,0 +28.80,-4.80,12.67,0.00,1.00,-28.80,-4.80,0 +24.00,-4.80,12.69,0.00,1.00,158.40,-4.80,0 +19.20,-4.80,12.71,0.00,1.00,-19.20,-4.80,0 +14.40,-0.00,12.73,0.00,1.00,163.20,-4.80,0 +9.60,-0.00,12.75,0.00,1.00,-9.60,-0.00,0 +4.80,-0.00,12.77,0.00,1.00,172.80,-0.00,0 +0.00,0.00,12.80,0.00,1.00,-4.80,-0.00,0 +-4.80,0.00,12.82,0.00,1.00,0.00,0.00,0 +-9.60,0.00,12.84,0.00,1.00,-177.60,0.00,0 +-14.40,0.00,12.86,0.00,1.00,9.60,0.00,0 +-19.20,0.00,12.88,0.00,1.00,-168.00,0.00,0 +-24.00,0.00,12.90,0.00,1.00,14.40,0.00,0 +-28.80,0.00,12.92,0.00,1.00,-163.20,0.00,0 +-33.60,4.80,12.95,0.00,1.00,24.00,0.00,0 +-38.40,4.80,12.97,0.00,1.00,-153.60,0.00,0 +-43.20,4.80,12.99,0.00,1.00,28.80,0.00,0 +-48.00,4.80,13.01,0.00,1.00,-144.00,4.80,0 +-52.80,4.80,13.03,0.00,1.00,38.40,4.80,0 +-57.60,4.80,13.05,0.00,1.00,-134.40,4.80,0 +-62.40,4.80,13.07,0.00,1.00,48.00,4.80,0 +-67.20,4.80,13.09,0.00,1.00,-124.80,4.80,0 +-72.00,4.80,13.12,0.00,1.00,62.40,4.80,0 +-76.80,4.80,13.14,0.00,1.00,-115.20,4.80,0 +-81.60,4.80,13.16,0.00,1.00,72.00,4.80,0 +-86.40,4.80,13.18,0.00,1.00,-100.80,4.80,0 +-91.20,4.80,13.20,0.00,1.00,86.40,4.80,0 +-96.00,4.80,13.22,0.00,1.00,-86.40,4.80,0 +-100.80,4.80,13.24,0.00,1.00,96.00,4.80,0 +-105.60,4.80,13.27,0.00,1.00,-76.80,4.80,0 +-110.40,4.80,13.29,0.00,1.00,110.40,4.80,0 +-115.20,4.80,13.31,0.00,1.00,-62.40,4.80,0 +-120.00,4.80,13.33,0.00,1.00,120.00,4.80,0 +-124.80,4.80,13.35,0.00,1.00,-52.80,4.80,0 +-129.60,4.80,13.37,0.00,1.00,134.40,4.80,0 +-134.40,4.80,13.39,0.00,1.00,-43.20,4.80,0 +-139.20,4.80,13.42,0.00,1.00,144.00,4.80,0 +-144.00,4.80,13.44,0.00,1.00,-33.60,0.00,0 +-148.80,4.80,13.46,0.00,1.00,153.60,0.00,0 +-153.60,0.00,13.48,0.00,1.00,-24.00,0.00,0 +-158.40,0.00,13.50,0.00,1.00,158.40,0.00,0 +-163.20,0.00,13.52,0.00,1.00,-14.40,0.00,0 +-168.00,0.00,13.54,0.00,1.00,168.00,0.00,0 +-172.80,0.00,13.56,0.00,1.00,-9.60,0.00,0 +-177.60,0.00,13.59,0.00,1.00,172.80,0.00,0 +177.60,-0.00,13.61,0.00,1.00,-0.00,0.00,0 +172.80,-0.00,13.63,0.00,1.00,-177.60,-0.00,0 +168.00,-0.00,13.65,0.00,1.00,4.80,-0.00,0 +163.20,-0.00,13.67,0.00,1.00,-172.80,-0.00,0 +158.40,-0.00,13.69,0.00,1.00,14.40,-0.00,0 +153.60,-0.00,13.71,0.00,1.00,-163.20,-0.00,0 +148.80,-4.80,13.74,0.00,1.00,19.20,-0.00,0 +144.00,-4.80,13.76,0.00,1.00,-153.60,-0.00,0 +139.20,-4.80,13.78,0.00,1.00,28.80,-0.00,0 +134.40,-4.80,13.80,0.00,1.00,-148.80,-0.00,0 +129.60,-4.80,13.82,0.00,1.00,38.40,-4.80,0 +124.80,-4.80,13.84,0.00,1.00,-139.20,-4.80,0 +120.00,-4.80,13.86,0.00,1.00,48.00,-4.80,0 +115.20,-4.80,13.89,0.00,1.00,-129.60,-4.80,0 +110.40,-4.80,13.91,0.00,1.00,57.60,-4.80,0 +105.60,-4.80,13.93,0.00,1.00,-115.20,-4.80,0 +100.80,-4.80,13.95,0.00,1.00,67.20,-4.80,0 +96.00,-4.80,13.97,0.00,1.00,-105.60,-4.80,0 +91.20,-4.80,13.99,0.00,1.00,81.60,-4.80,0 +86.40,-4.80,14.01,0.00,1.00,-91.20,-4.80,0 +81.60,-4.80,14.03,0.00,1.00,96.00,-4.80,0 +76.80,-4.80,14.06,0.00,1.00,-76.80,-4.80,0 +72.00,-4.80,14.08,0.00,1.00,105.60,-4.80,0 +67.20,-4.80,14.10,0.00,1.00,-67.20,-4.80,0 +62.40,-4.80,14.12,0.00,1.00,120.00,-4.80,0 +57.60,-4.80,14.14,0.00,1.00,-52.80,-4.80,0 +52.80,-4.80,14.16,0.00,1.00,129.60,-4.80,0 +48.00,-4.80,14.18,0.00,1.00,-43.20,-4.80,0 +43.20,-4.80,14.21,0.00,1.00,139.20,-4.80,0 +38.40,-4.80,14.23,0.00,1.00,-33.60,-4.80,0 +33.60,-4.80,14.25,0.00,1.00,148.80,-0.00,0 +28.80,-0.00,14.27,0.00,1.00,-28.80,-0.00,0 +24.00,-0.00,14.29,0.00,1.00,158.40,-0.00,0 +19.20,-0.00,14.31,0.00,1.00,-19.20,-0.00,0 +14.40,-0.00,14.33,0.00,1.00,163.20,-0.00,0 +9.60,-0.00,14.36,0.00,1.00,-9.60,-0.00,0 +4.80,-0.00,14.38,0.00,1.00,172.80,-0.00,0 +0.00,0.00,14.40,0.00,1.00,-4.80,-0.00,0 +-4.80,0.00,14.42,0.00,1.00,0.00,0.00,0 +-9.60,0.00,14.44,0.00,1.00,-177.60,-0.00,0 +-14.40,0.00,14.46,0.00,1.00,4.80,-0.00,0 +-19.20,0.00,14.48,0.00,1.00,-168.00,-0.00,0 +-24.00,0.00,14.50,0.00,1.00,14.40,-0.00,0 +-28.80,0.00,14.53,0.00,1.00,-163.20,-0.00,0 +-33.60,0.00,14.55,0.00,1.00,19.20,-0.00,0 +-38.40,0.00,14.57,0.00,1.00,-153.60,-0.00,0 +-43.20,0.00,14.59,0.00,1.00,28.80,-0.00,0 +-48.00,0.00,14.61,0.00,1.00,-148.80,-0.00,0 +-52.80,0.00,14.63,0.00,1.00,38.40,-0.00,0 +-57.60,0.00,14.65,0.00,1.00,-139.20,-0.00,0 +-62.40,0.00,14.68,0.00,1.00,48.00,-0.00,0 +-67.20,0.00,14.70,0.00,1.00,-124.80,-0.00,0 +-72.00,0.00,14.72,0.00,1.00,57.60,-0.00,0 +-76.80,0.00,14.74,0.00,1.00,-115.20,-0.00,0 +-81.60,0.00,14.76,0.00,1.00,72.00,-0.00,0 +-86.40,0.00,14.78,0.00,1.00,-100.80,-0.00,0 +-91.20,0.00,14.80,0.00,1.00,86.40,-0.00,0 +-96.00,0.00,14.83,0.00,1.00,-86.40,-0.00,0 +-100.80,0.00,14.85,0.00,1.00,100.80,-0.00,0 +-105.60,0.00,14.87,0.00,1.00,-76.80,-0.00,0 +-110.40,0.00,14.89,0.00,1.00,110.40,-0.00,0 +-115.20,0.00,14.91,0.00,1.00,-62.40,-0.00,0 +-120.00,0.00,14.93,0.00,1.00,124.80,-0.00,0 +-124.80,0.00,14.95,0.00,1.00,-48.00,-0.00,0 +-129.60,0.00,14.97,0.00,1.00,134.40,-0.00,0 +-134.40,0.00,15.00,0.00,1.00,-38.40,-0.00,0 +-139.20,0.00,15.02,0.00,1.00,144.00,-0.00,0 +-144.00,0.00,15.04,0.00,1.00,-28.80,-0.00,0 +-148.80,0.00,15.06,0.00,1.00,153.60,-0.00,0 +-153.60,0.00,15.08,0.00,1.00,-24.00,-0.00,0 +-158.40,0.00,15.10,0.00,1.00,163.20,-0.00,0 +-163.20,0.00,15.12,0.00,1.00,-14.40,-0.00,0 +-168.00,0.00,15.15,0.00,1.00,168.00,-0.00,0 +-172.80,0.00,15.17,0.00,1.00,-9.60,-0.00,0 +-177.60,0.00,15.19,0.00,1.00,172.80,-0.00,0 +177.60,0.00,15.21,0.00,1.00,-0.00,-0.00,0 +172.80,0.00,15.23,0.00,1.00,-177.60,0.00,0 +168.00,0.00,15.25,0.00,1.00,4.80,0.00,0 +163.20,0.00,15.27,0.00,1.00,-172.80,0.00,0 +158.40,0.00,15.30,0.00,1.00,9.60,0.00,0 +153.60,0.00,15.32,0.00,1.00,-163.20,0.00,0 +148.80,0.00,15.34,0.00,1.00,19.20,0.00,0 +144.00,0.00,15.36,0.00,1.00,-158.40,0.00,0 +139.20,0.00,15.38,0.00,1.00,28.80,0.00,0 +134.40,0.00,15.40,0.00,1.00,-148.80,0.00,0 +129.60,0.00,15.42,0.00,1.00,33.60,0.00,0 +124.80,0.00,15.44,0.00,1.00,-139.20,0.00,0 +120.00,0.00,15.47,0.00,1.00,43.20,0.00,0 +115.20,0.00,15.49,0.00,1.00,-129.60,0.00,0 +110.40,0.00,15.51,0.00,1.00,57.60,0.00,0 +105.60,0.00,15.53,0.00,1.00,-120.00,0.00,0 +100.80,0.00,15.55,0.00,1.00,67.20,0.00,0 +96.00,0.00,15.57,0.00,1.00,-105.60,0.00,0 +91.20,0.00,15.59,0.00,1.00,81.60,0.00,0 +86.40,0.00,15.62,0.00,1.00,-91.20,0.00,0 +81.60,0.00,15.64,0.00,1.00,96.00,0.00,0 +76.80,0.00,15.66,0.00,1.00,-76.80,0.00,0 +72.00,0.00,15.68,0.00,1.00,110.40,0.00,0 +67.20,0.00,15.70,0.00,1.00,-67.20,0.00,0 +62.40,0.00,15.72,0.00,1.00,120.00,0.00,0 +57.60,0.00,15.74,0.00,1.00,-52.80,0.00,0 +52.80,0.00,15.77,0.00,1.00,134.40,0.00,0 +48.00,0.00,15.79,0.00,1.00,-43.20,0.00,0 +43.20,0.00,15.81,0.00,1.00,144.00,0.00,0 +38.40,0.00,15.83,0.00,1.00,-33.60,0.00,0 +33.60,0.00,15.85,0.00,1.00,153.60,0.00,0 +28.80,0.00,15.87,0.00,1.00,-24.00,0.00,0 +24.00,0.00,15.89,0.00,1.00,158.40,0.00,0 +19.20,0.00,15.91,0.00,1.00,-19.20,0.00,0 +14.40,0.00,15.94,0.00,1.00,168.00,0.00,0 +9.60,0.00,15.96,0.00,1.00,-9.60,0.00,0 +4.80,0.00,15.98,0.00,1.00,172.80,0.00,0 +0.00,0.00,16.00,0.00,1.00,-4.80,0.00,0 diff --git a/scripts/testv/stvISM3.csv b/scripts/testv/stvISM3.csv index ac37e672e3758c851a5d236e56e612697bcd5f1f..14eee9b693b536fa2fd22d2813d7f588b8930b06 100644 --- a/scripts/testv/stvISM3.csv +++ b/scripts/testv/stvISM3.csv @@ -1,1500 +1,1500 @@ -0.00,0.00,0.00,0.00,1.00,-0.00,0.00 --177.60,-4.80,16.00,0.00,1.00,-0.00,0.00 -4.80,4.80,0.02,0.00,1.00,-0.00,0.00 --168.00,-9.60,15.98,0.00,1.00,-0.00,0.00 -14.40,14.40,0.04,0.00,1.00,-0.00,0.00 --163.20,-14.40,15.96,0.00,1.00,-0.00,0.00 -19.20,19.20,0.06,0.00,1.00,-0.00,0.00 --153.60,-24.00,15.94,0.00,1.00,-0.00,0.00 -28.80,24.00,0.09,0.00,1.00,-0.00,0.00 --148.80,-28.80,15.91,0.00,1.00,-0.00,0.00 -38.40,33.60,0.11,0.00,1.00,-0.00,0.00 --139.20,-33.60,15.89,0.00,1.00,-0.00,0.00 -48.00,38.40,0.13,0.00,1.00,-0.00,0.00 --124.80,-38.40,15.87,0.00,1.00,-0.00,0.00 -57.60,38.40,0.15,0.00,1.00,-0.00,0.00 --115.20,-43.20,15.85,0.00,1.00,-0.00,0.00 -72.00,43.20,0.17,0.00,1.00,-0.00,0.00 --100.80,-43.20,15.83,0.00,1.00,-0.00,0.00 -86.40,43.20,0.19,0.00,1.00,-0.00,0.00 --86.40,-43.20,15.81,0.00,1.00,-177.60,0.00 -100.80,43.20,0.21,0.00,1.00,-177.60,0.00 --76.80,-43.20,15.79,0.00,1.00,-177.60,0.00 -110.40,43.20,0.23,0.00,1.00,-177.60,0.00 --62.40,-43.20,15.77,0.00,1.00,-177.60,0.00 -124.80,38.40,0.26,0.00,1.00,-177.60,0.00 --52.80,-38.40,15.74,0.00,1.00,177.60,0.00 -134.40,33.60,0.28,0.00,1.00,177.60,0.00 --38.40,-33.60,15.72,0.00,1.00,177.60,0.00 -144.00,28.80,0.30,0.00,1.00,177.60,0.00 --33.60,-28.80,15.70,0.00,1.00,177.60,0.00 -153.60,24.00,0.32,0.00,1.00,177.60,0.00 --24.00,-19.20,15.68,0.00,1.00,177.60,0.00 -158.40,19.20,0.34,0.00,1.00,177.60,0.00 --14.40,-14.40,15.66,0.00,1.00,177.60,0.00 -168.00,9.60,0.36,0.00,1.00,177.60,0.00 --9.60,-9.60,15.64,0.00,1.00,177.60,0.00 -172.80,4.80,0.38,0.00,1.00,177.60,0.00 --0.00,-0.00,15.62,0.00,1.00,177.60,0.00 --177.60,-0.00,0.41,0.00,1.00,-177.60,0.00 -4.80,4.80,15.59,0.00,1.00,-177.60,0.00 --172.80,-9.60,0.43,0.00,1.00,-177.60,0.00 -14.40,9.60,15.57,0.00,1.00,-177.60,0.00 --163.20,-14.40,0.45,0.00,1.00,-177.60,0.00 -19.20,19.20,15.55,0.00,1.00,-177.60,0.00 --158.40,-19.20,0.47,0.00,1.00,-177.60,0.00 -28.80,24.00,15.53,0.00,1.00,-177.60,0.00 --148.80,-28.80,0.49,0.00,1.00,-177.60,0.00 -33.60,28.80,15.51,0.00,1.00,-177.60,0.00 --139.20,-33.60,0.51,0.00,1.00,-177.60,0.00 -43.20,33.60,15.49,0.00,1.00,-177.60,0.00 --129.60,-38.40,0.53,0.00,1.00,-177.60,0.00 -57.60,38.40,15.47,0.00,1.00,177.60,0.00 --120.00,-43.20,0.56,0.00,1.00,177.60,0.00 -67.20,43.20,15.44,0.00,1.00,177.60,0.00 --105.60,-43.20,0.58,0.00,1.00,177.60,0.00 -81.60,43.20,15.42,0.00,1.00,177.60,0.00 --91.20,-43.20,0.60,0.00,1.00,177.60,0.00 -96.00,43.20,15.40,0.00,1.00,0.00,0.00 --76.80,-43.20,0.62,0.00,1.00,0.00,0.00 -110.40,43.20,15.38,0.00,1.00,0.00,0.00 --67.20,-43.20,0.64,0.00,1.00,0.00,0.00 -120.00,38.40,15.36,0.00,1.00,0.00,0.00 --52.80,-38.40,0.66,0.00,1.00,0.00,0.00 -129.60,38.40,15.34,0.00,1.00,0.00,0.00 --43.20,-33.60,0.68,0.00,1.00,0.00,0.00 -144.00,33.60,15.32,0.00,1.00,0.00,0.00 --33.60,-28.80,0.70,0.00,1.00,0.00,0.00 -148.80,24.00,15.30,0.00,1.00,0.00,0.00 --24.00,-24.00,0.73,0.00,1.00,0.00,0.00 -158.40,19.20,15.27,0.00,1.00,0.00,0.00 --19.20,-14.40,0.75,0.00,1.00,0.00,0.00 -168.00,14.40,15.25,0.00,1.00,0.00,0.00 --9.60,-9.60,0.77,0.00,1.00,0.00,0.00 -172.80,4.80,15.23,0.00,1.00,0.00,0.00 --4.80,-4.80,0.79,0.00,1.00,0.00,0.00 -0.00,0.00,15.21,0.00,1.00,0.00,0.00 --177.60,-4.80,0.81,0.00,1.00,0.00,-0.00 -9.60,4.80,15.19,0.00,1.00,0.00,-0.00 --168.00,-9.60,0.83,0.00,1.00,0.00,-0.00 -14.40,14.40,15.17,0.00,1.00,0.00,-0.00 --163.20,-14.40,0.85,0.00,1.00,0.00,-0.00 -24.00,19.20,15.15,0.00,1.00,4.80,-0.00 --153.60,-19.20,0.88,0.00,1.00,4.80,-4.80 -28.80,24.00,15.12,0.00,1.00,4.80,-4.80 --144.00,-24.00,0.90,0.00,1.00,4.80,-4.80 -38.40,28.80,15.10,0.00,1.00,4.80,-4.80 --134.40,-28.80,0.92,0.00,1.00,4.80,-4.80 -48.00,33.60,15.08,0.00,1.00,9.60,-4.80 --124.80,-33.60,0.94,0.00,1.00,9.60,-4.80 -62.40,38.40,15.06,0.00,1.00,9.60,-4.80 --115.20,-38.40,0.96,0.00,1.00,14.40,-4.80 -72.00,38.40,15.04,0.00,1.00,19.20,-4.80 --100.80,-38.40,0.98,0.00,1.00,28.80,-4.80 -86.40,38.40,15.02,0.00,1.00,52.80,-4.80 --86.40,-38.40,1.00,0.00,1.00,105.60,-4.80 -96.00,38.40,15.00,0.00,1.00,139.20,-4.80 --76.80,-38.40,1.03,0.00,1.00,158.40,-4.80 -110.40,38.40,14.97,0.00,1.00,163.20,-4.80 --62.40,-38.40,1.05,0.00,1.00,168.00,-4.80 -120.00,33.60,14.95,0.00,1.00,168.00,-4.80 --52.80,-33.60,1.07,0.00,1.00,172.80,-4.80 -134.40,33.60,14.93,0.00,1.00,172.80,-4.80 --43.20,-28.80,1.09,0.00,1.00,172.80,-4.80 -144.00,28.80,14.91,0.00,1.00,172.80,-4.80 --33.60,-24.00,1.11,0.00,1.00,177.60,-4.80 -148.80,24.00,14.89,0.00,1.00,177.60,-4.80 --24.00,-19.20,1.13,0.00,1.00,177.60,-4.80 -158.40,14.40,14.87,0.00,1.00,177.60,-0.00 --19.20,-14.40,1.15,0.00,1.00,177.60,-0.00 -168.00,9.60,14.85,0.00,1.00,177.60,-0.00 --9.60,-9.60,1.17,0.00,1.00,177.60,-0.00 -172.80,4.80,14.83,0.00,1.00,177.60,-0.00 --0.00,-0.00,1.20,0.00,1.00,177.60,-0.00 --177.60,-0.00,14.80,0.00,1.00,-177.60,0.00 -4.80,4.80,1.22,0.00,1.00,-177.60,0.00 --172.80,-9.60,14.78,0.00,1.00,-177.60,0.00 -14.40,9.60,1.24,0.00,1.00,-177.60,0.00 --163.20,-14.40,14.76,0.00,1.00,-177.60,0.00 -19.20,14.40,1.26,0.00,1.00,-177.60,0.00 --153.60,-19.20,14.74,0.00,1.00,-177.60,4.80 -28.80,24.00,1.28,0.00,1.00,-177.60,4.80 --148.80,-24.00,14.72,0.00,1.00,-177.60,4.80 -38.40,28.80,1.30,0.00,1.00,-172.80,4.80 --139.20,-28.80,14.70,0.00,1.00,-172.80,4.80 -48.00,33.60,1.32,0.00,1.00,-172.80,4.80 --124.80,-33.60,14.68,0.00,1.00,-172.80,4.80 -57.60,33.60,1.35,0.00,1.00,-168.00,4.80 --115.20,-38.40,14.65,0.00,1.00,-168.00,4.80 -72.00,38.40,1.37,0.00,1.00,-163.20,4.80 --105.60,-38.40,14.63,0.00,1.00,-158.40,4.80 -81.60,38.40,1.39,0.00,1.00,-139.20,4.80 --91.20,-38.40,14.61,0.00,1.00,-105.60,4.80 -96.00,38.40,1.41,0.00,1.00,-52.80,4.80 --76.80,-38.40,14.59,0.00,1.00,-28.80,4.80 -105.60,38.40,1.43,0.00,1.00,-19.20,4.80 --67.20,-38.40,14.57,0.00,1.00,-14.40,4.80 -120.00,38.40,1.45,0.00,1.00,-9.60,4.80 --57.60,-33.60,14.55,0.00,1.00,-9.60,4.80 -129.60,33.60,1.47,0.00,1.00,-9.60,4.80 --43.20,-28.80,14.53,0.00,1.00,-4.80,4.80 -139.20,28.80,1.50,0.00,1.00,-4.80,4.80 --33.60,-24.00,14.50,0.00,1.00,-4.80,4.80 -148.80,24.00,1.52,0.00,1.00,-4.80,4.80 --28.80,-19.20,14.48,0.00,1.00,-4.80,4.80 -158.40,19.20,1.54,0.00,1.00,-4.80,0.00 --19.20,-14.40,14.46,0.00,1.00,-0.00,0.00 -163.20,14.40,1.56,0.00,1.00,-0.00,0.00 --9.60,-9.60,14.44,0.00,1.00,-0.00,0.00 -172.80,4.80,1.58,0.00,1.00,-0.00,0.00 --4.80,-4.80,14.42,0.00,1.00,-0.00,0.00 -0.00,0.00,1.60,0.00,1.00,0.00,0.00 --177.60,-4.80,14.40,0.00,1.00,0.00,-0.00 -9.60,4.80,1.62,0.00,1.00,0.00,-0.00 --168.00,-9.60,14.38,0.00,1.00,4.80,-0.00 -14.40,9.60,1.64,0.00,1.00,4.80,-4.80 --158.40,-14.40,14.36,0.00,1.00,4.80,-4.80 -24.00,14.40,1.67,0.00,1.00,4.80,-4.80 --153.60,-19.20,14.33,0.00,1.00,4.80,-4.80 -33.60,19.20,1.69,0.00,1.00,9.60,-4.80 --144.00,-24.00,14.31,0.00,1.00,9.60,-4.80 -43.20,24.00,1.71,0.00,1.00,9.60,-4.80 --134.40,-28.80,14.29,0.00,1.00,14.40,-9.60 -52.80,28.80,1.73,0.00,1.00,14.40,-9.60 --124.80,-28.80,14.27,0.00,1.00,19.20,-9.60 -62.40,33.60,1.75,0.00,1.00,24.00,-9.60 --110.40,-33.60,14.25,0.00,1.00,28.80,-9.60 -72.00,33.60,1.77,0.00,1.00,33.60,-9.60 --100.80,-33.60,14.23,0.00,1.00,48.00,-9.60 -86.40,33.60,1.79,0.00,1.00,67.20,-9.60 --86.40,-33.60,14.21,0.00,1.00,96.00,-9.60 -96.00,33.60,1.82,0.00,1.00,120.00,-9.60 --76.80,-33.60,14.18,0.00,1.00,139.20,-9.60 -110.40,33.60,1.84,0.00,1.00,148.80,-9.60 --67.20,-33.60,14.16,0.00,1.00,153.60,-9.60 -120.00,33.60,1.86,0.00,1.00,158.40,-9.60 --52.80,-28.80,14.14,0.00,1.00,163.20,-9.60 -129.60,28.80,1.88,0.00,1.00,168.00,-9.60 --43.20,-28.80,14.12,0.00,1.00,168.00,-9.60 -139.20,24.00,1.90,0.00,1.00,168.00,-4.80 --33.60,-24.00,14.10,0.00,1.00,172.80,-4.80 -148.80,19.20,1.92,0.00,1.00,172.80,-4.80 --24.00,-19.20,14.08,0.00,1.00,172.80,-4.80 -158.40,14.40,1.94,0.00,1.00,177.60,-4.80 --19.20,-14.40,14.06,0.00,1.00,177.60,-4.80 -168.00,9.60,1.97,0.00,1.00,177.60,-4.80 --9.60,-4.80,14.03,0.00,1.00,177.60,-0.00 -172.80,4.80,1.99,0.00,1.00,177.60,-0.00 --0.00,-0.00,14.01,0.00,1.00,177.60,-0.00 --177.60,-0.00,2.01,0.00,1.00,-177.60,0.00 -4.80,4.80,13.99,0.00,1.00,-177.60,0.00 --168.00,-4.80,2.03,0.00,1.00,-177.60,0.00 -14.40,9.60,13.97,0.00,1.00,-177.60,4.80 --163.20,-14.40,2.05,0.00,1.00,-177.60,4.80 -24.00,14.40,13.95,0.00,1.00,-177.60,4.80 --153.60,-19.20,2.07,0.00,1.00,-172.80,4.80 -28.80,19.20,13.93,0.00,1.00,-172.80,4.80 --144.00,-24.00,2.09,0.00,1.00,-172.80,4.80 -38.40,24.00,13.91,0.00,1.00,-168.00,4.80 --134.40,-28.80,2.11,0.00,1.00,-168.00,9.60 -48.00,28.80,13.89,0.00,1.00,-168.00,9.60 --124.80,-28.80,2.14,0.00,1.00,-163.20,9.60 -62.40,33.60,13.86,0.00,1.00,-158.40,9.60 --115.20,-33.60,2.16,0.00,1.00,-153.60,9.60 -72.00,33.60,13.84,0.00,1.00,-148.80,9.60 --100.80,-33.60,2.18,0.00,1.00,-139.20,9.60 -81.60,33.60,13.82,0.00,1.00,-120.00,9.60 --91.20,-33.60,2.20,0.00,1.00,-96.00,9.60 -96.00,33.60,13.80,0.00,1.00,-67.20,9.60 --81.60,-33.60,2.22,0.00,1.00,-48.00,9.60 -105.60,33.60,13.78,0.00,1.00,-33.60,9.60 --67.20,-33.60,2.24,0.00,1.00,-28.80,9.60 -115.20,33.60,13.76,0.00,1.00,-24.00,9.60 --57.60,-28.80,2.26,0.00,1.00,-19.20,9.60 -129.60,28.80,13.74,0.00,1.00,-14.40,9.60 --48.00,-28.80,2.29,0.00,1.00,-14.40,9.60 -139.20,24.00,13.71,0.00,1.00,-9.60,4.80 --38.40,-24.00,2.31,0.00,1.00,-9.60,4.80 -148.80,19.20,13.69,0.00,1.00,-9.60,4.80 --28.80,-19.20,2.33,0.00,1.00,-4.80,4.80 -153.60,14.40,13.67,0.00,1.00,-4.80,4.80 --19.20,-14.40,2.35,0.00,1.00,-4.80,4.80 -163.20,9.60,13.65,0.00,1.00,-4.80,4.80 --9.60,-9.60,2.37,0.00,1.00,-4.80,0.00 -172.80,4.80,13.63,0.00,1.00,-0.00,0.00 --4.80,-4.80,2.39,0.00,1.00,-0.00,0.00 -0.00,0.00,13.61,0.00,1.00,0.00,0.00 --177.60,-4.80,2.41,0.00,1.00,0.00,-0.00 -9.60,4.80,13.59,0.00,1.00,4.80,-0.00 --168.00,-9.60,2.44,0.00,1.00,4.80,-4.80 -14.40,9.60,13.56,0.00,1.00,4.80,-4.80 --158.40,-9.60,2.46,0.00,1.00,4.80,-4.80 -24.00,14.40,13.54,0.00,1.00,9.60,-4.80 --148.80,-14.40,2.48,0.00,1.00,9.60,-9.60 -33.60,19.20,13.52,0.00,1.00,9.60,-9.60 --139.20,-19.20,2.50,0.00,1.00,14.40,-9.60 -43.20,24.00,13.50,0.00,1.00,14.40,-9.60 --129.60,-24.00,2.52,0.00,1.00,19.20,-9.60 -52.80,24.00,13.48,0.00,1.00,19.20,-14.40 --120.00,-28.80,2.54,0.00,1.00,24.00,-14.40 -62.40,28.80,13.46,0.00,1.00,28.80,-14.40 --110.40,-28.80,2.56,0.00,1.00,38.40,-14.40 -76.80,28.80,13.44,0.00,1.00,48.00,-14.40 --100.80,-28.80,2.58,0.00,1.00,57.60,-14.40 -86.40,28.80,13.42,0.00,1.00,76.80,-14.40 --86.40,-28.80,2.61,0.00,1.00,96.00,-14.40 -96.00,28.80,13.39,0.00,1.00,115.20,-14.40 --76.80,-28.80,2.63,0.00,1.00,129.60,-14.40 -105.60,28.80,13.37,0.00,1.00,139.20,-14.40 --67.20,-28.80,2.65,0.00,1.00,144.00,-14.40 -120.00,28.80,13.35,0.00,1.00,153.60,-14.40 --57.60,-24.00,2.67,0.00,1.00,158.40,-14.40 -129.60,24.00,13.33,0.00,1.00,158.40,-9.60 --48.00,-24.00,2.69,0.00,1.00,163.20,-9.60 -139.20,19.20,13.31,0.00,1.00,168.00,-9.60 --38.40,-19.20,2.71,0.00,1.00,168.00,-9.60 -148.80,19.20,13.29,0.00,1.00,168.00,-9.60 --28.80,-14.40,2.73,0.00,1.00,172.80,-9.60 -158.40,14.40,13.27,0.00,1.00,172.80,-4.80 --19.20,-9.60,2.76,0.00,1.00,172.80,-4.80 -163.20,9.60,13.24,0.00,1.00,177.60,-4.80 --9.60,-4.80,2.78,0.00,1.00,177.60,-4.80 -172.80,4.80,13.22,0.00,1.00,177.60,-0.00 --0.00,-0.00,2.80,0.00,1.00,177.60,-0.00 --177.60,-0.00,13.20,0.00,1.00,-177.60,0.00 -4.80,4.80,2.82,0.00,1.00,-177.60,0.00 --168.00,-4.80,13.18,0.00,1.00,-177.60,4.80 -14.40,9.60,2.84,0.00,1.00,-177.60,4.80 --163.20,-9.60,13.16,0.00,1.00,-172.80,4.80 -24.00,14.40,2.86,0.00,1.00,-172.80,4.80 --153.60,-14.40,13.14,0.00,1.00,-172.80,9.60 -33.60,19.20,2.88,0.00,1.00,-168.00,9.60 --144.00,-19.20,13.12,0.00,1.00,-168.00,9.60 -43.20,19.20,2.91,0.00,1.00,-168.00,9.60 --134.40,-24.00,13.09,0.00,1.00,-163.20,9.60 -52.80,24.00,2.93,0.00,1.00,-158.40,9.60 --124.80,-24.00,13.07,0.00,1.00,-158.40,14.40 -62.40,28.80,2.95,0.00,1.00,-153.60,14.40 --115.20,-28.80,13.05,0.00,1.00,-144.00,14.40 -72.00,28.80,2.97,0.00,1.00,-139.20,14.40 --100.80,-28.80,13.03,0.00,1.00,-129.60,14.40 -81.60,28.80,2.99,0.00,1.00,-115.20,14.40 --91.20,-28.80,13.01,0.00,1.00,-96.00,14.40 -96.00,28.80,3.01,0.00,1.00,-76.80,14.40 --81.60,-28.80,12.99,0.00,1.00,-57.60,14.40 -105.60,28.80,3.03,0.00,1.00,-48.00,14.40 --67.20,-28.80,12.97,0.00,1.00,-38.40,14.40 -115.20,28.80,3.05,0.00,1.00,-28.80,14.40 --57.60,-28.80,12.95,0.00,1.00,-24.00,14.40 -124.80,24.00,3.08,0.00,1.00,-19.20,14.40 --48.00,-24.00,12.92,0.00,1.00,-19.20,9.60 -134.40,24.00,3.10,0.00,1.00,-14.40,9.60 --38.40,-19.20,12.90,0.00,1.00,-14.40,9.60 -144.00,19.20,3.12,0.00,1.00,-9.60,9.60 --28.80,-14.40,12.88,0.00,1.00,-9.60,9.60 -153.60,14.40,3.14,0.00,1.00,-9.60,4.80 --19.20,-9.60,12.86,0.00,1.00,-4.80,4.80 -163.20,9.60,3.16,0.00,1.00,-4.80,4.80 --14.40,-9.60,12.84,0.00,1.00,-4.80,4.80 -172.80,4.80,3.18,0.00,1.00,-4.80,0.00 --4.80,-4.80,12.82,0.00,1.00,-0.00,0.00 -0.00,0.00,3.20,0.00,1.00,0.00,0.00 --177.60,-0.00,12.80,0.00,1.00,0.00,-0.00 -9.60,4.80,3.23,0.00,1.00,4.80,-4.80 --168.00,-4.80,12.77,0.00,1.00,4.80,-4.80 -19.20,9.60,3.25,0.00,1.00,4.80,-4.80 --158.40,-9.60,12.75,0.00,1.00,9.60,-9.60 -24.00,14.40,3.27,0.00,1.00,9.60,-9.60 --148.80,-14.40,12.73,0.00,1.00,14.40,-9.60 -33.60,14.40,3.29,0.00,1.00,14.40,-9.60 --139.20,-19.20,12.71,0.00,1.00,19.20,-14.40 -43.20,19.20,3.31,0.00,1.00,19.20,-14.40 --129.60,-19.20,12.69,0.00,1.00,24.00,-14.40 -52.80,19.20,3.33,0.00,1.00,28.80,-14.40 --120.00,-24.00,12.67,0.00,1.00,33.60,-19.20 -67.20,24.00,3.35,0.00,1.00,38.40,-19.20 --110.40,-24.00,12.65,0.00,1.00,43.20,-19.20 -76.80,24.00,3.38,0.00,1.00,52.80,-19.20 --100.80,-24.00,12.62,0.00,1.00,67.20,-19.20 -86.40,24.00,3.40,0.00,1.00,76.80,-19.20 --86.40,-24.00,12.60,0.00,1.00,96.00,-19.20 -96.00,24.00,3.42,0.00,1.00,105.60,-19.20 --76.80,-24.00,12.58,0.00,1.00,120.00,-19.20 -105.60,24.00,3.44,0.00,1.00,129.60,-19.20 --67.20,-24.00,12.56,0.00,1.00,139.20,-19.20 -115.20,24.00,3.46,0.00,1.00,144.00,-19.20 --57.60,-24.00,12.54,0.00,1.00,148.80,-14.40 -129.60,19.20,3.48,0.00,1.00,153.60,-14.40 --48.00,-19.20,12.52,0.00,1.00,158.40,-14.40 -139.20,19.20,3.50,0.00,1.00,163.20,-14.40 --38.40,-14.40,12.50,0.00,1.00,163.20,-14.40 -148.80,14.40,3.52,0.00,1.00,168.00,-9.60 --28.80,-14.40,12.48,0.00,1.00,168.00,-9.60 -153.60,9.60,3.55,0.00,1.00,172.80,-9.60 --19.20,-9.60,12.45,0.00,1.00,172.80,-4.80 -163.20,9.60,3.57,0.00,1.00,172.80,-4.80 --9.60,-4.80,12.43,0.00,1.00,177.60,-4.80 -172.80,4.80,3.59,0.00,1.00,177.60,-0.00 --0.00,-0.00,12.41,0.00,1.00,177.60,-0.00 --177.60,-0.00,3.61,0.00,1.00,-177.60,0.00 -4.80,4.80,12.39,0.00,1.00,-177.60,0.00 --168.00,-4.80,3.63,0.00,1.00,-177.60,4.80 -14.40,9.60,12.37,0.00,1.00,-172.80,4.80 --158.40,-9.60,3.65,0.00,1.00,-172.80,4.80 -24.00,9.60,12.35,0.00,1.00,-172.80,9.60 --153.60,-14.40,3.67,0.00,1.00,-168.00,9.60 -33.60,14.40,12.33,0.00,1.00,-168.00,9.60 --144.00,-14.40,3.70,0.00,1.00,-163.20,14.40 -43.20,19.20,12.30,0.00,1.00,-163.20,14.40 --134.40,-19.20,3.72,0.00,1.00,-158.40,14.40 -52.80,19.20,12.28,0.00,1.00,-153.60,14.40 --124.80,-24.00,3.74,0.00,1.00,-148.80,14.40 -62.40,24.00,12.26,0.00,1.00,-144.00,19.20 --110.40,-24.00,3.76,0.00,1.00,-139.20,19.20 -72.00,24.00,12.24,0.00,1.00,-129.60,19.20 --100.80,-24.00,3.78,0.00,1.00,-120.00,19.20 -81.60,24.00,12.22,0.00,1.00,-105.60,19.20 --91.20,-24.00,3.80,0.00,1.00,-96.00,19.20 -96.00,24.00,12.20,0.00,1.00,-76.80,19.20 --81.60,-24.00,3.82,0.00,1.00,-67.20,19.20 -105.60,24.00,12.18,0.00,1.00,-52.80,19.20 --72.00,-24.00,3.85,0.00,1.00,-43.20,19.20 -115.20,24.00,12.15,0.00,1.00,-38.40,19.20 --57.60,-24.00,3.87,0.00,1.00,-33.60,19.20 -124.80,19.20,12.13,0.00,1.00,-28.80,14.40 --48.00,-19.20,3.89,0.00,1.00,-24.00,14.40 -134.40,19.20,12.11,0.00,1.00,-19.20,14.40 --38.40,-19.20,3.91,0.00,1.00,-19.20,14.40 -144.00,14.40,12.09,0.00,1.00,-14.40,9.60 --28.80,-14.40,3.93,0.00,1.00,-14.40,9.60 -153.60,14.40,12.07,0.00,1.00,-9.60,9.60 --24.00,-9.60,3.95,0.00,1.00,-9.60,9.60 -163.20,9.60,12.05,0.00,1.00,-4.80,4.80 --14.40,-4.80,3.97,0.00,1.00,-4.80,4.80 -172.80,4.80,12.03,0.00,1.00,-4.80,4.80 --4.80,-0.00,3.99,0.00,1.00,-0.00,0.00 -0.00,0.00,12.01,0.00,1.00,0.00,0.00 --177.60,-0.00,4.02,0.00,1.00,0.00,-0.00 -9.60,4.80,11.98,0.00,1.00,4.80,-4.80 --168.00,-4.80,4.04,0.00,1.00,4.80,-4.80 -19.20,4.80,11.96,0.00,1.00,9.60,-9.60 --158.40,-9.60,4.06,0.00,1.00,9.60,-9.60 -28.80,9.60,11.94,0.00,1.00,14.40,-9.60 --148.80,-9.60,4.08,0.00,1.00,14.40,-14.40 -38.40,14.40,11.92,0.00,1.00,19.20,-14.40 --139.20,-14.40,4.10,0.00,1.00,19.20,-14.40 -48.00,14.40,11.90,0.00,1.00,24.00,-19.20 --129.60,-14.40,4.12,0.00,1.00,28.80,-19.20 -57.60,19.20,11.88,0.00,1.00,33.60,-19.20 --120.00,-19.20,4.14,0.00,1.00,38.40,-19.20 -67.20,19.20,11.86,0.00,1.00,43.20,-24.00 --110.40,-19.20,4.17,0.00,1.00,52.80,-24.00 -76.80,19.20,11.83,0.00,1.00,62.40,-24.00 --100.80,-19.20,4.19,0.00,1.00,72.00,-24.00 -86.40,19.20,11.81,0.00,1.00,81.60,-24.00 --86.40,-19.20,4.21,0.00,1.00,91.20,-24.00 -96.00,19.20,11.79,0.00,1.00,105.60,-24.00 --76.80,-19.20,4.23,0.00,1.00,115.20,-24.00 -105.60,19.20,11.77,0.00,1.00,124.80,-24.00 --67.20,-19.20,4.25,0.00,1.00,134.40,-24.00 -115.20,19.20,11.75,0.00,1.00,139.20,-19.20 --57.60,-19.20,4.27,0.00,1.00,144.00,-19.20 -124.80,19.20,11.73,0.00,1.00,148.80,-19.20 --48.00,-14.40,4.29,0.00,1.00,153.60,-19.20 -134.40,14.40,11.71,0.00,1.00,158.40,-19.20 --38.40,-14.40,4.32,0.00,1.00,158.40,-14.40 -144.00,14.40,11.68,0.00,1.00,163.20,-14.40 --28.80,-9.60,4.34,0.00,1.00,168.00,-14.40 -153.60,9.60,11.66,0.00,1.00,168.00,-9.60 --19.20,-9.60,4.36,0.00,1.00,172.80,-9.60 -163.20,4.80,11.64,0.00,1.00,172.80,-4.80 --9.60,-4.80,4.38,0.00,1.00,172.80,-4.80 -172.80,4.80,11.62,0.00,1.00,177.60,-4.80 --0.00,-0.00,4.40,0.00,1.00,177.60,-0.00 --177.60,-0.00,11.60,0.00,1.00,-177.60,0.00 -4.80,4.80,4.42,0.00,1.00,-177.60,4.80 --168.00,-4.80,11.58,0.00,1.00,-172.80,4.80 -14.40,4.80,4.44,0.00,1.00,-172.80,4.80 --158.40,-9.60,11.56,0.00,1.00,-172.80,9.60 -24.00,9.60,4.46,0.00,1.00,-168.00,9.60 --148.80,-9.60,11.54,0.00,1.00,-168.00,14.40 -33.60,14.40,4.49,0.00,1.00,-163.20,14.40 --139.20,-14.40,11.51,0.00,1.00,-158.40,14.40 -43.20,14.40,4.51,0.00,1.00,-158.40,19.20 --129.60,-14.40,11.49,0.00,1.00,-153.60,19.20 -52.80,19.20,4.53,0.00,1.00,-148.80,19.20 --120.00,-19.20,11.47,0.00,1.00,-144.00,19.20 -62.40,19.20,4.55,0.00,1.00,-139.20,19.20 --110.40,-19.20,11.45,0.00,1.00,-134.40,24.00 -72.00,19.20,4.57,0.00,1.00,-124.80,24.00 --100.80,-19.20,11.43,0.00,1.00,-115.20,24.00 -81.60,19.20,4.59,0.00,1.00,-105.60,24.00 --91.20,-19.20,11.41,0.00,1.00,-91.20,24.00 -96.00,19.20,4.61,0.00,1.00,-81.60,24.00 --81.60,-19.20,11.39,0.00,1.00,-72.00,24.00 -105.60,19.20,4.64,0.00,1.00,-62.40,24.00 --72.00,-19.20,11.36,0.00,1.00,-52.80,24.00 -115.20,19.20,4.66,0.00,1.00,-43.20,24.00 --62.40,-19.20,11.34,0.00,1.00,-38.40,19.20 -124.80,19.20,4.68,0.00,1.00,-33.60,19.20 --52.80,-14.40,11.32,0.00,1.00,-28.80,19.20 -134.40,14.40,4.70,0.00,1.00,-24.00,19.20 --43.20,-14.40,11.30,0.00,1.00,-19.20,14.40 -144.00,14.40,4.72,0.00,1.00,-19.20,14.40 --33.60,-9.60,11.28,0.00,1.00,-14.40,14.40 -153.60,9.60,4.74,0.00,1.00,-14.40,9.60 --24.00,-9.60,11.26,0.00,1.00,-9.60,9.60 -163.20,4.80,4.76,0.00,1.00,-9.60,9.60 --14.40,-4.80,11.24,0.00,1.00,-4.80,4.80 -172.80,4.80,4.79,0.00,1.00,-4.80,4.80 --4.80,-0.00,11.21,0.00,1.00,-0.00,0.00 -0.00,0.00,4.81,0.00,1.00,0.00,0.00 --177.60,-0.00,11.19,0.00,1.00,0.00,-0.00 -9.60,4.80,4.83,0.00,1.00,4.80,-4.80 --168.00,-4.80,11.17,0.00,1.00,4.80,-4.80 -19.20,4.80,4.85,0.00,1.00,9.60,-9.60 --158.40,-4.80,11.15,0.00,1.00,14.40,-9.60 -28.80,9.60,4.87,0.00,1.00,14.40,-14.40 --148.80,-9.60,11.13,0.00,1.00,19.20,-14.40 -38.40,9.60,4.89,0.00,1.00,19.20,-19.20 --139.20,-9.60,11.11,0.00,1.00,24.00,-19.20 -48.00,9.60,4.91,0.00,1.00,28.80,-19.20 --129.60,-14.40,11.09,0.00,1.00,33.60,-24.00 -57.60,14.40,4.93,0.00,1.00,38.40,-24.00 --120.00,-14.40,11.07,0.00,1.00,43.20,-24.00 -67.20,14.40,4.96,0.00,1.00,48.00,-24.00 --110.40,-14.40,11.04,0.00,1.00,57.60,-28.80 -76.80,14.40,4.98,0.00,1.00,62.40,-28.80 --100.80,-14.40,11.02,0.00,1.00,72.00,-28.80 -86.40,14.40,5.00,0.00,1.00,81.60,-28.80 --86.40,-14.40,11.00,0.00,1.00,91.20,-28.80 -96.00,14.40,5.02,0.00,1.00,100.80,-28.80 --76.80,-14.40,10.98,0.00,1.00,110.40,-28.80 -105.60,14.40,5.04,0.00,1.00,120.00,-28.80 --67.20,-14.40,10.96,0.00,1.00,129.60,-28.80 -115.20,14.40,5.06,0.00,1.00,134.40,-24.00 --57.60,-14.40,10.94,0.00,1.00,139.20,-24.00 -124.80,14.40,5.08,0.00,1.00,144.00,-24.00 --48.00,-14.40,10.92,0.00,1.00,148.80,-24.00 -134.40,9.60,5.11,0.00,1.00,153.60,-19.20 --38.40,-9.60,10.89,0.00,1.00,158.40,-19.20 -144.00,9.60,5.13,0.00,1.00,158.40,-14.40 --28.80,-9.60,10.87,0.00,1.00,163.20,-14.40 -153.60,4.80,5.15,0.00,1.00,168.00,-14.40 --19.20,-4.80,10.85,0.00,1.00,168.00,-9.60 -163.20,4.80,5.17,0.00,1.00,172.80,-9.60 --9.60,-4.80,10.83,0.00,1.00,172.80,-4.80 -172.80,0.00,5.19,0.00,1.00,177.60,-4.80 --0.00,-0.00,10.81,0.00,1.00,177.60,-0.00 --177.60,-0.00,5.21,0.00,1.00,-177.60,0.00 -4.80,0.00,10.79,0.00,1.00,-177.60,4.80 --168.00,-4.80,5.23,0.00,1.00,-172.80,4.80 -14.40,4.80,10.77,0.00,1.00,-172.80,9.60 --158.40,-4.80,5.26,0.00,1.00,-168.00,9.60 -24.00,4.80,10.74,0.00,1.00,-168.00,14.40 --148.80,-9.60,5.28,0.00,1.00,-163.20,14.40 -33.60,9.60,10.72,0.00,1.00,-158.40,14.40 --139.20,-9.60,5.30,0.00,1.00,-158.40,19.20 -43.20,9.60,10.70,0.00,1.00,-153.60,19.20 --129.60,-14.40,5.32,0.00,1.00,-148.80,24.00 -52.80,14.40,10.68,0.00,1.00,-144.00,24.00 --120.00,-14.40,5.34,0.00,1.00,-139.20,24.00 -62.40,14.40,10.66,0.00,1.00,-134.40,24.00 --110.40,-14.40,5.36,0.00,1.00,-129.60,28.80 -72.00,14.40,10.64,0.00,1.00,-120.00,28.80 --100.80,-14.40,5.38,0.00,1.00,-110.40,28.80 -81.60,14.40,10.62,0.00,1.00,-100.80,28.80 --91.20,-14.40,5.40,0.00,1.00,-91.20,28.80 -96.00,14.40,10.60,0.00,1.00,-81.60,28.80 --81.60,-14.40,5.43,0.00,1.00,-72.00,28.80 -105.60,14.40,10.57,0.00,1.00,-62.40,28.80 --72.00,-14.40,5.45,0.00,1.00,-57.60,28.80 -115.20,14.40,10.55,0.00,1.00,-48.00,24.00 --62.40,-14.40,5.47,0.00,1.00,-43.20,24.00 -124.80,14.40,10.53,0.00,1.00,-38.40,24.00 --52.80,-14.40,5.49,0.00,1.00,-33.60,24.00 -134.40,9.60,10.51,0.00,1.00,-28.80,19.20 --43.20,-9.60,5.51,0.00,1.00,-24.00,19.20 -144.00,9.60,10.49,0.00,1.00,-19.20,19.20 --33.60,-9.60,5.53,0.00,1.00,-19.20,14.40 -153.60,9.60,10.47,0.00,1.00,-14.40,14.40 --24.00,-4.80,5.55,0.00,1.00,-14.40,9.60 -163.20,4.80,10.45,0.00,1.00,-9.60,9.60 --14.40,-4.80,5.58,0.00,1.00,-4.80,4.80 -172.80,4.80,10.42,0.00,1.00,-4.80,4.80 --4.80,-0.00,5.60,0.00,1.00,-0.00,0.00 -0.00,0.00,10.40,0.00,1.00,0.00,0.00 --177.60,-0.00,5.62,0.00,1.00,4.80,-4.80 -9.60,0.00,10.38,0.00,1.00,4.80,-4.80 --168.00,-4.80,5.64,0.00,1.00,9.60,-9.60 -19.20,4.80,10.36,0.00,1.00,9.60,-9.60 --158.40,-4.80,5.66,0.00,1.00,14.40,-14.40 -28.80,4.80,10.34,0.00,1.00,19.20,-14.40 --148.80,-4.80,5.68,0.00,1.00,19.20,-19.20 -38.40,4.80,10.32,0.00,1.00,24.00,-19.20 --139.20,-9.60,5.70,0.00,1.00,28.80,-24.00 -48.00,9.60,10.30,0.00,1.00,33.60,-24.00 --129.60,-9.60,5.72,0.00,1.00,38.40,-24.00 -57.60,9.60,10.28,0.00,1.00,43.20,-28.80 --120.00,-9.60,5.75,0.00,1.00,48.00,-28.80 -67.20,9.60,10.25,0.00,1.00,52.80,-28.80 --110.40,-9.60,5.77,0.00,1.00,57.60,-33.60 -76.80,9.60,10.23,0.00,1.00,67.20,-33.60 --100.80,-9.60,5.79,0.00,1.00,76.80,-33.60 -86.40,9.60,10.21,0.00,1.00,81.60,-33.60 --86.40,-9.60,5.81,0.00,1.00,91.20,-33.60 -96.00,9.60,10.19,0.00,1.00,100.80,-33.60 --76.80,-9.60,5.83,0.00,1.00,110.40,-33.60 -105.60,9.60,10.17,0.00,1.00,115.20,-33.60 --67.20,-9.60,5.85,0.00,1.00,124.80,-33.60 -115.20,9.60,10.15,0.00,1.00,129.60,-28.80 --57.60,-9.60,5.87,0.00,1.00,134.40,-28.80 -124.80,9.60,10.13,0.00,1.00,139.20,-28.80 --48.00,-9.60,5.90,0.00,1.00,144.00,-24.00 -134.40,9.60,10.10,0.00,1.00,148.80,-24.00 --38.40,-9.60,5.92,0.00,1.00,153.60,-19.20 -144.00,4.80,10.08,0.00,1.00,158.40,-19.20 --28.80,-4.80,5.94,0.00,1.00,163.20,-14.40 -153.60,4.80,10.06,0.00,1.00,163.20,-14.40 --19.20,-4.80,5.96,0.00,1.00,168.00,-9.60 -163.20,4.80,10.04,0.00,1.00,172.80,-9.60 --9.60,-0.00,5.98,0.00,1.00,172.80,-4.80 -172.80,0.00,10.02,0.00,1.00,177.60,-4.80 --0.00,-0.00,6.00,0.00,1.00,177.60,-0.00 --177.60,-0.00,10.00,0.00,1.00,-177.60,0.00 -4.80,0.00,6.02,0.00,1.00,-177.60,4.80 --168.00,-0.00,9.98,0.00,1.00,-172.80,4.80 -14.40,4.80,6.05,0.00,1.00,-172.80,9.60 --158.40,-4.80,9.95,0.00,1.00,-168.00,9.60 -24.00,4.80,6.07,0.00,1.00,-163.20,14.40 --148.80,-4.80,9.93,0.00,1.00,-163.20,14.40 -33.60,4.80,6.09,0.00,1.00,-158.40,19.20 --139.20,-9.60,9.91,0.00,1.00,-153.60,19.20 -43.20,9.60,6.11,0.00,1.00,-148.80,24.00 --129.60,-9.60,9.89,0.00,1.00,-144.00,24.00 -52.80,9.60,6.13,0.00,1.00,-139.20,28.80 --120.00,-9.60,9.87,0.00,1.00,-134.40,28.80 -62.40,9.60,6.15,0.00,1.00,-129.60,28.80 --110.40,-9.60,9.85,0.00,1.00,-124.80,33.60 -72.00,9.60,6.17,0.00,1.00,-115.20,33.60 --100.80,-9.60,9.83,0.00,1.00,-110.40,33.60 -81.60,9.60,6.19,0.00,1.00,-100.80,33.60 --91.20,-9.60,9.81,0.00,1.00,-91.20,33.60 -96.00,9.60,6.22,0.00,1.00,-81.60,33.60 --81.60,-9.60,9.78,0.00,1.00,-76.80,33.60 -105.60,9.60,6.24,0.00,1.00,-67.20,33.60 --72.00,-9.60,9.76,0.00,1.00,-57.60,33.60 -115.20,9.60,6.26,0.00,1.00,-52.80,28.80 --62.40,-9.60,9.74,0.00,1.00,-48.00,28.80 -124.80,9.60,6.28,0.00,1.00,-43.20,28.80 --52.80,-9.60,9.72,0.00,1.00,-38.40,24.00 -134.40,9.60,6.30,0.00,1.00,-33.60,24.00 --43.20,-9.60,9.70,0.00,1.00,-28.80,24.00 -144.00,4.80,6.32,0.00,1.00,-24.00,19.20 --33.60,-4.80,9.68,0.00,1.00,-19.20,19.20 -153.60,4.80,6.34,0.00,1.00,-19.20,14.40 --24.00,-4.80,9.66,0.00,1.00,-14.40,14.40 -163.20,4.80,6.37,0.00,1.00,-9.60,9.60 --14.40,-4.80,9.63,0.00,1.00,-9.60,9.60 -172.80,0.00,6.39,0.00,1.00,-4.80,4.80 --4.80,-0.00,9.61,0.00,1.00,-4.80,4.80 -0.00,0.00,6.41,0.00,1.00,0.00,0.00 --177.60,-0.00,9.59,0.00,1.00,4.80,-4.80 -9.60,0.00,6.43,0.00,1.00,4.80,-4.80 --168.00,-0.00,9.57,0.00,1.00,9.60,-9.60 -19.20,0.00,6.45,0.00,1.00,14.40,-9.60 --158.40,-4.80,9.55,0.00,1.00,14.40,-14.40 -28.80,4.80,6.47,0.00,1.00,19.20,-19.20 --148.80,-4.80,9.53,0.00,1.00,24.00,-19.20 -38.40,4.80,6.49,0.00,1.00,24.00,-24.00 --139.20,-4.80,9.51,0.00,1.00,28.80,-24.00 -48.00,4.80,6.52,0.00,1.00,33.60,-28.80 --129.60,-4.80,9.48,0.00,1.00,38.40,-28.80 -57.60,4.80,6.54,0.00,1.00,43.20,-33.60 --120.00,-4.80,9.46,0.00,1.00,48.00,-33.60 -67.20,4.80,6.56,0.00,1.00,57.60,-33.60 --110.40,-4.80,9.44,0.00,1.00,62.40,-38.40 -76.80,4.80,6.58,0.00,1.00,67.20,-38.40 --100.80,-4.80,9.42,0.00,1.00,76.80,-38.40 -86.40,4.80,6.60,0.00,1.00,86.40,-38.40 --86.40,-4.80,9.40,0.00,1.00,91.20,-38.40 -96.00,4.80,6.62,0.00,1.00,100.80,-38.40 --76.80,-4.80,9.38,0.00,1.00,105.60,-38.40 -105.60,4.80,6.64,0.00,1.00,115.20,-38.40 --67.20,-4.80,9.36,0.00,1.00,120.00,-33.60 -115.20,4.80,6.66,0.00,1.00,124.80,-33.60 --57.60,-4.80,9.34,0.00,1.00,134.40,-33.60 -124.80,4.80,6.69,0.00,1.00,139.20,-28.80 --48.00,-4.80,9.31,0.00,1.00,144.00,-28.80 -134.40,4.80,6.71,0.00,1.00,148.80,-24.00 --38.40,-4.80,9.29,0.00,1.00,153.60,-24.00 -144.00,4.80,6.73,0.00,1.00,153.60,-19.20 --28.80,-4.80,9.27,0.00,1.00,158.40,-19.20 -153.60,4.80,6.75,0.00,1.00,163.20,-14.40 --19.20,-4.80,9.25,0.00,1.00,168.00,-14.40 -163.20,0.00,6.77,0.00,1.00,168.00,-9.60 --9.60,-0.00,9.23,0.00,1.00,172.80,-9.60 -172.80,0.00,6.79,0.00,1.00,177.60,-4.80 --0.00,-0.00,9.21,0.00,1.00,177.60,-0.00 --177.60,-0.00,6.81,0.00,1.00,-177.60,0.00 -4.80,0.00,9.19,0.00,1.00,-177.60,4.80 --168.00,-0.00,6.84,0.00,1.00,-172.80,9.60 -14.40,0.00,9.16,0.00,1.00,-168.00,9.60 --158.40,-4.80,6.86,0.00,1.00,-168.00,14.40 -24.00,4.80,9.14,0.00,1.00,-163.20,14.40 --148.80,-4.80,6.88,0.00,1.00,-158.40,19.20 -33.60,4.80,9.12,0.00,1.00,-153.60,19.20 --139.20,-4.80,6.90,0.00,1.00,-153.60,24.00 -43.20,4.80,9.10,0.00,1.00,-148.80,24.00 --129.60,-4.80,6.92,0.00,1.00,-144.00,28.80 -52.80,4.80,9.08,0.00,1.00,-139.20,28.80 --120.00,-4.80,6.94,0.00,1.00,-134.40,33.60 -62.40,4.80,9.06,0.00,1.00,-124.80,33.60 --110.40,-4.80,6.96,0.00,1.00,-120.00,33.60 -72.00,4.80,9.04,0.00,1.00,-115.20,38.40 --100.80,-4.80,6.99,0.00,1.00,-105.60,38.40 -81.60,4.80,9.01,0.00,1.00,-100.80,38.40 --91.20,-4.80,7.01,0.00,1.00,-91.20,38.40 -96.00,4.80,8.99,0.00,1.00,-86.40,38.40 --81.60,-4.80,7.03,0.00,1.00,-76.80,38.40 -105.60,4.80,8.97,0.00,1.00,-67.20,38.40 --72.00,-4.80,7.05,0.00,1.00,-62.40,38.40 -115.20,4.80,8.95,0.00,1.00,-57.60,33.60 --62.40,-4.80,7.07,0.00,1.00,-48.00,33.60 -124.80,4.80,8.93,0.00,1.00,-43.20,33.60 --52.80,-4.80,7.09,0.00,1.00,-38.40,28.80 -134.40,4.80,8.91,0.00,1.00,-33.60,28.80 --43.20,-4.80,7.11,0.00,1.00,-28.80,24.00 -144.00,4.80,8.89,0.00,1.00,-24.00,24.00 --33.60,-4.80,7.13,0.00,1.00,-24.00,19.20 -153.60,4.80,8.87,0.00,1.00,-19.20,19.20 --24.00,-4.80,7.16,0.00,1.00,-14.40,14.40 -163.20,0.00,8.84,0.00,1.00,-14.40,9.60 --14.40,-0.00,7.18,0.00,1.00,-9.60,9.60 -172.80,0.00,8.82,0.00,1.00,-4.80,4.80 --4.80,-0.00,7.20,0.00,1.00,-4.80,4.80 -0.00,0.00,8.80,0.00,1.00,0.00,0.00 --177.60,-0.00,7.22,0.00,1.00,4.80,-4.80 -9.60,0.00,8.78,0.00,1.00,4.80,-4.80 --168.00,-0.00,7.24,0.00,1.00,9.60,-9.60 -19.20,0.00,8.76,0.00,1.00,14.40,-14.40 --158.40,-0.00,7.26,0.00,1.00,19.20,-14.40 -28.80,0.00,8.74,0.00,1.00,19.20,-19.20 --148.80,-0.00,7.28,0.00,1.00,24.00,-24.00 -38.40,0.00,8.72,0.00,1.00,28.80,-24.00 --139.20,-0.00,7.31,0.00,1.00,33.60,-28.80 -48.00,0.00,8.69,0.00,1.00,38.40,-28.80 --129.60,-0.00,7.33,0.00,1.00,43.20,-33.60 -57.60,0.00,8.67,0.00,1.00,48.00,-33.60 --120.00,-0.00,7.35,0.00,1.00,52.80,-38.40 -67.20,0.00,8.65,0.00,1.00,57.60,-38.40 --110.40,-0.00,7.37,0.00,1.00,62.40,-38.40 -76.80,0.00,8.63,0.00,1.00,72.00,-43.20 --100.80,-0.00,7.39,0.00,1.00,76.80,-43.20 -86.40,0.00,8.61,0.00,1.00,86.40,-43.20 --86.40,-0.00,7.41,0.00,1.00,91.20,-43.20 -96.00,0.00,8.59,0.00,1.00,100.80,-43.20 --76.80,-0.00,7.43,0.00,1.00,105.60,-43.20 -105.60,0.00,8.57,0.00,1.00,110.40,-43.20 --67.20,-0.00,7.46,0.00,1.00,120.00,-38.40 -115.20,0.00,8.54,0.00,1.00,124.80,-38.40 --57.60,-0.00,7.48,0.00,1.00,129.60,-38.40 -124.80,0.00,8.52,0.00,1.00,134.40,-33.60 --48.00,-0.00,7.50,0.00,1.00,139.20,-33.60 -134.40,0.00,8.50,0.00,1.00,144.00,-28.80 --38.40,-0.00,7.52,0.00,1.00,148.80,-28.80 -144.00,0.00,8.48,0.00,1.00,153.60,-24.00 --28.80,-0.00,7.54,0.00,1.00,158.40,-19.20 -153.60,0.00,8.46,0.00,1.00,163.20,-19.20 --19.20,-0.00,7.56,0.00,1.00,163.20,-14.40 -163.20,0.00,8.44,0.00,1.00,168.00,-9.60 --9.60,-0.00,7.58,0.00,1.00,172.80,-9.60 -172.80,0.00,8.42,0.00,1.00,172.80,-4.80 --0.00,-0.00,7.60,0.00,1.00,177.60,-0.00 --177.60,-0.00,8.40,0.00,1.00,-177.60,0.00 -4.80,0.00,7.63,0.00,1.00,-172.80,4.80 --168.00,-0.00,8.37,0.00,1.00,-172.80,9.60 -14.40,0.00,7.65,0.00,1.00,-168.00,9.60 --158.40,-0.00,8.35,0.00,1.00,-163.20,14.40 -24.00,0.00,7.67,0.00,1.00,-163.20,19.20 --148.80,-0.00,8.33,0.00,1.00,-158.40,19.20 -33.60,0.00,7.69,0.00,1.00,-153.60,24.00 --139.20,-0.00,8.31,0.00,1.00,-148.80,28.80 -43.20,0.00,7.71,0.00,1.00,-144.00,28.80 --129.60,-0.00,8.29,0.00,1.00,-139.20,33.60 -52.80,0.00,7.73,0.00,1.00,-134.40,33.60 --120.00,-0.00,8.27,0.00,1.00,-129.60,38.40 -62.40,0.00,7.75,0.00,1.00,-124.80,38.40 --110.40,-0.00,8.25,0.00,1.00,-120.00,38.40 -72.00,0.00,7.78,0.00,1.00,-110.40,43.20 --100.80,-0.00,8.22,0.00,1.00,-105.60,43.20 -81.60,0.00,7.80,0.00,1.00,-100.80,43.20 --91.20,-0.00,8.20,0.00,1.00,-91.20,43.20 -96.00,0.00,7.82,0.00,1.00,-86.40,43.20 --81.60,-0.00,8.18,0.00,1.00,-76.80,43.20 -105.60,0.00,7.84,0.00,1.00,-72.00,43.20 --72.00,-0.00,8.16,0.00,1.00,-62.40,38.40 -115.20,0.00,7.86,0.00,1.00,-57.60,38.40 --62.40,-0.00,8.14,0.00,1.00,-52.80,38.40 -124.80,0.00,7.88,0.00,1.00,-48.00,33.60 --52.80,-0.00,8.12,0.00,1.00,-43.20,33.60 -134.40,0.00,7.90,0.00,1.00,-38.40,28.80 --43.20,-0.00,8.10,0.00,1.00,-33.60,28.80 -144.00,0.00,7.93,0.00,1.00,-28.80,24.00 --33.60,-0.00,8.07,0.00,1.00,-24.00,24.00 -153.60,0.00,7.95,0.00,1.00,-19.20,19.20 --24.00,-0.00,8.05,0.00,1.00,-19.20,14.40 -163.20,0.00,7.97,0.00,1.00,-14.40,14.40 --14.40,-0.00,8.03,0.00,1.00,-9.60,9.60 -172.80,0.00,7.99,0.00,1.00,-4.80,4.80 --4.80,-0.00,8.01,0.00,1.00,-4.80,4.80 -0.00,0.00,8.01,0.00,1.00,0.00,0.00 --177.60,0.00,7.99,0.00,1.00,4.80,-4.80 -9.60,-0.00,8.03,0.00,1.00,4.80,-4.80 --168.00,0.00,7.97,0.00,1.00,9.60,-9.60 -19.20,-0.00,8.05,0.00,1.00,14.40,-14.40 --158.40,0.00,7.95,0.00,1.00,19.20,-19.20 -28.80,-0.00,8.07,0.00,1.00,24.00,-19.20 --148.80,0.00,7.93,0.00,1.00,24.00,-24.00 -38.40,-0.00,8.10,0.00,1.00,28.80,-28.80 --139.20,0.00,7.90,0.00,1.00,33.60,-28.80 -48.00,-0.00,8.12,0.00,1.00,38.40,-33.60 --129.60,0.00,7.88,0.00,1.00,43.20,-38.40 -57.60,-4.80,8.14,0.00,1.00,48.00,-38.40 --120.00,4.80,7.86,0.00,1.00,52.80,-43.20 -67.20,-4.80,8.16,0.00,1.00,62.40,-43.20 --110.40,4.80,7.84,0.00,1.00,67.20,-43.20 -76.80,-4.80,8.18,0.00,1.00,72.00,-48.00 --100.80,4.80,7.82,0.00,1.00,76.80,-48.00 -86.40,-4.80,8.20,0.00,1.00,86.40,-48.00 --86.40,4.80,7.80,0.00,1.00,91.20,-48.00 -96.00,-4.80,8.22,0.00,1.00,96.00,-48.00 --76.80,4.80,7.78,0.00,1.00,105.60,-48.00 -105.60,-4.80,8.25,0.00,1.00,110.40,-48.00 --67.20,4.80,7.75,0.00,1.00,115.20,-43.20 -115.20,-4.80,8.27,0.00,1.00,120.00,-43.20 --57.60,4.80,7.73,0.00,1.00,129.60,-38.40 -124.80,-4.80,8.29,0.00,1.00,134.40,-38.40 --48.00,0.00,7.71,0.00,1.00,139.20,-33.60 -134.40,-0.00,8.31,0.00,1.00,144.00,-33.60 --38.40,0.00,7.69,0.00,1.00,148.80,-28.80 -144.00,-0.00,8.33,0.00,1.00,153.60,-24.00 --28.80,0.00,7.67,0.00,1.00,153.60,-24.00 -153.60,-0.00,8.35,0.00,1.00,158.40,-19.20 --19.20,0.00,7.65,0.00,1.00,163.20,-14.40 -163.20,-0.00,8.37,0.00,1.00,168.00,-14.40 --9.60,0.00,7.63,0.00,1.00,172.80,-9.60 -172.80,-0.00,8.40,0.00,1.00,172.80,-4.80 --0.00,0.00,7.60,0.00,1.00,177.60,-0.00 --177.60,0.00,8.42,0.00,1.00,-177.60,0.00 -4.80,-0.00,7.58,0.00,1.00,-172.80,4.80 --168.00,0.00,8.44,0.00,1.00,-172.80,9.60 -14.40,-0.00,7.56,0.00,1.00,-168.00,14.40 --158.40,0.00,8.46,0.00,1.00,-163.20,14.40 -24.00,-0.00,7.54,0.00,1.00,-158.40,19.20 --148.80,0.00,8.48,0.00,1.00,-153.60,24.00 -33.60,-0.00,7.52,0.00,1.00,-153.60,24.00 --139.20,0.00,8.50,0.00,1.00,-148.80,28.80 -43.20,-0.00,7.50,0.00,1.00,-144.00,33.60 --129.60,0.00,8.52,0.00,1.00,-139.20,33.60 -52.80,-4.80,7.48,0.00,1.00,-134.40,38.40 --120.00,4.80,8.54,0.00,1.00,-129.60,38.40 -62.40,-4.80,7.46,0.00,1.00,-120.00,43.20 --110.40,4.80,8.57,0.00,1.00,-115.20,43.20 -72.00,-4.80,7.43,0.00,1.00,-110.40,48.00 --100.80,4.80,8.59,0.00,1.00,-105.60,48.00 -81.60,-4.80,7.41,0.00,1.00,-96.00,48.00 --91.20,4.80,8.61,0.00,1.00,-91.20,48.00 -96.00,-4.80,7.39,0.00,1.00,-86.40,48.00 --81.60,4.80,8.63,0.00,1.00,-76.80,48.00 -105.60,-4.80,7.37,0.00,1.00,-72.00,48.00 --72.00,4.80,8.65,0.00,1.00,-67.20,43.20 -115.20,-4.80,7.35,0.00,1.00,-62.40,43.20 --62.40,4.80,8.67,0.00,1.00,-52.80,43.20 -124.80,-4.80,7.33,0.00,1.00,-48.00,38.40 --52.80,0.00,8.69,0.00,1.00,-43.20,38.40 -134.40,-0.00,7.31,0.00,1.00,-38.40,33.60 --43.20,0.00,8.72,0.00,1.00,-33.60,28.80 -144.00,-0.00,7.28,0.00,1.00,-28.80,28.80 --33.60,0.00,8.74,0.00,1.00,-24.00,24.00 -153.60,-0.00,7.26,0.00,1.00,-24.00,19.20 --24.00,0.00,8.76,0.00,1.00,-19.20,19.20 -163.20,-0.00,7.24,0.00,1.00,-14.40,14.40 --14.40,0.00,8.78,0.00,1.00,-9.60,9.60 -172.80,-0.00,7.22,0.00,1.00,-4.80,4.80 --4.80,0.00,8.80,0.00,1.00,-4.80,4.80 -0.00,0.00,7.20,0.00,1.00,0.00,0.00 --177.60,0.00,8.82,0.00,1.00,4.80,-4.80 -9.60,-0.00,7.18,0.00,1.00,9.60,-9.60 --168.00,0.00,8.84,0.00,1.00,9.60,-9.60 -19.20,-4.80,7.16,0.00,1.00,14.40,-14.40 --158.40,4.80,8.87,0.00,1.00,19.20,-19.20 -28.80,-4.80,7.13,0.00,1.00,24.00,-24.00 --148.80,4.80,8.89,0.00,1.00,28.80,-24.00 -38.40,-4.80,7.11,0.00,1.00,33.60,-28.80 --139.20,4.80,8.91,0.00,1.00,38.40,-33.60 -48.00,-4.80,7.09,0.00,1.00,43.20,-38.40 --129.60,4.80,8.93,0.00,1.00,48.00,-38.40 -57.60,-4.80,7.07,0.00,1.00,52.80,-43.20 --120.00,4.80,8.95,0.00,1.00,57.60,-43.20 -67.20,-4.80,7.05,0.00,1.00,62.40,-48.00 --110.40,9.60,8.97,0.00,1.00,67.20,-48.00 -76.80,-9.60,7.03,0.00,1.00,72.00,-52.80 --100.80,9.60,8.99,0.00,1.00,81.60,-52.80 -86.40,-9.60,7.01,0.00,1.00,86.40,-52.80 --86.40,9.60,9.01,0.00,1.00,91.20,-52.80 -96.00,-9.60,6.99,0.00,1.00,96.00,-52.80 --76.80,9.60,9.04,0.00,1.00,105.60,-52.80 -105.60,-9.60,6.96,0.00,1.00,110.40,-48.00 --67.20,9.60,9.06,0.00,1.00,115.20,-48.00 -115.20,-4.80,6.94,0.00,1.00,120.00,-48.00 --57.60,4.80,9.08,0.00,1.00,124.80,-43.20 -124.80,-4.80,6.92,0.00,1.00,129.60,-43.20 --48.00,4.80,9.10,0.00,1.00,134.40,-38.40 -134.40,-4.80,6.90,0.00,1.00,139.20,-33.60 --38.40,4.80,9.12,0.00,1.00,144.00,-33.60 -144.00,-4.80,6.88,0.00,1.00,148.80,-28.80 --28.80,4.80,9.14,0.00,1.00,153.60,-24.00 -153.60,-4.80,6.86,0.00,1.00,158.40,-19.20 --19.20,4.80,9.16,0.00,1.00,163.20,-19.20 -163.20,-0.00,6.84,0.00,1.00,168.00,-14.40 --9.60,0.00,9.19,0.00,1.00,168.00,-9.60 -172.80,-0.00,6.81,0.00,1.00,172.80,-4.80 --0.00,0.00,9.21,0.00,1.00,177.60,-0.00 --177.60,0.00,6.79,0.00,1.00,-177.60,0.00 -4.80,-0.00,9.23,0.00,1.00,-172.80,4.80 --168.00,0.00,6.77,0.00,1.00,-168.00,9.60 -14.40,-0.00,9.25,0.00,1.00,-168.00,14.40 --158.40,4.80,6.75,0.00,1.00,-163.20,19.20 -24.00,-4.80,9.27,0.00,1.00,-158.40,19.20 --148.80,4.80,6.73,0.00,1.00,-153.60,24.00 -33.60,-4.80,9.29,0.00,1.00,-148.80,28.80 --139.20,4.80,6.71,0.00,1.00,-144.00,33.60 -43.20,-4.80,9.31,0.00,1.00,-139.20,33.60 --129.60,4.80,6.69,0.00,1.00,-134.40,38.40 -52.80,-4.80,9.34,0.00,1.00,-129.60,43.20 --120.00,4.80,6.66,0.00,1.00,-124.80,43.20 -62.40,-4.80,9.36,0.00,1.00,-120.00,48.00 --110.40,9.60,6.64,0.00,1.00,-115.20,48.00 -72.00,-9.60,9.38,0.00,1.00,-110.40,48.00 --100.80,9.60,6.62,0.00,1.00,-105.60,52.80 -81.60,-9.60,9.40,0.00,1.00,-96.00,52.80 --91.20,9.60,6.60,0.00,1.00,-91.20,52.80 -96.00,-9.60,9.42,0.00,1.00,-86.40,52.80 --81.60,9.60,6.58,0.00,1.00,-81.60,52.80 -105.60,-9.60,9.44,0.00,1.00,-72.00,52.80 --72.00,9.60,6.56,0.00,1.00,-67.20,48.00 -115.20,-4.80,9.46,0.00,1.00,-62.40,48.00 --62.40,4.80,6.54,0.00,1.00,-57.60,43.20 -124.80,-4.80,9.48,0.00,1.00,-52.80,43.20 --52.80,4.80,6.52,0.00,1.00,-48.00,38.40 -134.40,-4.80,9.51,0.00,1.00,-43.20,38.40 --43.20,4.80,6.49,0.00,1.00,-38.40,33.60 -144.00,-4.80,9.53,0.00,1.00,-33.60,28.80 --33.60,4.80,6.47,0.00,1.00,-28.80,24.00 -153.60,-4.80,9.55,0.00,1.00,-24.00,24.00 --24.00,4.80,6.45,0.00,1.00,-19.20,19.20 -163.20,-4.80,9.57,0.00,1.00,-14.40,14.40 --14.40,0.00,6.43,0.00,1.00,-9.60,9.60 -172.80,-0.00,9.59,0.00,1.00,-9.60,9.60 --4.80,0.00,6.41,0.00,1.00,-4.80,4.80 -0.00,0.00,9.61,0.00,1.00,0.00,0.00 --177.60,0.00,6.39,0.00,1.00,4.80,-4.80 -9.60,-0.00,9.63,0.00,1.00,9.60,-9.60 --168.00,4.80,6.37,0.00,1.00,14.40,-14.40 -19.20,-4.80,9.66,0.00,1.00,14.40,-14.40 --158.40,4.80,6.34,0.00,1.00,19.20,-19.20 -28.80,-4.80,9.68,0.00,1.00,24.00,-24.00 --148.80,4.80,6.32,0.00,1.00,28.80,-28.80 -38.40,-9.60,9.70,0.00,1.00,33.60,-33.60 --139.20,9.60,6.30,0.00,1.00,38.40,-33.60 -48.00,-9.60,9.72,0.00,1.00,43.20,-38.40 --129.60,9.60,6.28,0.00,1.00,48.00,-43.20 -57.60,-9.60,9.74,0.00,1.00,52.80,-43.20 --120.00,9.60,6.26,0.00,1.00,57.60,-48.00 -67.20,-9.60,9.76,0.00,1.00,62.40,-52.80 --110.40,9.60,6.24,0.00,1.00,67.20,-52.80 -76.80,-14.40,9.78,0.00,1.00,76.80,-57.60 --100.80,14.40,6.22,0.00,1.00,81.60,-57.60 -86.40,-14.40,9.81,0.00,1.00,86.40,-57.60 --86.40,14.40,6.19,0.00,1.00,91.20,-57.60 -96.00,-14.40,9.83,0.00,1.00,96.00,-57.60 --76.80,14.40,6.17,0.00,1.00,100.80,-57.60 -105.60,-14.40,9.85,0.00,1.00,110.40,-52.80 --67.20,9.60,6.15,0.00,1.00,115.20,-52.80 -115.20,-9.60,9.87,0.00,1.00,120.00,-48.00 --57.60,9.60,6.13,0.00,1.00,124.80,-48.00 -124.80,-9.60,9.89,0.00,1.00,129.60,-43.20 --48.00,9.60,6.11,0.00,1.00,134.40,-38.40 -134.40,-9.60,9.91,0.00,1.00,139.20,-38.40 --38.40,9.60,6.09,0.00,1.00,144.00,-33.60 -144.00,-9.60,9.93,0.00,1.00,148.80,-28.80 --28.80,4.80,6.07,0.00,1.00,153.60,-24.00 -153.60,-4.80,9.95,0.00,1.00,158.40,-24.00 --19.20,4.80,6.05,0.00,1.00,163.20,-19.20 -163.20,-4.80,9.98,0.00,1.00,168.00,-14.40 --9.60,4.80,6.02,0.00,1.00,168.00,-9.60 -172.80,-0.00,10.00,0.00,1.00,172.80,-4.80 --0.00,0.00,6.00,0.00,1.00,177.60,-0.00 --177.60,0.00,10.02,0.00,1.00,-177.60,0.00 -4.80,-0.00,5.98,0.00,1.00,-172.80,4.80 --168.00,4.80,10.04,0.00,1.00,-168.00,9.60 -14.40,-4.80,5.96,0.00,1.00,-168.00,14.40 --158.40,4.80,10.06,0.00,1.00,-163.20,19.20 -24.00,-4.80,5.94,0.00,1.00,-158.40,24.00 --148.80,4.80,10.08,0.00,1.00,-153.60,24.00 -33.60,-9.60,5.92,0.00,1.00,-148.80,28.80 --139.20,9.60,10.10,0.00,1.00,-144.00,33.60 -43.20,-9.60,5.90,0.00,1.00,-139.20,38.40 --129.60,9.60,10.13,0.00,1.00,-134.40,38.40 -52.80,-9.60,5.87,0.00,1.00,-129.60,43.20 --120.00,9.60,10.15,0.00,1.00,-124.80,48.00 -62.40,-9.60,5.85,0.00,1.00,-120.00,48.00 --110.40,9.60,10.17,0.00,1.00,-115.20,52.80 -72.00,-14.40,5.83,0.00,1.00,-110.40,52.80 --100.80,14.40,10.19,0.00,1.00,-100.80,57.60 -81.60,-14.40,5.81,0.00,1.00,-96.00,57.60 --91.20,14.40,10.21,0.00,1.00,-91.20,57.60 -96.00,-14.40,5.79,0.00,1.00,-86.40,57.60 --81.60,14.40,10.23,0.00,1.00,-81.60,57.60 -105.60,-14.40,5.77,0.00,1.00,-76.80,57.60 --72.00,9.60,10.25,0.00,1.00,-67.20,52.80 -115.20,-9.60,5.75,0.00,1.00,-62.40,52.80 --62.40,9.60,10.28,0.00,1.00,-57.60,48.00 -124.80,-9.60,5.72,0.00,1.00,-52.80,43.20 --52.80,9.60,10.30,0.00,1.00,-48.00,43.20 -134.40,-9.60,5.70,0.00,1.00,-43.20,38.40 --43.20,9.60,10.32,0.00,1.00,-38.40,33.60 -144.00,-9.60,5.68,0.00,1.00,-33.60,33.60 --33.60,4.80,10.34,0.00,1.00,-28.80,28.80 -153.60,-4.80,5.66,0.00,1.00,-24.00,24.00 --24.00,4.80,10.36,0.00,1.00,-19.20,19.20 -163.20,-4.80,5.64,0.00,1.00,-14.40,14.40 --14.40,4.80,10.38,0.00,1.00,-14.40,14.40 -172.80,-0.00,5.62,0.00,1.00,-9.60,9.60 --4.80,0.00,10.40,0.00,1.00,-4.80,4.80 -0.00,0.00,5.60,0.00,1.00,0.00,0.00 --177.60,0.00,10.42,0.00,1.00,4.80,-4.80 -9.60,-4.80,5.58,0.00,1.00,9.60,-9.60 --168.00,4.80,10.45,0.00,1.00,14.40,-14.40 -19.20,-4.80,5.55,0.00,1.00,19.20,-19.20 --158.40,4.80,10.47,0.00,1.00,19.20,-19.20 -28.80,-9.60,5.53,0.00,1.00,24.00,-24.00 --148.80,9.60,10.49,0.00,1.00,28.80,-28.80 -38.40,-9.60,5.51,0.00,1.00,33.60,-33.60 --139.20,9.60,10.51,0.00,1.00,38.40,-38.40 -48.00,-14.40,5.49,0.00,1.00,43.20,-43.20 --129.60,14.40,10.53,0.00,1.00,48.00,-43.20 -57.60,-14.40,5.47,0.00,1.00,52.80,-48.00 --120.00,14.40,10.55,0.00,1.00,57.60,-52.80 -67.20,-14.40,5.45,0.00,1.00,62.40,-52.80 --110.40,14.40,10.57,0.00,1.00,72.00,-57.60 -76.80,-19.20,5.43,0.00,1.00,76.80,-57.60 --100.80,19.20,10.60,0.00,1.00,81.60,-62.40 -86.40,-19.20,5.40,0.00,1.00,86.40,-62.40 --86.40,19.20,10.62,0.00,1.00,91.20,-62.40 -96.00,-19.20,5.38,0.00,1.00,96.00,-62.40 --76.80,19.20,10.64,0.00,1.00,100.80,-62.40 -105.60,-14.40,5.36,0.00,1.00,105.60,-57.60 --67.20,14.40,10.66,0.00,1.00,110.40,-57.60 -115.20,-14.40,5.34,0.00,1.00,120.00,-52.80 --57.60,14.40,10.68,0.00,1.00,124.80,-48.00 -124.80,-14.40,5.32,0.00,1.00,129.60,-48.00 --48.00,14.40,10.70,0.00,1.00,134.40,-43.20 -134.40,-14.40,5.30,0.00,1.00,139.20,-38.40 --38.40,9.60,10.72,0.00,1.00,144.00,-33.60 -144.00,-9.60,5.28,0.00,1.00,148.80,-33.60 --28.80,9.60,10.74,0.00,1.00,153.60,-28.80 -153.60,-9.60,5.26,0.00,1.00,158.40,-24.00 --19.20,4.80,10.77,0.00,1.00,158.40,-19.20 -163.20,-4.80,5.23,0.00,1.00,163.20,-14.40 --9.60,4.80,10.79,0.00,1.00,168.00,-9.60 -172.80,-0.00,5.21,0.00,1.00,172.80,-4.80 --0.00,0.00,10.81,0.00,1.00,177.60,-0.00 --177.60,0.00,5.19,0.00,1.00,-177.60,0.00 -4.80,-0.00,10.83,0.00,1.00,-172.80,4.80 --168.00,4.80,5.17,0.00,1.00,-168.00,9.60 -14.40,-4.80,10.85,0.00,1.00,-163.20,14.40 --158.40,4.80,5.15,0.00,1.00,-158.40,19.20 -24.00,-9.60,10.87,0.00,1.00,-158.40,24.00 --148.80,9.60,5.13,0.00,1.00,-153.60,28.80 -33.60,-9.60,10.89,0.00,1.00,-148.80,33.60 --139.20,9.60,5.11,0.00,1.00,-144.00,33.60 -43.20,-14.40,10.92,0.00,1.00,-139.20,38.40 --129.60,14.40,5.08,0.00,1.00,-134.40,43.20 -52.80,-14.40,10.94,0.00,1.00,-129.60,48.00 --120.00,14.40,5.06,0.00,1.00,-124.80,48.00 -62.40,-14.40,10.96,0.00,1.00,-120.00,52.80 --110.40,14.40,5.04,0.00,1.00,-110.40,57.60 -72.00,-14.40,10.98,0.00,1.00,-105.60,57.60 --100.80,19.20,5.02,0.00,1.00,-100.80,62.40 -81.60,-19.20,11.00,0.00,1.00,-96.00,62.40 --91.20,19.20,5.00,0.00,1.00,-91.20,62.40 -96.00,-19.20,11.02,0.00,1.00,-86.40,62.40 --81.60,19.20,4.98,0.00,1.00,-81.60,62.40 -105.60,-19.20,11.04,0.00,1.00,-76.80,57.60 --72.00,14.40,4.96,0.00,1.00,-72.00,57.60 -115.20,-14.40,11.07,0.00,1.00,-62.40,52.80 --62.40,14.40,4.93,0.00,1.00,-57.60,52.80 -124.80,-14.40,11.09,0.00,1.00,-52.80,48.00 --52.80,14.40,4.91,0.00,1.00,-48.00,43.20 -134.40,-14.40,11.11,0.00,1.00,-43.20,43.20 --43.20,9.60,4.89,0.00,1.00,-38.40,38.40 -144.00,-9.60,11.13,0.00,1.00,-33.60,33.60 --33.60,9.60,4.87,0.00,1.00,-28.80,28.80 -153.60,-9.60,11.15,0.00,1.00,-24.00,24.00 --24.00,4.80,4.85,0.00,1.00,-19.20,19.20 -163.20,-4.80,11.17,0.00,1.00,-19.20,19.20 --14.40,4.80,4.83,0.00,1.00,-14.40,14.40 -172.80,-4.80,11.19,0.00,1.00,-9.60,9.60 --4.80,0.00,4.81,0.00,1.00,-4.80,4.80 -0.00,0.00,11.21,0.00,1.00,0.00,0.00 --177.60,0.00,4.79,0.00,1.00,4.80,-4.80 -9.60,-4.80,11.24,0.00,1.00,9.60,-9.60 --168.00,4.80,4.76,0.00,1.00,14.40,-14.40 -19.20,-4.80,11.26,0.00,1.00,19.20,-19.20 --158.40,9.60,4.74,0.00,1.00,24.00,-24.00 -28.80,-9.60,11.28,0.00,1.00,28.80,-24.00 --148.80,14.40,4.72,0.00,1.00,33.60,-28.80 -38.40,-14.40,11.30,0.00,1.00,38.40,-33.60 --139.20,14.40,4.70,0.00,1.00,43.20,-38.40 -48.00,-14.40,11.32,0.00,1.00,48.00,-43.20 --129.60,19.20,4.68,0.00,1.00,52.80,-48.00 -57.60,-19.20,11.34,0.00,1.00,57.60,-52.80 --120.00,19.20,4.66,0.00,1.00,62.40,-52.80 -67.20,-19.20,11.36,0.00,1.00,67.20,-57.60 --110.40,19.20,4.64,0.00,1.00,72.00,-62.40 -76.80,-19.20,11.39,0.00,1.00,76.80,-62.40 --100.80,24.00,4.61,0.00,1.00,81.60,-67.20 -86.40,-24.00,11.41,0.00,1.00,86.40,-67.20 --86.40,24.00,4.59,0.00,1.00,91.20,-67.20 -96.00,-24.00,11.43,0.00,1.00,96.00,-67.20 --76.80,24.00,4.57,0.00,1.00,100.80,-67.20 -105.60,-19.20,11.45,0.00,1.00,105.60,-62.40 --67.20,19.20,4.55,0.00,1.00,110.40,-57.60 -115.20,-19.20,11.47,0.00,1.00,115.20,-57.60 --57.60,19.20,4.53,0.00,1.00,120.00,-52.80 -124.80,-19.20,11.49,0.00,1.00,124.80,-48.00 --48.00,19.20,4.51,0.00,1.00,129.60,-43.20 -134.40,-14.40,11.51,0.00,1.00,134.40,-43.20 --38.40,14.40,4.49,0.00,1.00,139.20,-38.40 -144.00,-14.40,11.54,0.00,1.00,144.00,-33.60 --28.80,9.60,4.46,0.00,1.00,148.80,-28.80 -153.60,-9.60,11.56,0.00,1.00,153.60,-24.00 --19.20,9.60,4.44,0.00,1.00,158.40,-19.20 -163.20,-4.80,11.58,0.00,1.00,163.20,-14.40 --9.60,4.80,4.42,0.00,1.00,168.00,-9.60 -172.80,-4.80,11.60,0.00,1.00,172.80,-4.80 --0.00,0.00,4.40,0.00,1.00,177.60,-0.00 --177.60,0.00,11.62,0.00,1.00,-177.60,0.00 -4.80,-4.80,4.38,0.00,1.00,-172.80,4.80 --168.00,4.80,11.64,0.00,1.00,-168.00,9.60 -14.40,-4.80,4.36,0.00,1.00,-163.20,14.40 --158.40,9.60,11.66,0.00,1.00,-158.40,19.20 -24.00,-9.60,4.34,0.00,1.00,-153.60,24.00 --148.80,9.60,11.68,0.00,1.00,-148.80,28.80 -33.60,-14.40,4.32,0.00,1.00,-144.00,33.60 --139.20,14.40,11.71,0.00,1.00,-139.20,38.40 -43.20,-14.40,4.29,0.00,1.00,-134.40,43.20 --129.60,19.20,11.73,0.00,1.00,-129.60,43.20 -52.80,-19.20,4.27,0.00,1.00,-124.80,48.00 --120.00,19.20,11.75,0.00,1.00,-120.00,52.80 -62.40,-19.20,4.25,0.00,1.00,-115.20,57.60 --110.40,19.20,11.77,0.00,1.00,-110.40,57.60 -72.00,-19.20,4.23,0.00,1.00,-105.60,62.40 --100.80,24.00,11.79,0.00,1.00,-100.80,67.20 -81.60,-24.00,4.21,0.00,1.00,-96.00,67.20 --91.20,24.00,11.81,0.00,1.00,-91.20,67.20 -96.00,-24.00,4.19,0.00,1.00,-86.40,67.20 --81.60,24.00,11.83,0.00,1.00,-81.60,67.20 -105.60,-19.20,4.17,0.00,1.00,-76.80,62.40 --72.00,19.20,11.86,0.00,1.00,-72.00,62.40 -115.20,-19.20,4.14,0.00,1.00,-67.20,57.60 --62.40,19.20,11.88,0.00,1.00,-62.40,52.80 -124.80,-19.20,4.12,0.00,1.00,-57.60,52.80 --52.80,19.20,11.90,0.00,1.00,-52.80,48.00 -134.40,-14.40,4.10,0.00,1.00,-48.00,43.20 --43.20,14.40,11.92,0.00,1.00,-43.20,38.40 -144.00,-14.40,4.08,0.00,1.00,-38.40,33.60 --33.60,14.40,11.94,0.00,1.00,-33.60,28.80 -153.60,-9.60,4.06,0.00,1.00,-28.80,24.00 --24.00,9.60,11.96,0.00,1.00,-24.00,24.00 -163.20,-4.80,4.04,0.00,1.00,-19.20,19.20 --14.40,4.80,11.98,0.00,1.00,-14.40,14.40 -172.80,-4.80,4.02,0.00,1.00,-9.60,9.60 --4.80,0.00,12.01,0.00,1.00,-4.80,4.80 -0.00,0.00,3.99,0.00,1.00,0.00,0.00 --177.60,0.00,12.03,0.00,1.00,4.80,-4.80 -9.60,-4.80,3.97,0.00,1.00,9.60,-9.60 --168.00,4.80,12.05,0.00,1.00,14.40,-14.40 -19.20,-9.60,3.95,0.00,1.00,19.20,-19.20 --158.40,9.60,12.07,0.00,1.00,24.00,-24.00 -24.00,-14.40,3.93,0.00,1.00,28.80,-28.80 --148.80,14.40,12.09,0.00,1.00,33.60,-33.60 -33.60,-14.40,3.91,0.00,1.00,38.40,-38.40 --139.20,19.20,12.11,0.00,1.00,43.20,-38.40 -43.20,-19.20,3.89,0.00,1.00,48.00,-43.20 --129.60,19.20,12.13,0.00,1.00,52.80,-48.00 -52.80,-24.00,3.87,0.00,1.00,57.60,-52.80 --120.00,24.00,12.15,0.00,1.00,62.40,-57.60 -62.40,-24.00,3.85,0.00,1.00,67.20,-62.40 --110.40,24.00,12.18,0.00,1.00,72.00,-62.40 -76.80,-24.00,3.82,0.00,1.00,76.80,-67.20 --100.80,28.80,12.20,0.00,1.00,81.60,-72.00 -86.40,-28.80,3.80,0.00,1.00,86.40,-72.00 --86.40,28.80,12.22,0.00,1.00,91.20,-72.00 -96.00,-28.80,3.78,0.00,1.00,96.00,-72.00 --76.80,28.80,12.24,0.00,1.00,100.80,-67.20 -105.60,-24.00,3.76,0.00,1.00,105.60,-67.20 --67.20,24.00,12.26,0.00,1.00,110.40,-62.40 -120.00,-24.00,3.74,0.00,1.00,115.20,-57.60 --57.60,24.00,12.28,0.00,1.00,120.00,-57.60 -129.60,-24.00,3.72,0.00,1.00,124.80,-52.80 --48.00,19.20,12.30,0.00,1.00,129.60,-48.00 -139.20,-19.20,3.70,0.00,1.00,134.40,-43.20 --38.40,19.20,12.33,0.00,1.00,139.20,-38.40 -148.80,-14.40,3.67,0.00,1.00,144.00,-33.60 --28.80,14.40,12.35,0.00,1.00,148.80,-28.80 -158.40,-9.60,3.65,0.00,1.00,153.60,-24.00 --19.20,9.60,12.37,0.00,1.00,158.40,-19.20 -163.20,-9.60,3.63,0.00,1.00,163.20,-14.40 --9.60,4.80,12.39,0.00,1.00,168.00,-9.60 -172.80,-4.80,3.61,0.00,1.00,172.80,-4.80 --0.00,0.00,12.41,0.00,1.00,177.60,-0.00 --177.60,0.00,3.59,0.00,1.00,-177.60,0.00 -4.80,-4.80,12.43,0.00,1.00,-172.80,4.80 --168.00,4.80,3.57,0.00,1.00,-168.00,9.60 -14.40,-9.60,12.45,0.00,1.00,-163.20,14.40 --158.40,9.60,3.55,0.00,1.00,-158.40,19.20 -24.00,-9.60,12.48,0.00,1.00,-153.60,24.00 --153.60,14.40,3.52,0.00,1.00,-148.80,28.80 -33.60,-14.40,12.50,0.00,1.00,-144.00,33.60 --144.00,19.20,3.50,0.00,1.00,-139.20,38.40 -43.20,-19.20,12.52,0.00,1.00,-134.40,43.20 --134.40,19.20,3.48,0.00,1.00,-129.60,48.00 -52.80,-24.00,12.54,0.00,1.00,-124.80,52.80 --124.80,24.00,3.46,0.00,1.00,-120.00,57.60 -62.40,-24.00,12.56,0.00,1.00,-115.20,57.60 --110.40,24.00,3.44,0.00,1.00,-110.40,62.40 -72.00,-24.00,12.58,0.00,1.00,-105.60,67.20 --100.80,28.80,3.42,0.00,1.00,-100.80,67.20 -81.60,-28.80,12.60,0.00,1.00,-96.00,72.00 --91.20,28.80,3.40,0.00,1.00,-91.20,72.00 -96.00,-28.80,12.62,0.00,1.00,-86.40,72.00 --81.60,28.80,3.38,0.00,1.00,-81.60,72.00 -105.60,-24.00,12.65,0.00,1.00,-76.80,67.20 --72.00,24.00,3.35,0.00,1.00,-72.00,62.40 -115.20,-24.00,12.67,0.00,1.00,-67.20,62.40 --57.60,24.00,3.33,0.00,1.00,-62.40,57.60 -124.80,-24.00,12.69,0.00,1.00,-57.60,52.80 --48.00,19.20,3.31,0.00,1.00,-52.80,48.00 -134.40,-19.20,12.71,0.00,1.00,-48.00,43.20 --38.40,19.20,3.29,0.00,1.00,-43.20,38.40 -144.00,-14.40,12.73,0.00,1.00,-38.40,38.40 --28.80,14.40,3.27,0.00,1.00,-33.60,33.60 -153.60,-14.40,12.75,0.00,1.00,-28.80,28.80 --24.00,9.60,3.25,0.00,1.00,-24.00,24.00 -163.20,-9.60,12.77,0.00,1.00,-19.20,19.20 --14.40,4.80,3.23,0.00,1.00,-14.40,14.40 -172.80,-4.80,12.80,0.00,1.00,-9.60,9.60 --4.80,0.00,3.20,0.00,1.00,-4.80,4.80 -0.00,0.00,12.82,0.00,1.00,0.00,0.00 --177.60,4.80,3.18,0.00,1.00,4.80,-4.80 -9.60,-4.80,12.84,0.00,1.00,9.60,-9.60 --168.00,9.60,3.16,0.00,1.00,14.40,-14.40 -14.40,-9.60,12.86,0.00,1.00,19.20,-19.20 --158.40,14.40,3.14,0.00,1.00,24.00,-24.00 -24.00,-14.40,12.88,0.00,1.00,28.80,-28.80 --148.80,19.20,3.12,0.00,1.00,33.60,-33.60 -33.60,-19.20,12.90,0.00,1.00,38.40,-38.40 --139.20,19.20,3.10,0.00,1.00,43.20,-43.20 -43.20,-24.00,12.92,0.00,1.00,48.00,-48.00 --129.60,24.00,3.08,0.00,1.00,52.80,-52.80 -52.80,-28.80,12.95,0.00,1.00,57.60,-57.60 --120.00,28.80,3.05,0.00,1.00,62.40,-57.60 -62.40,-28.80,12.97,0.00,1.00,67.20,-62.40 --110.40,28.80,3.03,0.00,1.00,72.00,-67.20 -76.80,-28.80,12.99,0.00,1.00,76.80,-72.00 --100.80,33.60,3.01,0.00,1.00,81.60,-72.00 -86.40,-33.60,13.01,0.00,1.00,86.40,-76.80 --86.40,33.60,2.99,0.00,1.00,91.20,-76.80 -96.00,-33.60,13.03,0.00,1.00,96.00,-76.80 --76.80,28.80,2.97,0.00,1.00,100.80,-72.00 -110.40,-28.80,13.05,0.00,1.00,105.60,-72.00 --67.20,28.80,2.95,0.00,1.00,110.40,-67.20 -120.00,-28.80,13.07,0.00,1.00,115.20,-62.40 --57.60,28.80,2.93,0.00,1.00,120.00,-57.60 -129.60,-24.00,13.09,0.00,1.00,124.80,-52.80 --48.00,24.00,2.91,0.00,1.00,129.60,-48.00 -139.20,-24.00,13.12,0.00,1.00,134.40,-43.20 --38.40,19.20,2.88,0.00,1.00,139.20,-38.40 -148.80,-19.20,13.14,0.00,1.00,144.00,-33.60 --28.80,14.40,2.86,0.00,1.00,148.80,-28.80 -158.40,-14.40,13.16,0.00,1.00,153.60,-24.00 --19.20,9.60,2.84,0.00,1.00,158.40,-19.20 -168.00,-9.60,13.18,0.00,1.00,163.20,-14.40 --9.60,4.80,2.82,0.00,1.00,168.00,-9.60 -172.80,-4.80,13.20,0.00,1.00,172.80,-4.80 --0.00,0.00,2.80,0.00,1.00,177.60,-0.00 --177.60,0.00,13.22,0.00,1.00,-177.60,0.00 -4.80,-4.80,2.78,0.00,1.00,-172.80,4.80 --168.00,4.80,13.24,0.00,1.00,-168.00,9.60 -14.40,-9.60,2.76,0.00,1.00,-163.20,14.40 --163.20,9.60,13.27,0.00,1.00,-158.40,19.20 -24.00,-14.40,2.73,0.00,1.00,-153.60,24.00 --153.60,14.40,13.29,0.00,1.00,-148.80,28.80 -33.60,-19.20,2.71,0.00,1.00,-144.00,33.60 --144.00,19.20,13.31,0.00,1.00,-139.20,38.40 -43.20,-24.00,2.69,0.00,1.00,-134.40,43.20 --134.40,24.00,13.33,0.00,1.00,-129.60,48.00 -52.80,-24.00,2.67,0.00,1.00,-124.80,52.80 --124.80,28.80,13.35,0.00,1.00,-120.00,57.60 -62.40,-28.80,2.65,0.00,1.00,-115.20,62.40 --115.20,28.80,13.37,0.00,1.00,-110.40,67.20 -72.00,-28.80,2.63,0.00,1.00,-105.60,72.00 --100.80,28.80,13.39,0.00,1.00,-100.80,72.00 -81.60,-33.60,2.61,0.00,1.00,-96.00,76.80 --91.20,33.60,13.42,0.00,1.00,-91.20,76.80 -96.00,-33.60,2.58,0.00,1.00,-86.40,76.80 --81.60,33.60,13.44,0.00,1.00,-81.60,72.00 -105.60,-28.80,2.56,0.00,1.00,-76.80,72.00 --67.20,28.80,13.46,0.00,1.00,-72.00,67.20 -115.20,-28.80,2.54,0.00,1.00,-67.20,62.40 --57.60,28.80,13.48,0.00,1.00,-62.40,57.60 -124.80,-28.80,2.52,0.00,1.00,-57.60,57.60 --48.00,24.00,13.50,0.00,1.00,-52.80,52.80 -134.40,-24.00,2.50,0.00,1.00,-48.00,48.00 --38.40,19.20,13.52,0.00,1.00,-43.20,43.20 -144.00,-19.20,2.48,0.00,1.00,-38.40,38.40 --28.80,19.20,13.54,0.00,1.00,-33.60,33.60 -153.60,-14.40,2.46,0.00,1.00,-28.80,28.80 --19.20,14.40,13.56,0.00,1.00,-24.00,24.00 -163.20,-9.60,2.44,0.00,1.00,-19.20,19.20 --14.40,9.60,13.59,0.00,1.00,-14.40,14.40 -172.80,-4.80,2.41,0.00,1.00,-9.60,9.60 --4.80,4.80,13.61,0.00,1.00,-4.80,4.80 -0.00,0.00,2.39,0.00,1.00,0.00,0.00 --177.60,4.80,13.63,0.00,1.00,4.80,-4.80 -9.60,-4.80,2.37,0.00,1.00,9.60,-9.60 --168.00,9.60,13.65,0.00,1.00,14.40,-14.40 -14.40,-9.60,2.35,0.00,1.00,19.20,-19.20 --158.40,14.40,13.67,0.00,1.00,24.00,-24.00 -24.00,-14.40,2.33,0.00,1.00,28.80,-28.80 --153.60,19.20,13.69,0.00,1.00,33.60,-33.60 -33.60,-24.00,2.31,0.00,1.00,38.40,-38.40 --144.00,24.00,13.71,0.00,1.00,43.20,-43.20 -43.20,-24.00,2.29,0.00,1.00,48.00,-48.00 --134.40,28.80,13.74,0.00,1.00,52.80,-52.80 -52.80,-28.80,2.26,0.00,1.00,57.60,-57.60 --124.80,33.60,13.76,0.00,1.00,62.40,-62.40 -62.40,-33.60,2.24,0.00,1.00,67.20,-67.20 --110.40,33.60,13.78,0.00,1.00,72.00,-72.00 -72.00,-33.60,2.22,0.00,1.00,76.80,-72.00 --100.80,38.40,13.80,0.00,1.00,81.60,-76.80 -86.40,-38.40,2.20,0.00,1.00,86.40,-81.60 --86.40,38.40,13.82,0.00,1.00,91.20,-81.60 -96.00,-38.40,2.18,0.00,1.00,96.00,-81.60 --76.80,33.60,13.84,0.00,1.00,100.80,-76.80 -110.40,-33.60,2.16,0.00,1.00,105.60,-72.00 --67.20,33.60,13.86,0.00,1.00,110.40,-67.20 -120.00,-33.60,2.14,0.00,1.00,115.20,-62.40 --52.80,28.80,13.89,0.00,1.00,120.00,-57.60 -129.60,-28.80,2.11,0.00,1.00,124.80,-52.80 --43.20,28.80,13.91,0.00,1.00,129.60,-48.00 -139.20,-24.00,2.09,0.00,1.00,134.40,-43.20 --33.60,24.00,13.93,0.00,1.00,139.20,-38.40 -148.80,-19.20,2.07,0.00,1.00,144.00,-33.60 --24.00,19.20,13.95,0.00,1.00,148.80,-28.80 -158.40,-14.40,2.05,0.00,1.00,153.60,-24.00 --19.20,14.40,13.97,0.00,1.00,158.40,-19.20 -168.00,-9.60,2.03,0.00,1.00,163.20,-14.40 --9.60,4.80,13.99,0.00,1.00,168.00,-9.60 -172.80,-4.80,2.01,0.00,1.00,172.80,-4.80 --0.00,0.00,14.01,0.00,1.00,177.60,-0.00 --177.60,0.00,1.99,0.00,1.00,-177.60,0.00 -4.80,-4.80,14.03,0.00,1.00,-172.80,4.80 --168.00,4.80,1.97,0.00,1.00,-168.00,9.60 -14.40,-9.60,14.06,0.00,1.00,-163.20,14.40 --163.20,14.40,1.94,0.00,1.00,-158.40,19.20 -24.00,-14.40,14.08,0.00,1.00,-153.60,24.00 --153.60,19.20,1.92,0.00,1.00,-148.80,28.80 -28.80,-19.20,14.10,0.00,1.00,-144.00,33.60 --144.00,24.00,1.90,0.00,1.00,-139.20,38.40 -38.40,-24.00,14.12,0.00,1.00,-134.40,43.20 --134.40,28.80,1.88,0.00,1.00,-129.60,48.00 -48.00,-28.80,14.14,0.00,1.00,-124.80,52.80 --124.80,28.80,1.86,0.00,1.00,-120.00,57.60 -57.60,-33.60,14.16,0.00,1.00,-115.20,62.40 --115.20,33.60,1.84,0.00,1.00,-110.40,67.20 -72.00,-33.60,14.18,0.00,1.00,-105.60,72.00 --105.60,33.60,1.82,0.00,1.00,-100.80,76.80 -81.60,-38.40,14.21,0.00,1.00,-96.00,81.60 --91.20,38.40,1.79,0.00,1.00,-91.20,81.60 -96.00,-38.40,14.23,0.00,1.00,-86.40,81.60 --81.60,38.40,1.77,0.00,1.00,-81.60,76.80 -105.60,-33.60,14.25,0.00,1.00,-76.80,72.00 --67.20,33.60,1.75,0.00,1.00,-72.00,72.00 -120.00,-33.60,14.27,0.00,1.00,-67.20,67.20 --57.60,33.60,1.73,0.00,1.00,-62.40,62.40 -129.60,-28.80,14.29,0.00,1.00,-57.60,57.60 --48.00,28.80,1.71,0.00,1.00,-52.80,52.80 -139.20,-24.00,14.31,0.00,1.00,-48.00,48.00 --38.40,24.00,1.69,0.00,1.00,-43.20,43.20 -148.80,-24.00,14.33,0.00,1.00,-38.40,38.40 --28.80,19.20,1.67,0.00,1.00,-33.60,33.60 -158.40,-14.40,14.36,0.00,1.00,-28.80,28.80 --19.20,14.40,1.64,0.00,1.00,-24.00,24.00 -163.20,-9.60,14.38,0.00,1.00,-19.20,19.20 --9.60,9.60,1.62,0.00,1.00,-14.40,14.40 -172.80,-4.80,14.40,0.00,1.00,-9.60,9.60 --4.80,4.80,1.60,0.00,1.00,-4.80,4.80 -0.00,0.00,14.42,0.00,1.00,0.00,0.00 --177.60,4.80,1.58,0.00,1.00,4.80,-4.80 -9.60,-4.80,14.44,0.00,1.00,9.60,-9.60 --168.00,9.60,1.56,0.00,1.00,14.40,-14.40 -14.40,-14.40,14.46,0.00,1.00,19.20,-19.20 --163.20,14.40,1.54,0.00,1.00,24.00,-24.00 -24.00,-19.20,14.48,0.00,1.00,28.80,-28.80 --153.60,19.20,1.52,0.00,1.00,33.60,-33.60 -28.80,-24.00,14.50,0.00,1.00,38.40,-38.40 --144.00,28.80,1.50,0.00,1.00,43.20,-43.20 -38.40,-28.80,14.53,0.00,1.00,48.00,-48.00 --134.40,33.60,1.47,0.00,1.00,52.80,-52.80 -48.00,-33.60,14.55,0.00,1.00,57.60,-57.60 --124.80,33.60,1.45,0.00,1.00,62.40,-62.40 -62.40,-38.40,14.57,0.00,1.00,67.20,-67.20 --115.20,38.40,1.43,0.00,1.00,72.00,-72.00 -72.00,-38.40,14.59,0.00,1.00,76.80,-76.80 --100.80,43.20,1.41,0.00,1.00,81.60,-81.60 -86.40,-43.20,14.61,0.00,1.00,86.40,-86.40 --86.40,43.20,1.39,0.00,1.00,91.20,-86.40 -96.00,-43.20,14.63,0.00,1.00,96.00,-81.60 --76.80,38.40,1.37,0.00,1.00,100.80,-76.80 -110.40,-38.40,14.65,0.00,1.00,105.60,-72.00 --62.40,38.40,1.35,0.00,1.00,110.40,-67.20 -120.00,-38.40,14.68,0.00,1.00,115.20,-62.40 --52.80,33.60,1.32,0.00,1.00,120.00,-57.60 -134.40,-33.60,14.70,0.00,1.00,124.80,-52.80 --43.20,28.80,1.30,0.00,1.00,129.60,-48.00 -144.00,-28.80,14.72,0.00,1.00,134.40,-43.20 --33.60,24.00,1.28,0.00,1.00,139.20,-38.40 -153.60,-24.00,14.74,0.00,1.00,144.00,-33.60 --24.00,19.20,1.26,0.00,1.00,148.80,-28.80 -158.40,-19.20,14.76,0.00,1.00,153.60,-24.00 --14.40,14.40,1.24,0.00,1.00,158.40,-19.20 -168.00,-9.60,14.78,0.00,1.00,163.20,-14.40 --9.60,9.60,1.22,0.00,1.00,168.00,-9.60 -172.80,-4.80,14.80,0.00,1.00,172.80,-4.80 --0.00,0.00,1.20,0.00,1.00,177.60,-0.00 --177.60,0.00,14.83,0.00,1.00,-177.60,0.00 -4.80,-4.80,1.17,0.00,1.00,-172.80,4.80 --172.80,9.60,14.85,0.00,1.00,-168.00,9.60 -14.40,-9.60,1.15,0.00,1.00,-163.20,14.40 --163.20,14.40,14.87,0.00,1.00,-158.40,19.20 -19.20,-19.20,1.13,0.00,1.00,-153.60,24.00 --153.60,19.20,14.89,0.00,1.00,-148.80,28.80 -28.80,-24.00,1.11,0.00,1.00,-144.00,33.60 --148.80,24.00,14.91,0.00,1.00,-139.20,38.40 -38.40,-28.80,1.09,0.00,1.00,-134.40,43.20 --139.20,28.80,14.93,0.00,1.00,-129.60,48.00 -48.00,-33.60,1.07,0.00,1.00,-124.80,52.80 --129.60,33.60,14.95,0.00,1.00,-120.00,57.60 -57.60,-38.40,1.05,0.00,1.00,-115.20,62.40 --115.20,38.40,14.97,0.00,1.00,-110.40,67.20 -67.20,-38.40,1.03,0.00,1.00,-105.60,72.00 --105.60,38.40,15.00,0.00,1.00,-100.80,76.80 -81.60,-43.20,1.00,0.00,1.00,-96.00,81.60 --91.20,43.20,15.02,0.00,1.00,-91.20,86.40 -96.00,-43.20,0.98,0.00,1.00,-86.40,86.40 --76.80,43.20,15.04,0.00,1.00,-81.60,81.60 -105.60,-38.40,0.96,0.00,1.00,-76.80,76.80 --67.20,38.40,15.06,0.00,1.00,-72.00,72.00 -120.00,-38.40,0.94,0.00,1.00,-67.20,67.20 --52.80,33.60,15.08,0.00,1.00,-62.40,62.40 -129.60,-33.60,0.92,0.00,1.00,-57.60,57.60 --43.20,33.60,15.10,0.00,1.00,-52.80,52.80 -139.20,-28.80,0.90,0.00,1.00,-48.00,48.00 --33.60,28.80,15.12,0.00,1.00,-43.20,43.20 -148.80,-24.00,0.88,0.00,1.00,-38.40,38.40 --28.80,19.20,15.15,0.00,1.00,-33.60,33.60 -158.40,-19.20,0.85,0.00,1.00,-28.80,28.80 --19.20,14.40,15.17,0.00,1.00,-24.00,24.00 -163.20,-14.40,0.83,0.00,1.00,-19.20,19.20 --9.60,9.60,15.19,0.00,1.00,-14.40,14.40 -172.80,-4.80,0.81,0.00,1.00,-9.60,9.60 --4.80,4.80,15.21,0.00,1.00,-4.80,4.80 -0.00,0.00,0.79,0.00,1.00,0.00,0.00 --177.60,4.80,15.23,0.00,1.00,4.80,-4.80 -4.80,-4.80,0.77,0.00,1.00,9.60,-9.60 --168.00,9.60,15.25,0.00,1.00,14.40,-14.40 -14.40,-14.40,0.75,0.00,1.00,19.20,-19.20 --163.20,19.20,15.27,0.00,1.00,24.00,-24.00 -19.20,-19.20,0.73,0.00,1.00,28.80,-28.80 --153.60,24.00,15.30,0.00,1.00,33.60,-33.60 -28.80,-28.80,0.70,0.00,1.00,38.40,-38.40 --148.80,28.80,15.32,0.00,1.00,43.20,-43.20 -38.40,-33.60,0.68,0.00,1.00,48.00,-48.00 --139.20,33.60,15.34,0.00,1.00,52.80,-52.80 -48.00,-38.40,0.66,0.00,1.00,57.60,-57.60 --124.80,38.40,15.36,0.00,1.00,62.40,-62.40 -57.60,-43.20,0.64,0.00,1.00,67.20,-67.20 --115.20,43.20,15.38,0.00,1.00,72.00,-72.00 -72.00,-43.20,0.62,0.00,1.00,76.80,-76.80 --100.80,43.20,15.40,0.00,1.00,81.60,-81.60 -86.40,-48.00,0.60,0.00,1.00,86.40,-86.40 --86.40,48.00,15.42,0.00,1.00,91.20,-86.40 -100.80,-48.00,0.58,0.00,1.00,96.00,-81.60 --76.80,43.20,15.44,0.00,1.00,100.80,-76.80 -110.40,-43.20,0.56,0.00,1.00,105.60,-72.00 --62.40,43.20,15.47,0.00,1.00,110.40,-67.20 -124.80,-38.40,0.53,0.00,1.00,115.20,-62.40 --48.00,38.40,15.49,0.00,1.00,120.00,-57.60 -134.40,-38.40,0.51,0.00,1.00,124.80,-52.80 --38.40,33.60,15.51,0.00,1.00,129.60,-48.00 -144.00,-28.80,0.49,0.00,1.00,134.40,-43.20 --28.80,28.80,15.53,0.00,1.00,139.20,-38.40 -153.60,-24.00,0.47,0.00,1.00,144.00,-33.60 --24.00,24.00,15.55,0.00,1.00,148.80,-28.80 -163.20,-19.20,0.45,0.00,1.00,153.60,-24.00 --14.40,14.40,15.57,0.00,1.00,158.40,-19.20 -168.00,-14.40,0.43,0.00,1.00,163.20,-14.40 --9.60,9.60,15.59,0.00,1.00,168.00,-9.60 -172.80,-4.80,0.41,0.00,1.00,172.80,-4.80 --0.00,0.00,15.62,0.00,1.00,177.60,-0.00 --177.60,0.00,0.38,0.00,1.00,-177.60,0.00 -4.80,-4.80,15.64,0.00,1.00,-172.80,4.80 --172.80,9.60,0.36,0.00,1.00,-168.00,9.60 -9.60,-14.40,15.66,0.00,1.00,-163.20,14.40 --163.20,14.40,0.34,0.00,1.00,-158.40,19.20 -19.20,-19.20,15.68,0.00,1.00,-153.60,24.00 --158.40,24.00,0.32,0.00,1.00,-148.80,28.80 -28.80,-24.00,15.70,0.00,1.00,-144.00,33.60 --148.80,28.80,0.30,0.00,1.00,-139.20,38.40 -33.60,-28.80,15.72,0.00,1.00,-134.40,43.20 --139.20,33.60,0.28,0.00,1.00,-129.60,48.00 -43.20,-38.40,15.74,0.00,1.00,-124.80,52.80 --129.60,38.40,0.26,0.00,1.00,-120.00,57.60 -57.60,-38.40,15.77,0.00,1.00,-115.20,62.40 --120.00,43.20,0.23,0.00,1.00,-110.40,67.20 -67.20,-43.20,15.79,0.00,1.00,-105.60,72.00 --105.60,43.20,0.21,0.00,1.00,-100.80,76.80 -81.60,-48.00,15.81,0.00,1.00,-96.00,81.60 --91.20,48.00,0.19,0.00,1.00,-91.20,86.40 -96.00,-48.00,15.83,0.00,1.00,-86.40,86.40 --76.80,43.20,0.17,0.00,1.00,-81.60,81.60 -110.40,-43.20,15.85,0.00,1.00,-76.80,76.80 --67.20,43.20,0.15,0.00,1.00,-72.00,72.00 -120.00,-43.20,15.87,0.00,1.00,-67.20,67.20 --52.80,38.40,0.13,0.00,1.00,-62.40,62.40 -134.40,-38.40,15.89,0.00,1.00,-57.60,57.60 --43.20,33.60,0.11,0.00,1.00,-52.80,52.80 -144.00,-33.60,15.91,0.00,1.00,-48.00,48.00 --33.60,28.80,0.09,0.00,1.00,-43.20,43.20 -153.60,-28.80,15.94,0.00,1.00,-38.40,38.40 --24.00,24.00,0.06,0.00,1.00,-33.60,33.60 -158.40,-19.20,15.96,0.00,1.00,-28.80,28.80 --19.20,19.20,0.04,0.00,1.00,-24.00,24.00 -168.00,-14.40,15.98,0.00,1.00,-19.20,19.20 --9.60,9.60,0.02,0.00,1.00,-14.40,14.40 -172.80,-4.80,16.00,0.00,1.00,-9.60,9.60 --4.80,4.80,0.00,0.00,1.00,-4.80,4.80 +0.00,0.00,0.00,0.00,1.00,-0.00,0.00,0 +-177.60,-4.80,16.00,0.00,1.00,-0.00,0.00,0 +4.80,4.80,0.02,0.00,1.00,-0.00,0.00,0 +-168.00,-9.60,15.98,0.00,1.00,-0.00,0.00,0 +14.40,14.40,0.04,0.00,1.00,-0.00,0.00,0 +-163.20,-14.40,15.96,0.00,1.00,-0.00,0.00,0 +19.20,19.20,0.06,0.00,1.00,-0.00,0.00,0 +-153.60,-24.00,15.94,0.00,1.00,-0.00,0.00,0 +28.80,24.00,0.09,0.00,1.00,-0.00,0.00,0 +-148.80,-28.80,15.91,0.00,1.00,-0.00,0.00,0 +38.40,33.60,0.11,0.00,1.00,-0.00,0.00,0 +-139.20,-33.60,15.89,0.00,1.00,-0.00,0.00,0 +48.00,38.40,0.13,0.00,1.00,-0.00,0.00,0 +-124.80,-38.40,15.87,0.00,1.00,-0.00,0.00,0 +57.60,38.40,0.15,0.00,1.00,-0.00,0.00,0 +-115.20,-43.20,15.85,0.00,1.00,-0.00,0.00,0 +72.00,43.20,0.17,0.00,1.00,-0.00,0.00,0 +-100.80,-43.20,15.83,0.00,1.00,-0.00,0.00,0 +86.40,43.20,0.19,0.00,1.00,-0.00,0.00,0 +-86.40,-43.20,15.81,0.00,1.00,-177.60,0.00,0 +100.80,43.20,0.21,0.00,1.00,-177.60,0.00,0 +-76.80,-43.20,15.79,0.00,1.00,-177.60,0.00,0 +110.40,43.20,0.23,0.00,1.00,-177.60,0.00,0 +-62.40,-43.20,15.77,0.00,1.00,-177.60,0.00,0 +124.80,38.40,0.26,0.00,1.00,-177.60,0.00,0 +-52.80,-38.40,15.74,0.00,1.00,177.60,0.00,0 +134.40,33.60,0.28,0.00,1.00,177.60,0.00,0 +-38.40,-33.60,15.72,0.00,1.00,177.60,0.00,0 +144.00,28.80,0.30,0.00,1.00,177.60,0.00,0 +-33.60,-28.80,15.70,0.00,1.00,177.60,0.00,0 +153.60,24.00,0.32,0.00,1.00,177.60,0.00,0 +-24.00,-19.20,15.68,0.00,1.00,177.60,0.00,0 +158.40,19.20,0.34,0.00,1.00,177.60,0.00,0 +-14.40,-14.40,15.66,0.00,1.00,177.60,0.00,0 +168.00,9.60,0.36,0.00,1.00,177.60,0.00,0 +-9.60,-9.60,15.64,0.00,1.00,177.60,0.00,0 +172.80,4.80,0.38,0.00,1.00,177.60,0.00,0 +-0.00,-0.00,15.62,0.00,1.00,177.60,0.00,0 +-177.60,-0.00,0.41,0.00,1.00,-177.60,0.00,0 +4.80,4.80,15.59,0.00,1.00,-177.60,0.00,0 +-172.80,-9.60,0.43,0.00,1.00,-177.60,0.00,0 +14.40,9.60,15.57,0.00,1.00,-177.60,0.00,0 +-163.20,-14.40,0.45,0.00,1.00,-177.60,0.00,0 +19.20,19.20,15.55,0.00,1.00,-177.60,0.00,0 +-158.40,-19.20,0.47,0.00,1.00,-177.60,0.00,0 +28.80,24.00,15.53,0.00,1.00,-177.60,0.00,0 +-148.80,-28.80,0.49,0.00,1.00,-177.60,0.00,0 +33.60,28.80,15.51,0.00,1.00,-177.60,0.00,0 +-139.20,-33.60,0.51,0.00,1.00,-177.60,0.00,0 +43.20,33.60,15.49,0.00,1.00,-177.60,0.00,0 +-129.60,-38.40,0.53,0.00,1.00,-177.60,0.00,0 +57.60,38.40,15.47,0.00,1.00,177.60,0.00,0 +-120.00,-43.20,0.56,0.00,1.00,177.60,0.00,0 +67.20,43.20,15.44,0.00,1.00,177.60,0.00,0 +-105.60,-43.20,0.58,0.00,1.00,177.60,0.00,0 +81.60,43.20,15.42,0.00,1.00,177.60,0.00,0 +-91.20,-43.20,0.60,0.00,1.00,177.60,0.00,0 +96.00,43.20,15.40,0.00,1.00,0.00,0.00,0 +-76.80,-43.20,0.62,0.00,1.00,0.00,0.00,0 +110.40,43.20,15.38,0.00,1.00,0.00,0.00,0 +-67.20,-43.20,0.64,0.00,1.00,0.00,0.00,0 +120.00,38.40,15.36,0.00,1.00,0.00,0.00,0 +-52.80,-38.40,0.66,0.00,1.00,0.00,0.00,0 +129.60,38.40,15.34,0.00,1.00,0.00,0.00,0 +-43.20,-33.60,0.68,0.00,1.00,0.00,0.00,0 +144.00,33.60,15.32,0.00,1.00,0.00,0.00,0 +-33.60,-28.80,0.70,0.00,1.00,0.00,0.00,0 +148.80,24.00,15.30,0.00,1.00,0.00,0.00,0 +-24.00,-24.00,0.73,0.00,1.00,0.00,0.00,0 +158.40,19.20,15.27,0.00,1.00,0.00,0.00,0 +-19.20,-14.40,0.75,0.00,1.00,0.00,0.00,0 +168.00,14.40,15.25,0.00,1.00,0.00,0.00,0 +-9.60,-9.60,0.77,0.00,1.00,0.00,0.00,0 +172.80,4.80,15.23,0.00,1.00,0.00,0.00,0 +-4.80,-4.80,0.79,0.00,1.00,0.00,0.00,0 +0.00,0.00,15.21,0.00,1.00,0.00,0.00,0 +-177.60,-4.80,0.81,0.00,1.00,0.00,-0.00,0 +9.60,4.80,15.19,0.00,1.00,0.00,-0.00,0 +-168.00,-9.60,0.83,0.00,1.00,0.00,-0.00,0 +14.40,14.40,15.17,0.00,1.00,0.00,-0.00,0 +-163.20,-14.40,0.85,0.00,1.00,0.00,-0.00,0 +24.00,19.20,15.15,0.00,1.00,4.80,-0.00,0 +-153.60,-19.20,0.88,0.00,1.00,4.80,-4.80,0 +28.80,24.00,15.12,0.00,1.00,4.80,-4.80,0 +-144.00,-24.00,0.90,0.00,1.00,4.80,-4.80,0 +38.40,28.80,15.10,0.00,1.00,4.80,-4.80,0 +-134.40,-28.80,0.92,0.00,1.00,4.80,-4.80,0 +48.00,33.60,15.08,0.00,1.00,9.60,-4.80,0 +-124.80,-33.60,0.94,0.00,1.00,9.60,-4.80,0 +62.40,38.40,15.06,0.00,1.00,9.60,-4.80,0 +-115.20,-38.40,0.96,0.00,1.00,14.40,-4.80,0 +72.00,38.40,15.04,0.00,1.00,19.20,-4.80,0 +-100.80,-38.40,0.98,0.00,1.00,28.80,-4.80,0 +86.40,38.40,15.02,0.00,1.00,52.80,-4.80,0 +-86.40,-38.40,1.00,0.00,1.00,105.60,-4.80,0 +96.00,38.40,15.00,0.00,1.00,139.20,-4.80,0 +-76.80,-38.40,1.03,0.00,1.00,158.40,-4.80,0 +110.40,38.40,14.97,0.00,1.00,163.20,-4.80,0 +-62.40,-38.40,1.05,0.00,1.00,168.00,-4.80,0 +120.00,33.60,14.95,0.00,1.00,168.00,-4.80,0 +-52.80,-33.60,1.07,0.00,1.00,172.80,-4.80,0 +134.40,33.60,14.93,0.00,1.00,172.80,-4.80,0 +-43.20,-28.80,1.09,0.00,1.00,172.80,-4.80,0 +144.00,28.80,14.91,0.00,1.00,172.80,-4.80,0 +-33.60,-24.00,1.11,0.00,1.00,177.60,-4.80,0 +148.80,24.00,14.89,0.00,1.00,177.60,-4.80,0 +-24.00,-19.20,1.13,0.00,1.00,177.60,-4.80,0 +158.40,14.40,14.87,0.00,1.00,177.60,-0.00,0 +-19.20,-14.40,1.15,0.00,1.00,177.60,-0.00,0 +168.00,9.60,14.85,0.00,1.00,177.60,-0.00,0 +-9.60,-9.60,1.17,0.00,1.00,177.60,-0.00,0 +172.80,4.80,14.83,0.00,1.00,177.60,-0.00,0 +-0.00,-0.00,1.20,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,14.80,0.00,1.00,-177.60,0.00,0 +4.80,4.80,1.22,0.00,1.00,-177.60,0.00,0 +-172.80,-9.60,14.78,0.00,1.00,-177.60,0.00,0 +14.40,9.60,1.24,0.00,1.00,-177.60,0.00,0 +-163.20,-14.40,14.76,0.00,1.00,-177.60,0.00,0 +19.20,14.40,1.26,0.00,1.00,-177.60,0.00,0 +-153.60,-19.20,14.74,0.00,1.00,-177.60,4.80,0 +28.80,24.00,1.28,0.00,1.00,-177.60,4.80,0 +-148.80,-24.00,14.72,0.00,1.00,-177.60,4.80,0 +38.40,28.80,1.30,0.00,1.00,-172.80,4.80,0 +-139.20,-28.80,14.70,0.00,1.00,-172.80,4.80,0 +48.00,33.60,1.32,0.00,1.00,-172.80,4.80,0 +-124.80,-33.60,14.68,0.00,1.00,-172.80,4.80,0 +57.60,33.60,1.35,0.00,1.00,-168.00,4.80,0 +-115.20,-38.40,14.65,0.00,1.00,-168.00,4.80,0 +72.00,38.40,1.37,0.00,1.00,-163.20,4.80,0 +-105.60,-38.40,14.63,0.00,1.00,-158.40,4.80,0 +81.60,38.40,1.39,0.00,1.00,-139.20,4.80,0 +-91.20,-38.40,14.61,0.00,1.00,-105.60,4.80,0 +96.00,38.40,1.41,0.00,1.00,-52.80,4.80,0 +-76.80,-38.40,14.59,0.00,1.00,-28.80,4.80,0 +105.60,38.40,1.43,0.00,1.00,-19.20,4.80,0 +-67.20,-38.40,14.57,0.00,1.00,-14.40,4.80,0 +120.00,38.40,1.45,0.00,1.00,-9.60,4.80,0 +-57.60,-33.60,14.55,0.00,1.00,-9.60,4.80,0 +129.60,33.60,1.47,0.00,1.00,-9.60,4.80,0 +-43.20,-28.80,14.53,0.00,1.00,-4.80,4.80,0 +139.20,28.80,1.50,0.00,1.00,-4.80,4.80,0 +-33.60,-24.00,14.50,0.00,1.00,-4.80,4.80,0 +148.80,24.00,1.52,0.00,1.00,-4.80,4.80,0 +-28.80,-19.20,14.48,0.00,1.00,-4.80,4.80,0 +158.40,19.20,1.54,0.00,1.00,-4.80,0.00,0 +-19.20,-14.40,14.46,0.00,1.00,-0.00,0.00,0 +163.20,14.40,1.56,0.00,1.00,-0.00,0.00,0 +-9.60,-9.60,14.44,0.00,1.00,-0.00,0.00,0 +172.80,4.80,1.58,0.00,1.00,-0.00,0.00,0 +-4.80,-4.80,14.42,0.00,1.00,-0.00,0.00,0 +0.00,0.00,1.60,0.00,1.00,0.00,0.00,0 +-177.60,-4.80,14.40,0.00,1.00,0.00,-0.00,0 +9.60,4.80,1.62,0.00,1.00,0.00,-0.00,0 +-168.00,-9.60,14.38,0.00,1.00,4.80,-0.00,0 +14.40,9.60,1.64,0.00,1.00,4.80,-4.80,0 +-158.40,-14.40,14.36,0.00,1.00,4.80,-4.80,0 +24.00,14.40,1.67,0.00,1.00,4.80,-4.80,0 +-153.60,-19.20,14.33,0.00,1.00,4.80,-4.80,0 +33.60,19.20,1.69,0.00,1.00,9.60,-4.80,0 +-144.00,-24.00,14.31,0.00,1.00,9.60,-4.80,0 +43.20,24.00,1.71,0.00,1.00,9.60,-4.80,0 +-134.40,-28.80,14.29,0.00,1.00,14.40,-9.60,0 +52.80,28.80,1.73,0.00,1.00,14.40,-9.60,0 +-124.80,-28.80,14.27,0.00,1.00,19.20,-9.60,0 +62.40,33.60,1.75,0.00,1.00,24.00,-9.60,0 +-110.40,-33.60,14.25,0.00,1.00,28.80,-9.60,0 +72.00,33.60,1.77,0.00,1.00,33.60,-9.60,0 +-100.80,-33.60,14.23,0.00,1.00,48.00,-9.60,0 +86.40,33.60,1.79,0.00,1.00,67.20,-9.60,0 +-86.40,-33.60,14.21,0.00,1.00,96.00,-9.60,0 +96.00,33.60,1.82,0.00,1.00,120.00,-9.60,0 +-76.80,-33.60,14.18,0.00,1.00,139.20,-9.60,0 +110.40,33.60,1.84,0.00,1.00,148.80,-9.60,0 +-67.20,-33.60,14.16,0.00,1.00,153.60,-9.60,0 +120.00,33.60,1.86,0.00,1.00,158.40,-9.60,0 +-52.80,-28.80,14.14,0.00,1.00,163.20,-9.60,0 +129.60,28.80,1.88,0.00,1.00,168.00,-9.60,0 +-43.20,-28.80,14.12,0.00,1.00,168.00,-9.60,0 +139.20,24.00,1.90,0.00,1.00,168.00,-4.80,0 +-33.60,-24.00,14.10,0.00,1.00,172.80,-4.80,0 +148.80,19.20,1.92,0.00,1.00,172.80,-4.80,0 +-24.00,-19.20,14.08,0.00,1.00,172.80,-4.80,0 +158.40,14.40,1.94,0.00,1.00,177.60,-4.80,0 +-19.20,-14.40,14.06,0.00,1.00,177.60,-4.80,0 +168.00,9.60,1.97,0.00,1.00,177.60,-4.80,0 +-9.60,-4.80,14.03,0.00,1.00,177.60,-0.00,0 +172.80,4.80,1.99,0.00,1.00,177.60,-0.00,0 +-0.00,-0.00,14.01,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,2.01,0.00,1.00,-177.60,0.00,0 +4.80,4.80,13.99,0.00,1.00,-177.60,0.00,0 +-168.00,-4.80,2.03,0.00,1.00,-177.60,0.00,0 +14.40,9.60,13.97,0.00,1.00,-177.60,4.80,0 +-163.20,-14.40,2.05,0.00,1.00,-177.60,4.80,0 +24.00,14.40,13.95,0.00,1.00,-177.60,4.80,0 +-153.60,-19.20,2.07,0.00,1.00,-172.80,4.80,0 +28.80,19.20,13.93,0.00,1.00,-172.80,4.80,0 +-144.00,-24.00,2.09,0.00,1.00,-172.80,4.80,0 +38.40,24.00,13.91,0.00,1.00,-168.00,4.80,0 +-134.40,-28.80,2.11,0.00,1.00,-168.00,9.60,0 +48.00,28.80,13.89,0.00,1.00,-168.00,9.60,0 +-124.80,-28.80,2.14,0.00,1.00,-163.20,9.60,0 +62.40,33.60,13.86,0.00,1.00,-158.40,9.60,0 +-115.20,-33.60,2.16,0.00,1.00,-153.60,9.60,0 +72.00,33.60,13.84,0.00,1.00,-148.80,9.60,0 +-100.80,-33.60,2.18,0.00,1.00,-139.20,9.60,0 +81.60,33.60,13.82,0.00,1.00,-120.00,9.60,0 +-91.20,-33.60,2.20,0.00,1.00,-96.00,9.60,0 +96.00,33.60,13.80,0.00,1.00,-67.20,9.60,0 +-81.60,-33.60,2.22,0.00,1.00,-48.00,9.60,0 +105.60,33.60,13.78,0.00,1.00,-33.60,9.60,0 +-67.20,-33.60,2.24,0.00,1.00,-28.80,9.60,0 +115.20,33.60,13.76,0.00,1.00,-24.00,9.60,0 +-57.60,-28.80,2.26,0.00,1.00,-19.20,9.60,0 +129.60,28.80,13.74,0.00,1.00,-14.40,9.60,0 +-48.00,-28.80,2.29,0.00,1.00,-14.40,9.60,0 +139.20,24.00,13.71,0.00,1.00,-9.60,4.80,0 +-38.40,-24.00,2.31,0.00,1.00,-9.60,4.80,0 +148.80,19.20,13.69,0.00,1.00,-9.60,4.80,0 +-28.80,-19.20,2.33,0.00,1.00,-4.80,4.80,0 +153.60,14.40,13.67,0.00,1.00,-4.80,4.80,0 +-19.20,-14.40,2.35,0.00,1.00,-4.80,4.80,0 +163.20,9.60,13.65,0.00,1.00,-4.80,4.80,0 +-9.60,-9.60,2.37,0.00,1.00,-4.80,0.00,0 +172.80,4.80,13.63,0.00,1.00,-0.00,0.00,0 +-4.80,-4.80,2.39,0.00,1.00,-0.00,0.00,0 +0.00,0.00,13.61,0.00,1.00,0.00,0.00,0 +-177.60,-4.80,2.41,0.00,1.00,0.00,-0.00,0 +9.60,4.80,13.59,0.00,1.00,4.80,-0.00,0 +-168.00,-9.60,2.44,0.00,1.00,4.80,-4.80,0 +14.40,9.60,13.56,0.00,1.00,4.80,-4.80,0 +-158.40,-9.60,2.46,0.00,1.00,4.80,-4.80,0 +24.00,14.40,13.54,0.00,1.00,9.60,-4.80,0 +-148.80,-14.40,2.48,0.00,1.00,9.60,-9.60,0 +33.60,19.20,13.52,0.00,1.00,9.60,-9.60,0 +-139.20,-19.20,2.50,0.00,1.00,14.40,-9.60,0 +43.20,24.00,13.50,0.00,1.00,14.40,-9.60,0 +-129.60,-24.00,2.52,0.00,1.00,19.20,-9.60,0 +52.80,24.00,13.48,0.00,1.00,19.20,-14.40,0 +-120.00,-28.80,2.54,0.00,1.00,24.00,-14.40,0 +62.40,28.80,13.46,0.00,1.00,28.80,-14.40,0 +-110.40,-28.80,2.56,0.00,1.00,38.40,-14.40,0 +76.80,28.80,13.44,0.00,1.00,48.00,-14.40,0 +-100.80,-28.80,2.58,0.00,1.00,57.60,-14.40,0 +86.40,28.80,13.42,0.00,1.00,76.80,-14.40,0 +-86.40,-28.80,2.61,0.00,1.00,96.00,-14.40,0 +96.00,28.80,13.39,0.00,1.00,115.20,-14.40,0 +-76.80,-28.80,2.63,0.00,1.00,129.60,-14.40,0 +105.60,28.80,13.37,0.00,1.00,139.20,-14.40,0 +-67.20,-28.80,2.65,0.00,1.00,144.00,-14.40,0 +120.00,28.80,13.35,0.00,1.00,153.60,-14.40,0 +-57.60,-24.00,2.67,0.00,1.00,158.40,-14.40,0 +129.60,24.00,13.33,0.00,1.00,158.40,-9.60,0 +-48.00,-24.00,2.69,0.00,1.00,163.20,-9.60,0 +139.20,19.20,13.31,0.00,1.00,168.00,-9.60,0 +-38.40,-19.20,2.71,0.00,1.00,168.00,-9.60,0 +148.80,19.20,13.29,0.00,1.00,168.00,-9.60,0 +-28.80,-14.40,2.73,0.00,1.00,172.80,-9.60,0 +158.40,14.40,13.27,0.00,1.00,172.80,-4.80,0 +-19.20,-9.60,2.76,0.00,1.00,172.80,-4.80,0 +163.20,9.60,13.24,0.00,1.00,177.60,-4.80,0 +-9.60,-4.80,2.78,0.00,1.00,177.60,-4.80,0 +172.80,4.80,13.22,0.00,1.00,177.60,-0.00,0 +-0.00,-0.00,2.80,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,13.20,0.00,1.00,-177.60,0.00,0 +4.80,4.80,2.82,0.00,1.00,-177.60,0.00,0 +-168.00,-4.80,13.18,0.00,1.00,-177.60,4.80,0 +14.40,9.60,2.84,0.00,1.00,-177.60,4.80,0 +-163.20,-9.60,13.16,0.00,1.00,-172.80,4.80,0 +24.00,14.40,2.86,0.00,1.00,-172.80,4.80,0 +-153.60,-14.40,13.14,0.00,1.00,-172.80,9.60,0 +33.60,19.20,2.88,0.00,1.00,-168.00,9.60,0 +-144.00,-19.20,13.12,0.00,1.00,-168.00,9.60,0 +43.20,19.20,2.91,0.00,1.00,-168.00,9.60,0 +-134.40,-24.00,13.09,0.00,1.00,-163.20,9.60,0 +52.80,24.00,2.93,0.00,1.00,-158.40,9.60,0 +-124.80,-24.00,13.07,0.00,1.00,-158.40,14.40,0 +62.40,28.80,2.95,0.00,1.00,-153.60,14.40,0 +-115.20,-28.80,13.05,0.00,1.00,-144.00,14.40,0 +72.00,28.80,2.97,0.00,1.00,-139.20,14.40,0 +-100.80,-28.80,13.03,0.00,1.00,-129.60,14.40,0 +81.60,28.80,2.99,0.00,1.00,-115.20,14.40,0 +-91.20,-28.80,13.01,0.00,1.00,-96.00,14.40,0 +96.00,28.80,3.01,0.00,1.00,-76.80,14.40,0 +-81.60,-28.80,12.99,0.00,1.00,-57.60,14.40,0 +105.60,28.80,3.03,0.00,1.00,-48.00,14.40,0 +-67.20,-28.80,12.97,0.00,1.00,-38.40,14.40,0 +115.20,28.80,3.05,0.00,1.00,-28.80,14.40,0 +-57.60,-28.80,12.95,0.00,1.00,-24.00,14.40,0 +124.80,24.00,3.08,0.00,1.00,-19.20,14.40,0 +-48.00,-24.00,12.92,0.00,1.00,-19.20,9.60,0 +134.40,24.00,3.10,0.00,1.00,-14.40,9.60,0 +-38.40,-19.20,12.90,0.00,1.00,-14.40,9.60,0 +144.00,19.20,3.12,0.00,1.00,-9.60,9.60,0 +-28.80,-14.40,12.88,0.00,1.00,-9.60,9.60,0 +153.60,14.40,3.14,0.00,1.00,-9.60,4.80,0 +-19.20,-9.60,12.86,0.00,1.00,-4.80,4.80,0 +163.20,9.60,3.16,0.00,1.00,-4.80,4.80,0 +-14.40,-9.60,12.84,0.00,1.00,-4.80,4.80,0 +172.80,4.80,3.18,0.00,1.00,-4.80,0.00,0 +-4.80,-4.80,12.82,0.00,1.00,-0.00,0.00,0 +0.00,0.00,3.20,0.00,1.00,0.00,0.00,0 +-177.60,-0.00,12.80,0.00,1.00,0.00,-0.00,0 +9.60,4.80,3.23,0.00,1.00,4.80,-4.80,0 +-168.00,-4.80,12.77,0.00,1.00,4.80,-4.80,0 +19.20,9.60,3.25,0.00,1.00,4.80,-4.80,0 +-158.40,-9.60,12.75,0.00,1.00,9.60,-9.60,0 +24.00,14.40,3.27,0.00,1.00,9.60,-9.60,0 +-148.80,-14.40,12.73,0.00,1.00,14.40,-9.60,0 +33.60,14.40,3.29,0.00,1.00,14.40,-9.60,0 +-139.20,-19.20,12.71,0.00,1.00,19.20,-14.40,0 +43.20,19.20,3.31,0.00,1.00,19.20,-14.40,0 +-129.60,-19.20,12.69,0.00,1.00,24.00,-14.40,0 +52.80,19.20,3.33,0.00,1.00,28.80,-14.40,0 +-120.00,-24.00,12.67,0.00,1.00,33.60,-19.20,0 +67.20,24.00,3.35,0.00,1.00,38.40,-19.20,0 +-110.40,-24.00,12.65,0.00,1.00,43.20,-19.20,0 +76.80,24.00,3.38,0.00,1.00,52.80,-19.20,0 +-100.80,-24.00,12.62,0.00,1.00,67.20,-19.20,0 +86.40,24.00,3.40,0.00,1.00,76.80,-19.20,0 +-86.40,-24.00,12.60,0.00,1.00,96.00,-19.20,0 +96.00,24.00,3.42,0.00,1.00,105.60,-19.20,0 +-76.80,-24.00,12.58,0.00,1.00,120.00,-19.20,0 +105.60,24.00,3.44,0.00,1.00,129.60,-19.20,0 +-67.20,-24.00,12.56,0.00,1.00,139.20,-19.20,0 +115.20,24.00,3.46,0.00,1.00,144.00,-19.20,0 +-57.60,-24.00,12.54,0.00,1.00,148.80,-14.40,0 +129.60,19.20,3.48,0.00,1.00,153.60,-14.40,0 +-48.00,-19.20,12.52,0.00,1.00,158.40,-14.40,0 +139.20,19.20,3.50,0.00,1.00,163.20,-14.40,0 +-38.40,-14.40,12.50,0.00,1.00,163.20,-14.40,0 +148.80,14.40,3.52,0.00,1.00,168.00,-9.60,0 +-28.80,-14.40,12.48,0.00,1.00,168.00,-9.60,0 +153.60,9.60,3.55,0.00,1.00,172.80,-9.60,0 +-19.20,-9.60,12.45,0.00,1.00,172.80,-4.80,0 +163.20,9.60,3.57,0.00,1.00,172.80,-4.80,0 +-9.60,-4.80,12.43,0.00,1.00,177.60,-4.80,0 +172.80,4.80,3.59,0.00,1.00,177.60,-0.00,0 +-0.00,-0.00,12.41,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,3.61,0.00,1.00,-177.60,0.00,0 +4.80,4.80,12.39,0.00,1.00,-177.60,0.00,0 +-168.00,-4.80,3.63,0.00,1.00,-177.60,4.80,0 +14.40,9.60,12.37,0.00,1.00,-172.80,4.80,0 +-158.40,-9.60,3.65,0.00,1.00,-172.80,4.80,0 +24.00,9.60,12.35,0.00,1.00,-172.80,9.60,0 +-153.60,-14.40,3.67,0.00,1.00,-168.00,9.60,0 +33.60,14.40,12.33,0.00,1.00,-168.00,9.60,0 +-144.00,-14.40,3.70,0.00,1.00,-163.20,14.40,0 +43.20,19.20,12.30,0.00,1.00,-163.20,14.40,0 +-134.40,-19.20,3.72,0.00,1.00,-158.40,14.40,0 +52.80,19.20,12.28,0.00,1.00,-153.60,14.40,0 +-124.80,-24.00,3.74,0.00,1.00,-148.80,14.40,0 +62.40,24.00,12.26,0.00,1.00,-144.00,19.20,0 +-110.40,-24.00,3.76,0.00,1.00,-139.20,19.20,0 +72.00,24.00,12.24,0.00,1.00,-129.60,19.20,0 +-100.80,-24.00,3.78,0.00,1.00,-120.00,19.20,0 +81.60,24.00,12.22,0.00,1.00,-105.60,19.20,0 +-91.20,-24.00,3.80,0.00,1.00,-96.00,19.20,0 +96.00,24.00,12.20,0.00,1.00,-76.80,19.20,0 +-81.60,-24.00,3.82,0.00,1.00,-67.20,19.20,0 +105.60,24.00,12.18,0.00,1.00,-52.80,19.20,0 +-72.00,-24.00,3.85,0.00,1.00,-43.20,19.20,0 +115.20,24.00,12.15,0.00,1.00,-38.40,19.20,0 +-57.60,-24.00,3.87,0.00,1.00,-33.60,19.20,0 +124.80,19.20,12.13,0.00,1.00,-28.80,14.40,0 +-48.00,-19.20,3.89,0.00,1.00,-24.00,14.40,0 +134.40,19.20,12.11,0.00,1.00,-19.20,14.40,0 +-38.40,-19.20,3.91,0.00,1.00,-19.20,14.40,0 +144.00,14.40,12.09,0.00,1.00,-14.40,9.60,0 +-28.80,-14.40,3.93,0.00,1.00,-14.40,9.60,0 +153.60,14.40,12.07,0.00,1.00,-9.60,9.60,0 +-24.00,-9.60,3.95,0.00,1.00,-9.60,9.60,0 +163.20,9.60,12.05,0.00,1.00,-4.80,4.80,0 +-14.40,-4.80,3.97,0.00,1.00,-4.80,4.80,0 +172.80,4.80,12.03,0.00,1.00,-4.80,4.80,0 +-4.80,-0.00,3.99,0.00,1.00,-0.00,0.00,0 +0.00,0.00,12.01,0.00,1.00,0.00,0.00,0 +-177.60,-0.00,4.02,0.00,1.00,0.00,-0.00,0 +9.60,4.80,11.98,0.00,1.00,4.80,-4.80,0 +-168.00,-4.80,4.04,0.00,1.00,4.80,-4.80,0 +19.20,4.80,11.96,0.00,1.00,9.60,-9.60,0 +-158.40,-9.60,4.06,0.00,1.00,9.60,-9.60,0 +28.80,9.60,11.94,0.00,1.00,14.40,-9.60,0 +-148.80,-9.60,4.08,0.00,1.00,14.40,-14.40,0 +38.40,14.40,11.92,0.00,1.00,19.20,-14.40,0 +-139.20,-14.40,4.10,0.00,1.00,19.20,-14.40,0 +48.00,14.40,11.90,0.00,1.00,24.00,-19.20,0 +-129.60,-14.40,4.12,0.00,1.00,28.80,-19.20,0 +57.60,19.20,11.88,0.00,1.00,33.60,-19.20,0 +-120.00,-19.20,4.14,0.00,1.00,38.40,-19.20,0 +67.20,19.20,11.86,0.00,1.00,43.20,-24.00,0 +-110.40,-19.20,4.17,0.00,1.00,52.80,-24.00,0 +76.80,19.20,11.83,0.00,1.00,62.40,-24.00,0 +-100.80,-19.20,4.19,0.00,1.00,72.00,-24.00,0 +86.40,19.20,11.81,0.00,1.00,81.60,-24.00,0 +-86.40,-19.20,4.21,0.00,1.00,91.20,-24.00,0 +96.00,19.20,11.79,0.00,1.00,105.60,-24.00,0 +-76.80,-19.20,4.23,0.00,1.00,115.20,-24.00,0 +105.60,19.20,11.77,0.00,1.00,124.80,-24.00,0 +-67.20,-19.20,4.25,0.00,1.00,134.40,-24.00,0 +115.20,19.20,11.75,0.00,1.00,139.20,-19.20,0 +-57.60,-19.20,4.27,0.00,1.00,144.00,-19.20,0 +124.80,19.20,11.73,0.00,1.00,148.80,-19.20,0 +-48.00,-14.40,4.29,0.00,1.00,153.60,-19.20,0 +134.40,14.40,11.71,0.00,1.00,158.40,-19.20,0 +-38.40,-14.40,4.32,0.00,1.00,158.40,-14.40,0 +144.00,14.40,11.68,0.00,1.00,163.20,-14.40,0 +-28.80,-9.60,4.34,0.00,1.00,168.00,-14.40,0 +153.60,9.60,11.66,0.00,1.00,168.00,-9.60,0 +-19.20,-9.60,4.36,0.00,1.00,172.80,-9.60,0 +163.20,4.80,11.64,0.00,1.00,172.80,-4.80,0 +-9.60,-4.80,4.38,0.00,1.00,172.80,-4.80,0 +172.80,4.80,11.62,0.00,1.00,177.60,-4.80,0 +-0.00,-0.00,4.40,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,11.60,0.00,1.00,-177.60,0.00,0 +4.80,4.80,4.42,0.00,1.00,-177.60,4.80,0 +-168.00,-4.80,11.58,0.00,1.00,-172.80,4.80,0 +14.40,4.80,4.44,0.00,1.00,-172.80,4.80,0 +-158.40,-9.60,11.56,0.00,1.00,-172.80,9.60,0 +24.00,9.60,4.46,0.00,1.00,-168.00,9.60,0 +-148.80,-9.60,11.54,0.00,1.00,-168.00,14.40,0 +33.60,14.40,4.49,0.00,1.00,-163.20,14.40,0 +-139.20,-14.40,11.51,0.00,1.00,-158.40,14.40,0 +43.20,14.40,4.51,0.00,1.00,-158.40,19.20,0 +-129.60,-14.40,11.49,0.00,1.00,-153.60,19.20,0 +52.80,19.20,4.53,0.00,1.00,-148.80,19.20,0 +-120.00,-19.20,11.47,0.00,1.00,-144.00,19.20,0 +62.40,19.20,4.55,0.00,1.00,-139.20,19.20,0 +-110.40,-19.20,11.45,0.00,1.00,-134.40,24.00,0 +72.00,19.20,4.57,0.00,1.00,-124.80,24.00,0 +-100.80,-19.20,11.43,0.00,1.00,-115.20,24.00,0 +81.60,19.20,4.59,0.00,1.00,-105.60,24.00,0 +-91.20,-19.20,11.41,0.00,1.00,-91.20,24.00,0 +96.00,19.20,4.61,0.00,1.00,-81.60,24.00,0 +-81.60,-19.20,11.39,0.00,1.00,-72.00,24.00,0 +105.60,19.20,4.64,0.00,1.00,-62.40,24.00,0 +-72.00,-19.20,11.36,0.00,1.00,-52.80,24.00,0 +115.20,19.20,4.66,0.00,1.00,-43.20,24.00,0 +-62.40,-19.20,11.34,0.00,1.00,-38.40,19.20,0 +124.80,19.20,4.68,0.00,1.00,-33.60,19.20,0 +-52.80,-14.40,11.32,0.00,1.00,-28.80,19.20,0 +134.40,14.40,4.70,0.00,1.00,-24.00,19.20,0 +-43.20,-14.40,11.30,0.00,1.00,-19.20,14.40,0 +144.00,14.40,4.72,0.00,1.00,-19.20,14.40,0 +-33.60,-9.60,11.28,0.00,1.00,-14.40,14.40,0 +153.60,9.60,4.74,0.00,1.00,-14.40,9.60,0 +-24.00,-9.60,11.26,0.00,1.00,-9.60,9.60,0 +163.20,4.80,4.76,0.00,1.00,-9.60,9.60,0 +-14.40,-4.80,11.24,0.00,1.00,-4.80,4.80,0 +172.80,4.80,4.79,0.00,1.00,-4.80,4.80,0 +-4.80,-0.00,11.21,0.00,1.00,-0.00,0.00,0 +0.00,0.00,4.81,0.00,1.00,0.00,0.00,0 +-177.60,-0.00,11.19,0.00,1.00,0.00,-0.00,0 +9.60,4.80,4.83,0.00,1.00,4.80,-4.80,0 +-168.00,-4.80,11.17,0.00,1.00,4.80,-4.80,0 +19.20,4.80,4.85,0.00,1.00,9.60,-9.60,0 +-158.40,-4.80,11.15,0.00,1.00,14.40,-9.60,0 +28.80,9.60,4.87,0.00,1.00,14.40,-14.40,0 +-148.80,-9.60,11.13,0.00,1.00,19.20,-14.40,0 +38.40,9.60,4.89,0.00,1.00,19.20,-19.20,0 +-139.20,-9.60,11.11,0.00,1.00,24.00,-19.20,0 +48.00,9.60,4.91,0.00,1.00,28.80,-19.20,0 +-129.60,-14.40,11.09,0.00,1.00,33.60,-24.00,0 +57.60,14.40,4.93,0.00,1.00,38.40,-24.00,0 +-120.00,-14.40,11.07,0.00,1.00,43.20,-24.00,0 +67.20,14.40,4.96,0.00,1.00,48.00,-24.00,0 +-110.40,-14.40,11.04,0.00,1.00,57.60,-28.80,0 +76.80,14.40,4.98,0.00,1.00,62.40,-28.80,0 +-100.80,-14.40,11.02,0.00,1.00,72.00,-28.80,0 +86.40,14.40,5.00,0.00,1.00,81.60,-28.80,0 +-86.40,-14.40,11.00,0.00,1.00,91.20,-28.80,0 +96.00,14.40,5.02,0.00,1.00,100.80,-28.80,0 +-76.80,-14.40,10.98,0.00,1.00,110.40,-28.80,0 +105.60,14.40,5.04,0.00,1.00,120.00,-28.80,0 +-67.20,-14.40,10.96,0.00,1.00,129.60,-28.80,0 +115.20,14.40,5.06,0.00,1.00,134.40,-24.00,0 +-57.60,-14.40,10.94,0.00,1.00,139.20,-24.00,0 +124.80,14.40,5.08,0.00,1.00,144.00,-24.00,0 +-48.00,-14.40,10.92,0.00,1.00,148.80,-24.00,0 +134.40,9.60,5.11,0.00,1.00,153.60,-19.20,0 +-38.40,-9.60,10.89,0.00,1.00,158.40,-19.20,0 +144.00,9.60,5.13,0.00,1.00,158.40,-14.40,0 +-28.80,-9.60,10.87,0.00,1.00,163.20,-14.40,0 +153.60,4.80,5.15,0.00,1.00,168.00,-14.40,0 +-19.20,-4.80,10.85,0.00,1.00,168.00,-9.60,0 +163.20,4.80,5.17,0.00,1.00,172.80,-9.60,0 +-9.60,-4.80,10.83,0.00,1.00,172.80,-4.80,0 +172.80,0.00,5.19,0.00,1.00,177.60,-4.80,0 +-0.00,-0.00,10.81,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,5.21,0.00,1.00,-177.60,0.00,0 +4.80,0.00,10.79,0.00,1.00,-177.60,4.80,0 +-168.00,-4.80,5.23,0.00,1.00,-172.80,4.80,0 +14.40,4.80,10.77,0.00,1.00,-172.80,9.60,0 +-158.40,-4.80,5.26,0.00,1.00,-168.00,9.60,0 +24.00,4.80,10.74,0.00,1.00,-168.00,14.40,0 +-148.80,-9.60,5.28,0.00,1.00,-163.20,14.40,0 +33.60,9.60,10.72,0.00,1.00,-158.40,14.40,0 +-139.20,-9.60,5.30,0.00,1.00,-158.40,19.20,0 +43.20,9.60,10.70,0.00,1.00,-153.60,19.20,0 +-129.60,-14.40,5.32,0.00,1.00,-148.80,24.00,0 +52.80,14.40,10.68,0.00,1.00,-144.00,24.00,0 +-120.00,-14.40,5.34,0.00,1.00,-139.20,24.00,0 +62.40,14.40,10.66,0.00,1.00,-134.40,24.00,0 +-110.40,-14.40,5.36,0.00,1.00,-129.60,28.80,0 +72.00,14.40,10.64,0.00,1.00,-120.00,28.80,0 +-100.80,-14.40,5.38,0.00,1.00,-110.40,28.80,0 +81.60,14.40,10.62,0.00,1.00,-100.80,28.80,0 +-91.20,-14.40,5.40,0.00,1.00,-91.20,28.80,0 +96.00,14.40,10.60,0.00,1.00,-81.60,28.80,0 +-81.60,-14.40,5.43,0.00,1.00,-72.00,28.80,0 +105.60,14.40,10.57,0.00,1.00,-62.40,28.80,0 +-72.00,-14.40,5.45,0.00,1.00,-57.60,28.80,0 +115.20,14.40,10.55,0.00,1.00,-48.00,24.00,0 +-62.40,-14.40,5.47,0.00,1.00,-43.20,24.00,0 +124.80,14.40,10.53,0.00,1.00,-38.40,24.00,0 +-52.80,-14.40,5.49,0.00,1.00,-33.60,24.00,0 +134.40,9.60,10.51,0.00,1.00,-28.80,19.20,0 +-43.20,-9.60,5.51,0.00,1.00,-24.00,19.20,0 +144.00,9.60,10.49,0.00,1.00,-19.20,19.20,0 +-33.60,-9.60,5.53,0.00,1.00,-19.20,14.40,0 +153.60,9.60,10.47,0.00,1.00,-14.40,14.40,0 +-24.00,-4.80,5.55,0.00,1.00,-14.40,9.60,0 +163.20,4.80,10.45,0.00,1.00,-9.60,9.60,0 +-14.40,-4.80,5.58,0.00,1.00,-4.80,4.80,0 +172.80,4.80,10.42,0.00,1.00,-4.80,4.80,0 +-4.80,-0.00,5.60,0.00,1.00,-0.00,0.00,0 +0.00,0.00,10.40,0.00,1.00,0.00,0.00,0 +-177.60,-0.00,5.62,0.00,1.00,4.80,-4.80,0 +9.60,0.00,10.38,0.00,1.00,4.80,-4.80,0 +-168.00,-4.80,5.64,0.00,1.00,9.60,-9.60,0 +19.20,4.80,10.36,0.00,1.00,9.60,-9.60,0 +-158.40,-4.80,5.66,0.00,1.00,14.40,-14.40,0 +28.80,4.80,10.34,0.00,1.00,19.20,-14.40,0 +-148.80,-4.80,5.68,0.00,1.00,19.20,-19.20,0 +38.40,4.80,10.32,0.00,1.00,24.00,-19.20,0 +-139.20,-9.60,5.70,0.00,1.00,28.80,-24.00,0 +48.00,9.60,10.30,0.00,1.00,33.60,-24.00,0 +-129.60,-9.60,5.72,0.00,1.00,38.40,-24.00,0 +57.60,9.60,10.28,0.00,1.00,43.20,-28.80,0 +-120.00,-9.60,5.75,0.00,1.00,48.00,-28.80,0 +67.20,9.60,10.25,0.00,1.00,52.80,-28.80,0 +-110.40,-9.60,5.77,0.00,1.00,57.60,-33.60,0 +76.80,9.60,10.23,0.00,1.00,67.20,-33.60,0 +-100.80,-9.60,5.79,0.00,1.00,76.80,-33.60,0 +86.40,9.60,10.21,0.00,1.00,81.60,-33.60,0 +-86.40,-9.60,5.81,0.00,1.00,91.20,-33.60,0 +96.00,9.60,10.19,0.00,1.00,100.80,-33.60,0 +-76.80,-9.60,5.83,0.00,1.00,110.40,-33.60,0 +105.60,9.60,10.17,0.00,1.00,115.20,-33.60,0 +-67.20,-9.60,5.85,0.00,1.00,124.80,-33.60,0 +115.20,9.60,10.15,0.00,1.00,129.60,-28.80,0 +-57.60,-9.60,5.87,0.00,1.00,134.40,-28.80,0 +124.80,9.60,10.13,0.00,1.00,139.20,-28.80,0 +-48.00,-9.60,5.90,0.00,1.00,144.00,-24.00,0 +134.40,9.60,10.10,0.00,1.00,148.80,-24.00,0 +-38.40,-9.60,5.92,0.00,1.00,153.60,-19.20,0 +144.00,4.80,10.08,0.00,1.00,158.40,-19.20,0 +-28.80,-4.80,5.94,0.00,1.00,163.20,-14.40,0 +153.60,4.80,10.06,0.00,1.00,163.20,-14.40,0 +-19.20,-4.80,5.96,0.00,1.00,168.00,-9.60,0 +163.20,4.80,10.04,0.00,1.00,172.80,-9.60,0 +-9.60,-0.00,5.98,0.00,1.00,172.80,-4.80,0 +172.80,0.00,10.02,0.00,1.00,177.60,-4.80,0 +-0.00,-0.00,6.00,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,10.00,0.00,1.00,-177.60,0.00,0 +4.80,0.00,6.02,0.00,1.00,-177.60,4.80,0 +-168.00,-0.00,9.98,0.00,1.00,-172.80,4.80,0 +14.40,4.80,6.05,0.00,1.00,-172.80,9.60,0 +-158.40,-4.80,9.95,0.00,1.00,-168.00,9.60,0 +24.00,4.80,6.07,0.00,1.00,-163.20,14.40,0 +-148.80,-4.80,9.93,0.00,1.00,-163.20,14.40,0 +33.60,4.80,6.09,0.00,1.00,-158.40,19.20,0 +-139.20,-9.60,9.91,0.00,1.00,-153.60,19.20,0 +43.20,9.60,6.11,0.00,1.00,-148.80,24.00,0 +-129.60,-9.60,9.89,0.00,1.00,-144.00,24.00,0 +52.80,9.60,6.13,0.00,1.00,-139.20,28.80,0 +-120.00,-9.60,9.87,0.00,1.00,-134.40,28.80,0 +62.40,9.60,6.15,0.00,1.00,-129.60,28.80,0 +-110.40,-9.60,9.85,0.00,1.00,-124.80,33.60,0 +72.00,9.60,6.17,0.00,1.00,-115.20,33.60,0 +-100.80,-9.60,9.83,0.00,1.00,-110.40,33.60,0 +81.60,9.60,6.19,0.00,1.00,-100.80,33.60,0 +-91.20,-9.60,9.81,0.00,1.00,-91.20,33.60,0 +96.00,9.60,6.22,0.00,1.00,-81.60,33.60,0 +-81.60,-9.60,9.78,0.00,1.00,-76.80,33.60,0 +105.60,9.60,6.24,0.00,1.00,-67.20,33.60,0 +-72.00,-9.60,9.76,0.00,1.00,-57.60,33.60,0 +115.20,9.60,6.26,0.00,1.00,-52.80,28.80,0 +-62.40,-9.60,9.74,0.00,1.00,-48.00,28.80,0 +124.80,9.60,6.28,0.00,1.00,-43.20,28.80,0 +-52.80,-9.60,9.72,0.00,1.00,-38.40,24.00,0 +134.40,9.60,6.30,0.00,1.00,-33.60,24.00,0 +-43.20,-9.60,9.70,0.00,1.00,-28.80,24.00,0 +144.00,4.80,6.32,0.00,1.00,-24.00,19.20,0 +-33.60,-4.80,9.68,0.00,1.00,-19.20,19.20,0 +153.60,4.80,6.34,0.00,1.00,-19.20,14.40,0 +-24.00,-4.80,9.66,0.00,1.00,-14.40,14.40,0 +163.20,4.80,6.37,0.00,1.00,-9.60,9.60,0 +-14.40,-4.80,9.63,0.00,1.00,-9.60,9.60,0 +172.80,0.00,6.39,0.00,1.00,-4.80,4.80,0 +-4.80,-0.00,9.61,0.00,1.00,-4.80,4.80,0 +0.00,0.00,6.41,0.00,1.00,0.00,0.00,0 +-177.60,-0.00,9.59,0.00,1.00,4.80,-4.80,0 +9.60,0.00,6.43,0.00,1.00,4.80,-4.80,0 +-168.00,-0.00,9.57,0.00,1.00,9.60,-9.60,0 +19.20,0.00,6.45,0.00,1.00,14.40,-9.60,0 +-158.40,-4.80,9.55,0.00,1.00,14.40,-14.40,0 +28.80,4.80,6.47,0.00,1.00,19.20,-19.20,0 +-148.80,-4.80,9.53,0.00,1.00,24.00,-19.20,0 +38.40,4.80,6.49,0.00,1.00,24.00,-24.00,0 +-139.20,-4.80,9.51,0.00,1.00,28.80,-24.00,0 +48.00,4.80,6.52,0.00,1.00,33.60,-28.80,0 +-129.60,-4.80,9.48,0.00,1.00,38.40,-28.80,0 +57.60,4.80,6.54,0.00,1.00,43.20,-33.60,0 +-120.00,-4.80,9.46,0.00,1.00,48.00,-33.60,0 +67.20,4.80,6.56,0.00,1.00,57.60,-33.60,0 +-110.40,-4.80,9.44,0.00,1.00,62.40,-38.40,0 +76.80,4.80,6.58,0.00,1.00,67.20,-38.40,0 +-100.80,-4.80,9.42,0.00,1.00,76.80,-38.40,0 +86.40,4.80,6.60,0.00,1.00,86.40,-38.40,0 +-86.40,-4.80,9.40,0.00,1.00,91.20,-38.40,0 +96.00,4.80,6.62,0.00,1.00,100.80,-38.40,0 +-76.80,-4.80,9.38,0.00,1.00,105.60,-38.40,0 +105.60,4.80,6.64,0.00,1.00,115.20,-38.40,0 +-67.20,-4.80,9.36,0.00,1.00,120.00,-33.60,0 +115.20,4.80,6.66,0.00,1.00,124.80,-33.60,0 +-57.60,-4.80,9.34,0.00,1.00,134.40,-33.60,0 +124.80,4.80,6.69,0.00,1.00,139.20,-28.80,0 +-48.00,-4.80,9.31,0.00,1.00,144.00,-28.80,0 +134.40,4.80,6.71,0.00,1.00,148.80,-24.00,0 +-38.40,-4.80,9.29,0.00,1.00,153.60,-24.00,0 +144.00,4.80,6.73,0.00,1.00,153.60,-19.20,0 +-28.80,-4.80,9.27,0.00,1.00,158.40,-19.20,0 +153.60,4.80,6.75,0.00,1.00,163.20,-14.40,0 +-19.20,-4.80,9.25,0.00,1.00,168.00,-14.40,0 +163.20,0.00,6.77,0.00,1.00,168.00,-9.60,0 +-9.60,-0.00,9.23,0.00,1.00,172.80,-9.60,0 +172.80,0.00,6.79,0.00,1.00,177.60,-4.80,0 +-0.00,-0.00,9.21,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,6.81,0.00,1.00,-177.60,0.00,0 +4.80,0.00,9.19,0.00,1.00,-177.60,4.80,0 +-168.00,-0.00,6.84,0.00,1.00,-172.80,9.60,0 +14.40,0.00,9.16,0.00,1.00,-168.00,9.60,0 +-158.40,-4.80,6.86,0.00,1.00,-168.00,14.40,0 +24.00,4.80,9.14,0.00,1.00,-163.20,14.40,0 +-148.80,-4.80,6.88,0.00,1.00,-158.40,19.20,0 +33.60,4.80,9.12,0.00,1.00,-153.60,19.20,0 +-139.20,-4.80,6.90,0.00,1.00,-153.60,24.00,0 +43.20,4.80,9.10,0.00,1.00,-148.80,24.00,0 +-129.60,-4.80,6.92,0.00,1.00,-144.00,28.80,0 +52.80,4.80,9.08,0.00,1.00,-139.20,28.80,0 +-120.00,-4.80,6.94,0.00,1.00,-134.40,33.60,0 +62.40,4.80,9.06,0.00,1.00,-124.80,33.60,0 +-110.40,-4.80,6.96,0.00,1.00,-120.00,33.60,0 +72.00,4.80,9.04,0.00,1.00,-115.20,38.40,0 +-100.80,-4.80,6.99,0.00,1.00,-105.60,38.40,0 +81.60,4.80,9.01,0.00,1.00,-100.80,38.40,0 +-91.20,-4.80,7.01,0.00,1.00,-91.20,38.40,0 +96.00,4.80,8.99,0.00,1.00,-86.40,38.40,0 +-81.60,-4.80,7.03,0.00,1.00,-76.80,38.40,0 +105.60,4.80,8.97,0.00,1.00,-67.20,38.40,0 +-72.00,-4.80,7.05,0.00,1.00,-62.40,38.40,0 +115.20,4.80,8.95,0.00,1.00,-57.60,33.60,0 +-62.40,-4.80,7.07,0.00,1.00,-48.00,33.60,0 +124.80,4.80,8.93,0.00,1.00,-43.20,33.60,0 +-52.80,-4.80,7.09,0.00,1.00,-38.40,28.80,0 +134.40,4.80,8.91,0.00,1.00,-33.60,28.80,0 +-43.20,-4.80,7.11,0.00,1.00,-28.80,24.00,0 +144.00,4.80,8.89,0.00,1.00,-24.00,24.00,0 +-33.60,-4.80,7.13,0.00,1.00,-24.00,19.20,0 +153.60,4.80,8.87,0.00,1.00,-19.20,19.20,0 +-24.00,-4.80,7.16,0.00,1.00,-14.40,14.40,0 +163.20,0.00,8.84,0.00,1.00,-14.40,9.60,0 +-14.40,-0.00,7.18,0.00,1.00,-9.60,9.60,0 +172.80,0.00,8.82,0.00,1.00,-4.80,4.80,0 +-4.80,-0.00,7.20,0.00,1.00,-4.80,4.80,0 +0.00,0.00,8.80,0.00,1.00,0.00,0.00,0 +-177.60,-0.00,7.22,0.00,1.00,4.80,-4.80,0 +9.60,0.00,8.78,0.00,1.00,4.80,-4.80,0 +-168.00,-0.00,7.24,0.00,1.00,9.60,-9.60,0 +19.20,0.00,8.76,0.00,1.00,14.40,-14.40,0 +-158.40,-0.00,7.26,0.00,1.00,19.20,-14.40,0 +28.80,0.00,8.74,0.00,1.00,19.20,-19.20,0 +-148.80,-0.00,7.28,0.00,1.00,24.00,-24.00,0 +38.40,0.00,8.72,0.00,1.00,28.80,-24.00,0 +-139.20,-0.00,7.31,0.00,1.00,33.60,-28.80,0 +48.00,0.00,8.69,0.00,1.00,38.40,-28.80,0 +-129.60,-0.00,7.33,0.00,1.00,43.20,-33.60,0 +57.60,0.00,8.67,0.00,1.00,48.00,-33.60,0 +-120.00,-0.00,7.35,0.00,1.00,52.80,-38.40,0 +67.20,0.00,8.65,0.00,1.00,57.60,-38.40,0 +-110.40,-0.00,7.37,0.00,1.00,62.40,-38.40,0 +76.80,0.00,8.63,0.00,1.00,72.00,-43.20,0 +-100.80,-0.00,7.39,0.00,1.00,76.80,-43.20,0 +86.40,0.00,8.61,0.00,1.00,86.40,-43.20,0 +-86.40,-0.00,7.41,0.00,1.00,91.20,-43.20,0 +96.00,0.00,8.59,0.00,1.00,100.80,-43.20,0 +-76.80,-0.00,7.43,0.00,1.00,105.60,-43.20,0 +105.60,0.00,8.57,0.00,1.00,110.40,-43.20,0 +-67.20,-0.00,7.46,0.00,1.00,120.00,-38.40,0 +115.20,0.00,8.54,0.00,1.00,124.80,-38.40,0 +-57.60,-0.00,7.48,0.00,1.00,129.60,-38.40,0 +124.80,0.00,8.52,0.00,1.00,134.40,-33.60,0 +-48.00,-0.00,7.50,0.00,1.00,139.20,-33.60,0 +134.40,0.00,8.50,0.00,1.00,144.00,-28.80,0 +-38.40,-0.00,7.52,0.00,1.00,148.80,-28.80,0 +144.00,0.00,8.48,0.00,1.00,153.60,-24.00,0 +-28.80,-0.00,7.54,0.00,1.00,158.40,-19.20,0 +153.60,0.00,8.46,0.00,1.00,163.20,-19.20,0 +-19.20,-0.00,7.56,0.00,1.00,163.20,-14.40,0 +163.20,0.00,8.44,0.00,1.00,168.00,-9.60,0 +-9.60,-0.00,7.58,0.00,1.00,172.80,-9.60,0 +172.80,0.00,8.42,0.00,1.00,172.80,-4.80,0 +-0.00,-0.00,7.60,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,8.40,0.00,1.00,-177.60,0.00,0 +4.80,0.00,7.63,0.00,1.00,-172.80,4.80,0 +-168.00,-0.00,8.37,0.00,1.00,-172.80,9.60,0 +14.40,0.00,7.65,0.00,1.00,-168.00,9.60,0 +-158.40,-0.00,8.35,0.00,1.00,-163.20,14.40,0 +24.00,0.00,7.67,0.00,1.00,-163.20,19.20,0 +-148.80,-0.00,8.33,0.00,1.00,-158.40,19.20,0 +33.60,0.00,7.69,0.00,1.00,-153.60,24.00,0 +-139.20,-0.00,8.31,0.00,1.00,-148.80,28.80,0 +43.20,0.00,7.71,0.00,1.00,-144.00,28.80,0 +-129.60,-0.00,8.29,0.00,1.00,-139.20,33.60,0 +52.80,0.00,7.73,0.00,1.00,-134.40,33.60,0 +-120.00,-0.00,8.27,0.00,1.00,-129.60,38.40,0 +62.40,0.00,7.75,0.00,1.00,-124.80,38.40,0 +-110.40,-0.00,8.25,0.00,1.00,-120.00,38.40,0 +72.00,0.00,7.78,0.00,1.00,-110.40,43.20,0 +-100.80,-0.00,8.22,0.00,1.00,-105.60,43.20,0 +81.60,0.00,7.80,0.00,1.00,-100.80,43.20,0 +-91.20,-0.00,8.20,0.00,1.00,-91.20,43.20,0 +96.00,0.00,7.82,0.00,1.00,-86.40,43.20,0 +-81.60,-0.00,8.18,0.00,1.00,-76.80,43.20,0 +105.60,0.00,7.84,0.00,1.00,-72.00,43.20,0 +-72.00,-0.00,8.16,0.00,1.00,-62.40,38.40,0 +115.20,0.00,7.86,0.00,1.00,-57.60,38.40,0 +-62.40,-0.00,8.14,0.00,1.00,-52.80,38.40,0 +124.80,0.00,7.88,0.00,1.00,-48.00,33.60,0 +-52.80,-0.00,8.12,0.00,1.00,-43.20,33.60,0 +134.40,0.00,7.90,0.00,1.00,-38.40,28.80,0 +-43.20,-0.00,8.10,0.00,1.00,-33.60,28.80,0 +144.00,0.00,7.93,0.00,1.00,-28.80,24.00,0 +-33.60,-0.00,8.07,0.00,1.00,-24.00,24.00,0 +153.60,0.00,7.95,0.00,1.00,-19.20,19.20,0 +-24.00,-0.00,8.05,0.00,1.00,-19.20,14.40,0 +163.20,0.00,7.97,0.00,1.00,-14.40,14.40,0 +-14.40,-0.00,8.03,0.00,1.00,-9.60,9.60,0 +172.80,0.00,7.99,0.00,1.00,-4.80,4.80,0 +-4.80,-0.00,8.01,0.00,1.00,-4.80,4.80,0 +0.00,0.00,8.01,0.00,1.00,0.00,0.00,0 +-177.60,0.00,7.99,0.00,1.00,4.80,-4.80,0 +9.60,-0.00,8.03,0.00,1.00,4.80,-4.80,0 +-168.00,0.00,7.97,0.00,1.00,9.60,-9.60,0 +19.20,-0.00,8.05,0.00,1.00,14.40,-14.40,0 +-158.40,0.00,7.95,0.00,1.00,19.20,-19.20,0 +28.80,-0.00,8.07,0.00,1.00,24.00,-19.20,0 +-148.80,0.00,7.93,0.00,1.00,24.00,-24.00,0 +38.40,-0.00,8.10,0.00,1.00,28.80,-28.80,0 +-139.20,0.00,7.90,0.00,1.00,33.60,-28.80,0 +48.00,-0.00,8.12,0.00,1.00,38.40,-33.60,0 +-129.60,0.00,7.88,0.00,1.00,43.20,-38.40,0 +57.60,-4.80,8.14,0.00,1.00,48.00,-38.40,0 +-120.00,4.80,7.86,0.00,1.00,52.80,-43.20,0 +67.20,-4.80,8.16,0.00,1.00,62.40,-43.20,0 +-110.40,4.80,7.84,0.00,1.00,67.20,-43.20,0 +76.80,-4.80,8.18,0.00,1.00,72.00,-48.00,0 +-100.80,4.80,7.82,0.00,1.00,76.80,-48.00,0 +86.40,-4.80,8.20,0.00,1.00,86.40,-48.00,0 +-86.40,4.80,7.80,0.00,1.00,91.20,-48.00,0 +96.00,-4.80,8.22,0.00,1.00,96.00,-48.00,0 +-76.80,4.80,7.78,0.00,1.00,105.60,-48.00,0 +105.60,-4.80,8.25,0.00,1.00,110.40,-48.00,0 +-67.20,4.80,7.75,0.00,1.00,115.20,-43.20,0 +115.20,-4.80,8.27,0.00,1.00,120.00,-43.20,0 +-57.60,4.80,7.73,0.00,1.00,129.60,-38.40,0 +124.80,-4.80,8.29,0.00,1.00,134.40,-38.40,0 +-48.00,0.00,7.71,0.00,1.00,139.20,-33.60,0 +134.40,-0.00,8.31,0.00,1.00,144.00,-33.60,0 +-38.40,0.00,7.69,0.00,1.00,148.80,-28.80,0 +144.00,-0.00,8.33,0.00,1.00,153.60,-24.00,0 +-28.80,0.00,7.67,0.00,1.00,153.60,-24.00,0 +153.60,-0.00,8.35,0.00,1.00,158.40,-19.20,0 +-19.20,0.00,7.65,0.00,1.00,163.20,-14.40,0 +163.20,-0.00,8.37,0.00,1.00,168.00,-14.40,0 +-9.60,0.00,7.63,0.00,1.00,172.80,-9.60,0 +172.80,-0.00,8.40,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,7.60,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,8.42,0.00,1.00,-177.60,0.00,0 +4.80,-0.00,7.58,0.00,1.00,-172.80,4.80,0 +-168.00,0.00,8.44,0.00,1.00,-172.80,9.60,0 +14.40,-0.00,7.56,0.00,1.00,-168.00,14.40,0 +-158.40,0.00,8.46,0.00,1.00,-163.20,14.40,0 +24.00,-0.00,7.54,0.00,1.00,-158.40,19.20,0 +-148.80,0.00,8.48,0.00,1.00,-153.60,24.00,0 +33.60,-0.00,7.52,0.00,1.00,-153.60,24.00,0 +-139.20,0.00,8.50,0.00,1.00,-148.80,28.80,0 +43.20,-0.00,7.50,0.00,1.00,-144.00,33.60,0 +-129.60,0.00,8.52,0.00,1.00,-139.20,33.60,0 +52.80,-4.80,7.48,0.00,1.00,-134.40,38.40,0 +-120.00,4.80,8.54,0.00,1.00,-129.60,38.40,0 +62.40,-4.80,7.46,0.00,1.00,-120.00,43.20,0 +-110.40,4.80,8.57,0.00,1.00,-115.20,43.20,0 +72.00,-4.80,7.43,0.00,1.00,-110.40,48.00,0 +-100.80,4.80,8.59,0.00,1.00,-105.60,48.00,0 +81.60,-4.80,7.41,0.00,1.00,-96.00,48.00,0 +-91.20,4.80,8.61,0.00,1.00,-91.20,48.00,0 +96.00,-4.80,7.39,0.00,1.00,-86.40,48.00,0 +-81.60,4.80,8.63,0.00,1.00,-76.80,48.00,0 +105.60,-4.80,7.37,0.00,1.00,-72.00,48.00,0 +-72.00,4.80,8.65,0.00,1.00,-67.20,43.20,0 +115.20,-4.80,7.35,0.00,1.00,-62.40,43.20,0 +-62.40,4.80,8.67,0.00,1.00,-52.80,43.20,0 +124.80,-4.80,7.33,0.00,1.00,-48.00,38.40,0 +-52.80,0.00,8.69,0.00,1.00,-43.20,38.40,0 +134.40,-0.00,7.31,0.00,1.00,-38.40,33.60,0 +-43.20,0.00,8.72,0.00,1.00,-33.60,28.80,0 +144.00,-0.00,7.28,0.00,1.00,-28.80,28.80,0 +-33.60,0.00,8.74,0.00,1.00,-24.00,24.00,0 +153.60,-0.00,7.26,0.00,1.00,-24.00,19.20,0 +-24.00,0.00,8.76,0.00,1.00,-19.20,19.20,0 +163.20,-0.00,7.24,0.00,1.00,-14.40,14.40,0 +-14.40,0.00,8.78,0.00,1.00,-9.60,9.60,0 +172.80,-0.00,7.22,0.00,1.00,-4.80,4.80,0 +-4.80,0.00,8.80,0.00,1.00,-4.80,4.80,0 +0.00,0.00,7.20,0.00,1.00,0.00,0.00,0 +-177.60,0.00,8.82,0.00,1.00,4.80,-4.80,0 +9.60,-0.00,7.18,0.00,1.00,9.60,-9.60,0 +-168.00,0.00,8.84,0.00,1.00,9.60,-9.60,0 +19.20,-4.80,7.16,0.00,1.00,14.40,-14.40,0 +-158.40,4.80,8.87,0.00,1.00,19.20,-19.20,0 +28.80,-4.80,7.13,0.00,1.00,24.00,-24.00,0 +-148.80,4.80,8.89,0.00,1.00,28.80,-24.00,0 +38.40,-4.80,7.11,0.00,1.00,33.60,-28.80,0 +-139.20,4.80,8.91,0.00,1.00,38.40,-33.60,0 +48.00,-4.80,7.09,0.00,1.00,43.20,-38.40,0 +-129.60,4.80,8.93,0.00,1.00,48.00,-38.40,0 +57.60,-4.80,7.07,0.00,1.00,52.80,-43.20,0 +-120.00,4.80,8.95,0.00,1.00,57.60,-43.20,0 +67.20,-4.80,7.05,0.00,1.00,62.40,-48.00,0 +-110.40,9.60,8.97,0.00,1.00,67.20,-48.00,0 +76.80,-9.60,7.03,0.00,1.00,72.00,-52.80,0 +-100.80,9.60,8.99,0.00,1.00,81.60,-52.80,0 +86.40,-9.60,7.01,0.00,1.00,86.40,-52.80,0 +-86.40,9.60,9.01,0.00,1.00,91.20,-52.80,0 +96.00,-9.60,6.99,0.00,1.00,96.00,-52.80,0 +-76.80,9.60,9.04,0.00,1.00,105.60,-52.80,0 +105.60,-9.60,6.96,0.00,1.00,110.40,-48.00,0 +-67.20,9.60,9.06,0.00,1.00,115.20,-48.00,0 +115.20,-4.80,6.94,0.00,1.00,120.00,-48.00,0 +-57.60,4.80,9.08,0.00,1.00,124.80,-43.20,0 +124.80,-4.80,6.92,0.00,1.00,129.60,-43.20,0 +-48.00,4.80,9.10,0.00,1.00,134.40,-38.40,0 +134.40,-4.80,6.90,0.00,1.00,139.20,-33.60,0 +-38.40,4.80,9.12,0.00,1.00,144.00,-33.60,0 +144.00,-4.80,6.88,0.00,1.00,148.80,-28.80,0 +-28.80,4.80,9.14,0.00,1.00,153.60,-24.00,0 +153.60,-4.80,6.86,0.00,1.00,158.40,-19.20,0 +-19.20,4.80,9.16,0.00,1.00,163.20,-19.20,0 +163.20,-0.00,6.84,0.00,1.00,168.00,-14.40,0 +-9.60,0.00,9.19,0.00,1.00,168.00,-9.60,0 +172.80,-0.00,6.81,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,9.21,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,6.79,0.00,1.00,-177.60,0.00,0 +4.80,-0.00,9.23,0.00,1.00,-172.80,4.80,0 +-168.00,0.00,6.77,0.00,1.00,-168.00,9.60,0 +14.40,-0.00,9.25,0.00,1.00,-168.00,14.40,0 +-158.40,4.80,6.75,0.00,1.00,-163.20,19.20,0 +24.00,-4.80,9.27,0.00,1.00,-158.40,19.20,0 +-148.80,4.80,6.73,0.00,1.00,-153.60,24.00,0 +33.60,-4.80,9.29,0.00,1.00,-148.80,28.80,0 +-139.20,4.80,6.71,0.00,1.00,-144.00,33.60,0 +43.20,-4.80,9.31,0.00,1.00,-139.20,33.60,0 +-129.60,4.80,6.69,0.00,1.00,-134.40,38.40,0 +52.80,-4.80,9.34,0.00,1.00,-129.60,43.20,0 +-120.00,4.80,6.66,0.00,1.00,-124.80,43.20,0 +62.40,-4.80,9.36,0.00,1.00,-120.00,48.00,0 +-110.40,9.60,6.64,0.00,1.00,-115.20,48.00,0 +72.00,-9.60,9.38,0.00,1.00,-110.40,48.00,0 +-100.80,9.60,6.62,0.00,1.00,-105.60,52.80,0 +81.60,-9.60,9.40,0.00,1.00,-96.00,52.80,0 +-91.20,9.60,6.60,0.00,1.00,-91.20,52.80,0 +96.00,-9.60,9.42,0.00,1.00,-86.40,52.80,0 +-81.60,9.60,6.58,0.00,1.00,-81.60,52.80,0 +105.60,-9.60,9.44,0.00,1.00,-72.00,52.80,0 +-72.00,9.60,6.56,0.00,1.00,-67.20,48.00,0 +115.20,-4.80,9.46,0.00,1.00,-62.40,48.00,0 +-62.40,4.80,6.54,0.00,1.00,-57.60,43.20,0 +124.80,-4.80,9.48,0.00,1.00,-52.80,43.20,0 +-52.80,4.80,6.52,0.00,1.00,-48.00,38.40,0 +134.40,-4.80,9.51,0.00,1.00,-43.20,38.40,0 +-43.20,4.80,6.49,0.00,1.00,-38.40,33.60,0 +144.00,-4.80,9.53,0.00,1.00,-33.60,28.80,0 +-33.60,4.80,6.47,0.00,1.00,-28.80,24.00,0 +153.60,-4.80,9.55,0.00,1.00,-24.00,24.00,0 +-24.00,4.80,6.45,0.00,1.00,-19.20,19.20,0 +163.20,-4.80,9.57,0.00,1.00,-14.40,14.40,0 +-14.40,0.00,6.43,0.00,1.00,-9.60,9.60,0 +172.80,-0.00,9.59,0.00,1.00,-9.60,9.60,0 +-4.80,0.00,6.41,0.00,1.00,-4.80,4.80,0 +0.00,0.00,9.61,0.00,1.00,0.00,0.00,0 +-177.60,0.00,6.39,0.00,1.00,4.80,-4.80,0 +9.60,-0.00,9.63,0.00,1.00,9.60,-9.60,0 +-168.00,4.80,6.37,0.00,1.00,14.40,-14.40,0 +19.20,-4.80,9.66,0.00,1.00,14.40,-14.40,0 +-158.40,4.80,6.34,0.00,1.00,19.20,-19.20,0 +28.80,-4.80,9.68,0.00,1.00,24.00,-24.00,0 +-148.80,4.80,6.32,0.00,1.00,28.80,-28.80,0 +38.40,-9.60,9.70,0.00,1.00,33.60,-33.60,0 +-139.20,9.60,6.30,0.00,1.00,38.40,-33.60,0 +48.00,-9.60,9.72,0.00,1.00,43.20,-38.40,0 +-129.60,9.60,6.28,0.00,1.00,48.00,-43.20,0 +57.60,-9.60,9.74,0.00,1.00,52.80,-43.20,0 +-120.00,9.60,6.26,0.00,1.00,57.60,-48.00,0 +67.20,-9.60,9.76,0.00,1.00,62.40,-52.80,0 +-110.40,9.60,6.24,0.00,1.00,67.20,-52.80,0 +76.80,-14.40,9.78,0.00,1.00,76.80,-57.60,0 +-100.80,14.40,6.22,0.00,1.00,81.60,-57.60,0 +86.40,-14.40,9.81,0.00,1.00,86.40,-57.60,0 +-86.40,14.40,6.19,0.00,1.00,91.20,-57.60,0 +96.00,-14.40,9.83,0.00,1.00,96.00,-57.60,0 +-76.80,14.40,6.17,0.00,1.00,100.80,-57.60,0 +105.60,-14.40,9.85,0.00,1.00,110.40,-52.80,0 +-67.20,9.60,6.15,0.00,1.00,115.20,-52.80,0 +115.20,-9.60,9.87,0.00,1.00,120.00,-48.00,0 +-57.60,9.60,6.13,0.00,1.00,124.80,-48.00,0 +124.80,-9.60,9.89,0.00,1.00,129.60,-43.20,0 +-48.00,9.60,6.11,0.00,1.00,134.40,-38.40,0 +134.40,-9.60,9.91,0.00,1.00,139.20,-38.40,0 +-38.40,9.60,6.09,0.00,1.00,144.00,-33.60,0 +144.00,-9.60,9.93,0.00,1.00,148.80,-28.80,0 +-28.80,4.80,6.07,0.00,1.00,153.60,-24.00,0 +153.60,-4.80,9.95,0.00,1.00,158.40,-24.00,0 +-19.20,4.80,6.05,0.00,1.00,163.20,-19.20,0 +163.20,-4.80,9.98,0.00,1.00,168.00,-14.40,0 +-9.60,4.80,6.02,0.00,1.00,168.00,-9.60,0 +172.80,-0.00,10.00,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,6.00,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,10.02,0.00,1.00,-177.60,0.00,0 +4.80,-0.00,5.98,0.00,1.00,-172.80,4.80,0 +-168.00,4.80,10.04,0.00,1.00,-168.00,9.60,0 +14.40,-4.80,5.96,0.00,1.00,-168.00,14.40,0 +-158.40,4.80,10.06,0.00,1.00,-163.20,19.20,0 +24.00,-4.80,5.94,0.00,1.00,-158.40,24.00,0 +-148.80,4.80,10.08,0.00,1.00,-153.60,24.00,0 +33.60,-9.60,5.92,0.00,1.00,-148.80,28.80,0 +-139.20,9.60,10.10,0.00,1.00,-144.00,33.60,0 +43.20,-9.60,5.90,0.00,1.00,-139.20,38.40,0 +-129.60,9.60,10.13,0.00,1.00,-134.40,38.40,0 +52.80,-9.60,5.87,0.00,1.00,-129.60,43.20,0 +-120.00,9.60,10.15,0.00,1.00,-124.80,48.00,0 +62.40,-9.60,5.85,0.00,1.00,-120.00,48.00,0 +-110.40,9.60,10.17,0.00,1.00,-115.20,52.80,0 +72.00,-14.40,5.83,0.00,1.00,-110.40,52.80,0 +-100.80,14.40,10.19,0.00,1.00,-100.80,57.60,0 +81.60,-14.40,5.81,0.00,1.00,-96.00,57.60,0 +-91.20,14.40,10.21,0.00,1.00,-91.20,57.60,0 +96.00,-14.40,5.79,0.00,1.00,-86.40,57.60,0 +-81.60,14.40,10.23,0.00,1.00,-81.60,57.60,0 +105.60,-14.40,5.77,0.00,1.00,-76.80,57.60,0 +-72.00,9.60,10.25,0.00,1.00,-67.20,52.80,0 +115.20,-9.60,5.75,0.00,1.00,-62.40,52.80,0 +-62.40,9.60,10.28,0.00,1.00,-57.60,48.00,0 +124.80,-9.60,5.72,0.00,1.00,-52.80,43.20,0 +-52.80,9.60,10.30,0.00,1.00,-48.00,43.20,0 +134.40,-9.60,5.70,0.00,1.00,-43.20,38.40,0 +-43.20,9.60,10.32,0.00,1.00,-38.40,33.60,0 +144.00,-9.60,5.68,0.00,1.00,-33.60,33.60,0 +-33.60,4.80,10.34,0.00,1.00,-28.80,28.80,0 +153.60,-4.80,5.66,0.00,1.00,-24.00,24.00,0 +-24.00,4.80,10.36,0.00,1.00,-19.20,19.20,0 +163.20,-4.80,5.64,0.00,1.00,-14.40,14.40,0 +-14.40,4.80,10.38,0.00,1.00,-14.40,14.40,0 +172.80,-0.00,5.62,0.00,1.00,-9.60,9.60,0 +-4.80,0.00,10.40,0.00,1.00,-4.80,4.80,0 +0.00,0.00,5.60,0.00,1.00,0.00,0.00,0 +-177.60,0.00,10.42,0.00,1.00,4.80,-4.80,0 +9.60,-4.80,5.58,0.00,1.00,9.60,-9.60,0 +-168.00,4.80,10.45,0.00,1.00,14.40,-14.40,0 +19.20,-4.80,5.55,0.00,1.00,19.20,-19.20,0 +-158.40,4.80,10.47,0.00,1.00,19.20,-19.20,0 +28.80,-9.60,5.53,0.00,1.00,24.00,-24.00,0 +-148.80,9.60,10.49,0.00,1.00,28.80,-28.80,0 +38.40,-9.60,5.51,0.00,1.00,33.60,-33.60,0 +-139.20,9.60,10.51,0.00,1.00,38.40,-38.40,0 +48.00,-14.40,5.49,0.00,1.00,43.20,-43.20,0 +-129.60,14.40,10.53,0.00,1.00,48.00,-43.20,0 +57.60,-14.40,5.47,0.00,1.00,52.80,-48.00,0 +-120.00,14.40,10.55,0.00,1.00,57.60,-52.80,0 +67.20,-14.40,5.45,0.00,1.00,62.40,-52.80,0 +-110.40,14.40,10.57,0.00,1.00,72.00,-57.60,0 +76.80,-19.20,5.43,0.00,1.00,76.80,-57.60,0 +-100.80,19.20,10.60,0.00,1.00,81.60,-62.40,0 +86.40,-19.20,5.40,0.00,1.00,86.40,-62.40,0 +-86.40,19.20,10.62,0.00,1.00,91.20,-62.40,0 +96.00,-19.20,5.38,0.00,1.00,96.00,-62.40,0 +-76.80,19.20,10.64,0.00,1.00,100.80,-62.40,0 +105.60,-14.40,5.36,0.00,1.00,105.60,-57.60,0 +-67.20,14.40,10.66,0.00,1.00,110.40,-57.60,0 +115.20,-14.40,5.34,0.00,1.00,120.00,-52.80,0 +-57.60,14.40,10.68,0.00,1.00,124.80,-48.00,0 +124.80,-14.40,5.32,0.00,1.00,129.60,-48.00,0 +-48.00,14.40,10.70,0.00,1.00,134.40,-43.20,0 +134.40,-14.40,5.30,0.00,1.00,139.20,-38.40,0 +-38.40,9.60,10.72,0.00,1.00,144.00,-33.60,0 +144.00,-9.60,5.28,0.00,1.00,148.80,-33.60,0 +-28.80,9.60,10.74,0.00,1.00,153.60,-28.80,0 +153.60,-9.60,5.26,0.00,1.00,158.40,-24.00,0 +-19.20,4.80,10.77,0.00,1.00,158.40,-19.20,0 +163.20,-4.80,5.23,0.00,1.00,163.20,-14.40,0 +-9.60,4.80,10.79,0.00,1.00,168.00,-9.60,0 +172.80,-0.00,5.21,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,10.81,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,5.19,0.00,1.00,-177.60,0.00,0 +4.80,-0.00,10.83,0.00,1.00,-172.80,4.80,0 +-168.00,4.80,5.17,0.00,1.00,-168.00,9.60,0 +14.40,-4.80,10.85,0.00,1.00,-163.20,14.40,0 +-158.40,4.80,5.15,0.00,1.00,-158.40,19.20,0 +24.00,-9.60,10.87,0.00,1.00,-158.40,24.00,0 +-148.80,9.60,5.13,0.00,1.00,-153.60,28.80,0 +33.60,-9.60,10.89,0.00,1.00,-148.80,33.60,0 +-139.20,9.60,5.11,0.00,1.00,-144.00,33.60,0 +43.20,-14.40,10.92,0.00,1.00,-139.20,38.40,0 +-129.60,14.40,5.08,0.00,1.00,-134.40,43.20,0 +52.80,-14.40,10.94,0.00,1.00,-129.60,48.00,0 +-120.00,14.40,5.06,0.00,1.00,-124.80,48.00,0 +62.40,-14.40,10.96,0.00,1.00,-120.00,52.80,0 +-110.40,14.40,5.04,0.00,1.00,-110.40,57.60,0 +72.00,-14.40,10.98,0.00,1.00,-105.60,57.60,0 +-100.80,19.20,5.02,0.00,1.00,-100.80,62.40,0 +81.60,-19.20,11.00,0.00,1.00,-96.00,62.40,0 +-91.20,19.20,5.00,0.00,1.00,-91.20,62.40,0 +96.00,-19.20,11.02,0.00,1.00,-86.40,62.40,0 +-81.60,19.20,4.98,0.00,1.00,-81.60,62.40,0 +105.60,-19.20,11.04,0.00,1.00,-76.80,57.60,0 +-72.00,14.40,4.96,0.00,1.00,-72.00,57.60,0 +115.20,-14.40,11.07,0.00,1.00,-62.40,52.80,0 +-62.40,14.40,4.93,0.00,1.00,-57.60,52.80,0 +124.80,-14.40,11.09,0.00,1.00,-52.80,48.00,0 +-52.80,14.40,4.91,0.00,1.00,-48.00,43.20,0 +134.40,-14.40,11.11,0.00,1.00,-43.20,43.20,0 +-43.20,9.60,4.89,0.00,1.00,-38.40,38.40,0 +144.00,-9.60,11.13,0.00,1.00,-33.60,33.60,0 +-33.60,9.60,4.87,0.00,1.00,-28.80,28.80,0 +153.60,-9.60,11.15,0.00,1.00,-24.00,24.00,0 +-24.00,4.80,4.85,0.00,1.00,-19.20,19.20,0 +163.20,-4.80,11.17,0.00,1.00,-19.20,19.20,0 +-14.40,4.80,4.83,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,11.19,0.00,1.00,-9.60,9.60,0 +-4.80,0.00,4.81,0.00,1.00,-4.80,4.80,0 +0.00,0.00,11.21,0.00,1.00,0.00,0.00,0 +-177.60,0.00,4.79,0.00,1.00,4.80,-4.80,0 +9.60,-4.80,11.24,0.00,1.00,9.60,-9.60,0 +-168.00,4.80,4.76,0.00,1.00,14.40,-14.40,0 +19.20,-4.80,11.26,0.00,1.00,19.20,-19.20,0 +-158.40,9.60,4.74,0.00,1.00,24.00,-24.00,0 +28.80,-9.60,11.28,0.00,1.00,28.80,-24.00,0 +-148.80,14.40,4.72,0.00,1.00,33.60,-28.80,0 +38.40,-14.40,11.30,0.00,1.00,38.40,-33.60,0 +-139.20,14.40,4.70,0.00,1.00,43.20,-38.40,0 +48.00,-14.40,11.32,0.00,1.00,48.00,-43.20,0 +-129.60,19.20,4.68,0.00,1.00,52.80,-48.00,0 +57.60,-19.20,11.34,0.00,1.00,57.60,-52.80,0 +-120.00,19.20,4.66,0.00,1.00,62.40,-52.80,0 +67.20,-19.20,11.36,0.00,1.00,67.20,-57.60,0 +-110.40,19.20,4.64,0.00,1.00,72.00,-62.40,0 +76.80,-19.20,11.39,0.00,1.00,76.80,-62.40,0 +-100.80,24.00,4.61,0.00,1.00,81.60,-67.20,0 +86.40,-24.00,11.41,0.00,1.00,86.40,-67.20,0 +-86.40,24.00,4.59,0.00,1.00,91.20,-67.20,0 +96.00,-24.00,11.43,0.00,1.00,96.00,-67.20,0 +-76.80,24.00,4.57,0.00,1.00,100.80,-67.20,0 +105.60,-19.20,11.45,0.00,1.00,105.60,-62.40,0 +-67.20,19.20,4.55,0.00,1.00,110.40,-57.60,0 +115.20,-19.20,11.47,0.00,1.00,115.20,-57.60,0 +-57.60,19.20,4.53,0.00,1.00,120.00,-52.80,0 +124.80,-19.20,11.49,0.00,1.00,124.80,-48.00,0 +-48.00,19.20,4.51,0.00,1.00,129.60,-43.20,0 +134.40,-14.40,11.51,0.00,1.00,134.40,-43.20,0 +-38.40,14.40,4.49,0.00,1.00,139.20,-38.40,0 +144.00,-14.40,11.54,0.00,1.00,144.00,-33.60,0 +-28.80,9.60,4.46,0.00,1.00,148.80,-28.80,0 +153.60,-9.60,11.56,0.00,1.00,153.60,-24.00,0 +-19.20,9.60,4.44,0.00,1.00,158.40,-19.20,0 +163.20,-4.80,11.58,0.00,1.00,163.20,-14.40,0 +-9.60,4.80,4.42,0.00,1.00,168.00,-9.60,0 +172.80,-4.80,11.60,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,4.40,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,11.62,0.00,1.00,-177.60,0.00,0 +4.80,-4.80,4.38,0.00,1.00,-172.80,4.80,0 +-168.00,4.80,11.64,0.00,1.00,-168.00,9.60,0 +14.40,-4.80,4.36,0.00,1.00,-163.20,14.40,0 +-158.40,9.60,11.66,0.00,1.00,-158.40,19.20,0 +24.00,-9.60,4.34,0.00,1.00,-153.60,24.00,0 +-148.80,9.60,11.68,0.00,1.00,-148.80,28.80,0 +33.60,-14.40,4.32,0.00,1.00,-144.00,33.60,0 +-139.20,14.40,11.71,0.00,1.00,-139.20,38.40,0 +43.20,-14.40,4.29,0.00,1.00,-134.40,43.20,0 +-129.60,19.20,11.73,0.00,1.00,-129.60,43.20,0 +52.80,-19.20,4.27,0.00,1.00,-124.80,48.00,0 +-120.00,19.20,11.75,0.00,1.00,-120.00,52.80,0 +62.40,-19.20,4.25,0.00,1.00,-115.20,57.60,0 +-110.40,19.20,11.77,0.00,1.00,-110.40,57.60,0 +72.00,-19.20,4.23,0.00,1.00,-105.60,62.40,0 +-100.80,24.00,11.79,0.00,1.00,-100.80,67.20,0 +81.60,-24.00,4.21,0.00,1.00,-96.00,67.20,0 +-91.20,24.00,11.81,0.00,1.00,-91.20,67.20,0 +96.00,-24.00,4.19,0.00,1.00,-86.40,67.20,0 +-81.60,24.00,11.83,0.00,1.00,-81.60,67.20,0 +105.60,-19.20,4.17,0.00,1.00,-76.80,62.40,0 +-72.00,19.20,11.86,0.00,1.00,-72.00,62.40,0 +115.20,-19.20,4.14,0.00,1.00,-67.20,57.60,0 +-62.40,19.20,11.88,0.00,1.00,-62.40,52.80,0 +124.80,-19.20,4.12,0.00,1.00,-57.60,52.80,0 +-52.80,19.20,11.90,0.00,1.00,-52.80,48.00,0 +134.40,-14.40,4.10,0.00,1.00,-48.00,43.20,0 +-43.20,14.40,11.92,0.00,1.00,-43.20,38.40,0 +144.00,-14.40,4.08,0.00,1.00,-38.40,33.60,0 +-33.60,14.40,11.94,0.00,1.00,-33.60,28.80,0 +153.60,-9.60,4.06,0.00,1.00,-28.80,24.00,0 +-24.00,9.60,11.96,0.00,1.00,-24.00,24.00,0 +163.20,-4.80,4.04,0.00,1.00,-19.20,19.20,0 +-14.40,4.80,11.98,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,4.02,0.00,1.00,-9.60,9.60,0 +-4.80,0.00,12.01,0.00,1.00,-4.80,4.80,0 +0.00,0.00,3.99,0.00,1.00,0.00,0.00,0 +-177.60,0.00,12.03,0.00,1.00,4.80,-4.80,0 +9.60,-4.80,3.97,0.00,1.00,9.60,-9.60,0 +-168.00,4.80,12.05,0.00,1.00,14.40,-14.40,0 +19.20,-9.60,3.95,0.00,1.00,19.20,-19.20,0 +-158.40,9.60,12.07,0.00,1.00,24.00,-24.00,0 +24.00,-14.40,3.93,0.00,1.00,28.80,-28.80,0 +-148.80,14.40,12.09,0.00,1.00,33.60,-33.60,0 +33.60,-14.40,3.91,0.00,1.00,38.40,-38.40,0 +-139.20,19.20,12.11,0.00,1.00,43.20,-38.40,0 +43.20,-19.20,3.89,0.00,1.00,48.00,-43.20,0 +-129.60,19.20,12.13,0.00,1.00,52.80,-48.00,0 +52.80,-24.00,3.87,0.00,1.00,57.60,-52.80,0 +-120.00,24.00,12.15,0.00,1.00,62.40,-57.60,0 +62.40,-24.00,3.85,0.00,1.00,67.20,-62.40,0 +-110.40,24.00,12.18,0.00,1.00,72.00,-62.40,0 +76.80,-24.00,3.82,0.00,1.00,76.80,-67.20,0 +-100.80,28.80,12.20,0.00,1.00,81.60,-72.00,0 +86.40,-28.80,3.80,0.00,1.00,86.40,-72.00,0 +-86.40,28.80,12.22,0.00,1.00,91.20,-72.00,0 +96.00,-28.80,3.78,0.00,1.00,96.00,-72.00,0 +-76.80,28.80,12.24,0.00,1.00,100.80,-67.20,0 +105.60,-24.00,3.76,0.00,1.00,105.60,-67.20,0 +-67.20,24.00,12.26,0.00,1.00,110.40,-62.40,0 +120.00,-24.00,3.74,0.00,1.00,115.20,-57.60,0 +-57.60,24.00,12.28,0.00,1.00,120.00,-57.60,0 +129.60,-24.00,3.72,0.00,1.00,124.80,-52.80,0 +-48.00,19.20,12.30,0.00,1.00,129.60,-48.00,0 +139.20,-19.20,3.70,0.00,1.00,134.40,-43.20,0 +-38.40,19.20,12.33,0.00,1.00,139.20,-38.40,0 +148.80,-14.40,3.67,0.00,1.00,144.00,-33.60,0 +-28.80,14.40,12.35,0.00,1.00,148.80,-28.80,0 +158.40,-9.60,3.65,0.00,1.00,153.60,-24.00,0 +-19.20,9.60,12.37,0.00,1.00,158.40,-19.20,0 +163.20,-9.60,3.63,0.00,1.00,163.20,-14.40,0 +-9.60,4.80,12.39,0.00,1.00,168.00,-9.60,0 +172.80,-4.80,3.61,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,12.41,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,3.59,0.00,1.00,-177.60,0.00,0 +4.80,-4.80,12.43,0.00,1.00,-172.80,4.80,0 +-168.00,4.80,3.57,0.00,1.00,-168.00,9.60,0 +14.40,-9.60,12.45,0.00,1.00,-163.20,14.40,0 +-158.40,9.60,3.55,0.00,1.00,-158.40,19.20,0 +24.00,-9.60,12.48,0.00,1.00,-153.60,24.00,0 +-153.60,14.40,3.52,0.00,1.00,-148.80,28.80,0 +33.60,-14.40,12.50,0.00,1.00,-144.00,33.60,0 +-144.00,19.20,3.50,0.00,1.00,-139.20,38.40,0 +43.20,-19.20,12.52,0.00,1.00,-134.40,43.20,0 +-134.40,19.20,3.48,0.00,1.00,-129.60,48.00,0 +52.80,-24.00,12.54,0.00,1.00,-124.80,52.80,0 +-124.80,24.00,3.46,0.00,1.00,-120.00,57.60,0 +62.40,-24.00,12.56,0.00,1.00,-115.20,57.60,0 +-110.40,24.00,3.44,0.00,1.00,-110.40,62.40,0 +72.00,-24.00,12.58,0.00,1.00,-105.60,67.20,0 +-100.80,28.80,3.42,0.00,1.00,-100.80,67.20,0 +81.60,-28.80,12.60,0.00,1.00,-96.00,72.00,0 +-91.20,28.80,3.40,0.00,1.00,-91.20,72.00,0 +96.00,-28.80,12.62,0.00,1.00,-86.40,72.00,0 +-81.60,28.80,3.38,0.00,1.00,-81.60,72.00,0 +105.60,-24.00,12.65,0.00,1.00,-76.80,67.20,0 +-72.00,24.00,3.35,0.00,1.00,-72.00,62.40,0 +115.20,-24.00,12.67,0.00,1.00,-67.20,62.40,0 +-57.60,24.00,3.33,0.00,1.00,-62.40,57.60,0 +124.80,-24.00,12.69,0.00,1.00,-57.60,52.80,0 +-48.00,19.20,3.31,0.00,1.00,-52.80,48.00,0 +134.40,-19.20,12.71,0.00,1.00,-48.00,43.20,0 +-38.40,19.20,3.29,0.00,1.00,-43.20,38.40,0 +144.00,-14.40,12.73,0.00,1.00,-38.40,38.40,0 +-28.80,14.40,3.27,0.00,1.00,-33.60,33.60,0 +153.60,-14.40,12.75,0.00,1.00,-28.80,28.80,0 +-24.00,9.60,3.25,0.00,1.00,-24.00,24.00,0 +163.20,-9.60,12.77,0.00,1.00,-19.20,19.20,0 +-14.40,4.80,3.23,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,12.80,0.00,1.00,-9.60,9.60,0 +-4.80,0.00,3.20,0.00,1.00,-4.80,4.80,0 +0.00,0.00,12.82,0.00,1.00,0.00,0.00,0 +-177.60,4.80,3.18,0.00,1.00,4.80,-4.80,0 +9.60,-4.80,12.84,0.00,1.00,9.60,-9.60,0 +-168.00,9.60,3.16,0.00,1.00,14.40,-14.40,0 +14.40,-9.60,12.86,0.00,1.00,19.20,-19.20,0 +-158.40,14.40,3.14,0.00,1.00,24.00,-24.00,0 +24.00,-14.40,12.88,0.00,1.00,28.80,-28.80,0 +-148.80,19.20,3.12,0.00,1.00,33.60,-33.60,0 +33.60,-19.20,12.90,0.00,1.00,38.40,-38.40,0 +-139.20,19.20,3.10,0.00,1.00,43.20,-43.20,0 +43.20,-24.00,12.92,0.00,1.00,48.00,-48.00,0 +-129.60,24.00,3.08,0.00,1.00,52.80,-52.80,0 +52.80,-28.80,12.95,0.00,1.00,57.60,-57.60,0 +-120.00,28.80,3.05,0.00,1.00,62.40,-57.60,0 +62.40,-28.80,12.97,0.00,1.00,67.20,-62.40,0 +-110.40,28.80,3.03,0.00,1.00,72.00,-67.20,0 +76.80,-28.80,12.99,0.00,1.00,76.80,-72.00,0 +-100.80,33.60,3.01,0.00,1.00,81.60,-72.00,0 +86.40,-33.60,13.01,0.00,1.00,86.40,-76.80,0 +-86.40,33.60,2.99,0.00,1.00,91.20,-76.80,0 +96.00,-33.60,13.03,0.00,1.00,96.00,-76.80,0 +-76.80,28.80,2.97,0.00,1.00,100.80,-72.00,0 +110.40,-28.80,13.05,0.00,1.00,105.60,-72.00,0 +-67.20,28.80,2.95,0.00,1.00,110.40,-67.20,0 +120.00,-28.80,13.07,0.00,1.00,115.20,-62.40,0 +-57.60,28.80,2.93,0.00,1.00,120.00,-57.60,0 +129.60,-24.00,13.09,0.00,1.00,124.80,-52.80,0 +-48.00,24.00,2.91,0.00,1.00,129.60,-48.00,0 +139.20,-24.00,13.12,0.00,1.00,134.40,-43.20,0 +-38.40,19.20,2.88,0.00,1.00,139.20,-38.40,0 +148.80,-19.20,13.14,0.00,1.00,144.00,-33.60,0 +-28.80,14.40,2.86,0.00,1.00,148.80,-28.80,0 +158.40,-14.40,13.16,0.00,1.00,153.60,-24.00,0 +-19.20,9.60,2.84,0.00,1.00,158.40,-19.20,0 +168.00,-9.60,13.18,0.00,1.00,163.20,-14.40,0 +-9.60,4.80,2.82,0.00,1.00,168.00,-9.60,0 +172.80,-4.80,13.20,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,2.80,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,13.22,0.00,1.00,-177.60,0.00,0 +4.80,-4.80,2.78,0.00,1.00,-172.80,4.80,0 +-168.00,4.80,13.24,0.00,1.00,-168.00,9.60,0 +14.40,-9.60,2.76,0.00,1.00,-163.20,14.40,0 +-163.20,9.60,13.27,0.00,1.00,-158.40,19.20,0 +24.00,-14.40,2.73,0.00,1.00,-153.60,24.00,0 +-153.60,14.40,13.29,0.00,1.00,-148.80,28.80,0 +33.60,-19.20,2.71,0.00,1.00,-144.00,33.60,0 +-144.00,19.20,13.31,0.00,1.00,-139.20,38.40,0 +43.20,-24.00,2.69,0.00,1.00,-134.40,43.20,0 +-134.40,24.00,13.33,0.00,1.00,-129.60,48.00,0 +52.80,-24.00,2.67,0.00,1.00,-124.80,52.80,0 +-124.80,28.80,13.35,0.00,1.00,-120.00,57.60,0 +62.40,-28.80,2.65,0.00,1.00,-115.20,62.40,0 +-115.20,28.80,13.37,0.00,1.00,-110.40,67.20,0 +72.00,-28.80,2.63,0.00,1.00,-105.60,72.00,0 +-100.80,28.80,13.39,0.00,1.00,-100.80,72.00,0 +81.60,-33.60,2.61,0.00,1.00,-96.00,76.80,0 +-91.20,33.60,13.42,0.00,1.00,-91.20,76.80,0 +96.00,-33.60,2.58,0.00,1.00,-86.40,76.80,0 +-81.60,33.60,13.44,0.00,1.00,-81.60,72.00,0 +105.60,-28.80,2.56,0.00,1.00,-76.80,72.00,0 +-67.20,28.80,13.46,0.00,1.00,-72.00,67.20,0 +115.20,-28.80,2.54,0.00,1.00,-67.20,62.40,0 +-57.60,28.80,13.48,0.00,1.00,-62.40,57.60,0 +124.80,-28.80,2.52,0.00,1.00,-57.60,57.60,0 +-48.00,24.00,13.50,0.00,1.00,-52.80,52.80,0 +134.40,-24.00,2.50,0.00,1.00,-48.00,48.00,0 +-38.40,19.20,13.52,0.00,1.00,-43.20,43.20,0 +144.00,-19.20,2.48,0.00,1.00,-38.40,38.40,0 +-28.80,19.20,13.54,0.00,1.00,-33.60,33.60,0 +153.60,-14.40,2.46,0.00,1.00,-28.80,28.80,0 +-19.20,14.40,13.56,0.00,1.00,-24.00,24.00,0 +163.20,-9.60,2.44,0.00,1.00,-19.20,19.20,0 +-14.40,9.60,13.59,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,2.41,0.00,1.00,-9.60,9.60,0 +-4.80,4.80,13.61,0.00,1.00,-4.80,4.80,0 +0.00,0.00,2.39,0.00,1.00,0.00,0.00,0 +-177.60,4.80,13.63,0.00,1.00,4.80,-4.80,0 +9.60,-4.80,2.37,0.00,1.00,9.60,-9.60,0 +-168.00,9.60,13.65,0.00,1.00,14.40,-14.40,0 +14.40,-9.60,2.35,0.00,1.00,19.20,-19.20,0 +-158.40,14.40,13.67,0.00,1.00,24.00,-24.00,0 +24.00,-14.40,2.33,0.00,1.00,28.80,-28.80,0 +-153.60,19.20,13.69,0.00,1.00,33.60,-33.60,0 +33.60,-24.00,2.31,0.00,1.00,38.40,-38.40,0 +-144.00,24.00,13.71,0.00,1.00,43.20,-43.20,0 +43.20,-24.00,2.29,0.00,1.00,48.00,-48.00,0 +-134.40,28.80,13.74,0.00,1.00,52.80,-52.80,0 +52.80,-28.80,2.26,0.00,1.00,57.60,-57.60,0 +-124.80,33.60,13.76,0.00,1.00,62.40,-62.40,0 +62.40,-33.60,2.24,0.00,1.00,67.20,-67.20,0 +-110.40,33.60,13.78,0.00,1.00,72.00,-72.00,0 +72.00,-33.60,2.22,0.00,1.00,76.80,-72.00,0 +-100.80,38.40,13.80,0.00,1.00,81.60,-76.80,0 +86.40,-38.40,2.20,0.00,1.00,86.40,-81.60,0 +-86.40,38.40,13.82,0.00,1.00,91.20,-81.60,0 +96.00,-38.40,2.18,0.00,1.00,96.00,-81.60,0 +-76.80,33.60,13.84,0.00,1.00,100.80,-76.80,0 +110.40,-33.60,2.16,0.00,1.00,105.60,-72.00,0 +-67.20,33.60,13.86,0.00,1.00,110.40,-67.20,0 +120.00,-33.60,2.14,0.00,1.00,115.20,-62.40,0 +-52.80,28.80,13.89,0.00,1.00,120.00,-57.60,0 +129.60,-28.80,2.11,0.00,1.00,124.80,-52.80,0 +-43.20,28.80,13.91,0.00,1.00,129.60,-48.00,0 +139.20,-24.00,2.09,0.00,1.00,134.40,-43.20,0 +-33.60,24.00,13.93,0.00,1.00,139.20,-38.40,0 +148.80,-19.20,2.07,0.00,1.00,144.00,-33.60,0 +-24.00,19.20,13.95,0.00,1.00,148.80,-28.80,0 +158.40,-14.40,2.05,0.00,1.00,153.60,-24.00,0 +-19.20,14.40,13.97,0.00,1.00,158.40,-19.20,0 +168.00,-9.60,2.03,0.00,1.00,163.20,-14.40,0 +-9.60,4.80,13.99,0.00,1.00,168.00,-9.60,0 +172.80,-4.80,2.01,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,14.01,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,1.99,0.00,1.00,-177.60,0.00,0 +4.80,-4.80,14.03,0.00,1.00,-172.80,4.80,0 +-168.00,4.80,1.97,0.00,1.00,-168.00,9.60,0 +14.40,-9.60,14.06,0.00,1.00,-163.20,14.40,0 +-163.20,14.40,1.94,0.00,1.00,-158.40,19.20,0 +24.00,-14.40,14.08,0.00,1.00,-153.60,24.00,0 +-153.60,19.20,1.92,0.00,1.00,-148.80,28.80,0 +28.80,-19.20,14.10,0.00,1.00,-144.00,33.60,0 +-144.00,24.00,1.90,0.00,1.00,-139.20,38.40,0 +38.40,-24.00,14.12,0.00,1.00,-134.40,43.20,0 +-134.40,28.80,1.88,0.00,1.00,-129.60,48.00,0 +48.00,-28.80,14.14,0.00,1.00,-124.80,52.80,0 +-124.80,28.80,1.86,0.00,1.00,-120.00,57.60,0 +57.60,-33.60,14.16,0.00,1.00,-115.20,62.40,0 +-115.20,33.60,1.84,0.00,1.00,-110.40,67.20,0 +72.00,-33.60,14.18,0.00,1.00,-105.60,72.00,0 +-105.60,33.60,1.82,0.00,1.00,-100.80,76.80,0 +81.60,-38.40,14.21,0.00,1.00,-96.00,81.60,0 +-91.20,38.40,1.79,0.00,1.00,-91.20,81.60,0 +96.00,-38.40,14.23,0.00,1.00,-86.40,81.60,0 +-81.60,38.40,1.77,0.00,1.00,-81.60,76.80,0 +105.60,-33.60,14.25,0.00,1.00,-76.80,72.00,0 +-67.20,33.60,1.75,0.00,1.00,-72.00,72.00,0 +120.00,-33.60,14.27,0.00,1.00,-67.20,67.20,0 +-57.60,33.60,1.73,0.00,1.00,-62.40,62.40,0 +129.60,-28.80,14.29,0.00,1.00,-57.60,57.60,0 +-48.00,28.80,1.71,0.00,1.00,-52.80,52.80,0 +139.20,-24.00,14.31,0.00,1.00,-48.00,48.00,0 +-38.40,24.00,1.69,0.00,1.00,-43.20,43.20,0 +148.80,-24.00,14.33,0.00,1.00,-38.40,38.40,0 +-28.80,19.20,1.67,0.00,1.00,-33.60,33.60,0 +158.40,-14.40,14.36,0.00,1.00,-28.80,28.80,0 +-19.20,14.40,1.64,0.00,1.00,-24.00,24.00,0 +163.20,-9.60,14.38,0.00,1.00,-19.20,19.20,0 +-9.60,9.60,1.62,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,14.40,0.00,1.00,-9.60,9.60,0 +-4.80,4.80,1.60,0.00,1.00,-4.80,4.80,0 +0.00,0.00,14.42,0.00,1.00,0.00,0.00,0 +-177.60,4.80,1.58,0.00,1.00,4.80,-4.80,0 +9.60,-4.80,14.44,0.00,1.00,9.60,-9.60,0 +-168.00,9.60,1.56,0.00,1.00,14.40,-14.40,0 +14.40,-14.40,14.46,0.00,1.00,19.20,-19.20,0 +-163.20,14.40,1.54,0.00,1.00,24.00,-24.00,0 +24.00,-19.20,14.48,0.00,1.00,28.80,-28.80,0 +-153.60,19.20,1.52,0.00,1.00,33.60,-33.60,0 +28.80,-24.00,14.50,0.00,1.00,38.40,-38.40,0 +-144.00,28.80,1.50,0.00,1.00,43.20,-43.20,0 +38.40,-28.80,14.53,0.00,1.00,48.00,-48.00,0 +-134.40,33.60,1.47,0.00,1.00,52.80,-52.80,0 +48.00,-33.60,14.55,0.00,1.00,57.60,-57.60,0 +-124.80,33.60,1.45,0.00,1.00,62.40,-62.40,0 +62.40,-38.40,14.57,0.00,1.00,67.20,-67.20,0 +-115.20,38.40,1.43,0.00,1.00,72.00,-72.00,0 +72.00,-38.40,14.59,0.00,1.00,76.80,-76.80,0 +-100.80,43.20,1.41,0.00,1.00,81.60,-81.60,0 +86.40,-43.20,14.61,0.00,1.00,86.40,-86.40,0 +-86.40,43.20,1.39,0.00,1.00,91.20,-86.40,0 +96.00,-43.20,14.63,0.00,1.00,96.00,-81.60,0 +-76.80,38.40,1.37,0.00,1.00,100.80,-76.80,0 +110.40,-38.40,14.65,0.00,1.00,105.60,-72.00,0 +-62.40,38.40,1.35,0.00,1.00,110.40,-67.20,0 +120.00,-38.40,14.68,0.00,1.00,115.20,-62.40,0 +-52.80,33.60,1.32,0.00,1.00,120.00,-57.60,0 +134.40,-33.60,14.70,0.00,1.00,124.80,-52.80,0 +-43.20,28.80,1.30,0.00,1.00,129.60,-48.00,0 +144.00,-28.80,14.72,0.00,1.00,134.40,-43.20,0 +-33.60,24.00,1.28,0.00,1.00,139.20,-38.40,0 +153.60,-24.00,14.74,0.00,1.00,144.00,-33.60,0 +-24.00,19.20,1.26,0.00,1.00,148.80,-28.80,0 +158.40,-19.20,14.76,0.00,1.00,153.60,-24.00,0 +-14.40,14.40,1.24,0.00,1.00,158.40,-19.20,0 +168.00,-9.60,14.78,0.00,1.00,163.20,-14.40,0 +-9.60,9.60,1.22,0.00,1.00,168.00,-9.60,0 +172.80,-4.80,14.80,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,1.20,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,14.83,0.00,1.00,-177.60,0.00,0 +4.80,-4.80,1.17,0.00,1.00,-172.80,4.80,0 +-172.80,9.60,14.85,0.00,1.00,-168.00,9.60,0 +14.40,-9.60,1.15,0.00,1.00,-163.20,14.40,0 +-163.20,14.40,14.87,0.00,1.00,-158.40,19.20,0 +19.20,-19.20,1.13,0.00,1.00,-153.60,24.00,0 +-153.60,19.20,14.89,0.00,1.00,-148.80,28.80,0 +28.80,-24.00,1.11,0.00,1.00,-144.00,33.60,0 +-148.80,24.00,14.91,0.00,1.00,-139.20,38.40,0 +38.40,-28.80,1.09,0.00,1.00,-134.40,43.20,0 +-139.20,28.80,14.93,0.00,1.00,-129.60,48.00,0 +48.00,-33.60,1.07,0.00,1.00,-124.80,52.80,0 +-129.60,33.60,14.95,0.00,1.00,-120.00,57.60,0 +57.60,-38.40,1.05,0.00,1.00,-115.20,62.40,0 +-115.20,38.40,14.97,0.00,1.00,-110.40,67.20,0 +67.20,-38.40,1.03,0.00,1.00,-105.60,72.00,0 +-105.60,38.40,15.00,0.00,1.00,-100.80,76.80,0 +81.60,-43.20,1.00,0.00,1.00,-96.00,81.60,0 +-91.20,43.20,15.02,0.00,1.00,-91.20,86.40,0 +96.00,-43.20,0.98,0.00,1.00,-86.40,86.40,0 +-76.80,43.20,15.04,0.00,1.00,-81.60,81.60,0 +105.60,-38.40,0.96,0.00,1.00,-76.80,76.80,0 +-67.20,38.40,15.06,0.00,1.00,-72.00,72.00,0 +120.00,-38.40,0.94,0.00,1.00,-67.20,67.20,0 +-52.80,33.60,15.08,0.00,1.00,-62.40,62.40,0 +129.60,-33.60,0.92,0.00,1.00,-57.60,57.60,0 +-43.20,33.60,15.10,0.00,1.00,-52.80,52.80,0 +139.20,-28.80,0.90,0.00,1.00,-48.00,48.00,0 +-33.60,28.80,15.12,0.00,1.00,-43.20,43.20,0 +148.80,-24.00,0.88,0.00,1.00,-38.40,38.40,0 +-28.80,19.20,15.15,0.00,1.00,-33.60,33.60,0 +158.40,-19.20,0.85,0.00,1.00,-28.80,28.80,0 +-19.20,14.40,15.17,0.00,1.00,-24.00,24.00,0 +163.20,-14.40,0.83,0.00,1.00,-19.20,19.20,0 +-9.60,9.60,15.19,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,0.81,0.00,1.00,-9.60,9.60,0 +-4.80,4.80,15.21,0.00,1.00,-4.80,4.80,0 +0.00,0.00,0.79,0.00,1.00,0.00,0.00,0 +-177.60,4.80,15.23,0.00,1.00,4.80,-4.80,0 +4.80,-4.80,0.77,0.00,1.00,9.60,-9.60,0 +-168.00,9.60,15.25,0.00,1.00,14.40,-14.40,0 +14.40,-14.40,0.75,0.00,1.00,19.20,-19.20,0 +-163.20,19.20,15.27,0.00,1.00,24.00,-24.00,0 +19.20,-19.20,0.73,0.00,1.00,28.80,-28.80,0 +-153.60,24.00,15.30,0.00,1.00,33.60,-33.60,0 +28.80,-28.80,0.70,0.00,1.00,38.40,-38.40,0 +-148.80,28.80,15.32,0.00,1.00,43.20,-43.20,0 +38.40,-33.60,0.68,0.00,1.00,48.00,-48.00,0 +-139.20,33.60,15.34,0.00,1.00,52.80,-52.80,0 +48.00,-38.40,0.66,0.00,1.00,57.60,-57.60,0 +-124.80,38.40,15.36,0.00,1.00,62.40,-62.40,0 +57.60,-43.20,0.64,0.00,1.00,67.20,-67.20,0 +-115.20,43.20,15.38,0.00,1.00,72.00,-72.00,0 +72.00,-43.20,0.62,0.00,1.00,76.80,-76.80,0 +-100.80,43.20,15.40,0.00,1.00,81.60,-81.60,0 +86.40,-48.00,0.60,0.00,1.00,86.40,-86.40,0 +-86.40,48.00,15.42,0.00,1.00,91.20,-86.40,0 +100.80,-48.00,0.58,0.00,1.00,96.00,-81.60,0 +-76.80,43.20,15.44,0.00,1.00,100.80,-76.80,0 +110.40,-43.20,0.56,0.00,1.00,105.60,-72.00,0 +-62.40,43.20,15.47,0.00,1.00,110.40,-67.20,0 +124.80,-38.40,0.53,0.00,1.00,115.20,-62.40,0 +-48.00,38.40,15.49,0.00,1.00,120.00,-57.60,0 +134.40,-38.40,0.51,0.00,1.00,124.80,-52.80,0 +-38.40,33.60,15.51,0.00,1.00,129.60,-48.00,0 +144.00,-28.80,0.49,0.00,1.00,134.40,-43.20,0 +-28.80,28.80,15.53,0.00,1.00,139.20,-38.40,0 +153.60,-24.00,0.47,0.00,1.00,144.00,-33.60,0 +-24.00,24.00,15.55,0.00,1.00,148.80,-28.80,0 +163.20,-19.20,0.45,0.00,1.00,153.60,-24.00,0 +-14.40,14.40,15.57,0.00,1.00,158.40,-19.20,0 +168.00,-14.40,0.43,0.00,1.00,163.20,-14.40,0 +-9.60,9.60,15.59,0.00,1.00,168.00,-9.60,0 +172.80,-4.80,0.41,0.00,1.00,172.80,-4.80,0 +-0.00,0.00,15.62,0.00,1.00,177.60,-0.00,0 +-177.60,0.00,0.38,0.00,1.00,-177.60,0.00,0 +4.80,-4.80,15.64,0.00,1.00,-172.80,4.80,0 +-172.80,9.60,0.36,0.00,1.00,-168.00,9.60,0 +9.60,-14.40,15.66,0.00,1.00,-163.20,14.40,0 +-163.20,14.40,0.34,0.00,1.00,-158.40,19.20,0 +19.20,-19.20,15.68,0.00,1.00,-153.60,24.00,0 +-158.40,24.00,0.32,0.00,1.00,-148.80,28.80,0 +28.80,-24.00,15.70,0.00,1.00,-144.00,33.60,0 +-148.80,28.80,0.30,0.00,1.00,-139.20,38.40,0 +33.60,-28.80,15.72,0.00,1.00,-134.40,43.20,0 +-139.20,33.60,0.28,0.00,1.00,-129.60,48.00,0 +43.20,-38.40,15.74,0.00,1.00,-124.80,52.80,0 +-129.60,38.40,0.26,0.00,1.00,-120.00,57.60,0 +57.60,-38.40,15.77,0.00,1.00,-115.20,62.40,0 +-120.00,43.20,0.23,0.00,1.00,-110.40,67.20,0 +67.20,-43.20,15.79,0.00,1.00,-105.60,72.00,0 +-105.60,43.20,0.21,0.00,1.00,-100.80,76.80,0 +81.60,-48.00,15.81,0.00,1.00,-96.00,81.60,0 +-91.20,48.00,0.19,0.00,1.00,-91.20,86.40,0 +96.00,-48.00,15.83,0.00,1.00,-86.40,86.40,0 +-76.80,43.20,0.17,0.00,1.00,-81.60,81.60,0 +110.40,-43.20,15.85,0.00,1.00,-76.80,76.80,0 +-67.20,43.20,0.15,0.00,1.00,-72.00,72.00,0 +120.00,-43.20,15.87,0.00,1.00,-67.20,67.20,0 +-52.80,38.40,0.13,0.00,1.00,-62.40,62.40,0 +134.40,-38.40,15.89,0.00,1.00,-57.60,57.60,0 +-43.20,33.60,0.11,0.00,1.00,-52.80,52.80,0 +144.00,-33.60,15.91,0.00,1.00,-48.00,48.00,0 +-33.60,28.80,0.09,0.00,1.00,-43.20,43.20,0 +153.60,-28.80,15.94,0.00,1.00,-38.40,38.40,0 +-24.00,24.00,0.06,0.00,1.00,-33.60,33.60,0 +158.40,-19.20,15.96,0.00,1.00,-28.80,28.80,0 +-19.20,19.20,0.04,0.00,1.00,-24.00,24.00,0 +168.00,-14.40,15.98,0.00,1.00,-19.20,19.20,0 +-9.60,9.60,0.02,0.00,1.00,-14.40,14.40,0 +172.80,-4.80,16.00,0.00,1.00,-9.60,9.60,0 +-4.80,4.80,0.00,0.00,1.00,-4.80,4.80,0 diff --git a/scripts/testv/stvISM4.csv b/scripts/testv/stvISM4.csv index 326176319a11d780fbf4dab842869b792887c8a5..8a14c3413ddd2dd47415bf6de3e19631f65f8f6c 100644 --- a/scripts/testv/stvISM4.csv +++ b/scripts/testv/stvISM4.csv @@ -1,1500 +1,1500 @@ --0.00,0.00,0.00,0.00,1.00,0.00,4.80 --0.00,4.80,0.06,0.00,1.00,4.80,9.60 --0.00,9.60,0.13,0.00,1.00,9.60,14.40 --0.00,14.40,0.19,0.00,1.00,14.40,19.20 --0.00,19.20,0.26,0.00,1.00,19.20,24.00 --0.00,24.00,0.32,0.00,1.00,24.00,28.80 --0.00,28.80,0.39,0.00,1.00,28.80,33.60 --0.00,33.60,0.45,0.00,1.00,33.60,38.40 --0.00,38.40,0.51,0.00,1.00,38.40,43.20 --0.00,43.20,0.58,0.00,1.00,43.20,48.00 --0.00,48.00,0.64,0.00,1.00,48.00,52.80 --0.00,52.80,0.71,0.00,1.00,52.80,57.60 --0.00,57.60,0.77,0.00,1.00,57.60,62.40 --0.00,62.40,0.84,0.00,1.00,62.40,67.20 --0.00,67.20,0.90,0.00,1.00,67.20,72.00 --0.00,72.00,0.96,0.00,1.00,72.00,76.80 --0.00,76.80,1.03,0.00,1.00,76.80,81.60 --0.00,81.60,1.09,0.00,1.00,81.60,86.40 --0.00,86.40,1.16,0.00,1.00,86.40,86.40 --177.60,89.20,1.22,0.00,1.00,91.20,81.60 --177.60,86.40,1.29,0.00,1.00,96.00,76.80 --177.60,81.60,1.35,0.00,1.00,100.80,72.00 --177.60,76.80,1.41,0.00,1.00,105.60,67.20 --177.60,72.00,1.48,0.00,1.00,110.40,62.40 --177.60,67.20,1.54,0.00,1.00,115.20,57.60 -177.60,62.40,1.61,0.00,1.00,120.00,52.80 -177.60,57.60,1.67,0.00,1.00,124.80,48.00 -177.60,52.80,1.73,0.00,1.00,129.60,43.20 -177.60,48.00,1.80,0.00,1.00,134.40,38.40 -177.60,43.20,1.86,0.00,1.00,139.20,33.60 -177.60,38.40,1.93,0.00,1.00,144.00,28.80 -177.60,33.60,1.99,0.00,1.00,148.80,24.00 -177.60,28.80,2.06,0.00,1.00,153.60,19.20 -177.60,24.00,2.12,0.00,1.00,158.40,14.40 -177.60,19.20,2.18,0.00,1.00,163.20,9.60 -177.60,14.40,2.25,0.00,1.00,168.00,4.80 -177.60,9.60,2.31,0.00,1.00,172.80,0.00 -177.60,4.80,2.38,0.00,1.00,177.60,-0.00 --177.60,-0.00,2.44,0.00,1.00,-177.60,-4.80 --177.60,-4.80,2.51,0.00,1.00,-172.80,-9.60 --177.60,-9.60,2.57,0.00,1.00,-168.00,-14.40 --177.60,-14.40,2.63,0.00,1.00,-163.20,-19.20 --177.60,-19.20,2.70,0.00,1.00,-158.40,-24.00 --177.60,-24.00,2.76,0.00,1.00,-153.60,-28.80 --177.60,-28.80,2.83,0.00,1.00,-148.80,-33.60 --177.60,-33.60,2.89,0.00,1.00,-144.00,-38.40 --177.60,-38.40,2.96,0.00,1.00,-139.20,-43.20 --177.60,-48.00,3.02,0.00,1.00,-134.40,-48.00 --177.60,-48.00,3.08,0.00,1.00,-129.60,-52.80 --177.60,-52.80,3.15,0.00,1.00,-124.80,-57.60 --177.60,-57.60,3.21,0.00,1.00,-120.00,-62.40 -177.60,-62.40,3.28,0.00,1.00,-115.20,-67.20 -177.60,-67.20,3.34,0.00,1.00,-110.40,-72.00 -177.60,-76.80,3.41,0.00,1.00,-105.60,-76.80 -177.60,-76.80,3.47,0.00,1.00,-100.80,-81.60 -177.60,-86.40,3.53,0.00,1.00,-96.00,-86.40 -177.60,-89.20,3.60,0.00,1.00,-91.20,-86.40 -0.00,-86.40,3.66,0.00,1.00,-86.40,-81.60 -0.00,-81.60,3.73,0.00,1.00,-81.60,-76.80 -0.00,-76.80,3.79,0.00,1.00,-76.80,-72.00 -0.00,-72.00,3.86,0.00,1.00,-72.00,-67.20 -0.00,-67.20,3.92,0.00,1.00,-67.20,-62.40 -0.00,-62.40,3.98,0.00,1.00,-62.40,-57.60 -0.00,-57.60,4.05,0.00,1.00,-57.60,-52.80 -0.00,-52.80,4.11,0.00,1.00,-52.80,-48.00 -0.00,-48.00,4.18,0.00,1.00,-48.00,-43.20 -0.00,-43.20,4.24,0.00,1.00,-43.20,-38.40 -0.00,-38.40,4.31,0.00,1.00,-38.40,-33.60 -0.00,-33.60,4.37,0.00,1.00,-33.60,-28.80 -0.00,-28.80,4.43,0.00,1.00,-28.80,-24.00 -0.00,-24.00,4.50,0.00,1.00,-24.00,-19.20 -0.00,-19.20,4.56,0.00,1.00,-19.20,-14.40 -0.00,-14.40,4.63,0.00,1.00,-14.40,-9.60 -0.00,-9.60,4.69,0.00,1.00,-9.60,-4.80 -0.00,-4.80,4.76,0.00,1.00,-4.80,0.00 -0.00,0.00,4.82,0.00,1.00,0.00,4.80 -0.00,4.80,4.88,0.00,1.00,4.80,9.60 -0.00,9.60,4.95,0.00,1.00,9.60,14.40 -0.00,14.40,5.01,0.00,1.00,14.40,19.20 -0.00,19.20,5.08,0.00,1.00,19.20,24.00 -0.00,24.00,5.14,0.00,1.00,24.00,28.80 -4.80,28.80,5.20,0.00,1.00,28.80,33.60 -4.80,33.60,5.27,0.00,1.00,33.60,38.40 -4.80,38.40,5.33,0.00,1.00,38.40,43.20 -4.80,43.20,5.40,0.00,1.00,43.20,48.00 -4.80,48.00,5.46,0.00,1.00,48.00,52.80 -4.80,52.80,5.53,0.00,1.00,52.80,57.60 -9.60,57.60,5.59,0.00,1.00,57.60,62.40 -9.60,62.40,5.65,0.00,1.00,62.40,67.20 -9.60,67.20,5.72,0.00,1.00,67.20,72.00 -14.40,72.00,5.78,0.00,1.00,72.00,76.80 -19.20,76.80,5.85,0.00,1.00,76.80,81.60 -28.80,81.60,5.91,0.00,1.00,81.60,86.40 -52.80,86.40,5.98,0.00,1.00,86.40,86.40 -105.60,86.40,6.04,0.00,1.00,91.20,81.60 -139.20,81.60,6.10,0.00,1.00,96.00,76.80 -158.40,76.80,6.17,0.00,1.00,100.80,72.00 -163.20,72.00,6.23,0.00,1.00,105.60,67.20 -168.00,67.20,6.30,0.00,1.00,110.40,62.40 -168.00,62.40,6.36,0.00,1.00,115.20,57.60 -172.80,57.60,6.43,0.00,1.00,120.00,52.80 -172.80,52.80,6.49,0.00,1.00,124.80,48.00 -172.80,48.00,6.55,0.00,1.00,129.60,43.20 -172.80,43.20,6.62,0.00,1.00,134.40,38.40 -177.60,38.40,6.68,0.00,1.00,139.20,33.60 -177.60,33.60,6.75,0.00,1.00,144.00,28.80 -177.60,28.80,6.81,0.00,1.00,148.80,24.00 -177.60,24.00,6.88,0.00,1.00,153.60,19.20 -177.60,19.20,6.94,0.00,1.00,158.40,14.40 -177.60,14.40,7.00,0.00,1.00,163.20,9.60 -177.60,9.60,7.07,0.00,1.00,168.00,4.80 -177.60,4.80,7.13,0.00,1.00,172.80,0.00 -177.60,0.00,7.20,0.00,1.00,177.60,-0.00 --177.60,-0.00,7.26,0.00,1.00,-177.60,-4.80 --177.60,-4.80,7.33,0.00,1.00,-172.80,-9.60 --177.60,-9.60,7.39,0.00,1.00,-168.00,-14.40 --177.60,-14.40,7.45,0.00,1.00,-163.20,-19.20 --177.60,-19.20,7.52,0.00,1.00,-158.40,-24.00 --177.60,-24.00,7.58,0.00,1.00,-153.60,-28.80 --177.60,-28.80,7.65,0.00,1.00,-148.80,-33.60 --177.60,-33.60,7.71,0.00,1.00,-144.00,-38.40 --177.60,-38.40,7.78,0.00,1.00,-139.20,-43.20 --172.80,-43.20,7.84,0.00,1.00,-134.40,-48.00 --172.80,-48.00,7.90,0.00,1.00,-129.60,-52.80 --172.80,-52.80,7.97,0.00,1.00,-124.80,-57.60 --172.80,-57.60,8.03,0.00,1.00,-120.00,-62.40 --168.00,-62.40,8.10,0.00,1.00,-115.20,-67.20 --168.00,-67.20,8.16,0.00,1.00,-110.40,-72.00 --163.20,-72.00,8.22,0.00,1.00,-105.60,-76.80 --158.40,-76.80,8.29,0.00,1.00,-100.80,-81.60 --139.20,-81.60,8.35,0.00,1.00,-96.00,-86.40 --105.60,-86.40,8.42,0.00,1.00,-91.20,-86.40 --52.80,-86.40,8.48,0.00,1.00,-86.40,-81.60 --28.80,-81.60,8.55,0.00,1.00,-81.60,-76.80 --19.20,-76.80,8.61,0.00,1.00,-76.80,-72.00 --14.40,-72.00,8.67,0.00,1.00,-72.00,-67.20 --9.60,-67.20,8.74,0.00,1.00,-67.20,-62.40 --9.60,-62.40,8.80,0.00,1.00,-62.40,-57.60 --9.60,-57.60,8.87,0.00,1.00,-57.60,-52.80 --4.80,-52.80,8.93,0.00,1.00,-52.80,-48.00 --4.80,-48.00,9.00,0.00,1.00,-48.00,-43.20 --4.80,-43.20,9.06,0.00,1.00,-43.20,-38.40 --4.80,-38.40,9.12,0.00,1.00,-38.40,-33.60 --4.80,-33.60,9.19,0.00,1.00,-33.60,-28.80 --4.80,-28.80,9.25,0.00,1.00,-28.80,-24.00 --0.00,-24.00,9.32,0.00,1.00,-24.00,-19.20 --0.00,-19.20,9.38,0.00,1.00,-19.20,-14.40 --0.00,-14.40,9.45,0.00,1.00,-14.40,-9.60 --0.00,-9.60,9.51,0.00,1.00,-9.60,-4.80 --0.00,-4.80,9.57,0.00,1.00,-4.80,0.00 -0.00,0.00,9.64,0.00,1.00,0.00,4.80 -0.00,4.80,9.70,0.00,1.00,4.80,9.60 -0.00,9.60,9.77,0.00,1.00,9.60,14.40 -4.80,14.40,9.83,0.00,1.00,14.40,19.20 -4.80,19.20,9.90,0.00,1.00,19.20,24.00 -4.80,24.00,9.96,0.00,1.00,24.00,28.80 -4.80,28.80,10.02,0.00,1.00,28.80,33.60 -4.80,33.60,10.09,0.00,1.00,33.60,38.40 -9.60,38.40,10.15,0.00,1.00,38.40,43.20 -9.60,43.20,10.22,0.00,1.00,43.20,48.00 -9.60,48.00,10.28,0.00,1.00,48.00,52.80 -14.40,52.80,10.35,0.00,1.00,52.80,57.60 -14.40,57.60,10.41,0.00,1.00,57.60,62.40 -19.20,62.40,10.47,0.00,1.00,62.40,67.20 -24.00,67.20,10.54,0.00,1.00,67.20,72.00 -28.80,72.00,10.60,0.00,1.00,72.00,72.00 -33.60,72.00,10.67,0.00,1.00,76.80,76.80 -48.00,76.80,10.73,0.00,1.00,81.60,81.60 -67.20,81.60,10.80,0.00,1.00,86.40,81.60 -96.00,81.60,10.86,0.00,1.00,91.20,81.60 -120.00,76.80,10.92,0.00,1.00,96.00,76.80 -139.20,76.80,10.99,0.00,1.00,100.80,72.00 -148.80,72.00,11.05,0.00,1.00,105.60,67.20 -153.60,67.20,11.12,0.00,1.00,110.40,62.40 -158.40,62.40,11.18,0.00,1.00,115.20,57.60 -163.20,57.60,11.24,0.00,1.00,120.00,52.80 -168.00,52.80,11.31,0.00,1.00,124.80,48.00 -168.00,48.00,11.37,0.00,1.00,129.60,43.20 -168.00,43.20,11.44,0.00,1.00,134.40,38.40 -172.80,38.40,11.50,0.00,1.00,139.20,33.60 -172.80,33.60,11.57,0.00,1.00,144.00,28.80 -172.80,28.80,11.63,0.00,1.00,148.80,24.00 -177.60,24.00,11.69,0.00,1.00,153.60,19.20 -177.60,19.20,11.76,0.00,1.00,158.40,14.40 -177.60,14.40,11.82,0.00,1.00,163.20,9.60 -177.60,9.60,11.89,0.00,1.00,168.00,4.80 -177.60,4.80,11.95,0.00,1.00,172.80,0.00 -177.60,0.00,12.02,0.00,1.00,177.60,-0.00 --177.60,-0.00,12.08,0.00,1.00,-177.60,-4.80 --177.60,-4.80,12.14,0.00,1.00,-172.80,-9.60 --177.60,-9.60,12.21,0.00,1.00,-168.00,-14.40 --177.60,-14.40,12.27,0.00,1.00,-163.20,-19.20 --177.60,-19.20,12.34,0.00,1.00,-158.40,-24.00 --177.60,-24.00,12.40,0.00,1.00,-153.60,-28.80 --172.80,-28.80,12.47,0.00,1.00,-148.80,-33.60 --172.80,-33.60,12.53,0.00,1.00,-144.00,-38.40 --172.80,-38.40,12.59,0.00,1.00,-139.20,-43.20 --168.00,-43.20,12.66,0.00,1.00,-134.40,-48.00 --168.00,-48.00,12.72,0.00,1.00,-129.60,-52.80 --168.00,-52.80,12.79,0.00,1.00,-124.80,-57.60 --163.20,-57.60,12.85,0.00,1.00,-120.00,-62.40 --158.40,-62.40,12.92,0.00,1.00,-115.20,-67.20 --153.60,-67.20,12.98,0.00,1.00,-110.40,-72.00 --148.80,-72.00,13.04,0.00,1.00,-105.60,-76.80 --139.20,-76.80,13.11,0.00,1.00,-100.80,-81.60 --120.00,-76.80,13.17,0.00,1.00,-96.00,-81.60 --96.00,-81.60,13.24,0.00,1.00,-91.20,-81.60 --67.20,-81.60,13.30,0.00,1.00,-86.40,-76.80 --48.00,-76.80,13.37,0.00,1.00,-81.60,-72.00 --33.60,-72.00,13.43,0.00,1.00,-76.80,-72.00 --28.80,-72.00,13.49,0.00,1.00,-72.00,-67.20 --24.00,-67.20,13.56,0.00,1.00,-67.20,-62.40 --19.20,-62.40,13.62,0.00,1.00,-62.40,-57.60 --14.40,-57.60,13.69,0.00,1.00,-57.60,-52.80 --14.40,-52.80,13.75,0.00,1.00,-52.80,-48.00 --9.60,-48.00,13.82,0.00,1.00,-48.00,-43.20 --9.60,-43.20,13.88,0.00,1.00,-43.20,-38.40 --9.60,-38.40,13.94,0.00,1.00,-38.40,-33.60 --4.80,-33.60,14.01,0.00,1.00,-33.60,-28.80 --4.80,-28.80,14.07,0.00,1.00,-28.80,-24.00 --4.80,-24.00,14.14,0.00,1.00,-24.00,-19.20 --4.80,-19.20,14.20,0.00,1.00,-19.20,-14.40 --4.80,-14.40,14.27,0.00,1.00,-14.40,-9.60 --0.00,-9.60,14.33,0.00,1.00,-9.60,-4.80 --0.00,-4.80,14.39,0.00,1.00,-4.80,0.00 -0.00,0.00,14.46,0.00,1.00,0.00,4.80 -0.00,4.80,14.52,0.00,1.00,4.80,9.60 -4.80,9.60,14.59,0.00,1.00,9.60,14.40 -4.80,14.40,14.65,0.00,1.00,14.40,19.20 -4.80,19.20,14.71,0.00,1.00,19.20,24.00 -4.80,24.00,14.78,0.00,1.00,24.00,28.80 -9.60,28.80,14.84,0.00,1.00,28.80,33.60 -9.60,33.60,14.91,0.00,1.00,33.60,38.40 -9.60,38.40,14.97,0.00,1.00,38.40,43.20 -14.40,43.20,15.04,0.00,1.00,43.20,48.00 -14.40,48.00,15.10,0.00,1.00,48.00,52.80 -19.20,52.80,15.16,0.00,1.00,52.80,57.60 -19.20,52.80,15.23,0.00,1.00,57.60,57.60 -24.00,57.60,15.29,0.00,1.00,62.40,62.40 -28.80,62.40,15.36,0.00,1.00,67.20,67.20 -38.40,67.20,15.42,0.00,1.00,72.00,72.00 -48.00,72.00,15.49,0.00,1.00,76.80,72.00 -57.60,72.00,15.55,0.00,1.00,81.60,76.80 -76.80,76.80,15.61,0.00,1.00,86.40,76.80 -96.00,76.80,15.68,0.00,1.00,91.20,76.80 -115.20,76.80,15.74,0.00,1.00,96.00,72.00 -129.60,72.00,15.81,0.00,1.00,100.80,72.00 -139.20,67.20,15.87,0.00,1.00,105.60,67.20 -144.00,67.20,15.94,0.00,1.00,110.40,62.40 -153.60,62.40,16.00,0.00,1.00,115.20,57.60 -158.40,57.60,16.00,0.00,1.00,120.00,52.80 -158.40,52.80,15.94,0.00,1.00,124.80,48.00 -163.20,48.00,15.87,0.00,1.00,129.60,43.20 -168.00,43.20,15.81,0.00,1.00,134.40,38.40 -168.00,38.40,15.74,0.00,1.00,139.20,33.60 -168.00,33.60,15.68,0.00,1.00,144.00,28.80 -172.80,28.80,15.61,0.00,1.00,148.80,24.00 -172.80,24.00,15.55,0.00,1.00,153.60,19.20 -172.80,19.20,15.49,0.00,1.00,158.40,14.40 -177.60,14.40,15.42,0.00,1.00,163.20,9.60 -177.60,9.60,15.36,0.00,1.00,168.00,4.80 -177.60,4.80,15.29,0.00,1.00,172.80,0.00 -177.60,0.00,15.23,0.00,1.00,177.60,-0.00 --177.60,-0.00,15.16,0.00,1.00,-177.60,-4.80 --177.60,-4.80,15.10,0.00,1.00,-172.80,-9.60 --177.60,-9.60,15.04,0.00,1.00,-168.00,-14.40 --177.60,-14.40,14.97,0.00,1.00,-163.20,-19.20 --172.80,-19.20,14.91,0.00,1.00,-158.40,-24.00 --172.80,-24.00,14.84,0.00,1.00,-153.60,-28.80 --172.80,-28.80,14.78,0.00,1.00,-148.80,-33.60 --168.00,-33.60,14.71,0.00,1.00,-144.00,-38.40 --168.00,-38.40,14.65,0.00,1.00,-139.20,-43.20 --168.00,-43.20,14.59,0.00,1.00,-134.40,-48.00 --163.20,-48.00,14.52,0.00,1.00,-129.60,-52.80 --158.40,-52.80,14.46,0.00,1.00,-124.80,-57.60 --158.40,-57.60,14.39,0.00,1.00,-120.00,-62.40 --153.60,-62.40,14.33,0.00,1.00,-115.20,-67.20 --144.00,-67.20,14.27,0.00,1.00,-110.40,-72.00 --139.20,-67.20,14.20,0.00,1.00,-105.60,-72.00 --129.60,-72.00,14.14,0.00,1.00,-100.80,-76.80 --115.20,-76.80,14.07,0.00,1.00,-96.00,-76.80 --96.00,-76.80,14.01,0.00,1.00,-91.20,-76.80 --76.80,-76.80,13.94,0.00,1.00,-86.40,-72.00 --57.60,-72.00,13.88,0.00,1.00,-81.60,-72.00 --48.00,-72.00,13.82,0.00,1.00,-76.80,-67.20 --38.40,-67.20,13.75,0.00,1.00,-72.00,-62.40 --28.80,-62.40,13.69,0.00,1.00,-67.20,-57.60 --24.00,-57.60,13.62,0.00,1.00,-62.40,-57.60 --19.20,-52.80,13.56,0.00,1.00,-57.60,-52.80 --19.20,-52.80,13.49,0.00,1.00,-52.80,-48.00 --14.40,-48.00,13.43,0.00,1.00,-48.00,-43.20 --14.40,-43.20,13.37,0.00,1.00,-43.20,-38.40 --9.60,-38.40,13.30,0.00,1.00,-38.40,-33.60 --9.60,-33.60,13.24,0.00,1.00,-33.60,-28.80 --9.60,-28.80,13.17,0.00,1.00,-28.80,-24.00 --4.80,-24.00,13.11,0.00,1.00,-24.00,-19.20 --4.80,-19.20,13.04,0.00,1.00,-19.20,-14.40 --4.80,-14.40,12.98,0.00,1.00,-14.40,-9.60 --4.80,-9.60,12.92,0.00,1.00,-9.60,-4.80 --0.00,-4.80,12.85,0.00,1.00,-4.80,0.00 -0.00,0.00,12.79,0.00,1.00,0.00,4.80 -0.00,4.80,12.72,0.00,1.00,4.80,9.60 -4.80,9.60,12.66,0.00,1.00,9.60,14.40 -4.80,14.40,12.59,0.00,1.00,14.40,19.20 -4.80,19.20,12.53,0.00,1.00,19.20,24.00 -9.60,24.00,12.47,0.00,1.00,24.00,28.80 -9.60,28.80,12.40,0.00,1.00,28.80,33.60 -14.40,33.60,12.34,0.00,1.00,33.60,38.40 -14.40,33.60,12.27,0.00,1.00,38.40,38.40 -19.20,38.40,12.21,0.00,1.00,43.20,43.20 -19.20,43.20,12.14,0.00,1.00,48.00,48.00 -24.00,48.00,12.08,0.00,1.00,52.80,52.80 -28.80,52.80,12.02,0.00,1.00,57.60,57.60 -33.60,57.60,11.95,0.00,1.00,62.40,62.40 -38.40,62.40,11.89,0.00,1.00,67.20,62.40 -43.20,62.40,11.82,0.00,1.00,72.00,67.20 -52.80,67.20,11.76,0.00,1.00,76.80,72.00 -67.20,67.20,11.69,0.00,1.00,81.60,72.00 -76.80,72.00,11.63,0.00,1.00,86.40,72.00 -96.00,72.00,11.57,0.00,1.00,91.20,72.00 -105.60,72.00,11.50,0.00,1.00,96.00,67.20 -120.00,67.20,11.44,0.00,1.00,100.80,67.20 -129.60,67.20,11.37,0.00,1.00,105.60,62.40 -139.20,62.40,11.31,0.00,1.00,110.40,57.60 -144.00,57.60,11.24,0.00,1.00,115.20,57.60 -148.80,52.80,11.18,0.00,1.00,120.00,52.80 -153.60,52.80,11.12,0.00,1.00,124.80,48.00 -158.40,48.00,11.05,0.00,1.00,129.60,43.20 -163.20,43.20,10.99,0.00,1.00,134.40,38.40 -163.20,38.40,10.92,0.00,1.00,139.20,33.60 -168.00,33.60,10.86,0.00,1.00,144.00,28.80 -168.00,28.80,10.80,0.00,1.00,148.80,24.00 -172.80,24.00,10.73,0.00,1.00,153.60,19.20 -172.80,19.20,10.67,0.00,1.00,158.40,14.40 -172.80,14.40,10.60,0.00,1.00,163.20,9.60 -177.60,9.60,10.54,0.00,1.00,168.00,4.80 -177.60,4.80,10.47,0.00,1.00,172.80,0.00 -177.60,0.00,10.41,0.00,1.00,177.60,-0.00 --177.60,-0.00,10.35,0.00,1.00,-177.60,-4.80 --177.60,-4.80,10.28,0.00,1.00,-172.80,-9.60 --177.60,-9.60,10.22,0.00,1.00,-168.00,-14.40 --172.80,-14.40,10.15,0.00,1.00,-163.20,-19.20 --172.80,-19.20,10.09,0.00,1.00,-158.40,-24.00 --172.80,-24.00,10.02,0.00,1.00,-153.60,-28.80 --168.00,-28.80,9.96,0.00,1.00,-148.80,-33.60 --168.00,-33.60,9.90,0.00,1.00,-144.00,-38.40 --163.20,-38.40,9.83,0.00,1.00,-139.20,-43.20 --163.20,-43.20,9.77,0.00,1.00,-134.40,-48.00 --158.40,-48.00,9.70,0.00,1.00,-129.60,-52.80 --153.60,-52.80,9.64,0.00,1.00,-124.80,-57.60 --148.80,-52.80,9.57,0.00,1.00,-120.00,-57.60 --144.00,-57.60,9.51,0.00,1.00,-115.20,-62.40 --139.20,-62.40,9.45,0.00,1.00,-110.40,-67.20 --129.60,-67.20,9.38,0.00,1.00,-105.60,-67.20 --120.00,-67.20,9.32,0.00,1.00,-100.80,-72.00 --105.60,-72.00,9.25,0.00,1.00,-96.00,-72.00 --96.00,-72.00,9.19,0.00,1.00,-91.20,-72.00 --76.80,-72.00,9.12,0.00,1.00,-86.40,-72.00 --67.20,-67.20,9.06,0.00,1.00,-81.60,-67.20 --52.80,-67.20,9.00,0.00,1.00,-76.80,-62.40 --43.20,-62.40,8.93,0.00,1.00,-72.00,-62.40 --38.40,-62.40,8.87,0.00,1.00,-67.20,-57.60 --33.60,-57.60,8.80,0.00,1.00,-62.40,-52.80 --28.80,-52.80,8.74,0.00,1.00,-57.60,-48.00 --24.00,-48.00,8.67,0.00,1.00,-52.80,-43.20 --19.20,-43.20,8.61,0.00,1.00,-48.00,-38.40 --19.20,-38.40,8.55,0.00,1.00,-43.20,-38.40 --14.40,-33.60,8.48,0.00,1.00,-38.40,-33.60 --14.40,-33.60,8.42,0.00,1.00,-33.60,-28.80 --9.60,-28.80,8.35,0.00,1.00,-28.80,-24.00 --9.60,-24.00,8.29,0.00,1.00,-24.00,-19.20 --4.80,-19.20,8.22,0.00,1.00,-19.20,-14.40 --4.80,-14.40,8.16,0.00,1.00,-14.40,-9.60 --4.80,-9.60,8.10,0.00,1.00,-9.60,-4.80 --0.00,-4.80,8.03,0.00,1.00,-4.80,0.00 -0.00,0.00,7.97,0.00,1.00,0.00,4.80 -0.00,4.80,7.90,0.00,1.00,4.80,9.60 -4.80,9.60,7.84,0.00,1.00,9.60,14.40 -4.80,14.40,7.78,0.00,1.00,14.40,19.20 -9.60,19.20,7.71,0.00,1.00,19.20,24.00 -9.60,24.00,7.65,0.00,1.00,24.00,24.00 -14.40,24.00,7.58,0.00,1.00,28.80,28.80 -14.40,28.80,7.52,0.00,1.00,33.60,33.60 -19.20,33.60,7.45,0.00,1.00,33.60,38.40 -19.20,38.40,7.39,0.00,1.00,38.40,43.20 -24.00,43.20,7.33,0.00,1.00,43.20,48.00 -28.80,48.00,7.26,0.00,1.00,48.00,52.80 -33.60,52.80,7.20,0.00,1.00,57.60,52.80 -38.40,52.80,7.13,0.00,1.00,62.40,57.60 -43.20,57.60,7.07,0.00,1.00,67.20,62.40 -52.80,62.40,7.00,0.00,1.00,72.00,62.40 -62.40,62.40,6.94,0.00,1.00,76.80,67.20 -72.00,62.40,6.88,0.00,1.00,81.60,67.20 -81.60,67.20,6.81,0.00,1.00,86.40,67.20 -91.20,67.20,6.75,0.00,1.00,91.20,67.20 -105.60,67.20,6.68,0.00,1.00,96.00,67.20 -115.20,62.40,6.62,0.00,1.00,100.80,62.40 -124.80,62.40,6.55,0.00,1.00,105.60,57.60 -134.40,57.60,6.49,0.00,1.00,110.40,57.60 -139.20,57.60,6.43,0.00,1.00,115.20,52.80 -144.00,52.80,6.36,0.00,1.00,120.00,48.00 -148.80,48.00,6.30,0.00,1.00,129.60,43.20 -153.60,43.20,6.23,0.00,1.00,134.40,43.20 -158.40,38.40,6.17,0.00,1.00,139.20,38.40 -158.40,38.40,6.10,0.00,1.00,144.00,33.60 -163.20,33.60,6.04,0.00,1.00,148.80,28.80 -168.00,28.80,5.98,0.00,1.00,148.80,24.00 -168.00,24.00,5.91,0.00,1.00,153.60,19.20 -172.80,19.20,5.85,0.00,1.00,158.40,14.40 -172.80,14.40,5.78,0.00,1.00,163.20,9.60 -172.80,9.60,5.72,0.00,1.00,168.00,4.80 -177.60,4.80,5.65,0.00,1.00,172.80,0.00 -177.60,0.00,5.59,0.00,1.00,177.60,-0.00 --177.60,-0.00,5.53,0.00,1.00,-177.60,-4.80 --177.60,-4.80,5.46,0.00,1.00,-172.80,-9.60 --172.80,-9.60,5.40,0.00,1.00,-168.00,-14.40 --172.80,-14.40,5.33,0.00,1.00,-163.20,-19.20 --172.80,-19.20,5.27,0.00,1.00,-158.40,-24.00 --168.00,-24.00,5.20,0.00,1.00,-153.60,-28.80 --168.00,-28.80,5.14,0.00,1.00,-148.80,-33.60 --163.20,-33.60,5.08,0.00,1.00,-148.80,-38.40 --158.40,-38.40,5.01,0.00,1.00,-144.00,-43.20 --158.40,-38.40,4.95,0.00,1.00,-139.20,-43.20 --153.60,-43.20,4.88,0.00,1.00,-134.40,-48.00 --148.80,-48.00,4.82,0.00,1.00,-129.60,-52.80 --144.00,-52.80,4.76,0.00,1.00,-120.00,-57.60 --139.20,-57.60,4.69,0.00,1.00,-115.20,-57.60 --134.40,-57.60,4.63,0.00,1.00,-110.40,-62.40 --124.80,-62.40,4.56,0.00,1.00,-105.60,-67.20 --115.20,-62.40,4.50,0.00,1.00,-100.80,-67.20 --105.60,-67.20,4.43,0.00,1.00,-96.00,-67.20 --91.20,-67.20,4.37,0.00,1.00,-91.20,-67.20 --81.60,-67.20,4.31,0.00,1.00,-86.40,-67.20 --72.00,-62.40,4.24,0.00,1.00,-81.60,-62.40 --62.40,-62.40,4.18,0.00,1.00,-76.80,-62.40 --52.80,-62.40,4.11,0.00,1.00,-72.00,-57.60 --43.20,-57.60,4.05,0.00,1.00,-67.20,-52.80 --38.40,-52.80,3.98,0.00,1.00,-62.40,-52.80 --33.60,-52.80,3.92,0.00,1.00,-57.60,-48.00 --28.80,-48.00,3.86,0.00,1.00,-48.00,-43.20 --24.00,-43.20,3.79,0.00,1.00,-43.20,-38.40 --19.20,-38.40,3.73,0.00,1.00,-38.40,-33.60 --19.20,-33.60,3.66,0.00,1.00,-33.60,-28.80 --14.40,-28.80,3.60,0.00,1.00,-33.60,-24.00 --14.40,-24.00,3.53,0.00,1.00,-28.80,-24.00 --9.60,-24.00,3.47,0.00,1.00,-24.00,-19.20 --9.60,-19.20,3.41,0.00,1.00,-19.20,-14.40 --4.80,-14.40,3.34,0.00,1.00,-14.40,-9.60 --4.80,-9.60,3.28,0.00,1.00,-9.60,-4.80 --0.00,-4.80,3.21,0.00,1.00,-4.80,0.00 -0.00,0.00,3.15,0.00,1.00,0.00,4.80 -0.00,4.80,3.08,0.00,1.00,4.80,9.60 -4.80,9.60,3.02,0.00,1.00,9.60,14.40 -4.80,14.40,2.96,0.00,1.00,14.40,19.20 -9.60,14.40,2.89,0.00,1.00,19.20,19.20 -14.40,19.20,2.83,0.00,1.00,19.20,24.00 -14.40,24.00,2.76,0.00,1.00,24.00,28.80 -19.20,28.80,2.70,0.00,1.00,28.80,33.60 -19.20,33.60,2.63,0.00,1.00,33.60,38.40 -24.00,38.40,2.57,0.00,1.00,38.40,43.20 -28.80,38.40,2.51,0.00,1.00,43.20,43.20 -33.60,43.20,2.44,0.00,1.00,48.00,48.00 -38.40,48.00,2.38,0.00,1.00,52.80,52.80 -43.20,52.80,2.31,0.00,1.00,57.60,52.80 -48.00,52.80,2.25,0.00,1.00,62.40,57.60 -57.60,57.60,2.18,0.00,1.00,72.00,57.60 -62.40,57.60,2.12,0.00,1.00,76.80,62.40 -72.00,62.40,2.06,0.00,1.00,81.60,62.40 -81.60,62.40,1.99,0.00,1.00,86.40,62.40 -91.20,62.40,1.93,0.00,1.00,91.20,62.40 -100.80,62.40,1.86,0.00,1.00,96.00,62.40 -110.40,57.60,1.80,0.00,1.00,100.80,57.60 -120.00,57.60,1.73,0.00,1.00,105.60,57.60 -129.60,57.60,1.67,0.00,1.00,115.20,52.80 -134.40,52.80,1.61,0.00,1.00,120.00,48.00 -139.20,48.00,1.54,0.00,1.00,124.80,48.00 -144.00,48.00,1.48,0.00,1.00,129.60,43.20 -148.80,43.20,1.41,0.00,1.00,134.40,38.40 -153.60,38.40,1.35,0.00,1.00,139.20,33.60 -158.40,33.60,1.29,0.00,1.00,144.00,33.60 -158.40,28.80,1.22,0.00,1.00,148.80,28.80 -163.20,28.80,1.16,0.00,1.00,153.60,24.00 -168.00,24.00,1.09,0.00,1.00,158.40,19.20 -168.00,19.20,1.03,0.00,1.00,163.20,14.40 -172.80,14.40,0.96,0.00,1.00,163.20,9.60 -172.80,9.60,0.90,0.00,1.00,168.00,4.80 -177.60,4.80,0.84,0.00,1.00,172.80,0.00 -177.60,0.00,0.77,0.00,1.00,177.60,-0.00 --177.60,-0.00,0.71,0.00,1.00,-177.60,-4.80 --177.60,-4.80,0.64,0.00,1.00,-172.80,-9.60 --172.80,-9.60,0.58,0.00,1.00,-168.00,-14.40 --172.80,-14.40,0.51,0.00,1.00,-163.20,-19.20 --168.00,-19.20,0.45,0.00,1.00,-163.20,-24.00 --168.00,-24.00,0.39,0.00,1.00,-158.40,-28.80 --163.20,-28.80,0.32,0.00,1.00,-153.60,-33.60 --158.40,-28.80,0.26,0.00,1.00,-148.80,-33.60 --158.40,-33.60,0.19,0.00,1.00,-144.00,-38.40 --153.60,-38.40,0.13,0.00,1.00,-139.20,-43.20 --148.80,-43.20,0.06,0.00,1.00,-134.40,-48.00 --144.00,-48.00,0.00,0.00,1.00,-129.60,-48.00 --139.20,-48.00,0.00,0.00,1.00,-124.80,-52.80 --134.40,-52.80,0.16,0.00,1.00,-120.00,-57.60 --129.60,-57.60,0.32,0.00,1.00,-115.20,-57.60 --120.00,-57.60,0.48,0.00,1.00,-105.60,-62.40 --110.40,-57.60,0.65,0.00,1.00,-100.80,-62.40 --100.80,-62.40,0.81,0.00,1.00,-96.00,-62.40 --91.20,-62.40,0.97,0.00,1.00,-91.20,-62.40 --81.60,-62.40,1.13,0.00,1.00,-86.40,-62.40 --72.00,-62.40,1.29,0.00,1.00,-81.60,-57.60 --62.40,-57.60,1.45,0.00,1.00,-76.80,-57.60 --57.60,-57.60,1.62,0.00,1.00,-72.00,-52.80 --48.00,-52.80,1.78,0.00,1.00,-62.40,-52.80 --43.20,-52.80,1.94,0.00,1.00,-57.60,-48.00 --38.40,-48.00,2.10,0.00,1.00,-52.80,-43.20 --33.60,-43.20,2.26,0.00,1.00,-48.00,-43.20 --28.80,-38.40,2.42,0.00,1.00,-43.20,-38.40 --24.00,-38.40,2.59,0.00,1.00,-38.40,-33.60 --19.20,-33.60,2.75,0.00,1.00,-33.60,-28.80 --19.20,-28.80,2.91,0.00,1.00,-28.80,-24.00 --14.40,-24.00,3.07,0.00,1.00,-24.00,-19.20 --14.40,-19.20,3.23,0.00,1.00,-19.20,-19.20 --9.60,-14.40,3.39,0.00,1.00,-19.20,-14.40 --4.80,-14.40,3.56,0.00,1.00,-14.40,-9.60 --4.80,-9.60,3.72,0.00,1.00,-9.60,-4.80 --0.00,-4.80,3.88,0.00,1.00,-4.80,0.00 -0.00,0.00,4.04,0.00,1.00,0.00,4.80 -4.80,4.80,4.20,0.00,1.00,4.80,9.60 -4.80,9.60,4.36,0.00,1.00,9.60,14.40 -9.60,9.60,4.53,0.00,1.00,14.40,14.40 -9.60,14.40,4.69,0.00,1.00,14.40,19.20 -14.40,19.20,4.85,0.00,1.00,19.20,24.00 -19.20,24.00,5.01,0.00,1.00,24.00,28.80 -19.20,28.80,5.17,0.00,1.00,28.80,33.60 -24.00,28.80,5.33,0.00,1.00,33.60,33.60 -28.80,33.60,5.49,0.00,1.00,38.40,38.40 -33.60,38.40,5.66,0.00,1.00,43.20,43.20 -38.40,43.20,5.82,0.00,1.00,48.00,43.20 -43.20,43.20,5.98,0.00,1.00,52.80,48.00 -48.00,48.00,6.14,0.00,1.00,57.60,52.80 -52.80,48.00,6.30,0.00,1.00,62.40,52.80 -57.60,52.80,6.46,0.00,1.00,67.20,57.60 -67.20,52.80,6.63,0.00,1.00,72.00,57.60 -76.80,57.60,6.79,0.00,1.00,81.60,57.60 -81.60,57.60,6.95,0.00,1.00,86.40,57.60 -91.20,57.60,7.11,0.00,1.00,91.20,57.60 -100.80,57.60,7.27,0.00,1.00,96.00,57.60 -110.40,52.80,7.43,0.00,1.00,100.80,52.80 -115.20,52.80,7.60,0.00,1.00,110.40,52.80 -124.80,52.80,7.76,0.00,1.00,115.20,48.00 -129.60,48.00,7.92,0.00,1.00,120.00,48.00 -134.40,48.00,8.08,0.00,1.00,124.80,43.20 -139.20,43.20,8.24,0.00,1.00,129.60,38.40 -144.00,38.40,8.40,0.00,1.00,134.40,38.40 -148.80,38.40,8.57,0.00,1.00,139.20,33.60 -153.60,33.60,8.73,0.00,1.00,144.00,28.80 -158.40,28.80,8.89,0.00,1.00,148.80,24.00 -163.20,24.00,9.05,0.00,1.00,153.60,24.00 -163.20,24.00,9.21,0.00,1.00,158.40,19.20 -168.00,19.20,9.37,0.00,1.00,163.20,14.40 -172.80,14.40,9.54,0.00,1.00,168.00,9.60 -172.80,9.60,9.70,0.00,1.00,168.00,4.80 -177.60,4.80,9.86,0.00,1.00,172.80,0.00 -177.60,0.00,10.02,0.00,1.00,177.60,-0.00 --177.60,-0.00,10.18,0.00,1.00,-177.60,-4.80 --177.60,-4.80,10.34,0.00,1.00,-172.80,-9.60 --172.80,-9.60,10.51,0.00,1.00,-168.00,-14.40 --172.80,-14.40,10.67,0.00,1.00,-168.00,-19.20 --168.00,-19.20,10.83,0.00,1.00,-163.20,-24.00 --163.20,-24.00,10.99,0.00,1.00,-158.40,-24.00 --163.20,-24.00,11.15,0.00,1.00,-153.60,-28.80 --158.40,-28.80,11.31,0.00,1.00,-148.80,-33.60 --153.60,-33.60,11.47,0.00,1.00,-144.00,-38.40 --148.80,-38.40,11.64,0.00,1.00,-139.20,-38.40 --144.00,-38.40,11.80,0.00,1.00,-134.40,-43.20 --139.20,-43.20,11.96,0.00,1.00,-129.60,-48.00 --134.40,-48.00,12.12,0.00,1.00,-124.80,-48.00 --129.60,-48.00,12.28,0.00,1.00,-120.00,-52.80 --124.80,-52.80,12.44,0.00,1.00,-115.20,-52.80 --115.20,-52.80,12.61,0.00,1.00,-110.40,-57.60 --110.40,-52.80,12.77,0.00,1.00,-100.80,-57.60 --100.80,-57.60,12.93,0.00,1.00,-96.00,-57.60 --91.20,-57.60,13.09,0.00,1.00,-91.20,-57.60 --81.60,-57.60,13.25,0.00,1.00,-86.40,-57.60 --76.80,-57.60,13.41,0.00,1.00,-81.60,-57.60 --67.20,-52.80,13.58,0.00,1.00,-72.00,-52.80 --57.60,-52.80,13.74,0.00,1.00,-67.20,-52.80 --52.80,-48.00,13.90,0.00,1.00,-62.40,-48.00 --48.00,-48.00,14.06,0.00,1.00,-57.60,-43.20 --43.20,-43.20,14.22,0.00,1.00,-52.80,-43.20 --38.40,-43.20,14.38,0.00,1.00,-48.00,-38.40 --33.60,-38.40,14.55,0.00,1.00,-43.20,-33.60 --28.80,-33.60,14.71,0.00,1.00,-38.40,-33.60 --24.00,-28.80,14.87,0.00,1.00,-33.60,-28.80 --19.20,-28.80,15.03,0.00,1.00,-28.80,-24.00 --19.20,-24.00,15.19,0.00,1.00,-24.00,-19.20 --14.40,-19.20,15.35,0.00,1.00,-19.20,-14.40 --9.60,-14.40,15.52,0.00,1.00,-14.40,-14.40 --9.60,-9.60,15.68,0.00,1.00,-14.40,-9.60 --4.80,-9.60,15.84,0.00,1.00,-9.60,-4.80 --4.80,-4.80,16.00,0.00,1.00,-4.80,0.00 -0.00,0.00,16.00,0.00,1.00,0.00,4.80 -4.80,4.80,15.84,0.00,1.00,4.80,9.60 -4.80,9.60,15.68,0.00,1.00,9.60,9.60 -9.60,9.60,15.52,0.00,1.00,9.60,14.40 -14.40,14.40,15.35,0.00,1.00,14.40,19.20 -14.40,19.20,15.19,0.00,1.00,19.20,24.00 -19.20,24.00,15.03,0.00,1.00,24.00,24.00 -24.00,24.00,14.87,0.00,1.00,28.80,28.80 -24.00,28.80,14.71,0.00,1.00,33.60,33.60 -28.80,33.60,14.55,0.00,1.00,38.40,38.40 -33.60,33.60,14.38,0.00,1.00,43.20,38.40 -38.40,38.40,14.22,0.00,1.00,48.00,43.20 -43.20,43.20,14.06,0.00,1.00,52.80,43.20 -48.00,43.20,13.90,0.00,1.00,57.60,48.00 -57.60,48.00,13.74,0.00,1.00,62.40,48.00 -62.40,48.00,13.58,0.00,1.00,67.20,52.80 -67.20,48.00,13.41,0.00,1.00,72.00,52.80 -76.80,52.80,13.25,0.00,1.00,81.60,52.80 -86.40,52.80,13.09,0.00,1.00,86.40,52.80 -91.20,52.80,12.93,0.00,1.00,91.20,52.80 -100.80,52.80,12.77,0.00,1.00,96.00,52.80 -105.60,48.00,12.61,0.00,1.00,105.60,48.00 -115.20,48.00,12.44,0.00,1.00,110.40,48.00 -120.00,48.00,12.28,0.00,1.00,115.20,48.00 -124.80,43.20,12.12,0.00,1.00,120.00,43.20 -134.40,43.20,11.96,0.00,1.00,124.80,43.20 -139.20,38.40,11.80,0.00,1.00,129.60,38.40 -144.00,38.40,11.64,0.00,1.00,134.40,33.60 -148.80,33.60,11.47,0.00,1.00,139.20,33.60 -153.60,28.80,11.31,0.00,1.00,144.00,28.80 -153.60,28.80,11.15,0.00,1.00,148.80,24.00 -158.40,24.00,10.99,0.00,1.00,153.60,19.20 -163.20,19.20,10.83,0.00,1.00,158.40,19.20 -168.00,14.40,10.67,0.00,1.00,163.20,14.40 -168.00,14.40,10.51,0.00,1.00,168.00,9.60 -172.80,9.60,10.34,0.00,1.00,172.80,4.80 -177.60,4.80,10.18,0.00,1.00,172.80,0.00 -177.60,0.00,10.02,0.00,1.00,177.60,-0.00 --177.60,-0.00,9.86,0.00,1.00,-177.60,-4.80 --177.60,-4.80,9.70,0.00,1.00,-172.80,-9.60 --172.80,-9.60,9.54,0.00,1.00,-172.80,-14.40 --168.00,-14.40,9.37,0.00,1.00,-168.00,-19.20 --168.00,-14.40,9.21,0.00,1.00,-163.20,-19.20 --163.20,-19.20,9.05,0.00,1.00,-158.40,-24.00 --158.40,-24.00,8.89,0.00,1.00,-153.60,-28.80 --153.60,-28.80,8.73,0.00,1.00,-148.80,-33.60 --153.60,-28.80,8.57,0.00,1.00,-144.00,-33.60 --148.80,-33.60,8.40,0.00,1.00,-139.20,-38.40 --144.00,-38.40,8.24,0.00,1.00,-134.40,-43.20 --139.20,-38.40,8.08,0.00,1.00,-129.60,-43.20 --134.40,-43.20,7.92,0.00,1.00,-124.80,-48.00 --124.80,-43.20,7.76,0.00,1.00,-120.00,-48.00 --120.00,-48.00,7.60,0.00,1.00,-115.20,-48.00 --115.20,-48.00,7.43,0.00,1.00,-110.40,-52.80 --105.60,-48.00,7.27,0.00,1.00,-105.60,-52.80 --100.80,-52.80,7.11,0.00,1.00,-96.00,-52.80 --91.20,-52.80,6.95,0.00,1.00,-91.20,-52.80 --86.40,-52.80,6.79,0.00,1.00,-86.40,-52.80 --76.80,-52.80,6.63,0.00,1.00,-81.60,-52.80 --67.20,-48.00,6.46,0.00,1.00,-72.00,-48.00 --62.40,-48.00,6.30,0.00,1.00,-67.20,-48.00 --57.60,-48.00,6.14,0.00,1.00,-62.40,-43.20 --48.00,-43.20,5.98,0.00,1.00,-57.60,-43.20 --43.20,-43.20,5.82,0.00,1.00,-52.80,-38.40 --38.40,-38.40,5.66,0.00,1.00,-48.00,-38.40 --33.60,-33.60,5.49,0.00,1.00,-43.20,-33.60 --28.80,-33.60,5.33,0.00,1.00,-38.40,-28.80 --24.00,-28.80,5.17,0.00,1.00,-33.60,-24.00 --24.00,-24.00,5.01,0.00,1.00,-28.80,-24.00 --19.20,-24.00,4.85,0.00,1.00,-24.00,-19.20 --14.40,-19.20,4.69,0.00,1.00,-19.20,-14.40 --14.40,-14.40,4.53,0.00,1.00,-14.40,-9.60 --9.60,-9.60,4.36,0.00,1.00,-9.60,-9.60 --4.80,-9.60,4.20,0.00,1.00,-9.60,-4.80 --4.80,-4.80,4.04,0.00,1.00,-4.80,0.00 -0.00,0.00,3.88,0.00,1.00,0.00,4.80 -4.80,4.80,3.72,0.00,1.00,4.80,4.80 -4.80,4.80,3.56,0.00,1.00,4.80,9.60 -9.60,9.60,3.39,0.00,1.00,9.60,14.40 -14.40,14.40,3.23,0.00,1.00,14.40,19.20 -19.20,19.20,3.07,0.00,1.00,19.20,19.20 -19.20,19.20,2.91,0.00,1.00,24.00,24.00 -24.00,24.00,2.75,0.00,1.00,24.00,28.80 -28.80,28.80,2.59,0.00,1.00,28.80,28.80 -33.60,28.80,2.42,0.00,1.00,33.60,33.60 -38.40,33.60,2.26,0.00,1.00,38.40,38.40 -43.20,33.60,2.10,0.00,1.00,43.20,38.40 -48.00,38.40,1.94,0.00,1.00,48.00,43.20 -52.80,38.40,1.78,0.00,1.00,52.80,43.20 -57.60,43.20,1.62,0.00,1.00,62.40,43.20 -62.40,43.20,1.45,0.00,1.00,67.20,48.00 -72.00,43.20,1.29,0.00,1.00,72.00,48.00 -76.80,48.00,1.13,0.00,1.00,76.80,48.00 -86.40,48.00,0.97,0.00,1.00,86.40,48.00 -91.20,48.00,0.81,0.00,1.00,91.20,48.00 -100.80,48.00,0.65,0.00,1.00,96.00,48.00 -105.60,48.00,0.48,0.00,1.00,105.60,48.00 -110.40,43.20,0.32,0.00,1.00,110.40,43.20 -120.00,43.20,0.16,0.00,1.00,115.20,43.20 -124.80,43.20,0.00,0.00,1.00,124.80,38.40 -129.60,38.40,0.00,0.00,1.00,129.60,38.40 -134.40,38.40,0.04,0.00,1.00,134.40,33.60 -139.20,33.60,0.08,0.00,1.00,139.20,33.60 -144.00,33.60,0.12,0.00,1.00,144.00,28.80 -148.80,28.80,0.16,0.00,1.00,148.80,24.00 -153.60,24.00,0.20,0.00,1.00,153.60,24.00 -158.40,24.00,0.24,0.00,1.00,158.40,19.20 -163.20,19.20,0.28,0.00,1.00,158.40,14.40 -163.20,14.40,0.32,0.00,1.00,163.20,14.40 -168.00,14.40,0.36,0.00,1.00,168.00,9.60 -172.80,9.60,0.40,0.00,1.00,172.80,4.80 -172.80,4.80,0.44,0.00,1.00,172.80,0.00 -177.60,0.00,0.48,0.00,1.00,177.60,-0.00 --177.60,-0.00,0.52,0.00,1.00,-177.60,-4.80 --172.80,-4.80,0.56,0.00,1.00,-172.80,-9.60 --172.80,-9.60,0.60,0.00,1.00,-172.80,-14.40 --168.00,-14.40,0.64,0.00,1.00,-168.00,-14.40 --163.20,-14.40,0.68,0.00,1.00,-163.20,-19.20 --163.20,-19.20,0.72,0.00,1.00,-158.40,-24.00 --158.40,-24.00,0.76,0.00,1.00,-158.40,-24.00 --153.60,-24.00,0.80,0.00,1.00,-153.60,-28.80 --148.80,-28.80,0.84,0.00,1.00,-148.80,-33.60 --144.00,-33.60,0.88,0.00,1.00,-144.00,-33.60 --139.20,-33.60,0.92,0.00,1.00,-139.20,-38.40 --134.40,-38.40,0.96,0.00,1.00,-134.40,-38.40 --129.60,-38.40,1.00,0.00,1.00,-129.60,-43.20 --124.80,-43.20,1.04,0.00,1.00,-124.80,-43.20 --120.00,-43.20,1.08,0.00,1.00,-115.20,-48.00 --110.40,-43.20,1.12,0.00,1.00,-110.40,-48.00 --105.60,-48.00,1.16,0.00,1.00,-105.60,-48.00 --100.80,-48.00,1.20,0.00,1.00,-96.00,-48.00 --91.20,-48.00,1.24,0.00,1.00,-91.20,-48.00 --86.40,-48.00,1.28,0.00,1.00,-86.40,-48.00 --76.80,-48.00,1.32,0.00,1.00,-76.80,-48.00 --72.00,-43.20,1.36,0.00,1.00,-72.00,-43.20 --62.40,-43.20,1.40,0.00,1.00,-67.20,-43.20 --57.60,-43.20,1.44,0.00,1.00,-62.40,-43.20 --52.80,-38.40,1.48,0.00,1.00,-52.80,-38.40 --48.00,-38.40,1.52,0.00,1.00,-48.00,-38.40 --43.20,-33.60,1.56,0.00,1.00,-43.20,-33.60 --38.40,-33.60,1.60,0.00,1.00,-38.40,-28.80 --33.60,-28.80,1.64,0.00,1.00,-33.60,-28.80 --28.80,-28.80,1.68,0.00,1.00,-28.80,-24.00 --24.00,-24.00,1.72,0.00,1.00,-24.00,-19.20 --19.20,-19.20,1.76,0.00,1.00,-24.00,-19.20 --19.20,-19.20,1.80,0.00,1.00,-19.20,-14.40 --14.40,-14.40,1.84,0.00,1.00,-14.40,-9.60 --9.60,-9.60,1.88,0.00,1.00,-9.60,-4.80 --4.80,-4.80,1.92,0.00,1.00,-4.80,-4.80 --4.80,-4.80,1.96,0.00,1.00,-4.80,0.00 -0.00,0.00,2.01,0.00,1.00,0.00,4.80 -4.80,4.80,2.05,0.00,1.00,4.80,4.80 -4.80,4.80,2.09,0.00,1.00,4.80,9.60 -9.60,9.60,2.13,0.00,1.00,9.60,14.40 -14.40,14.40,2.17,0.00,1.00,14.40,14.40 -19.20,14.40,2.21,0.00,1.00,14.40,19.20 -24.00,19.20,2.25,0.00,1.00,19.20,24.00 -24.00,24.00,2.29,0.00,1.00,24.00,24.00 -28.80,24.00,2.33,0.00,1.00,28.80,28.80 -33.60,28.80,2.37,0.00,1.00,33.60,28.80 -38.40,28.80,2.41,0.00,1.00,38.40,33.60 -43.20,33.60,2.45,0.00,1.00,43.20,33.60 -48.00,33.60,2.49,0.00,1.00,48.00,38.40 -52.80,38.40,2.53,0.00,1.00,52.80,38.40 -62.40,38.40,2.57,0.00,1.00,57.60,38.40 -67.20,38.40,2.61,0.00,1.00,62.40,43.20 -72.00,38.40,2.65,0.00,1.00,72.00,43.20 -76.80,43.20,2.69,0.00,1.00,76.80,43.20 -86.40,43.20,2.73,0.00,1.00,86.40,43.20 -91.20,43.20,2.77,0.00,1.00,91.20,43.20 -96.00,43.20,2.81,0.00,1.00,100.80,43.20 -105.60,43.20,2.85,0.00,1.00,105.60,43.20 -110.40,38.40,2.89,0.00,1.00,110.40,38.40 -115.20,38.40,2.93,0.00,1.00,120.00,38.40 -120.00,38.40,2.97,0.00,1.00,124.80,38.40 -129.60,33.60,3.01,0.00,1.00,129.60,33.60 -134.40,33.60,3.05,0.00,1.00,134.40,33.60 -139.20,28.80,3.09,0.00,1.00,139.20,28.80 -144.00,28.80,3.13,0.00,1.00,144.00,28.80 -148.80,24.00,3.17,0.00,1.00,148.80,24.00 -153.60,24.00,3.21,0.00,1.00,153.60,19.20 -153.60,19.20,3.25,0.00,1.00,158.40,19.20 -158.40,19.20,3.29,0.00,1.00,163.20,14.40 -163.20,14.40,3.33,0.00,1.00,163.20,9.60 -168.00,9.60,3.37,0.00,1.00,168.00,9.60 -172.80,9.60,3.41,0.00,1.00,172.80,4.80 -172.80,4.80,3.45,0.00,1.00,172.80,0.00 -177.60,0.00,3.49,0.00,1.00,177.60,-0.00 --177.60,-0.00,3.53,0.00,1.00,-177.60,-4.80 --172.80,-4.80,3.57,0.00,1.00,-172.80,-9.60 --172.80,-9.60,3.61,0.00,1.00,-172.80,-9.60 --168.00,-9.60,3.65,0.00,1.00,-168.00,-14.40 --163.20,-14.40,3.69,0.00,1.00,-163.20,-19.20 --158.40,-19.20,3.73,0.00,1.00,-163.20,-19.20 --153.60,-19.20,3.77,0.00,1.00,-158.40,-24.00 --153.60,-24.00,3.81,0.00,1.00,-153.60,-28.80 --148.80,-24.00,3.85,0.00,1.00,-148.80,-28.80 --144.00,-28.80,3.89,0.00,1.00,-144.00,-33.60 --139.20,-28.80,3.93,0.00,1.00,-139.20,-33.60 --134.40,-33.60,3.97,0.00,1.00,-134.40,-38.40 --129.60,-33.60,4.01,0.00,1.00,-129.60,-38.40 --120.00,-38.40,4.05,0.00,1.00,-124.80,-38.40 --115.20,-38.40,4.09,0.00,1.00,-120.00,-43.20 --110.40,-38.40,4.13,0.00,1.00,-110.40,-43.20 --105.60,-43.20,4.17,0.00,1.00,-105.60,-43.20 --96.00,-43.20,4.21,0.00,1.00,-100.80,-43.20 --91.20,-43.20,4.25,0.00,1.00,-91.20,-43.20 --86.40,-43.20,4.29,0.00,1.00,-86.40,-43.20 --76.80,-43.20,4.33,0.00,1.00,-76.80,-43.20 --72.00,-38.40,4.37,0.00,1.00,-72.00,-38.40 --67.20,-38.40,4.41,0.00,1.00,-62.40,-38.40 --62.40,-38.40,4.45,0.00,1.00,-57.60,-38.40 --52.80,-38.40,4.49,0.00,1.00,-52.80,-33.60 --48.00,-33.60,4.53,0.00,1.00,-48.00,-33.60 --43.20,-33.60,4.57,0.00,1.00,-43.20,-28.80 --38.40,-28.80,4.61,0.00,1.00,-38.40,-28.80 --33.60,-28.80,4.65,0.00,1.00,-33.60,-24.00 --28.80,-24.00,4.69,0.00,1.00,-28.80,-24.00 --24.00,-24.00,4.73,0.00,1.00,-24.00,-19.20 --24.00,-19.20,4.77,0.00,1.00,-19.20,-14.40 --19.20,-14.40,4.81,0.00,1.00,-14.40,-14.40 --14.40,-14.40,4.85,0.00,1.00,-14.40,-9.60 --9.60,-9.60,4.89,0.00,1.00,-9.60,-4.80 --4.80,-4.80,4.93,0.00,1.00,-4.80,-4.80 --4.80,-4.80,4.97,0.00,1.00,-4.80,0.00 -0.00,0.00,5.01,0.00,1.00,0.00,4.80 -4.80,4.80,5.05,0.00,1.00,4.80,4.80 -9.60,4.80,5.09,0.00,1.00,4.80,9.60 -9.60,9.60,5.13,0.00,1.00,9.60,9.60 -14.40,9.60,5.17,0.00,1.00,9.60,14.40 -19.20,14.40,5.21,0.00,1.00,14.40,19.20 -24.00,19.20,5.25,0.00,1.00,19.20,19.20 -28.80,19.20,5.29,0.00,1.00,24.00,24.00 -33.60,24.00,5.33,0.00,1.00,24.00,24.00 -38.40,24.00,5.37,0.00,1.00,28.80,28.80 -43.20,28.80,5.41,0.00,1.00,33.60,28.80 -48.00,28.80,5.45,0.00,1.00,38.40,33.60 -52.80,28.80,5.49,0.00,1.00,43.20,33.60 -57.60,33.60,5.53,0.00,1.00,48.00,33.60 -62.40,33.60,5.57,0.00,1.00,52.80,38.40 -67.20,33.60,5.61,0.00,1.00,62.40,38.40 -72.00,38.40,5.65,0.00,1.00,67.20,38.40 -81.60,38.40,5.69,0.00,1.00,76.80,38.40 -86.40,38.40,5.73,0.00,1.00,86.40,38.40 -91.20,38.40,5.77,0.00,1.00,91.20,38.40 -96.00,38.40,5.81,0.00,1.00,100.80,38.40 -105.60,38.40,5.85,0.00,1.00,105.60,38.40 -110.40,33.60,5.89,0.00,1.00,115.20,33.60 -115.20,33.60,5.93,0.00,1.00,120.00,33.60 -120.00,33.60,5.97,0.00,1.00,129.60,33.60 -124.80,33.60,6.02,0.00,1.00,134.40,28.80 -129.60,28.80,6.06,0.00,1.00,139.20,28.80 -134.40,28.80,6.10,0.00,1.00,144.00,24.00 -139.20,24.00,6.14,0.00,1.00,148.80,24.00 -144.00,24.00,6.18,0.00,1.00,153.60,19.20 -148.80,19.20,6.22,0.00,1.00,158.40,19.20 -153.60,19.20,6.26,0.00,1.00,158.40,14.40 -158.40,14.40,6.30,0.00,1.00,163.20,14.40 -163.20,14.40,6.34,0.00,1.00,168.00,9.60 -168.00,9.60,6.38,0.00,1.00,168.00,9.60 -168.00,9.60,6.42,0.00,1.00,172.80,4.80 -172.80,4.80,6.46,0.00,1.00,177.60,0.00 -177.60,0.00,6.50,0.00,1.00,177.60,-0.00 --177.60,-0.00,6.54,0.00,1.00,-177.60,-4.80 --172.80,-4.80,6.58,0.00,1.00,-177.60,-9.60 --168.00,-9.60,6.62,0.00,1.00,-172.80,-9.60 --168.00,-9.60,6.66,0.00,1.00,-168.00,-14.40 --163.20,-14.40,6.70,0.00,1.00,-168.00,-14.40 --158.40,-14.40,6.74,0.00,1.00,-163.20,-19.20 --153.60,-19.20,6.78,0.00,1.00,-158.40,-19.20 --148.80,-19.20,6.82,0.00,1.00,-158.40,-24.00 --144.00,-24.00,6.86,0.00,1.00,-153.60,-24.00 --139.20,-24.00,6.90,0.00,1.00,-148.80,-28.80 --134.40,-28.80,6.94,0.00,1.00,-144.00,-28.80 --129.60,-28.80,6.98,0.00,1.00,-139.20,-33.60 --124.80,-33.60,7.02,0.00,1.00,-134.40,-33.60 --120.00,-33.60,7.06,0.00,1.00,-129.60,-33.60 --115.20,-33.60,7.10,0.00,1.00,-120.00,-38.40 --110.40,-33.60,7.14,0.00,1.00,-115.20,-38.40 --105.60,-38.40,7.18,0.00,1.00,-105.60,-38.40 --96.00,-38.40,7.22,0.00,1.00,-100.80,-38.40 --91.20,-38.40,7.26,0.00,1.00,-91.20,-38.40 --86.40,-38.40,7.30,0.00,1.00,-86.40,-38.40 --81.60,-38.40,7.34,0.00,1.00,-76.80,-38.40 --72.00,-38.40,7.38,0.00,1.00,-67.20,-38.40 --67.20,-33.60,7.42,0.00,1.00,-62.40,-33.60 --62.40,-33.60,7.46,0.00,1.00,-52.80,-33.60 --57.60,-33.60,7.50,0.00,1.00,-48.00,-33.60 --52.80,-28.80,7.54,0.00,1.00,-43.20,-28.80 --48.00,-28.80,7.58,0.00,1.00,-38.40,-28.80 --43.20,-28.80,7.62,0.00,1.00,-33.60,-24.00 --38.40,-24.00,7.66,0.00,1.00,-28.80,-24.00 --33.60,-24.00,7.70,0.00,1.00,-24.00,-19.20 --28.80,-19.20,7.74,0.00,1.00,-24.00,-19.20 --24.00,-19.20,7.78,0.00,1.00,-19.20,-14.40 --19.20,-14.40,7.82,0.00,1.00,-14.40,-9.60 --14.40,-9.60,7.86,0.00,1.00,-9.60,-9.60 --9.60,-9.60,7.90,0.00,1.00,-9.60,-4.80 --9.60,-4.80,7.94,0.00,1.00,-4.80,-4.80 --4.80,-4.80,7.98,0.00,1.00,-4.80,0.00 -0.00,0.00,8.02,0.00,1.00,0.00,4.80 -4.80,4.80,8.06,0.00,1.00,4.80,4.80 -9.60,4.80,8.10,0.00,1.00,4.80,9.60 -14.40,9.60,8.14,0.00,1.00,9.60,9.60 -14.40,9.60,8.18,0.00,1.00,9.60,14.40 -19.20,14.40,8.22,0.00,1.00,14.40,14.40 -24.00,14.40,8.26,0.00,1.00,14.40,19.20 -28.80,19.20,8.30,0.00,1.00,19.20,19.20 -33.60,19.20,8.34,0.00,1.00,24.00,24.00 -38.40,19.20,8.38,0.00,1.00,28.80,24.00 -43.20,24.00,8.42,0.00,1.00,28.80,24.00 -48.00,24.00,8.46,0.00,1.00,33.60,28.80 -52.80,28.80,8.50,0.00,1.00,38.40,28.80 -57.60,28.80,8.54,0.00,1.00,48.00,28.80 -62.40,28.80,8.58,0.00,1.00,52.80,33.60 -67.20,28.80,8.62,0.00,1.00,57.60,33.60 -76.80,33.60,8.66,0.00,1.00,67.20,33.60 -81.60,33.60,8.70,0.00,1.00,76.80,33.60 -86.40,33.60,8.74,0.00,1.00,81.60,33.60 -91.20,33.60,8.78,0.00,1.00,91.20,33.60 -96.00,33.60,8.82,0.00,1.00,100.80,33.60 -100.80,33.60,8.86,0.00,1.00,110.40,33.60 -110.40,28.80,8.90,0.00,1.00,115.20,33.60 -115.20,28.80,8.94,0.00,1.00,124.80,28.80 -120.00,28.80,8.98,0.00,1.00,129.60,28.80 -124.80,28.80,9.02,0.00,1.00,139.20,28.80 -129.60,24.00,9.06,0.00,1.00,144.00,24.00 -134.40,24.00,9.10,0.00,1.00,148.80,24.00 -139.20,24.00,9.14,0.00,1.00,153.60,19.20 -144.00,19.20,9.18,0.00,1.00,153.60,19.20 -148.80,19.20,9.22,0.00,1.00,158.40,14.40 -153.60,14.40,9.26,0.00,1.00,163.20,14.40 -158.40,14.40,9.30,0.00,1.00,163.20,9.60 -163.20,9.60,9.34,0.00,1.00,168.00,9.60 -168.00,9.60,9.38,0.00,1.00,172.80,4.80 -168.00,4.80,9.42,0.00,1.00,172.80,4.80 -172.80,4.80,9.46,0.00,1.00,177.60,0.00 -177.60,0.00,9.50,0.00,1.00,177.60,-0.00 --177.60,-0.00,9.54,0.00,1.00,-177.60,-4.80 --172.80,-4.80,9.58,0.00,1.00,-177.60,-4.80 --168.00,-4.80,9.62,0.00,1.00,-172.80,-9.60 --168.00,-9.60,9.66,0.00,1.00,-172.80,-9.60 --163.20,-9.60,9.70,0.00,1.00,-168.00,-14.40 --158.40,-14.40,9.74,0.00,1.00,-163.20,-14.40 --153.60,-14.40,9.78,0.00,1.00,-163.20,-19.20 --148.80,-19.20,9.82,0.00,1.00,-158.40,-19.20 --144.00,-19.20,9.86,0.00,1.00,-153.60,-24.00 --139.20,-24.00,9.90,0.00,1.00,-153.60,-24.00 --134.40,-24.00,9.94,0.00,1.00,-148.80,-28.80 --129.60,-24.00,9.98,0.00,1.00,-144.00,-28.80 --124.80,-28.80,10.03,0.00,1.00,-139.20,-28.80 --120.00,-28.80,10.07,0.00,1.00,-129.60,-33.60 --115.20,-28.80,10.11,0.00,1.00,-124.80,-33.60 --110.40,-28.80,10.15,0.00,1.00,-115.20,-33.60 --100.80,-33.60,10.19,0.00,1.00,-110.40,-33.60 --96.00,-33.60,10.23,0.00,1.00,-100.80,-33.60 --91.20,-33.60,10.27,0.00,1.00,-91.20,-33.60 --86.40,-33.60,10.31,0.00,1.00,-81.60,-33.60 --81.60,-33.60,10.35,0.00,1.00,-76.80,-33.60 --76.80,-33.60,10.39,0.00,1.00,-67.20,-33.60 --67.20,-28.80,10.43,0.00,1.00,-57.60,-28.80 --62.40,-28.80,10.47,0.00,1.00,-52.80,-28.80 --57.60,-28.80,10.51,0.00,1.00,-48.00,-28.80 --52.80,-28.80,10.55,0.00,1.00,-38.40,-24.00 --48.00,-24.00,10.59,0.00,1.00,-33.60,-24.00 --43.20,-24.00,10.63,0.00,1.00,-28.80,-24.00 --38.40,-19.20,10.67,0.00,1.00,-28.80,-19.20 --33.60,-19.20,10.71,0.00,1.00,-24.00,-19.20 --28.80,-19.20,10.75,0.00,1.00,-19.20,-14.40 --24.00,-14.40,10.79,0.00,1.00,-14.40,-14.40 --19.20,-14.40,10.83,0.00,1.00,-14.40,-9.60 --14.40,-9.60,10.87,0.00,1.00,-9.60,-9.60 --14.40,-9.60,10.91,0.00,1.00,-9.60,-4.80 --9.60,-4.80,10.95,0.00,1.00,-4.80,-4.80 --4.80,-4.80,10.99,0.00,1.00,-4.80,0.00 -0.00,0.00,11.03,0.00,1.00,0.00,0.00 -4.80,0.00,11.07,0.00,1.00,0.00,4.80 -9.60,4.80,11.11,0.00,1.00,4.80,4.80 -14.40,4.80,11.15,0.00,1.00,4.80,9.60 -19.20,9.60,11.19,0.00,1.00,9.60,9.60 -19.20,9.60,11.23,0.00,1.00,9.60,14.40 -24.00,14.40,11.27,0.00,1.00,14.40,14.40 -28.80,14.40,11.31,0.00,1.00,19.20,19.20 -33.60,14.40,11.35,0.00,1.00,19.20,19.20 -38.40,19.20,11.39,0.00,1.00,24.00,19.20 -43.20,19.20,11.43,0.00,1.00,28.80,24.00 -48.00,24.00,11.47,0.00,1.00,33.60,24.00 -52.80,24.00,11.51,0.00,1.00,38.40,24.00 -57.60,24.00,11.55,0.00,1.00,43.20,24.00 -62.40,24.00,11.59,0.00,1.00,48.00,28.80 -72.00,24.00,11.63,0.00,1.00,52.80,28.80 -76.80,28.80,11.67,0.00,1.00,62.40,28.80 -81.60,28.80,11.71,0.00,1.00,72.00,28.80 -86.40,28.80,11.75,0.00,1.00,81.60,28.80 -91.20,28.80,11.79,0.00,1.00,91.20,28.80 -96.00,28.80,11.83,0.00,1.00,100.80,28.80 -100.80,28.80,11.87,0.00,1.00,110.40,28.80 -105.60,28.80,11.91,0.00,1.00,120.00,28.80 -110.40,24.00,11.95,0.00,1.00,129.60,24.00 -120.00,24.00,11.99,0.00,1.00,134.40,24.00 -124.80,24.00,12.03,0.00,1.00,139.20,24.00 -129.60,24.00,12.07,0.00,1.00,144.00,24.00 -134.40,19.20,12.11,0.00,1.00,148.80,19.20 -139.20,19.20,12.15,0.00,1.00,153.60,19.20 -144.00,19.20,12.19,0.00,1.00,158.40,14.40 -148.80,14.40,12.23,0.00,1.00,163.20,14.40 -153.60,14.40,12.27,0.00,1.00,163.20,14.40 -158.40,9.60,12.31,0.00,1.00,168.00,9.60 -158.40,9.60,12.35,0.00,1.00,168.00,9.60 -163.20,9.60,12.39,0.00,1.00,172.80,4.80 -168.00,4.80,12.43,0.00,1.00,172.80,4.80 -172.80,4.80,12.47,0.00,1.00,177.60,0.00 -177.60,0.00,12.51,0.00,1.00,177.60,-0.00 --177.60,-0.00,12.55,0.00,1.00,-177.60,-4.80 --172.80,-4.80,12.59,0.00,1.00,-177.60,-4.80 --168.00,-4.80,12.63,0.00,1.00,-172.80,-9.60 --163.20,-9.60,12.67,0.00,1.00,-172.80,-9.60 --158.40,-9.60,12.71,0.00,1.00,-168.00,-14.40 --158.40,-9.60,12.75,0.00,1.00,-168.00,-14.40 --153.60,-14.40,12.79,0.00,1.00,-163.20,-14.40 --148.80,-14.40,12.83,0.00,1.00,-163.20,-19.20 --144.00,-19.20,12.87,0.00,1.00,-158.40,-19.20 --139.20,-19.20,12.91,0.00,1.00,-153.60,-24.00 --134.40,-19.20,12.95,0.00,1.00,-148.80,-24.00 --129.60,-24.00,12.99,0.00,1.00,-144.00,-24.00 --124.80,-24.00,13.03,0.00,1.00,-139.20,-24.00 --120.00,-24.00,13.07,0.00,1.00,-134.40,-28.80 --110.40,-24.00,13.11,0.00,1.00,-129.60,-28.80 --105.60,-28.80,13.15,0.00,1.00,-120.00,-28.80 --100.80,-28.80,13.19,0.00,1.00,-110.40,-28.80 --96.00,-28.80,13.23,0.00,1.00,-100.80,-28.80 --91.20,-28.80,13.27,0.00,1.00,-91.20,-28.80 --86.40,-28.80,13.31,0.00,1.00,-81.60,-28.80 --81.60,-28.80,13.35,0.00,1.00,-72.00,-28.80 --76.80,-28.80,13.39,0.00,1.00,-62.40,-28.80 --72.00,-24.00,13.43,0.00,1.00,-52.80,-24.00 --62.40,-24.00,13.47,0.00,1.00,-48.00,-24.00 --57.60,-24.00,13.51,0.00,1.00,-43.20,-24.00 --52.80,-24.00,13.55,0.00,1.00,-38.40,-24.00 --48.00,-24.00,13.59,0.00,1.00,-33.60,-19.20 --43.20,-19.20,13.63,0.00,1.00,-28.80,-19.20 --38.40,-19.20,13.67,0.00,1.00,-24.00,-19.20 --33.60,-14.40,13.71,0.00,1.00,-19.20,-14.40 --28.80,-14.40,13.75,0.00,1.00,-19.20,-14.40 --24.00,-14.40,13.79,0.00,1.00,-14.40,-9.60 --19.20,-9.60,13.83,0.00,1.00,-9.60,-9.60 --19.20,-9.60,13.87,0.00,1.00,-9.60,-4.80 --14.40,-4.80,13.91,0.00,1.00,-4.80,-4.80 --9.60,-4.80,13.95,0.00,1.00,-4.80,-0.00 --4.80,-0.00,13.99,0.00,1.00,-0.00,0.00 -0.00,0.00,14.04,0.00,1.00,0.00,0.00 -4.80,0.00,14.08,0.00,1.00,0.00,4.80 -9.60,4.80,14.12,0.00,1.00,4.80,4.80 -14.40,4.80,14.16,0.00,1.00,4.80,9.60 -19.20,9.60,14.20,0.00,1.00,9.60,9.60 -24.00,9.60,14.24,0.00,1.00,9.60,9.60 -28.80,9.60,14.28,0.00,1.00,14.40,14.40 -33.60,14.40,14.32,0.00,1.00,14.40,14.40 -38.40,14.40,14.36,0.00,1.00,19.20,14.40 -43.20,14.40,14.40,0.00,1.00,19.20,19.20 -48.00,14.40,14.44,0.00,1.00,24.00,19.20 -52.80,19.20,14.48,0.00,1.00,28.80,19.20 -57.60,19.20,14.52,0.00,1.00,33.60,19.20 -62.40,19.20,14.56,0.00,1.00,38.40,24.00 -67.20,19.20,14.60,0.00,1.00,43.20,24.00 -72.00,24.00,14.64,0.00,1.00,48.00,24.00 -76.80,24.00,14.68,0.00,1.00,57.60,24.00 -81.60,24.00,14.72,0.00,1.00,67.20,24.00 -86.40,24.00,14.76,0.00,1.00,81.60,24.00 -91.20,24.00,14.80,0.00,1.00,91.20,24.00 -96.00,24.00,14.84,0.00,1.00,105.60,24.00 -100.80,24.00,14.88,0.00,1.00,115.20,24.00 -105.60,24.00,14.92,0.00,1.00,124.80,24.00 -110.40,19.20,14.96,0.00,1.00,134.40,19.20 -115.20,19.20,15.00,0.00,1.00,139.20,19.20 -120.00,19.20,15.04,0.00,1.00,144.00,19.20 -124.80,19.20,15.08,0.00,1.00,148.80,19.20 -129.60,19.20,15.12,0.00,1.00,153.60,19.20 -134.40,14.40,15.16,0.00,1.00,158.40,14.40 -139.20,14.40,15.20,0.00,1.00,163.20,14.40 -144.00,14.40,15.24,0.00,1.00,163.20,14.40 -148.80,9.60,15.28,0.00,1.00,168.00,9.60 -153.60,9.60,15.32,0.00,1.00,168.00,9.60 -158.40,9.60,15.36,0.00,1.00,172.80,4.80 -163.20,4.80,15.40,0.00,1.00,172.80,4.80 -168.00,4.80,15.44,0.00,1.00,177.60,4.80 -172.80,4.80,15.48,0.00,1.00,177.60,0.00 -177.60,0.00,15.52,0.00,1.00,177.60,-0.00 --177.60,-0.00,15.56,0.00,1.00,-177.60,-4.80 --172.80,-4.80,15.60,0.00,1.00,-177.60,-4.80 --168.00,-4.80,15.64,0.00,1.00,-177.60,-4.80 --163.20,-4.80,15.68,0.00,1.00,-172.80,-9.60 --158.40,-9.60,15.72,0.00,1.00,-172.80,-9.60 --153.60,-9.60,15.76,0.00,1.00,-168.00,-14.40 --148.80,-9.60,15.80,0.00,1.00,-168.00,-14.40 --144.00,-14.40,15.84,0.00,1.00,-163.20,-14.40 --139.20,-14.40,15.88,0.00,1.00,-163.20,-19.20 --134.40,-14.40,15.92,0.00,1.00,-158.40,-19.20 --129.60,-19.20,15.96,0.00,1.00,-153.60,-19.20 --124.80,-19.20,16.00,0.00,1.00,-148.80,-19.20 --120.00,-19.20,16.00,0.00,1.00,-144.00,-19.20 --115.20,-19.20,15.96,0.00,1.00,-139.20,-24.00 --110.40,-19.20,15.92,0.00,1.00,-134.40,-24.00 --105.60,-24.00,15.88,0.00,1.00,-124.80,-24.00 --100.80,-24.00,15.84,0.00,1.00,-115.20,-24.00 --96.00,-24.00,15.80,0.00,1.00,-105.60,-24.00 --91.20,-24.00,15.76,0.00,1.00,-91.20,-24.00 --86.40,-24.00,15.72,0.00,1.00,-81.60,-24.00 --81.60,-24.00,15.68,0.00,1.00,-67.20,-24.00 --76.80,-24.00,15.64,0.00,1.00,-57.60,-24.00 --72.00,-24.00,15.60,0.00,1.00,-48.00,-24.00 --67.20,-19.20,15.56,0.00,1.00,-43.20,-19.20 --62.40,-19.20,15.52,0.00,1.00,-38.40,-19.20 --57.60,-19.20,15.48,0.00,1.00,-33.60,-19.20 --52.80,-19.20,15.44,0.00,1.00,-28.80,-19.20 --48.00,-14.40,15.40,0.00,1.00,-24.00,-14.40 --43.20,-14.40,15.36,0.00,1.00,-19.20,-14.40 --38.40,-14.40,15.32,0.00,1.00,-19.20,-14.40 --33.60,-14.40,15.28,0.00,1.00,-14.40,-9.60 --28.80,-9.60,15.24,0.00,1.00,-14.40,-9.60 --24.00,-9.60,15.20,0.00,1.00,-9.60,-9.60 --19.20,-9.60,15.16,0.00,1.00,-9.60,-4.80 --14.40,-4.80,15.12,0.00,1.00,-4.80,-4.80 --9.60,-4.80,15.08,0.00,1.00,-4.80,-0.00 --4.80,-0.00,15.04,0.00,1.00,-0.00,0.00 -0.00,0.00,15.00,0.00,1.00,0.00,0.00 -4.80,0.00,14.96,0.00,1.00,0.00,4.80 -9.60,4.80,14.92,0.00,1.00,4.80,4.80 -14.40,4.80,14.88,0.00,1.00,4.80,4.80 -19.20,4.80,14.84,0.00,1.00,4.80,9.60 -24.00,9.60,14.80,0.00,1.00,9.60,9.60 -28.80,9.60,14.76,0.00,1.00,9.60,9.60 -33.60,9.60,14.72,0.00,1.00,9.60,9.60 -38.40,9.60,14.68,0.00,1.00,14.40,14.40 -43.20,14.40,14.64,0.00,1.00,14.40,14.40 -48.00,14.40,14.60,0.00,1.00,19.20,14.40 -52.80,14.40,14.56,0.00,1.00,24.00,14.40 -57.60,14.40,14.52,0.00,1.00,24.00,19.20 -62.40,14.40,14.48,0.00,1.00,28.80,19.20 -67.20,14.40,14.44,0.00,1.00,38.40,19.20 -72.00,19.20,14.40,0.00,1.00,43.20,19.20 -76.80,19.20,14.36,0.00,1.00,52.80,19.20 -81.60,19.20,14.32,0.00,1.00,62.40,19.20 -86.40,19.20,14.28,0.00,1.00,76.80,19.20 -91.20,19.20,14.24,0.00,1.00,96.00,19.20 -96.00,19.20,14.20,0.00,1.00,110.40,19.20 -100.80,19.20,14.16,0.00,1.00,120.00,19.20 -105.60,19.20,14.12,0.00,1.00,134.40,19.20 -110.40,19.20,14.08,0.00,1.00,139.20,19.20 -115.20,14.40,14.04,0.00,1.00,148.80,14.40 -120.00,14.40,13.99,0.00,1.00,153.60,14.40 -124.80,14.40,13.95,0.00,1.00,158.40,14.40 -129.60,14.40,13.91,0.00,1.00,158.40,14.40 -134.40,14.40,13.87,0.00,1.00,163.20,14.40 -139.20,9.60,13.83,0.00,1.00,163.20,9.60 -144.00,9.60,13.79,0.00,1.00,168.00,9.60 -148.80,9.60,13.75,0.00,1.00,168.00,9.60 -153.60,9.60,13.71,0.00,1.00,172.80,4.80 -158.40,4.80,13.67,0.00,1.00,172.80,4.80 -163.20,4.80,13.63,0.00,1.00,172.80,4.80 -168.00,4.80,13.59,0.00,1.00,177.60,0.00 -172.80,0.00,13.55,0.00,1.00,177.60,0.00 -177.60,0.00,13.51,0.00,1.00,177.60,-0.00 --177.60,-0.00,13.47,0.00,1.00,-177.60,-0.00 --172.80,-0.00,13.43,0.00,1.00,-177.60,-4.80 --168.00,-4.80,13.39,0.00,1.00,-177.60,-4.80 --163.20,-4.80,13.35,0.00,1.00,-172.80,-4.80 --158.40,-4.80,13.31,0.00,1.00,-172.80,-9.60 --153.60,-9.60,13.27,0.00,1.00,-172.80,-9.60 --148.80,-9.60,13.23,0.00,1.00,-168.00,-9.60 --144.00,-9.60,13.19,0.00,1.00,-168.00,-14.40 --139.20,-9.60,13.15,0.00,1.00,-163.20,-14.40 --134.40,-14.40,13.11,0.00,1.00,-163.20,-14.40 --129.60,-14.40,13.07,0.00,1.00,-158.40,-14.40 --124.80,-14.40,13.03,0.00,1.00,-158.40,-14.40 --120.00,-14.40,12.99,0.00,1.00,-153.60,-19.20 --115.20,-14.40,12.95,0.00,1.00,-148.80,-19.20 --110.40,-19.20,12.91,0.00,1.00,-139.20,-19.20 --105.60,-19.20,12.87,0.00,1.00,-134.40,-19.20 --100.80,-19.20,12.83,0.00,1.00,-120.00,-19.20 --96.00,-19.20,12.79,0.00,1.00,-110.40,-19.20 --91.20,-19.20,12.75,0.00,1.00,-96.00,-19.20 --86.40,-19.20,12.71,0.00,1.00,-76.80,-19.20 --81.60,-19.20,12.67,0.00,1.00,-62.40,-19.20 --76.80,-19.20,12.63,0.00,1.00,-52.80,-19.20 --72.00,-19.20,12.59,0.00,1.00,-43.20,-19.20 --67.20,-14.40,12.55,0.00,1.00,-38.40,-19.20 --62.40,-14.40,12.51,0.00,1.00,-28.80,-14.40 --57.60,-14.40,12.47,0.00,1.00,-24.00,-14.40 --52.80,-14.40,12.43,0.00,1.00,-24.00,-14.40 --48.00,-14.40,12.39,0.00,1.00,-19.20,-14.40 --43.20,-14.40,12.35,0.00,1.00,-14.40,-9.60 --38.40,-9.60,12.31,0.00,1.00,-14.40,-9.60 --33.60,-9.60,12.27,0.00,1.00,-9.60,-9.60 --28.80,-9.60,12.23,0.00,1.00,-9.60,-9.60 --24.00,-9.60,12.19,0.00,1.00,-9.60,-4.80 --19.20,-4.80,12.15,0.00,1.00,-4.80,-4.80 --14.40,-4.80,12.11,0.00,1.00,-4.80,-4.80 --9.60,-4.80,12.07,0.00,1.00,-4.80,-0.00 --4.80,-0.00,12.03,0.00,1.00,-0.00,0.00 -0.00,0.00,11.99,0.00,1.00,0.00,0.00 -4.80,0.00,11.95,0.00,1.00,0.00,0.00 -9.60,0.00,11.91,0.00,1.00,0.00,4.80 -14.40,4.80,11.87,0.00,1.00,4.80,4.80 -19.20,4.80,11.83,0.00,1.00,4.80,4.80 -24.00,4.80,11.79,0.00,1.00,4.80,4.80 -28.80,4.80,11.75,0.00,1.00,4.80,9.60 -33.60,9.60,11.71,0.00,1.00,9.60,9.60 -38.40,9.60,11.67,0.00,1.00,9.60,9.60 -43.20,9.60,11.63,0.00,1.00,14.40,9.60 -48.00,9.60,11.59,0.00,1.00,14.40,9.60 -52.80,9.60,11.55,0.00,1.00,14.40,14.40 -57.60,9.60,11.51,0.00,1.00,19.20,14.40 -62.40,9.60,11.47,0.00,1.00,24.00,14.40 -67.20,14.40,11.43,0.00,1.00,28.80,14.40 -72.00,14.40,11.39,0.00,1.00,33.60,14.40 -76.80,14.40,11.35,0.00,1.00,43.20,14.40 -81.60,14.40,11.31,0.00,1.00,57.60,14.40 -86.40,14.40,11.27,0.00,1.00,76.80,14.40 -91.20,14.40,11.23,0.00,1.00,96.00,14.40 -96.00,14.40,11.19,0.00,1.00,115.20,14.40 -100.80,14.40,11.15,0.00,1.00,129.60,14.40 -105.60,14.40,11.11,0.00,1.00,139.20,14.40 -110.40,14.40,11.07,0.00,1.00,148.80,14.40 -115.20,9.60,11.03,0.00,1.00,153.60,14.40 -120.00,9.60,10.99,0.00,1.00,158.40,9.60 -124.80,9.60,10.95,0.00,1.00,163.20,9.60 -129.60,9.60,10.91,0.00,1.00,163.20,9.60 -134.40,9.60,10.87,0.00,1.00,168.00,9.60 -139.20,9.60,10.83,0.00,1.00,168.00,9.60 -144.00,9.60,10.79,0.00,1.00,172.80,9.60 -148.80,4.80,10.75,0.00,1.00,172.80,4.80 -153.60,4.80,10.71,0.00,1.00,172.80,4.80 -158.40,4.80,10.67,0.00,1.00,172.80,4.80 -163.20,4.80,10.63,0.00,1.00,177.60,4.80 -168.00,4.80,10.59,0.00,1.00,177.60,0.00 -172.80,0.00,10.55,0.00,1.00,177.60,0.00 -177.60,0.00,10.51,0.00,1.00,177.60,-0.00 --177.60,-0.00,10.47,0.00,1.00,-177.60,-0.00 --172.80,-0.00,10.43,0.00,1.00,-177.60,-4.80 --168.00,-4.80,10.39,0.00,1.00,-177.60,-4.80 --163.20,-4.80,10.35,0.00,1.00,-177.60,-4.80 --158.40,-4.80,10.31,0.00,1.00,-172.80,-4.80 --153.60,-4.80,10.27,0.00,1.00,-172.80,-9.60 --148.80,-4.80,10.23,0.00,1.00,-172.80,-9.60 --144.00,-9.60,10.19,0.00,1.00,-172.80,-9.60 --139.20,-9.60,10.15,0.00,1.00,-168.00,-9.60 --134.40,-9.60,10.11,0.00,1.00,-168.00,-9.60 --129.60,-9.60,10.07,0.00,1.00,-163.20,-9.60 --124.80,-9.60,10.03,0.00,1.00,-163.20,-14.40 --120.00,-9.60,9.98,0.00,1.00,-158.40,-14.40 --115.20,-9.60,9.94,0.00,1.00,-153.60,-14.40 --110.40,-14.40,9.90,0.00,1.00,-148.80,-14.40 --105.60,-14.40,9.86,0.00,1.00,-139.20,-14.40 --100.80,-14.40,9.82,0.00,1.00,-129.60,-14.40 --96.00,-14.40,9.78,0.00,1.00,-115.20,-14.40 --91.20,-14.40,9.74,0.00,1.00,-96.00,-14.40 --86.40,-14.40,9.70,0.00,1.00,-76.80,-14.40 --81.60,-14.40,9.66,0.00,1.00,-57.60,-14.40 --76.80,-14.40,9.62,0.00,1.00,-43.20,-14.40 --72.00,-14.40,9.58,0.00,1.00,-33.60,-14.40 --67.20,-14.40,9.54,0.00,1.00,-28.80,-14.40 --62.40,-9.60,9.50,0.00,1.00,-24.00,-14.40 --57.60,-9.60,9.46,0.00,1.00,-19.20,-9.60 --52.80,-9.60,9.42,0.00,1.00,-14.40,-9.60 --48.00,-9.60,9.38,0.00,1.00,-14.40,-9.60 --43.20,-9.60,9.34,0.00,1.00,-14.40,-9.60 --38.40,-9.60,9.30,0.00,1.00,-9.60,-9.60 --33.60,-9.60,9.26,0.00,1.00,-9.60,-4.80 --28.80,-4.80,9.22,0.00,1.00,-4.80,-4.80 --24.00,-4.80,9.18,0.00,1.00,-4.80,-4.80 --19.20,-4.80,9.14,0.00,1.00,-4.80,-4.80 --14.40,-4.80,9.10,0.00,1.00,-4.80,-0.00 --9.60,-0.00,9.06,0.00,1.00,-0.00,-0.00 --4.80,-0.00,9.02,0.00,1.00,-0.00,0.00 -0.00,0.00,8.98,0.00,1.00,0.00,0.00 -4.80,0.00,8.94,0.00,1.00,0.00,0.00 -9.60,0.00,8.90,0.00,1.00,0.00,0.00 -14.40,0.00,8.86,0.00,1.00,0.00,4.80 -19.20,4.80,8.82,0.00,1.00,4.80,4.80 -24.00,4.80,8.78,0.00,1.00,4.80,4.80 -28.80,4.80,8.74,0.00,1.00,4.80,4.80 -33.60,4.80,8.70,0.00,1.00,4.80,4.80 -38.40,4.80,8.66,0.00,1.00,4.80,4.80 -43.20,4.80,8.62,0.00,1.00,9.60,4.80 -48.00,4.80,8.58,0.00,1.00,9.60,9.60 -52.80,4.80,8.54,0.00,1.00,9.60,9.60 -57.60,4.80,8.50,0.00,1.00,14.40,9.60 -62.40,9.60,8.46,0.00,1.00,14.40,9.60 -67.20,9.60,8.42,0.00,1.00,19.20,9.60 -72.00,9.60,8.38,0.00,1.00,24.00,9.60 -76.80,9.60,8.34,0.00,1.00,33.60,9.60 -81.60,9.60,8.30,0.00,1.00,43.20,9.60 -86.40,9.60,8.26,0.00,1.00,67.20,9.60 -91.20,9.60,8.22,0.00,1.00,96.00,9.60 -96.00,9.60,8.18,0.00,1.00,124.80,9.60 -100.80,9.60,8.14,0.00,1.00,144.00,9.60 -105.60,9.60,8.10,0.00,1.00,153.60,9.60 -110.40,9.60,8.06,0.00,1.00,158.40,9.60 -115.20,9.60,8.02,0.00,1.00,163.20,9.60 -120.00,9.60,7.98,0.00,1.00,168.00,9.60 -124.80,4.80,7.94,0.00,1.00,168.00,9.60 -129.60,4.80,7.90,0.00,1.00,168.00,4.80 -134.40,4.80,7.86,0.00,1.00,172.80,4.80 -139.20,4.80,7.82,0.00,1.00,172.80,4.80 -144.00,4.80,7.78,0.00,1.00,172.80,4.80 -148.80,4.80,7.74,0.00,1.00,172.80,4.80 -153.60,4.80,7.70,0.00,1.00,177.60,4.80 -158.40,4.80,7.66,0.00,1.00,177.60,4.80 -163.20,4.80,7.62,0.00,1.00,177.60,0.00 -168.00,0.00,7.58,0.00,1.00,177.60,0.00 -172.80,0.00,7.54,0.00,1.00,177.60,0.00 -177.60,0.00,7.50,0.00,1.00,177.60,-0.00 --177.60,-0.00,7.46,0.00,1.00,-177.60,-0.00 --172.80,-0.00,7.42,0.00,1.00,-177.60,-0.00 --168.00,-0.00,7.38,0.00,1.00,-177.60,-4.80 --163.20,-4.80,7.34,0.00,1.00,-177.60,-4.80 --158.40,-4.80,7.30,0.00,1.00,-177.60,-4.80 --153.60,-4.80,7.26,0.00,1.00,-177.60,-4.80 --148.80,-4.80,7.22,0.00,1.00,-172.80,-4.80 --144.00,-4.80,7.18,0.00,1.00,-172.80,-4.80 --139.20,-4.80,7.14,0.00,1.00,-172.80,-4.80 --134.40,-4.80,7.10,0.00,1.00,-172.80,-9.60 --129.60,-4.80,7.06,0.00,1.00,-168.00,-9.60 --124.80,-4.80,7.02,0.00,1.00,-168.00,-9.60 --120.00,-9.60,6.98,0.00,1.00,-168.00,-9.60 --115.20,-9.60,6.94,0.00,1.00,-163.20,-9.60 --110.40,-9.60,6.90,0.00,1.00,-158.40,-9.60 --105.60,-9.60,6.86,0.00,1.00,-153.60,-9.60 --100.80,-9.60,6.82,0.00,1.00,-144.00,-9.60 --96.00,-9.60,6.78,0.00,1.00,-124.80,-9.60 --91.20,-9.60,6.74,0.00,1.00,-96.00,-9.60 --86.40,-9.60,6.70,0.00,1.00,-67.20,-9.60 --81.60,-9.60,6.66,0.00,1.00,-43.20,-9.60 --76.80,-9.60,6.62,0.00,1.00,-33.60,-9.60 --72.00,-9.60,6.58,0.00,1.00,-24.00,-9.60 --67.20,-9.60,6.54,0.00,1.00,-19.20,-9.60 --62.40,-9.60,6.50,0.00,1.00,-14.40,-9.60 --57.60,-4.80,6.46,0.00,1.00,-14.40,-9.60 --52.80,-4.80,6.42,0.00,1.00,-9.60,-4.80 --48.00,-4.80,6.38,0.00,1.00,-9.60,-4.80 --43.20,-4.80,6.34,0.00,1.00,-9.60,-4.80 --38.40,-4.80,6.30,0.00,1.00,-4.80,-4.80 --33.60,-4.80,6.26,0.00,1.00,-4.80,-4.80 --28.80,-4.80,6.22,0.00,1.00,-4.80,-4.80 --24.00,-4.80,6.18,0.00,1.00,-4.80,-4.80 --19.20,-4.80,6.14,0.00,1.00,-4.80,-0.00 --14.40,-0.00,6.10,0.00,1.00,-0.00,-0.00 --9.60,-0.00,6.06,0.00,1.00,-0.00,-0.00 --4.80,-0.00,6.02,0.00,1.00,-0.00,0.00 -0.00,0.00,5.97,0.00,1.00,0.00,0.00 -4.80,0.00,5.93,0.00,1.00,0.00,0.00 -9.60,0.00,5.89,0.00,1.00,0.00,0.00 -14.40,0.00,5.85,0.00,1.00,0.00,0.00 -19.20,0.00,5.81,0.00,1.00,0.00,0.00 -24.00,0.00,5.77,0.00,1.00,0.00,0.00 -28.80,0.00,5.73,0.00,1.00,0.00,4.80 -33.60,0.00,5.69,0.00,1.00,0.00,4.80 -38.40,0.00,5.65,0.00,1.00,4.80,4.80 -43.20,4.80,5.61,0.00,1.00,4.80,4.80 -48.00,4.80,5.57,0.00,1.00,4.80,4.80 -52.80,4.80,5.53,0.00,1.00,4.80,4.80 -57.60,4.80,5.49,0.00,1.00,4.80,4.80 -62.40,4.80,5.45,0.00,1.00,4.80,4.80 -67.20,4.80,5.41,0.00,1.00,9.60,4.80 -72.00,4.80,5.37,0.00,1.00,9.60,4.80 -76.80,4.80,5.33,0.00,1.00,14.40,4.80 -81.60,4.80,5.29,0.00,1.00,24.00,4.80 -86.40,4.80,5.25,0.00,1.00,43.20,4.80 -91.20,4.80,5.21,0.00,1.00,110.40,4.80 -96.00,4.80,5.17,0.00,1.00,148.80,4.80 -100.80,4.80,5.13,0.00,1.00,163.20,4.80 -105.60,4.80,5.09,0.00,1.00,168.00,4.80 -110.40,4.80,5.05,0.00,1.00,172.80,4.80 -115.20,4.80,5.01,0.00,1.00,172.80,4.80 -120.00,4.80,4.97,0.00,1.00,172.80,4.80 -124.80,4.80,4.93,0.00,1.00,172.80,4.80 -129.60,4.80,4.89,0.00,1.00,177.60,4.80 -134.40,4.80,4.85,0.00,1.00,177.60,4.80 -139.20,0.00,4.81,0.00,1.00,177.60,4.80 -144.00,0.00,4.77,0.00,1.00,177.60,4.80 -148.80,0.00,4.73,0.00,1.00,177.60,0.00 -153.60,0.00,4.69,0.00,1.00,177.60,0.00 -158.40,0.00,4.65,0.00,1.00,177.60,0.00 -163.20,0.00,4.61,0.00,1.00,177.60,0.00 -168.00,0.00,4.57,0.00,1.00,177.60,0.00 -172.80,0.00,4.53,0.00,1.00,177.60,0.00 -177.60,0.00,4.49,0.00,1.00,177.60,-0.00 --177.60,-0.00,4.45,0.00,1.00,-177.60,-0.00 --172.80,-0.00,4.41,0.00,1.00,-177.60,-0.00 --168.00,-0.00,4.37,0.00,1.00,-177.60,-0.00 --163.20,-0.00,4.33,0.00,1.00,-177.60,-0.00 --158.40,-0.00,4.29,0.00,1.00,-177.60,-0.00 --153.60,-0.00,4.25,0.00,1.00,-177.60,-4.80 --148.80,-0.00,4.21,0.00,1.00,-177.60,-4.80 --144.00,-0.00,4.17,0.00,1.00,-177.60,-4.80 --139.20,-0.00,4.13,0.00,1.00,-177.60,-4.80 --134.40,-4.80,4.09,0.00,1.00,-177.60,-4.80 --129.60,-4.80,4.05,0.00,1.00,-177.60,-4.80 --124.80,-4.80,4.01,0.00,1.00,-172.80,-4.80 --120.00,-4.80,3.97,0.00,1.00,-172.80,-4.80 --115.20,-4.80,3.93,0.00,1.00,-172.80,-4.80 --110.40,-4.80,3.89,0.00,1.00,-172.80,-4.80 --105.60,-4.80,3.85,0.00,1.00,-168.00,-4.80 --100.80,-4.80,3.81,0.00,1.00,-163.20,-4.80 --96.00,-4.80,3.77,0.00,1.00,-148.80,-4.80 --91.20,-4.80,3.73,0.00,1.00,-110.40,-4.80 --86.40,-4.80,3.69,0.00,1.00,-43.20,-4.80 --81.60,-4.80,3.65,0.00,1.00,-24.00,-4.80 --76.80,-4.80,3.61,0.00,1.00,-14.40,-4.80 --72.00,-4.80,3.57,0.00,1.00,-9.60,-4.80 --67.20,-4.80,3.53,0.00,1.00,-9.60,-4.80 --62.40,-4.80,3.49,0.00,1.00,-4.80,-4.80 --57.60,-4.80,3.45,0.00,1.00,-4.80,-4.80 --52.80,-4.80,3.41,0.00,1.00,-4.80,-4.80 --48.00,-4.80,3.37,0.00,1.00,-4.80,-4.80 --43.20,-4.80,3.33,0.00,1.00,-4.80,-4.80 --38.40,-0.00,3.29,0.00,1.00,-4.80,-4.80 --33.60,-0.00,3.25,0.00,1.00,-0.00,-0.00 --28.80,-0.00,3.21,0.00,1.00,-0.00,-0.00 --24.00,-0.00,3.17,0.00,1.00,-0.00,-0.00 --19.20,-0.00,3.13,0.00,1.00,-0.00,-0.00 --14.40,-0.00,3.09,0.00,1.00,-0.00,-0.00 --9.60,-0.00,3.05,0.00,1.00,-0.00,-0.00 --4.80,-0.00,3.01,0.00,1.00,-0.00,0.00 -0.00,0.00,2.97,0.00,1.00,-0.00,0.00 -4.80,-0.00,2.93,0.00,1.00,-0.00,0.00 -9.60,-0.00,2.89,0.00,1.00,-0.00,0.00 -14.40,-0.00,2.85,0.00,1.00,-0.00,0.00 -19.20,-0.00,2.81,0.00,1.00,-0.00,0.00 -24.00,-0.00,2.77,0.00,1.00,-0.00,0.00 -28.80,-0.00,2.73,0.00,1.00,-0.00,0.00 -33.60,-0.00,2.69,0.00,1.00,-0.00,0.00 -38.40,-0.00,2.65,0.00,1.00,-0.00,0.00 -43.20,-0.00,2.61,0.00,1.00,-0.00,0.00 -48.00,-0.00,2.57,0.00,1.00,-0.00,0.00 -52.80,-0.00,2.53,0.00,1.00,-0.00,0.00 -57.60,-0.00,2.49,0.00,1.00,-0.00,0.00 -62.40,-0.00,2.45,0.00,1.00,-0.00,0.00 -67.20,-0.00,2.41,0.00,1.00,-4.80,0.00 -72.00,-0.00,2.37,0.00,1.00,-4.80,0.00 -76.80,-0.00,2.33,0.00,1.00,-4.80,0.00 -81.60,-0.00,2.29,0.00,1.00,-9.60,0.00 -86.40,-0.00,2.25,0.00,1.00,-19.20,0.00 -91.20,-0.00,2.21,0.00,1.00,-134.40,0.00 -96.00,-0.00,2.17,0.00,1.00,-168.00,0.00 -100.80,-0.00,2.13,0.00,1.00,-172.80,0.00 -105.60,-0.00,2.09,0.00,1.00,-177.60,0.00 -110.40,-0.00,2.05,0.00,1.00,-177.60,0.00 -115.20,-0.00,2.01,0.00,1.00,-177.60,0.00 -120.00,-0.00,1.96,0.00,1.00,-177.60,0.00 -124.80,-0.00,1.92,0.00,1.00,-177.60,0.00 -129.60,-0.00,1.88,0.00,1.00,-177.60,0.00 -134.40,-0.00,1.84,0.00,1.00,-177.60,0.00 -139.20,-0.00,1.80,0.00,1.00,-177.60,0.00 -144.00,-0.00,1.76,0.00,1.00,-177.60,0.00 -148.80,-0.00,1.72,0.00,1.00,-177.60,0.00 -153.60,-0.00,1.68,0.00,1.00,-177.60,0.00 -158.40,-0.00,1.64,0.00,1.00,-177.60,0.00 -163.20,-0.00,1.60,0.00,1.00,-177.60,0.00 -168.00,-0.00,1.56,0.00,1.00,-177.60,0.00 -172.80,-0.00,1.52,0.00,1.00,-177.60,0.00 -177.60,-0.00,1.48,0.00,1.00,-177.60,0.00 --177.60,0.00,1.44,0.00,1.00,177.60,0.00 --172.80,0.00,1.40,0.00,1.00,177.60,0.00 --168.00,0.00,1.36,0.00,1.00,177.60,0.00 --163.20,0.00,1.32,0.00,1.00,177.60,0.00 --158.40,0.00,1.28,0.00,1.00,177.60,0.00 --153.60,0.00,1.24,0.00,1.00,177.60,0.00 --148.80,0.00,1.20,0.00,1.00,177.60,0.00 --144.00,0.00,1.16,0.00,1.00,177.60,0.00 --139.20,0.00,1.12,0.00,1.00,177.60,0.00 --134.40,0.00,1.08,0.00,1.00,177.60,0.00 --129.60,0.00,1.04,0.00,1.00,177.60,0.00 --124.80,0.00,1.00,0.00,1.00,177.60,0.00 --120.00,0.00,0.96,0.00,1.00,177.60,0.00 --115.20,0.00,0.92,0.00,1.00,177.60,0.00 --110.40,0.00,0.88,0.00,1.00,177.60,0.00 --105.60,0.00,0.84,0.00,1.00,177.60,0.00 --100.80,0.00,0.80,0.00,1.00,172.80,0.00 --96.00,0.00,0.76,0.00,1.00,168.00,0.00 --91.20,0.00,0.72,0.00,1.00,134.40,0.00 --86.40,0.00,0.68,0.00,1.00,19.20,0.00 --81.60,0.00,0.64,0.00,1.00,9.60,0.00 --76.80,0.00,0.60,0.00,1.00,4.80,0.00 --72.00,0.00,0.56,0.00,1.00,4.80,0.00 --67.20,0.00,0.52,0.00,1.00,4.80,0.00 --62.40,0.00,0.48,0.00,1.00,0.00,0.00 --57.60,0.00,0.44,0.00,1.00,0.00,0.00 --52.80,0.00,0.40,0.00,1.00,0.00,0.00 --48.00,0.00,0.36,0.00,1.00,0.00,0.00 --43.20,0.00,0.32,0.00,1.00,0.00,0.00 --38.40,0.00,0.28,0.00,1.00,0.00,0.00 --33.60,0.00,0.24,0.00,1.00,0.00,0.00 --28.80,0.00,0.20,0.00,1.00,0.00,0.00 --24.00,0.00,0.16,0.00,1.00,0.00,0.00 --19.20,0.00,0.12,0.00,1.00,0.00,0.00 --14.40,0.00,0.08,0.00,1.00,0.00,0.00 --9.60,0.00,0.04,0.00,1.00,0.00,0.00 --4.80,0.00,0.00,0.00,1.00,0.00,0.00 +-0.00,0.00,0.00,0.00,1.00,0.00,4.80,0 +-0.00,4.80,0.06,0.00,1.00,4.80,9.60,0 +-0.00,9.60,0.13,0.00,1.00,9.60,14.40,0 +-0.00,14.40,0.19,0.00,1.00,14.40,19.20,0 +-0.00,19.20,0.26,0.00,1.00,19.20,24.00,0 +-0.00,24.00,0.32,0.00,1.00,24.00,28.80,0 +-0.00,28.80,0.39,0.00,1.00,28.80,33.60,0 +-0.00,33.60,0.45,0.00,1.00,33.60,38.40,0 +-0.00,38.40,0.51,0.00,1.00,38.40,43.20,0 +-0.00,43.20,0.58,0.00,1.00,43.20,48.00,0 +-0.00,48.00,0.64,0.00,1.00,48.00,52.80,0 +-0.00,52.80,0.71,0.00,1.00,52.80,57.60,0 +-0.00,57.60,0.77,0.00,1.00,57.60,62.40,0 +-0.00,62.40,0.84,0.00,1.00,62.40,67.20,0 +-0.00,67.20,0.90,0.00,1.00,67.20,72.00,0 +-0.00,72.00,0.96,0.00,1.00,72.00,76.80,0 +-0.00,76.80,1.03,0.00,1.00,76.80,81.60,0 +-0.00,81.60,1.09,0.00,1.00,81.60,86.40,0 +-0.00,86.40,1.16,0.00,1.00,86.40,86.40,0 +-177.60,89.20,1.22,0.00,1.00,91.20,81.60,0 +-177.60,86.40,1.29,0.00,1.00,96.00,76.80,0 +-177.60,81.60,1.35,0.00,1.00,100.80,72.00,0 +-177.60,76.80,1.41,0.00,1.00,105.60,67.20,0 +-177.60,72.00,1.48,0.00,1.00,110.40,62.40,0 +-177.60,67.20,1.54,0.00,1.00,115.20,57.60,0 +177.60,62.40,1.61,0.00,1.00,120.00,52.80,0 +177.60,57.60,1.67,0.00,1.00,124.80,48.00,0 +177.60,52.80,1.73,0.00,1.00,129.60,43.20,0 +177.60,48.00,1.80,0.00,1.00,134.40,38.40,0 +177.60,43.20,1.86,0.00,1.00,139.20,33.60,0 +177.60,38.40,1.93,0.00,1.00,144.00,28.80,0 +177.60,33.60,1.99,0.00,1.00,148.80,24.00,0 +177.60,28.80,2.06,0.00,1.00,153.60,19.20,0 +177.60,24.00,2.12,0.00,1.00,158.40,14.40,0 +177.60,19.20,2.18,0.00,1.00,163.20,9.60,0 +177.60,14.40,2.25,0.00,1.00,168.00,4.80,0 +177.60,9.60,2.31,0.00,1.00,172.80,0.00,0 +177.60,4.80,2.38,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,2.44,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,2.51,0.00,1.00,-172.80,-9.60,0 +-177.60,-9.60,2.57,0.00,1.00,-168.00,-14.40,0 +-177.60,-14.40,2.63,0.00,1.00,-163.20,-19.20,0 +-177.60,-19.20,2.70,0.00,1.00,-158.40,-24.00,0 +-177.60,-24.00,2.76,0.00,1.00,-153.60,-28.80,0 +-177.60,-28.80,2.83,0.00,1.00,-148.80,-33.60,0 +-177.60,-33.60,2.89,0.00,1.00,-144.00,-38.40,0 +-177.60,-38.40,2.96,0.00,1.00,-139.20,-43.20,0 +-177.60,-48.00,3.02,0.00,1.00,-134.40,-48.00,0 +-177.60,-48.00,3.08,0.00,1.00,-129.60,-52.80,0 +-177.60,-52.80,3.15,0.00,1.00,-124.80,-57.60,0 +-177.60,-57.60,3.21,0.00,1.00,-120.00,-62.40,0 +177.60,-62.40,3.28,0.00,1.00,-115.20,-67.20,0 +177.60,-67.20,3.34,0.00,1.00,-110.40,-72.00,0 +177.60,-76.80,3.41,0.00,1.00,-105.60,-76.80,0 +177.60,-76.80,3.47,0.00,1.00,-100.80,-81.60,0 +177.60,-86.40,3.53,0.00,1.00,-96.00,-86.40,0 +177.60,-89.20,3.60,0.00,1.00,-91.20,-86.40,0 +0.00,-86.40,3.66,0.00,1.00,-86.40,-81.60,0 +0.00,-81.60,3.73,0.00,1.00,-81.60,-76.80,0 +0.00,-76.80,3.79,0.00,1.00,-76.80,-72.00,0 +0.00,-72.00,3.86,0.00,1.00,-72.00,-67.20,0 +0.00,-67.20,3.92,0.00,1.00,-67.20,-62.40,0 +0.00,-62.40,3.98,0.00,1.00,-62.40,-57.60,0 +0.00,-57.60,4.05,0.00,1.00,-57.60,-52.80,0 +0.00,-52.80,4.11,0.00,1.00,-52.80,-48.00,0 +0.00,-48.00,4.18,0.00,1.00,-48.00,-43.20,0 +0.00,-43.20,4.24,0.00,1.00,-43.20,-38.40,0 +0.00,-38.40,4.31,0.00,1.00,-38.40,-33.60,0 +0.00,-33.60,4.37,0.00,1.00,-33.60,-28.80,0 +0.00,-28.80,4.43,0.00,1.00,-28.80,-24.00,0 +0.00,-24.00,4.50,0.00,1.00,-24.00,-19.20,0 +0.00,-19.20,4.56,0.00,1.00,-19.20,-14.40,0 +0.00,-14.40,4.63,0.00,1.00,-14.40,-9.60,0 +0.00,-9.60,4.69,0.00,1.00,-9.60,-4.80,0 +0.00,-4.80,4.76,0.00,1.00,-4.80,0.00,0 +0.00,0.00,4.82,0.00,1.00,0.00,4.80,0 +0.00,4.80,4.88,0.00,1.00,4.80,9.60,0 +0.00,9.60,4.95,0.00,1.00,9.60,14.40,0 +0.00,14.40,5.01,0.00,1.00,14.40,19.20,0 +0.00,19.20,5.08,0.00,1.00,19.20,24.00,0 +0.00,24.00,5.14,0.00,1.00,24.00,28.80,0 +4.80,28.80,5.20,0.00,1.00,28.80,33.60,0 +4.80,33.60,5.27,0.00,1.00,33.60,38.40,0 +4.80,38.40,5.33,0.00,1.00,38.40,43.20,0 +4.80,43.20,5.40,0.00,1.00,43.20,48.00,0 +4.80,48.00,5.46,0.00,1.00,48.00,52.80,0 +4.80,52.80,5.53,0.00,1.00,52.80,57.60,0 +9.60,57.60,5.59,0.00,1.00,57.60,62.40,0 +9.60,62.40,5.65,0.00,1.00,62.40,67.20,0 +9.60,67.20,5.72,0.00,1.00,67.20,72.00,0 +14.40,72.00,5.78,0.00,1.00,72.00,76.80,0 +19.20,76.80,5.85,0.00,1.00,76.80,81.60,0 +28.80,81.60,5.91,0.00,1.00,81.60,86.40,0 +52.80,86.40,5.98,0.00,1.00,86.40,86.40,0 +105.60,86.40,6.04,0.00,1.00,91.20,81.60,0 +139.20,81.60,6.10,0.00,1.00,96.00,76.80,0 +158.40,76.80,6.17,0.00,1.00,100.80,72.00,0 +163.20,72.00,6.23,0.00,1.00,105.60,67.20,0 +168.00,67.20,6.30,0.00,1.00,110.40,62.40,0 +168.00,62.40,6.36,0.00,1.00,115.20,57.60,0 +172.80,57.60,6.43,0.00,1.00,120.00,52.80,0 +172.80,52.80,6.49,0.00,1.00,124.80,48.00,0 +172.80,48.00,6.55,0.00,1.00,129.60,43.20,0 +172.80,43.20,6.62,0.00,1.00,134.40,38.40,0 +177.60,38.40,6.68,0.00,1.00,139.20,33.60,0 +177.60,33.60,6.75,0.00,1.00,144.00,28.80,0 +177.60,28.80,6.81,0.00,1.00,148.80,24.00,0 +177.60,24.00,6.88,0.00,1.00,153.60,19.20,0 +177.60,19.20,6.94,0.00,1.00,158.40,14.40,0 +177.60,14.40,7.00,0.00,1.00,163.20,9.60,0 +177.60,9.60,7.07,0.00,1.00,168.00,4.80,0 +177.60,4.80,7.13,0.00,1.00,172.80,0.00,0 +177.60,0.00,7.20,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,7.26,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,7.33,0.00,1.00,-172.80,-9.60,0 +-177.60,-9.60,7.39,0.00,1.00,-168.00,-14.40,0 +-177.60,-14.40,7.45,0.00,1.00,-163.20,-19.20,0 +-177.60,-19.20,7.52,0.00,1.00,-158.40,-24.00,0 +-177.60,-24.00,7.58,0.00,1.00,-153.60,-28.80,0 +-177.60,-28.80,7.65,0.00,1.00,-148.80,-33.60,0 +-177.60,-33.60,7.71,0.00,1.00,-144.00,-38.40,0 +-177.60,-38.40,7.78,0.00,1.00,-139.20,-43.20,0 +-172.80,-43.20,7.84,0.00,1.00,-134.40,-48.00,0 +-172.80,-48.00,7.90,0.00,1.00,-129.60,-52.80,0 +-172.80,-52.80,7.97,0.00,1.00,-124.80,-57.60,0 +-172.80,-57.60,8.03,0.00,1.00,-120.00,-62.40,0 +-168.00,-62.40,8.10,0.00,1.00,-115.20,-67.20,0 +-168.00,-67.20,8.16,0.00,1.00,-110.40,-72.00,0 +-163.20,-72.00,8.22,0.00,1.00,-105.60,-76.80,0 +-158.40,-76.80,8.29,0.00,1.00,-100.80,-81.60,0 +-139.20,-81.60,8.35,0.00,1.00,-96.00,-86.40,0 +-105.60,-86.40,8.42,0.00,1.00,-91.20,-86.40,0 +-52.80,-86.40,8.48,0.00,1.00,-86.40,-81.60,0 +-28.80,-81.60,8.55,0.00,1.00,-81.60,-76.80,0 +-19.20,-76.80,8.61,0.00,1.00,-76.80,-72.00,0 +-14.40,-72.00,8.67,0.00,1.00,-72.00,-67.20,0 +-9.60,-67.20,8.74,0.00,1.00,-67.20,-62.40,0 +-9.60,-62.40,8.80,0.00,1.00,-62.40,-57.60,0 +-9.60,-57.60,8.87,0.00,1.00,-57.60,-52.80,0 +-4.80,-52.80,8.93,0.00,1.00,-52.80,-48.00,0 +-4.80,-48.00,9.00,0.00,1.00,-48.00,-43.20,0 +-4.80,-43.20,9.06,0.00,1.00,-43.20,-38.40,0 +-4.80,-38.40,9.12,0.00,1.00,-38.40,-33.60,0 +-4.80,-33.60,9.19,0.00,1.00,-33.60,-28.80,0 +-4.80,-28.80,9.25,0.00,1.00,-28.80,-24.00,0 +-0.00,-24.00,9.32,0.00,1.00,-24.00,-19.20,0 +-0.00,-19.20,9.38,0.00,1.00,-19.20,-14.40,0 +-0.00,-14.40,9.45,0.00,1.00,-14.40,-9.60,0 +-0.00,-9.60,9.51,0.00,1.00,-9.60,-4.80,0 +-0.00,-4.80,9.57,0.00,1.00,-4.80,0.00,0 +0.00,0.00,9.64,0.00,1.00,0.00,4.80,0 +0.00,4.80,9.70,0.00,1.00,4.80,9.60,0 +0.00,9.60,9.77,0.00,1.00,9.60,14.40,0 +4.80,14.40,9.83,0.00,1.00,14.40,19.20,0 +4.80,19.20,9.90,0.00,1.00,19.20,24.00,0 +4.80,24.00,9.96,0.00,1.00,24.00,28.80,0 +4.80,28.80,10.02,0.00,1.00,28.80,33.60,0 +4.80,33.60,10.09,0.00,1.00,33.60,38.40,0 +9.60,38.40,10.15,0.00,1.00,38.40,43.20,0 +9.60,43.20,10.22,0.00,1.00,43.20,48.00,0 +9.60,48.00,10.28,0.00,1.00,48.00,52.80,0 +14.40,52.80,10.35,0.00,1.00,52.80,57.60,0 +14.40,57.60,10.41,0.00,1.00,57.60,62.40,0 +19.20,62.40,10.47,0.00,1.00,62.40,67.20,0 +24.00,67.20,10.54,0.00,1.00,67.20,72.00,0 +28.80,72.00,10.60,0.00,1.00,72.00,72.00,0 +33.60,72.00,10.67,0.00,1.00,76.80,76.80,0 +48.00,76.80,10.73,0.00,1.00,81.60,81.60,0 +67.20,81.60,10.80,0.00,1.00,86.40,81.60,0 +96.00,81.60,10.86,0.00,1.00,91.20,81.60,0 +120.00,76.80,10.92,0.00,1.00,96.00,76.80,0 +139.20,76.80,10.99,0.00,1.00,100.80,72.00,0 +148.80,72.00,11.05,0.00,1.00,105.60,67.20,0 +153.60,67.20,11.12,0.00,1.00,110.40,62.40,0 +158.40,62.40,11.18,0.00,1.00,115.20,57.60,0 +163.20,57.60,11.24,0.00,1.00,120.00,52.80,0 +168.00,52.80,11.31,0.00,1.00,124.80,48.00,0 +168.00,48.00,11.37,0.00,1.00,129.60,43.20,0 +168.00,43.20,11.44,0.00,1.00,134.40,38.40,0 +172.80,38.40,11.50,0.00,1.00,139.20,33.60,0 +172.80,33.60,11.57,0.00,1.00,144.00,28.80,0 +172.80,28.80,11.63,0.00,1.00,148.80,24.00,0 +177.60,24.00,11.69,0.00,1.00,153.60,19.20,0 +177.60,19.20,11.76,0.00,1.00,158.40,14.40,0 +177.60,14.40,11.82,0.00,1.00,163.20,9.60,0 +177.60,9.60,11.89,0.00,1.00,168.00,4.80,0 +177.60,4.80,11.95,0.00,1.00,172.80,0.00,0 +177.60,0.00,12.02,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,12.08,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,12.14,0.00,1.00,-172.80,-9.60,0 +-177.60,-9.60,12.21,0.00,1.00,-168.00,-14.40,0 +-177.60,-14.40,12.27,0.00,1.00,-163.20,-19.20,0 +-177.60,-19.20,12.34,0.00,1.00,-158.40,-24.00,0 +-177.60,-24.00,12.40,0.00,1.00,-153.60,-28.80,0 +-172.80,-28.80,12.47,0.00,1.00,-148.80,-33.60,0 +-172.80,-33.60,12.53,0.00,1.00,-144.00,-38.40,0 +-172.80,-38.40,12.59,0.00,1.00,-139.20,-43.20,0 +-168.00,-43.20,12.66,0.00,1.00,-134.40,-48.00,0 +-168.00,-48.00,12.72,0.00,1.00,-129.60,-52.80,0 +-168.00,-52.80,12.79,0.00,1.00,-124.80,-57.60,0 +-163.20,-57.60,12.85,0.00,1.00,-120.00,-62.40,0 +-158.40,-62.40,12.92,0.00,1.00,-115.20,-67.20,0 +-153.60,-67.20,12.98,0.00,1.00,-110.40,-72.00,0 +-148.80,-72.00,13.04,0.00,1.00,-105.60,-76.80,0 +-139.20,-76.80,13.11,0.00,1.00,-100.80,-81.60,0 +-120.00,-76.80,13.17,0.00,1.00,-96.00,-81.60,0 +-96.00,-81.60,13.24,0.00,1.00,-91.20,-81.60,0 +-67.20,-81.60,13.30,0.00,1.00,-86.40,-76.80,0 +-48.00,-76.80,13.37,0.00,1.00,-81.60,-72.00,0 +-33.60,-72.00,13.43,0.00,1.00,-76.80,-72.00,0 +-28.80,-72.00,13.49,0.00,1.00,-72.00,-67.20,0 +-24.00,-67.20,13.56,0.00,1.00,-67.20,-62.40,0 +-19.20,-62.40,13.62,0.00,1.00,-62.40,-57.60,0 +-14.40,-57.60,13.69,0.00,1.00,-57.60,-52.80,0 +-14.40,-52.80,13.75,0.00,1.00,-52.80,-48.00,0 +-9.60,-48.00,13.82,0.00,1.00,-48.00,-43.20,0 +-9.60,-43.20,13.88,0.00,1.00,-43.20,-38.40,0 +-9.60,-38.40,13.94,0.00,1.00,-38.40,-33.60,0 +-4.80,-33.60,14.01,0.00,1.00,-33.60,-28.80,0 +-4.80,-28.80,14.07,0.00,1.00,-28.80,-24.00,0 +-4.80,-24.00,14.14,0.00,1.00,-24.00,-19.20,0 +-4.80,-19.20,14.20,0.00,1.00,-19.20,-14.40,0 +-4.80,-14.40,14.27,0.00,1.00,-14.40,-9.60,0 +-0.00,-9.60,14.33,0.00,1.00,-9.60,-4.80,0 +-0.00,-4.80,14.39,0.00,1.00,-4.80,0.00,0 +0.00,0.00,14.46,0.00,1.00,0.00,4.80,0 +0.00,4.80,14.52,0.00,1.00,4.80,9.60,0 +4.80,9.60,14.59,0.00,1.00,9.60,14.40,0 +4.80,14.40,14.65,0.00,1.00,14.40,19.20,0 +4.80,19.20,14.71,0.00,1.00,19.20,24.00,0 +4.80,24.00,14.78,0.00,1.00,24.00,28.80,0 +9.60,28.80,14.84,0.00,1.00,28.80,33.60,0 +9.60,33.60,14.91,0.00,1.00,33.60,38.40,0 +9.60,38.40,14.97,0.00,1.00,38.40,43.20,0 +14.40,43.20,15.04,0.00,1.00,43.20,48.00,0 +14.40,48.00,15.10,0.00,1.00,48.00,52.80,0 +19.20,52.80,15.16,0.00,1.00,52.80,57.60,0 +19.20,52.80,15.23,0.00,1.00,57.60,57.60,0 +24.00,57.60,15.29,0.00,1.00,62.40,62.40,0 +28.80,62.40,15.36,0.00,1.00,67.20,67.20,0 +38.40,67.20,15.42,0.00,1.00,72.00,72.00,0 +48.00,72.00,15.49,0.00,1.00,76.80,72.00,0 +57.60,72.00,15.55,0.00,1.00,81.60,76.80,0 +76.80,76.80,15.61,0.00,1.00,86.40,76.80,0 +96.00,76.80,15.68,0.00,1.00,91.20,76.80,0 +115.20,76.80,15.74,0.00,1.00,96.00,72.00,0 +129.60,72.00,15.81,0.00,1.00,100.80,72.00,0 +139.20,67.20,15.87,0.00,1.00,105.60,67.20,0 +144.00,67.20,15.94,0.00,1.00,110.40,62.40,0 +153.60,62.40,16.00,0.00,1.00,115.20,57.60,0 +158.40,57.60,16.00,0.00,1.00,120.00,52.80,0 +158.40,52.80,15.94,0.00,1.00,124.80,48.00,0 +163.20,48.00,15.87,0.00,1.00,129.60,43.20,0 +168.00,43.20,15.81,0.00,1.00,134.40,38.40,0 +168.00,38.40,15.74,0.00,1.00,139.20,33.60,0 +168.00,33.60,15.68,0.00,1.00,144.00,28.80,0 +172.80,28.80,15.61,0.00,1.00,148.80,24.00,0 +172.80,24.00,15.55,0.00,1.00,153.60,19.20,0 +172.80,19.20,15.49,0.00,1.00,158.40,14.40,0 +177.60,14.40,15.42,0.00,1.00,163.20,9.60,0 +177.60,9.60,15.36,0.00,1.00,168.00,4.80,0 +177.60,4.80,15.29,0.00,1.00,172.80,0.00,0 +177.60,0.00,15.23,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,15.16,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,15.10,0.00,1.00,-172.80,-9.60,0 +-177.60,-9.60,15.04,0.00,1.00,-168.00,-14.40,0 +-177.60,-14.40,14.97,0.00,1.00,-163.20,-19.20,0 +-172.80,-19.20,14.91,0.00,1.00,-158.40,-24.00,0 +-172.80,-24.00,14.84,0.00,1.00,-153.60,-28.80,0 +-172.80,-28.80,14.78,0.00,1.00,-148.80,-33.60,0 +-168.00,-33.60,14.71,0.00,1.00,-144.00,-38.40,0 +-168.00,-38.40,14.65,0.00,1.00,-139.20,-43.20,0 +-168.00,-43.20,14.59,0.00,1.00,-134.40,-48.00,0 +-163.20,-48.00,14.52,0.00,1.00,-129.60,-52.80,0 +-158.40,-52.80,14.46,0.00,1.00,-124.80,-57.60,0 +-158.40,-57.60,14.39,0.00,1.00,-120.00,-62.40,0 +-153.60,-62.40,14.33,0.00,1.00,-115.20,-67.20,0 +-144.00,-67.20,14.27,0.00,1.00,-110.40,-72.00,0 +-139.20,-67.20,14.20,0.00,1.00,-105.60,-72.00,0 +-129.60,-72.00,14.14,0.00,1.00,-100.80,-76.80,0 +-115.20,-76.80,14.07,0.00,1.00,-96.00,-76.80,0 +-96.00,-76.80,14.01,0.00,1.00,-91.20,-76.80,0 +-76.80,-76.80,13.94,0.00,1.00,-86.40,-72.00,0 +-57.60,-72.00,13.88,0.00,1.00,-81.60,-72.00,0 +-48.00,-72.00,13.82,0.00,1.00,-76.80,-67.20,0 +-38.40,-67.20,13.75,0.00,1.00,-72.00,-62.40,0 +-28.80,-62.40,13.69,0.00,1.00,-67.20,-57.60,0 +-24.00,-57.60,13.62,0.00,1.00,-62.40,-57.60,0 +-19.20,-52.80,13.56,0.00,1.00,-57.60,-52.80,0 +-19.20,-52.80,13.49,0.00,1.00,-52.80,-48.00,0 +-14.40,-48.00,13.43,0.00,1.00,-48.00,-43.20,0 +-14.40,-43.20,13.37,0.00,1.00,-43.20,-38.40,0 +-9.60,-38.40,13.30,0.00,1.00,-38.40,-33.60,0 +-9.60,-33.60,13.24,0.00,1.00,-33.60,-28.80,0 +-9.60,-28.80,13.17,0.00,1.00,-28.80,-24.00,0 +-4.80,-24.00,13.11,0.00,1.00,-24.00,-19.20,0 +-4.80,-19.20,13.04,0.00,1.00,-19.20,-14.40,0 +-4.80,-14.40,12.98,0.00,1.00,-14.40,-9.60,0 +-4.80,-9.60,12.92,0.00,1.00,-9.60,-4.80,0 +-0.00,-4.80,12.85,0.00,1.00,-4.80,0.00,0 +0.00,0.00,12.79,0.00,1.00,0.00,4.80,0 +0.00,4.80,12.72,0.00,1.00,4.80,9.60,0 +4.80,9.60,12.66,0.00,1.00,9.60,14.40,0 +4.80,14.40,12.59,0.00,1.00,14.40,19.20,0 +4.80,19.20,12.53,0.00,1.00,19.20,24.00,0 +9.60,24.00,12.47,0.00,1.00,24.00,28.80,0 +9.60,28.80,12.40,0.00,1.00,28.80,33.60,0 +14.40,33.60,12.34,0.00,1.00,33.60,38.40,0 +14.40,33.60,12.27,0.00,1.00,38.40,38.40,0 +19.20,38.40,12.21,0.00,1.00,43.20,43.20,0 +19.20,43.20,12.14,0.00,1.00,48.00,48.00,0 +24.00,48.00,12.08,0.00,1.00,52.80,52.80,0 +28.80,52.80,12.02,0.00,1.00,57.60,57.60,0 +33.60,57.60,11.95,0.00,1.00,62.40,62.40,0 +38.40,62.40,11.89,0.00,1.00,67.20,62.40,0 +43.20,62.40,11.82,0.00,1.00,72.00,67.20,0 +52.80,67.20,11.76,0.00,1.00,76.80,72.00,0 +67.20,67.20,11.69,0.00,1.00,81.60,72.00,0 +76.80,72.00,11.63,0.00,1.00,86.40,72.00,0 +96.00,72.00,11.57,0.00,1.00,91.20,72.00,0 +105.60,72.00,11.50,0.00,1.00,96.00,67.20,0 +120.00,67.20,11.44,0.00,1.00,100.80,67.20,0 +129.60,67.20,11.37,0.00,1.00,105.60,62.40,0 +139.20,62.40,11.31,0.00,1.00,110.40,57.60,0 +144.00,57.60,11.24,0.00,1.00,115.20,57.60,0 +148.80,52.80,11.18,0.00,1.00,120.00,52.80,0 +153.60,52.80,11.12,0.00,1.00,124.80,48.00,0 +158.40,48.00,11.05,0.00,1.00,129.60,43.20,0 +163.20,43.20,10.99,0.00,1.00,134.40,38.40,0 +163.20,38.40,10.92,0.00,1.00,139.20,33.60,0 +168.00,33.60,10.86,0.00,1.00,144.00,28.80,0 +168.00,28.80,10.80,0.00,1.00,148.80,24.00,0 +172.80,24.00,10.73,0.00,1.00,153.60,19.20,0 +172.80,19.20,10.67,0.00,1.00,158.40,14.40,0 +172.80,14.40,10.60,0.00,1.00,163.20,9.60,0 +177.60,9.60,10.54,0.00,1.00,168.00,4.80,0 +177.60,4.80,10.47,0.00,1.00,172.80,0.00,0 +177.60,0.00,10.41,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,10.35,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,10.28,0.00,1.00,-172.80,-9.60,0 +-177.60,-9.60,10.22,0.00,1.00,-168.00,-14.40,0 +-172.80,-14.40,10.15,0.00,1.00,-163.20,-19.20,0 +-172.80,-19.20,10.09,0.00,1.00,-158.40,-24.00,0 +-172.80,-24.00,10.02,0.00,1.00,-153.60,-28.80,0 +-168.00,-28.80,9.96,0.00,1.00,-148.80,-33.60,0 +-168.00,-33.60,9.90,0.00,1.00,-144.00,-38.40,0 +-163.20,-38.40,9.83,0.00,1.00,-139.20,-43.20,0 +-163.20,-43.20,9.77,0.00,1.00,-134.40,-48.00,0 +-158.40,-48.00,9.70,0.00,1.00,-129.60,-52.80,0 +-153.60,-52.80,9.64,0.00,1.00,-124.80,-57.60,0 +-148.80,-52.80,9.57,0.00,1.00,-120.00,-57.60,0 +-144.00,-57.60,9.51,0.00,1.00,-115.20,-62.40,0 +-139.20,-62.40,9.45,0.00,1.00,-110.40,-67.20,0 +-129.60,-67.20,9.38,0.00,1.00,-105.60,-67.20,0 +-120.00,-67.20,9.32,0.00,1.00,-100.80,-72.00,0 +-105.60,-72.00,9.25,0.00,1.00,-96.00,-72.00,0 +-96.00,-72.00,9.19,0.00,1.00,-91.20,-72.00,0 +-76.80,-72.00,9.12,0.00,1.00,-86.40,-72.00,0 +-67.20,-67.20,9.06,0.00,1.00,-81.60,-67.20,0 +-52.80,-67.20,9.00,0.00,1.00,-76.80,-62.40,0 +-43.20,-62.40,8.93,0.00,1.00,-72.00,-62.40,0 +-38.40,-62.40,8.87,0.00,1.00,-67.20,-57.60,0 +-33.60,-57.60,8.80,0.00,1.00,-62.40,-52.80,0 +-28.80,-52.80,8.74,0.00,1.00,-57.60,-48.00,0 +-24.00,-48.00,8.67,0.00,1.00,-52.80,-43.20,0 +-19.20,-43.20,8.61,0.00,1.00,-48.00,-38.40,0 +-19.20,-38.40,8.55,0.00,1.00,-43.20,-38.40,0 +-14.40,-33.60,8.48,0.00,1.00,-38.40,-33.60,0 +-14.40,-33.60,8.42,0.00,1.00,-33.60,-28.80,0 +-9.60,-28.80,8.35,0.00,1.00,-28.80,-24.00,0 +-9.60,-24.00,8.29,0.00,1.00,-24.00,-19.20,0 +-4.80,-19.20,8.22,0.00,1.00,-19.20,-14.40,0 +-4.80,-14.40,8.16,0.00,1.00,-14.40,-9.60,0 +-4.80,-9.60,8.10,0.00,1.00,-9.60,-4.80,0 +-0.00,-4.80,8.03,0.00,1.00,-4.80,0.00,0 +0.00,0.00,7.97,0.00,1.00,0.00,4.80,0 +0.00,4.80,7.90,0.00,1.00,4.80,9.60,0 +4.80,9.60,7.84,0.00,1.00,9.60,14.40,0 +4.80,14.40,7.78,0.00,1.00,14.40,19.20,0 +9.60,19.20,7.71,0.00,1.00,19.20,24.00,0 +9.60,24.00,7.65,0.00,1.00,24.00,24.00,0 +14.40,24.00,7.58,0.00,1.00,28.80,28.80,0 +14.40,28.80,7.52,0.00,1.00,33.60,33.60,0 +19.20,33.60,7.45,0.00,1.00,33.60,38.40,0 +19.20,38.40,7.39,0.00,1.00,38.40,43.20,0 +24.00,43.20,7.33,0.00,1.00,43.20,48.00,0 +28.80,48.00,7.26,0.00,1.00,48.00,52.80,0 +33.60,52.80,7.20,0.00,1.00,57.60,52.80,0 +38.40,52.80,7.13,0.00,1.00,62.40,57.60,0 +43.20,57.60,7.07,0.00,1.00,67.20,62.40,0 +52.80,62.40,7.00,0.00,1.00,72.00,62.40,0 +62.40,62.40,6.94,0.00,1.00,76.80,67.20,0 +72.00,62.40,6.88,0.00,1.00,81.60,67.20,0 +81.60,67.20,6.81,0.00,1.00,86.40,67.20,0 +91.20,67.20,6.75,0.00,1.00,91.20,67.20,0 +105.60,67.20,6.68,0.00,1.00,96.00,67.20,0 +115.20,62.40,6.62,0.00,1.00,100.80,62.40,0 +124.80,62.40,6.55,0.00,1.00,105.60,57.60,0 +134.40,57.60,6.49,0.00,1.00,110.40,57.60,0 +139.20,57.60,6.43,0.00,1.00,115.20,52.80,0 +144.00,52.80,6.36,0.00,1.00,120.00,48.00,0 +148.80,48.00,6.30,0.00,1.00,129.60,43.20,0 +153.60,43.20,6.23,0.00,1.00,134.40,43.20,0 +158.40,38.40,6.17,0.00,1.00,139.20,38.40,0 +158.40,38.40,6.10,0.00,1.00,144.00,33.60,0 +163.20,33.60,6.04,0.00,1.00,148.80,28.80,0 +168.00,28.80,5.98,0.00,1.00,148.80,24.00,0 +168.00,24.00,5.91,0.00,1.00,153.60,19.20,0 +172.80,19.20,5.85,0.00,1.00,158.40,14.40,0 +172.80,14.40,5.78,0.00,1.00,163.20,9.60,0 +172.80,9.60,5.72,0.00,1.00,168.00,4.80,0 +177.60,4.80,5.65,0.00,1.00,172.80,0.00,0 +177.60,0.00,5.59,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,5.53,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,5.46,0.00,1.00,-172.80,-9.60,0 +-172.80,-9.60,5.40,0.00,1.00,-168.00,-14.40,0 +-172.80,-14.40,5.33,0.00,1.00,-163.20,-19.20,0 +-172.80,-19.20,5.27,0.00,1.00,-158.40,-24.00,0 +-168.00,-24.00,5.20,0.00,1.00,-153.60,-28.80,0 +-168.00,-28.80,5.14,0.00,1.00,-148.80,-33.60,0 +-163.20,-33.60,5.08,0.00,1.00,-148.80,-38.40,0 +-158.40,-38.40,5.01,0.00,1.00,-144.00,-43.20,0 +-158.40,-38.40,4.95,0.00,1.00,-139.20,-43.20,0 +-153.60,-43.20,4.88,0.00,1.00,-134.40,-48.00,0 +-148.80,-48.00,4.82,0.00,1.00,-129.60,-52.80,0 +-144.00,-52.80,4.76,0.00,1.00,-120.00,-57.60,0 +-139.20,-57.60,4.69,0.00,1.00,-115.20,-57.60,0 +-134.40,-57.60,4.63,0.00,1.00,-110.40,-62.40,0 +-124.80,-62.40,4.56,0.00,1.00,-105.60,-67.20,0 +-115.20,-62.40,4.50,0.00,1.00,-100.80,-67.20,0 +-105.60,-67.20,4.43,0.00,1.00,-96.00,-67.20,0 +-91.20,-67.20,4.37,0.00,1.00,-91.20,-67.20,0 +-81.60,-67.20,4.31,0.00,1.00,-86.40,-67.20,0 +-72.00,-62.40,4.24,0.00,1.00,-81.60,-62.40,0 +-62.40,-62.40,4.18,0.00,1.00,-76.80,-62.40,0 +-52.80,-62.40,4.11,0.00,1.00,-72.00,-57.60,0 +-43.20,-57.60,4.05,0.00,1.00,-67.20,-52.80,0 +-38.40,-52.80,3.98,0.00,1.00,-62.40,-52.80,0 +-33.60,-52.80,3.92,0.00,1.00,-57.60,-48.00,0 +-28.80,-48.00,3.86,0.00,1.00,-48.00,-43.20,0 +-24.00,-43.20,3.79,0.00,1.00,-43.20,-38.40,0 +-19.20,-38.40,3.73,0.00,1.00,-38.40,-33.60,0 +-19.20,-33.60,3.66,0.00,1.00,-33.60,-28.80,0 +-14.40,-28.80,3.60,0.00,1.00,-33.60,-24.00,0 +-14.40,-24.00,3.53,0.00,1.00,-28.80,-24.00,0 +-9.60,-24.00,3.47,0.00,1.00,-24.00,-19.20,0 +-9.60,-19.20,3.41,0.00,1.00,-19.20,-14.40,0 +-4.80,-14.40,3.34,0.00,1.00,-14.40,-9.60,0 +-4.80,-9.60,3.28,0.00,1.00,-9.60,-4.80,0 +-0.00,-4.80,3.21,0.00,1.00,-4.80,0.00,0 +0.00,0.00,3.15,0.00,1.00,0.00,4.80,0 +0.00,4.80,3.08,0.00,1.00,4.80,9.60,0 +4.80,9.60,3.02,0.00,1.00,9.60,14.40,0 +4.80,14.40,2.96,0.00,1.00,14.40,19.20,0 +9.60,14.40,2.89,0.00,1.00,19.20,19.20,0 +14.40,19.20,2.83,0.00,1.00,19.20,24.00,0 +14.40,24.00,2.76,0.00,1.00,24.00,28.80,0 +19.20,28.80,2.70,0.00,1.00,28.80,33.60,0 +19.20,33.60,2.63,0.00,1.00,33.60,38.40,0 +24.00,38.40,2.57,0.00,1.00,38.40,43.20,0 +28.80,38.40,2.51,0.00,1.00,43.20,43.20,0 +33.60,43.20,2.44,0.00,1.00,48.00,48.00,0 +38.40,48.00,2.38,0.00,1.00,52.80,52.80,0 +43.20,52.80,2.31,0.00,1.00,57.60,52.80,0 +48.00,52.80,2.25,0.00,1.00,62.40,57.60,0 +57.60,57.60,2.18,0.00,1.00,72.00,57.60,0 +62.40,57.60,2.12,0.00,1.00,76.80,62.40,0 +72.00,62.40,2.06,0.00,1.00,81.60,62.40,0 +81.60,62.40,1.99,0.00,1.00,86.40,62.40,0 +91.20,62.40,1.93,0.00,1.00,91.20,62.40,0 +100.80,62.40,1.86,0.00,1.00,96.00,62.40,0 +110.40,57.60,1.80,0.00,1.00,100.80,57.60,0 +120.00,57.60,1.73,0.00,1.00,105.60,57.60,0 +129.60,57.60,1.67,0.00,1.00,115.20,52.80,0 +134.40,52.80,1.61,0.00,1.00,120.00,48.00,0 +139.20,48.00,1.54,0.00,1.00,124.80,48.00,0 +144.00,48.00,1.48,0.00,1.00,129.60,43.20,0 +148.80,43.20,1.41,0.00,1.00,134.40,38.40,0 +153.60,38.40,1.35,0.00,1.00,139.20,33.60,0 +158.40,33.60,1.29,0.00,1.00,144.00,33.60,0 +158.40,28.80,1.22,0.00,1.00,148.80,28.80,0 +163.20,28.80,1.16,0.00,1.00,153.60,24.00,0 +168.00,24.00,1.09,0.00,1.00,158.40,19.20,0 +168.00,19.20,1.03,0.00,1.00,163.20,14.40,0 +172.80,14.40,0.96,0.00,1.00,163.20,9.60,0 +172.80,9.60,0.90,0.00,1.00,168.00,4.80,0 +177.60,4.80,0.84,0.00,1.00,172.80,0.00,0 +177.60,0.00,0.77,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,0.71,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,0.64,0.00,1.00,-172.80,-9.60,0 +-172.80,-9.60,0.58,0.00,1.00,-168.00,-14.40,0 +-172.80,-14.40,0.51,0.00,1.00,-163.20,-19.20,0 +-168.00,-19.20,0.45,0.00,1.00,-163.20,-24.00,0 +-168.00,-24.00,0.39,0.00,1.00,-158.40,-28.80,0 +-163.20,-28.80,0.32,0.00,1.00,-153.60,-33.60,0 +-158.40,-28.80,0.26,0.00,1.00,-148.80,-33.60,0 +-158.40,-33.60,0.19,0.00,1.00,-144.00,-38.40,0 +-153.60,-38.40,0.13,0.00,1.00,-139.20,-43.20,0 +-148.80,-43.20,0.06,0.00,1.00,-134.40,-48.00,0 +-144.00,-48.00,0.00,0.00,1.00,-129.60,-48.00,0 +-139.20,-48.00,0.00,0.00,1.00,-124.80,-52.80,0 +-134.40,-52.80,0.16,0.00,1.00,-120.00,-57.60,0 +-129.60,-57.60,0.32,0.00,1.00,-115.20,-57.60,0 +-120.00,-57.60,0.48,0.00,1.00,-105.60,-62.40,0 +-110.40,-57.60,0.65,0.00,1.00,-100.80,-62.40,0 +-100.80,-62.40,0.81,0.00,1.00,-96.00,-62.40,0 +-91.20,-62.40,0.97,0.00,1.00,-91.20,-62.40,0 +-81.60,-62.40,1.13,0.00,1.00,-86.40,-62.40,0 +-72.00,-62.40,1.29,0.00,1.00,-81.60,-57.60,0 +-62.40,-57.60,1.45,0.00,1.00,-76.80,-57.60,0 +-57.60,-57.60,1.62,0.00,1.00,-72.00,-52.80,0 +-48.00,-52.80,1.78,0.00,1.00,-62.40,-52.80,0 +-43.20,-52.80,1.94,0.00,1.00,-57.60,-48.00,0 +-38.40,-48.00,2.10,0.00,1.00,-52.80,-43.20,0 +-33.60,-43.20,2.26,0.00,1.00,-48.00,-43.20,0 +-28.80,-38.40,2.42,0.00,1.00,-43.20,-38.40,0 +-24.00,-38.40,2.59,0.00,1.00,-38.40,-33.60,0 +-19.20,-33.60,2.75,0.00,1.00,-33.60,-28.80,0 +-19.20,-28.80,2.91,0.00,1.00,-28.80,-24.00,0 +-14.40,-24.00,3.07,0.00,1.00,-24.00,-19.20,0 +-14.40,-19.20,3.23,0.00,1.00,-19.20,-19.20,0 +-9.60,-14.40,3.39,0.00,1.00,-19.20,-14.40,0 +-4.80,-14.40,3.56,0.00,1.00,-14.40,-9.60,0 +-4.80,-9.60,3.72,0.00,1.00,-9.60,-4.80,0 +-0.00,-4.80,3.88,0.00,1.00,-4.80,0.00,0 +0.00,0.00,4.04,0.00,1.00,0.00,4.80,0 +4.80,4.80,4.20,0.00,1.00,4.80,9.60,0 +4.80,9.60,4.36,0.00,1.00,9.60,14.40,0 +9.60,9.60,4.53,0.00,1.00,14.40,14.40,0 +9.60,14.40,4.69,0.00,1.00,14.40,19.20,0 +14.40,19.20,4.85,0.00,1.00,19.20,24.00,0 +19.20,24.00,5.01,0.00,1.00,24.00,28.80,0 +19.20,28.80,5.17,0.00,1.00,28.80,33.60,0 +24.00,28.80,5.33,0.00,1.00,33.60,33.60,0 +28.80,33.60,5.49,0.00,1.00,38.40,38.40,0 +33.60,38.40,5.66,0.00,1.00,43.20,43.20,0 +38.40,43.20,5.82,0.00,1.00,48.00,43.20,0 +43.20,43.20,5.98,0.00,1.00,52.80,48.00,0 +48.00,48.00,6.14,0.00,1.00,57.60,52.80,0 +52.80,48.00,6.30,0.00,1.00,62.40,52.80,0 +57.60,52.80,6.46,0.00,1.00,67.20,57.60,0 +67.20,52.80,6.63,0.00,1.00,72.00,57.60,0 +76.80,57.60,6.79,0.00,1.00,81.60,57.60,0 +81.60,57.60,6.95,0.00,1.00,86.40,57.60,0 +91.20,57.60,7.11,0.00,1.00,91.20,57.60,0 +100.80,57.60,7.27,0.00,1.00,96.00,57.60,0 +110.40,52.80,7.43,0.00,1.00,100.80,52.80,0 +115.20,52.80,7.60,0.00,1.00,110.40,52.80,0 +124.80,52.80,7.76,0.00,1.00,115.20,48.00,0 +129.60,48.00,7.92,0.00,1.00,120.00,48.00,0 +134.40,48.00,8.08,0.00,1.00,124.80,43.20,0 +139.20,43.20,8.24,0.00,1.00,129.60,38.40,0 +144.00,38.40,8.40,0.00,1.00,134.40,38.40,0 +148.80,38.40,8.57,0.00,1.00,139.20,33.60,0 +153.60,33.60,8.73,0.00,1.00,144.00,28.80,0 +158.40,28.80,8.89,0.00,1.00,148.80,24.00,0 +163.20,24.00,9.05,0.00,1.00,153.60,24.00,0 +163.20,24.00,9.21,0.00,1.00,158.40,19.20,0 +168.00,19.20,9.37,0.00,1.00,163.20,14.40,0 +172.80,14.40,9.54,0.00,1.00,168.00,9.60,0 +172.80,9.60,9.70,0.00,1.00,168.00,4.80,0 +177.60,4.80,9.86,0.00,1.00,172.80,0.00,0 +177.60,0.00,10.02,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,10.18,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,10.34,0.00,1.00,-172.80,-9.60,0 +-172.80,-9.60,10.51,0.00,1.00,-168.00,-14.40,0 +-172.80,-14.40,10.67,0.00,1.00,-168.00,-19.20,0 +-168.00,-19.20,10.83,0.00,1.00,-163.20,-24.00,0 +-163.20,-24.00,10.99,0.00,1.00,-158.40,-24.00,0 +-163.20,-24.00,11.15,0.00,1.00,-153.60,-28.80,0 +-158.40,-28.80,11.31,0.00,1.00,-148.80,-33.60,0 +-153.60,-33.60,11.47,0.00,1.00,-144.00,-38.40,0 +-148.80,-38.40,11.64,0.00,1.00,-139.20,-38.40,0 +-144.00,-38.40,11.80,0.00,1.00,-134.40,-43.20,0 +-139.20,-43.20,11.96,0.00,1.00,-129.60,-48.00,0 +-134.40,-48.00,12.12,0.00,1.00,-124.80,-48.00,0 +-129.60,-48.00,12.28,0.00,1.00,-120.00,-52.80,0 +-124.80,-52.80,12.44,0.00,1.00,-115.20,-52.80,0 +-115.20,-52.80,12.61,0.00,1.00,-110.40,-57.60,0 +-110.40,-52.80,12.77,0.00,1.00,-100.80,-57.60,0 +-100.80,-57.60,12.93,0.00,1.00,-96.00,-57.60,0 +-91.20,-57.60,13.09,0.00,1.00,-91.20,-57.60,0 +-81.60,-57.60,13.25,0.00,1.00,-86.40,-57.60,0 +-76.80,-57.60,13.41,0.00,1.00,-81.60,-57.60,0 +-67.20,-52.80,13.58,0.00,1.00,-72.00,-52.80,0 +-57.60,-52.80,13.74,0.00,1.00,-67.20,-52.80,0 +-52.80,-48.00,13.90,0.00,1.00,-62.40,-48.00,0 +-48.00,-48.00,14.06,0.00,1.00,-57.60,-43.20,0 +-43.20,-43.20,14.22,0.00,1.00,-52.80,-43.20,0 +-38.40,-43.20,14.38,0.00,1.00,-48.00,-38.40,0 +-33.60,-38.40,14.55,0.00,1.00,-43.20,-33.60,0 +-28.80,-33.60,14.71,0.00,1.00,-38.40,-33.60,0 +-24.00,-28.80,14.87,0.00,1.00,-33.60,-28.80,0 +-19.20,-28.80,15.03,0.00,1.00,-28.80,-24.00,0 +-19.20,-24.00,15.19,0.00,1.00,-24.00,-19.20,0 +-14.40,-19.20,15.35,0.00,1.00,-19.20,-14.40,0 +-9.60,-14.40,15.52,0.00,1.00,-14.40,-14.40,0 +-9.60,-9.60,15.68,0.00,1.00,-14.40,-9.60,0 +-4.80,-9.60,15.84,0.00,1.00,-9.60,-4.80,0 +-4.80,-4.80,16.00,0.00,1.00,-4.80,0.00,0 +0.00,0.00,16.00,0.00,1.00,0.00,4.80,0 +4.80,4.80,15.84,0.00,1.00,4.80,9.60,0 +4.80,9.60,15.68,0.00,1.00,9.60,9.60,0 +9.60,9.60,15.52,0.00,1.00,9.60,14.40,0 +14.40,14.40,15.35,0.00,1.00,14.40,19.20,0 +14.40,19.20,15.19,0.00,1.00,19.20,24.00,0 +19.20,24.00,15.03,0.00,1.00,24.00,24.00,0 +24.00,24.00,14.87,0.00,1.00,28.80,28.80,0 +24.00,28.80,14.71,0.00,1.00,33.60,33.60,0 +28.80,33.60,14.55,0.00,1.00,38.40,38.40,0 +33.60,33.60,14.38,0.00,1.00,43.20,38.40,0 +38.40,38.40,14.22,0.00,1.00,48.00,43.20,0 +43.20,43.20,14.06,0.00,1.00,52.80,43.20,0 +48.00,43.20,13.90,0.00,1.00,57.60,48.00,0 +57.60,48.00,13.74,0.00,1.00,62.40,48.00,0 +62.40,48.00,13.58,0.00,1.00,67.20,52.80,0 +67.20,48.00,13.41,0.00,1.00,72.00,52.80,0 +76.80,52.80,13.25,0.00,1.00,81.60,52.80,0 +86.40,52.80,13.09,0.00,1.00,86.40,52.80,0 +91.20,52.80,12.93,0.00,1.00,91.20,52.80,0 +100.80,52.80,12.77,0.00,1.00,96.00,52.80,0 +105.60,48.00,12.61,0.00,1.00,105.60,48.00,0 +115.20,48.00,12.44,0.00,1.00,110.40,48.00,0 +120.00,48.00,12.28,0.00,1.00,115.20,48.00,0 +124.80,43.20,12.12,0.00,1.00,120.00,43.20,0 +134.40,43.20,11.96,0.00,1.00,124.80,43.20,0 +139.20,38.40,11.80,0.00,1.00,129.60,38.40,0 +144.00,38.40,11.64,0.00,1.00,134.40,33.60,0 +148.80,33.60,11.47,0.00,1.00,139.20,33.60,0 +153.60,28.80,11.31,0.00,1.00,144.00,28.80,0 +153.60,28.80,11.15,0.00,1.00,148.80,24.00,0 +158.40,24.00,10.99,0.00,1.00,153.60,19.20,0 +163.20,19.20,10.83,0.00,1.00,158.40,19.20,0 +168.00,14.40,10.67,0.00,1.00,163.20,14.40,0 +168.00,14.40,10.51,0.00,1.00,168.00,9.60,0 +172.80,9.60,10.34,0.00,1.00,172.80,4.80,0 +177.60,4.80,10.18,0.00,1.00,172.80,0.00,0 +177.60,0.00,10.02,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,9.86,0.00,1.00,-177.60,-4.80,0 +-177.60,-4.80,9.70,0.00,1.00,-172.80,-9.60,0 +-172.80,-9.60,9.54,0.00,1.00,-172.80,-14.40,0 +-168.00,-14.40,9.37,0.00,1.00,-168.00,-19.20,0 +-168.00,-14.40,9.21,0.00,1.00,-163.20,-19.20,0 +-163.20,-19.20,9.05,0.00,1.00,-158.40,-24.00,0 +-158.40,-24.00,8.89,0.00,1.00,-153.60,-28.80,0 +-153.60,-28.80,8.73,0.00,1.00,-148.80,-33.60,0 +-153.60,-28.80,8.57,0.00,1.00,-144.00,-33.60,0 +-148.80,-33.60,8.40,0.00,1.00,-139.20,-38.40,0 +-144.00,-38.40,8.24,0.00,1.00,-134.40,-43.20,0 +-139.20,-38.40,8.08,0.00,1.00,-129.60,-43.20,0 +-134.40,-43.20,7.92,0.00,1.00,-124.80,-48.00,0 +-124.80,-43.20,7.76,0.00,1.00,-120.00,-48.00,0 +-120.00,-48.00,7.60,0.00,1.00,-115.20,-48.00,0 +-115.20,-48.00,7.43,0.00,1.00,-110.40,-52.80,0 +-105.60,-48.00,7.27,0.00,1.00,-105.60,-52.80,0 +-100.80,-52.80,7.11,0.00,1.00,-96.00,-52.80,0 +-91.20,-52.80,6.95,0.00,1.00,-91.20,-52.80,0 +-86.40,-52.80,6.79,0.00,1.00,-86.40,-52.80,0 +-76.80,-52.80,6.63,0.00,1.00,-81.60,-52.80,0 +-67.20,-48.00,6.46,0.00,1.00,-72.00,-48.00,0 +-62.40,-48.00,6.30,0.00,1.00,-67.20,-48.00,0 +-57.60,-48.00,6.14,0.00,1.00,-62.40,-43.20,0 +-48.00,-43.20,5.98,0.00,1.00,-57.60,-43.20,0 +-43.20,-43.20,5.82,0.00,1.00,-52.80,-38.40,0 +-38.40,-38.40,5.66,0.00,1.00,-48.00,-38.40,0 +-33.60,-33.60,5.49,0.00,1.00,-43.20,-33.60,0 +-28.80,-33.60,5.33,0.00,1.00,-38.40,-28.80,0 +-24.00,-28.80,5.17,0.00,1.00,-33.60,-24.00,0 +-24.00,-24.00,5.01,0.00,1.00,-28.80,-24.00,0 +-19.20,-24.00,4.85,0.00,1.00,-24.00,-19.20,0 +-14.40,-19.20,4.69,0.00,1.00,-19.20,-14.40,0 +-14.40,-14.40,4.53,0.00,1.00,-14.40,-9.60,0 +-9.60,-9.60,4.36,0.00,1.00,-9.60,-9.60,0 +-4.80,-9.60,4.20,0.00,1.00,-9.60,-4.80,0 +-4.80,-4.80,4.04,0.00,1.00,-4.80,0.00,0 +0.00,0.00,3.88,0.00,1.00,0.00,4.80,0 +4.80,4.80,3.72,0.00,1.00,4.80,4.80,0 +4.80,4.80,3.56,0.00,1.00,4.80,9.60,0 +9.60,9.60,3.39,0.00,1.00,9.60,14.40,0 +14.40,14.40,3.23,0.00,1.00,14.40,19.20,0 +19.20,19.20,3.07,0.00,1.00,19.20,19.20,0 +19.20,19.20,2.91,0.00,1.00,24.00,24.00,0 +24.00,24.00,2.75,0.00,1.00,24.00,28.80,0 +28.80,28.80,2.59,0.00,1.00,28.80,28.80,0 +33.60,28.80,2.42,0.00,1.00,33.60,33.60,0 +38.40,33.60,2.26,0.00,1.00,38.40,38.40,0 +43.20,33.60,2.10,0.00,1.00,43.20,38.40,0 +48.00,38.40,1.94,0.00,1.00,48.00,43.20,0 +52.80,38.40,1.78,0.00,1.00,52.80,43.20,0 +57.60,43.20,1.62,0.00,1.00,62.40,43.20,0 +62.40,43.20,1.45,0.00,1.00,67.20,48.00,0 +72.00,43.20,1.29,0.00,1.00,72.00,48.00,0 +76.80,48.00,1.13,0.00,1.00,76.80,48.00,0 +86.40,48.00,0.97,0.00,1.00,86.40,48.00,0 +91.20,48.00,0.81,0.00,1.00,91.20,48.00,0 +100.80,48.00,0.65,0.00,1.00,96.00,48.00,0 +105.60,48.00,0.48,0.00,1.00,105.60,48.00,0 +110.40,43.20,0.32,0.00,1.00,110.40,43.20,0 +120.00,43.20,0.16,0.00,1.00,115.20,43.20,0 +124.80,43.20,0.00,0.00,1.00,124.80,38.40,0 +129.60,38.40,0.00,0.00,1.00,129.60,38.40,0 +134.40,38.40,0.04,0.00,1.00,134.40,33.60,0 +139.20,33.60,0.08,0.00,1.00,139.20,33.60,0 +144.00,33.60,0.12,0.00,1.00,144.00,28.80,0 +148.80,28.80,0.16,0.00,1.00,148.80,24.00,0 +153.60,24.00,0.20,0.00,1.00,153.60,24.00,0 +158.40,24.00,0.24,0.00,1.00,158.40,19.20,0 +163.20,19.20,0.28,0.00,1.00,158.40,14.40,0 +163.20,14.40,0.32,0.00,1.00,163.20,14.40,0 +168.00,14.40,0.36,0.00,1.00,168.00,9.60,0 +172.80,9.60,0.40,0.00,1.00,172.80,4.80,0 +172.80,4.80,0.44,0.00,1.00,172.80,0.00,0 +177.60,0.00,0.48,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,0.52,0.00,1.00,-177.60,-4.80,0 +-172.80,-4.80,0.56,0.00,1.00,-172.80,-9.60,0 +-172.80,-9.60,0.60,0.00,1.00,-172.80,-14.40,0 +-168.00,-14.40,0.64,0.00,1.00,-168.00,-14.40,0 +-163.20,-14.40,0.68,0.00,1.00,-163.20,-19.20,0 +-163.20,-19.20,0.72,0.00,1.00,-158.40,-24.00,0 +-158.40,-24.00,0.76,0.00,1.00,-158.40,-24.00,0 +-153.60,-24.00,0.80,0.00,1.00,-153.60,-28.80,0 +-148.80,-28.80,0.84,0.00,1.00,-148.80,-33.60,0 +-144.00,-33.60,0.88,0.00,1.00,-144.00,-33.60,0 +-139.20,-33.60,0.92,0.00,1.00,-139.20,-38.40,0 +-134.40,-38.40,0.96,0.00,1.00,-134.40,-38.40,0 +-129.60,-38.40,1.00,0.00,1.00,-129.60,-43.20,0 +-124.80,-43.20,1.04,0.00,1.00,-124.80,-43.20,0 +-120.00,-43.20,1.08,0.00,1.00,-115.20,-48.00,0 +-110.40,-43.20,1.12,0.00,1.00,-110.40,-48.00,0 +-105.60,-48.00,1.16,0.00,1.00,-105.60,-48.00,0 +-100.80,-48.00,1.20,0.00,1.00,-96.00,-48.00,0 +-91.20,-48.00,1.24,0.00,1.00,-91.20,-48.00,0 +-86.40,-48.00,1.28,0.00,1.00,-86.40,-48.00,0 +-76.80,-48.00,1.32,0.00,1.00,-76.80,-48.00,0 +-72.00,-43.20,1.36,0.00,1.00,-72.00,-43.20,0 +-62.40,-43.20,1.40,0.00,1.00,-67.20,-43.20,0 +-57.60,-43.20,1.44,0.00,1.00,-62.40,-43.20,0 +-52.80,-38.40,1.48,0.00,1.00,-52.80,-38.40,0 +-48.00,-38.40,1.52,0.00,1.00,-48.00,-38.40,0 +-43.20,-33.60,1.56,0.00,1.00,-43.20,-33.60,0 +-38.40,-33.60,1.60,0.00,1.00,-38.40,-28.80,0 +-33.60,-28.80,1.64,0.00,1.00,-33.60,-28.80,0 +-28.80,-28.80,1.68,0.00,1.00,-28.80,-24.00,0 +-24.00,-24.00,1.72,0.00,1.00,-24.00,-19.20,0 +-19.20,-19.20,1.76,0.00,1.00,-24.00,-19.20,0 +-19.20,-19.20,1.80,0.00,1.00,-19.20,-14.40,0 +-14.40,-14.40,1.84,0.00,1.00,-14.40,-9.60,0 +-9.60,-9.60,1.88,0.00,1.00,-9.60,-4.80,0 +-4.80,-4.80,1.92,0.00,1.00,-4.80,-4.80,0 +-4.80,-4.80,1.96,0.00,1.00,-4.80,0.00,0 +0.00,0.00,2.01,0.00,1.00,0.00,4.80,0 +4.80,4.80,2.05,0.00,1.00,4.80,4.80,0 +4.80,4.80,2.09,0.00,1.00,4.80,9.60,0 +9.60,9.60,2.13,0.00,1.00,9.60,14.40,0 +14.40,14.40,2.17,0.00,1.00,14.40,14.40,0 +19.20,14.40,2.21,0.00,1.00,14.40,19.20,0 +24.00,19.20,2.25,0.00,1.00,19.20,24.00,0 +24.00,24.00,2.29,0.00,1.00,24.00,24.00,0 +28.80,24.00,2.33,0.00,1.00,28.80,28.80,0 +33.60,28.80,2.37,0.00,1.00,33.60,28.80,0 +38.40,28.80,2.41,0.00,1.00,38.40,33.60,0 +43.20,33.60,2.45,0.00,1.00,43.20,33.60,0 +48.00,33.60,2.49,0.00,1.00,48.00,38.40,0 +52.80,38.40,2.53,0.00,1.00,52.80,38.40,0 +62.40,38.40,2.57,0.00,1.00,57.60,38.40,0 +67.20,38.40,2.61,0.00,1.00,62.40,43.20,0 +72.00,38.40,2.65,0.00,1.00,72.00,43.20,0 +76.80,43.20,2.69,0.00,1.00,76.80,43.20,0 +86.40,43.20,2.73,0.00,1.00,86.40,43.20,0 +91.20,43.20,2.77,0.00,1.00,91.20,43.20,0 +96.00,43.20,2.81,0.00,1.00,100.80,43.20,0 +105.60,43.20,2.85,0.00,1.00,105.60,43.20,0 +110.40,38.40,2.89,0.00,1.00,110.40,38.40,0 +115.20,38.40,2.93,0.00,1.00,120.00,38.40,0 +120.00,38.40,2.97,0.00,1.00,124.80,38.40,0 +129.60,33.60,3.01,0.00,1.00,129.60,33.60,0 +134.40,33.60,3.05,0.00,1.00,134.40,33.60,0 +139.20,28.80,3.09,0.00,1.00,139.20,28.80,0 +144.00,28.80,3.13,0.00,1.00,144.00,28.80,0 +148.80,24.00,3.17,0.00,1.00,148.80,24.00,0 +153.60,24.00,3.21,0.00,1.00,153.60,19.20,0 +153.60,19.20,3.25,0.00,1.00,158.40,19.20,0 +158.40,19.20,3.29,0.00,1.00,163.20,14.40,0 +163.20,14.40,3.33,0.00,1.00,163.20,9.60,0 +168.00,9.60,3.37,0.00,1.00,168.00,9.60,0 +172.80,9.60,3.41,0.00,1.00,172.80,4.80,0 +172.80,4.80,3.45,0.00,1.00,172.80,0.00,0 +177.60,0.00,3.49,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,3.53,0.00,1.00,-177.60,-4.80,0 +-172.80,-4.80,3.57,0.00,1.00,-172.80,-9.60,0 +-172.80,-9.60,3.61,0.00,1.00,-172.80,-9.60,0 +-168.00,-9.60,3.65,0.00,1.00,-168.00,-14.40,0 +-163.20,-14.40,3.69,0.00,1.00,-163.20,-19.20,0 +-158.40,-19.20,3.73,0.00,1.00,-163.20,-19.20,0 +-153.60,-19.20,3.77,0.00,1.00,-158.40,-24.00,0 +-153.60,-24.00,3.81,0.00,1.00,-153.60,-28.80,0 +-148.80,-24.00,3.85,0.00,1.00,-148.80,-28.80,0 +-144.00,-28.80,3.89,0.00,1.00,-144.00,-33.60,0 +-139.20,-28.80,3.93,0.00,1.00,-139.20,-33.60,0 +-134.40,-33.60,3.97,0.00,1.00,-134.40,-38.40,0 +-129.60,-33.60,4.01,0.00,1.00,-129.60,-38.40,0 +-120.00,-38.40,4.05,0.00,1.00,-124.80,-38.40,0 +-115.20,-38.40,4.09,0.00,1.00,-120.00,-43.20,0 +-110.40,-38.40,4.13,0.00,1.00,-110.40,-43.20,0 +-105.60,-43.20,4.17,0.00,1.00,-105.60,-43.20,0 +-96.00,-43.20,4.21,0.00,1.00,-100.80,-43.20,0 +-91.20,-43.20,4.25,0.00,1.00,-91.20,-43.20,0 +-86.40,-43.20,4.29,0.00,1.00,-86.40,-43.20,0 +-76.80,-43.20,4.33,0.00,1.00,-76.80,-43.20,0 +-72.00,-38.40,4.37,0.00,1.00,-72.00,-38.40,0 +-67.20,-38.40,4.41,0.00,1.00,-62.40,-38.40,0 +-62.40,-38.40,4.45,0.00,1.00,-57.60,-38.40,0 +-52.80,-38.40,4.49,0.00,1.00,-52.80,-33.60,0 +-48.00,-33.60,4.53,0.00,1.00,-48.00,-33.60,0 +-43.20,-33.60,4.57,0.00,1.00,-43.20,-28.80,0 +-38.40,-28.80,4.61,0.00,1.00,-38.40,-28.80,0 +-33.60,-28.80,4.65,0.00,1.00,-33.60,-24.00,0 +-28.80,-24.00,4.69,0.00,1.00,-28.80,-24.00,0 +-24.00,-24.00,4.73,0.00,1.00,-24.00,-19.20,0 +-24.00,-19.20,4.77,0.00,1.00,-19.20,-14.40,0 +-19.20,-14.40,4.81,0.00,1.00,-14.40,-14.40,0 +-14.40,-14.40,4.85,0.00,1.00,-14.40,-9.60,0 +-9.60,-9.60,4.89,0.00,1.00,-9.60,-4.80,0 +-4.80,-4.80,4.93,0.00,1.00,-4.80,-4.80,0 +-4.80,-4.80,4.97,0.00,1.00,-4.80,0.00,0 +0.00,0.00,5.01,0.00,1.00,0.00,4.80,0 +4.80,4.80,5.05,0.00,1.00,4.80,4.80,0 +9.60,4.80,5.09,0.00,1.00,4.80,9.60,0 +9.60,9.60,5.13,0.00,1.00,9.60,9.60,0 +14.40,9.60,5.17,0.00,1.00,9.60,14.40,0 +19.20,14.40,5.21,0.00,1.00,14.40,19.20,0 +24.00,19.20,5.25,0.00,1.00,19.20,19.20,0 +28.80,19.20,5.29,0.00,1.00,24.00,24.00,0 +33.60,24.00,5.33,0.00,1.00,24.00,24.00,0 +38.40,24.00,5.37,0.00,1.00,28.80,28.80,0 +43.20,28.80,5.41,0.00,1.00,33.60,28.80,0 +48.00,28.80,5.45,0.00,1.00,38.40,33.60,0 +52.80,28.80,5.49,0.00,1.00,43.20,33.60,0 +57.60,33.60,5.53,0.00,1.00,48.00,33.60,0 +62.40,33.60,5.57,0.00,1.00,52.80,38.40,0 +67.20,33.60,5.61,0.00,1.00,62.40,38.40,0 +72.00,38.40,5.65,0.00,1.00,67.20,38.40,0 +81.60,38.40,5.69,0.00,1.00,76.80,38.40,0 +86.40,38.40,5.73,0.00,1.00,86.40,38.40,0 +91.20,38.40,5.77,0.00,1.00,91.20,38.40,0 +96.00,38.40,5.81,0.00,1.00,100.80,38.40,0 +105.60,38.40,5.85,0.00,1.00,105.60,38.40,0 +110.40,33.60,5.89,0.00,1.00,115.20,33.60,0 +115.20,33.60,5.93,0.00,1.00,120.00,33.60,0 +120.00,33.60,5.97,0.00,1.00,129.60,33.60,0 +124.80,33.60,6.02,0.00,1.00,134.40,28.80,0 +129.60,28.80,6.06,0.00,1.00,139.20,28.80,0 +134.40,28.80,6.10,0.00,1.00,144.00,24.00,0 +139.20,24.00,6.14,0.00,1.00,148.80,24.00,0 +144.00,24.00,6.18,0.00,1.00,153.60,19.20,0 +148.80,19.20,6.22,0.00,1.00,158.40,19.20,0 +153.60,19.20,6.26,0.00,1.00,158.40,14.40,0 +158.40,14.40,6.30,0.00,1.00,163.20,14.40,0 +163.20,14.40,6.34,0.00,1.00,168.00,9.60,0 +168.00,9.60,6.38,0.00,1.00,168.00,9.60,0 +168.00,9.60,6.42,0.00,1.00,172.80,4.80,0 +172.80,4.80,6.46,0.00,1.00,177.60,0.00,0 +177.60,0.00,6.50,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,6.54,0.00,1.00,-177.60,-4.80,0 +-172.80,-4.80,6.58,0.00,1.00,-177.60,-9.60,0 +-168.00,-9.60,6.62,0.00,1.00,-172.80,-9.60,0 +-168.00,-9.60,6.66,0.00,1.00,-168.00,-14.40,0 +-163.20,-14.40,6.70,0.00,1.00,-168.00,-14.40,0 +-158.40,-14.40,6.74,0.00,1.00,-163.20,-19.20,0 +-153.60,-19.20,6.78,0.00,1.00,-158.40,-19.20,0 +-148.80,-19.20,6.82,0.00,1.00,-158.40,-24.00,0 +-144.00,-24.00,6.86,0.00,1.00,-153.60,-24.00,0 +-139.20,-24.00,6.90,0.00,1.00,-148.80,-28.80,0 +-134.40,-28.80,6.94,0.00,1.00,-144.00,-28.80,0 +-129.60,-28.80,6.98,0.00,1.00,-139.20,-33.60,0 +-124.80,-33.60,7.02,0.00,1.00,-134.40,-33.60,0 +-120.00,-33.60,7.06,0.00,1.00,-129.60,-33.60,0 +-115.20,-33.60,7.10,0.00,1.00,-120.00,-38.40,0 +-110.40,-33.60,7.14,0.00,1.00,-115.20,-38.40,0 +-105.60,-38.40,7.18,0.00,1.00,-105.60,-38.40,0 +-96.00,-38.40,7.22,0.00,1.00,-100.80,-38.40,0 +-91.20,-38.40,7.26,0.00,1.00,-91.20,-38.40,0 +-86.40,-38.40,7.30,0.00,1.00,-86.40,-38.40,0 +-81.60,-38.40,7.34,0.00,1.00,-76.80,-38.40,0 +-72.00,-38.40,7.38,0.00,1.00,-67.20,-38.40,0 +-67.20,-33.60,7.42,0.00,1.00,-62.40,-33.60,0 +-62.40,-33.60,7.46,0.00,1.00,-52.80,-33.60,0 +-57.60,-33.60,7.50,0.00,1.00,-48.00,-33.60,0 +-52.80,-28.80,7.54,0.00,1.00,-43.20,-28.80,0 +-48.00,-28.80,7.58,0.00,1.00,-38.40,-28.80,0 +-43.20,-28.80,7.62,0.00,1.00,-33.60,-24.00,0 +-38.40,-24.00,7.66,0.00,1.00,-28.80,-24.00,0 +-33.60,-24.00,7.70,0.00,1.00,-24.00,-19.20,0 +-28.80,-19.20,7.74,0.00,1.00,-24.00,-19.20,0 +-24.00,-19.20,7.78,0.00,1.00,-19.20,-14.40,0 +-19.20,-14.40,7.82,0.00,1.00,-14.40,-9.60,0 +-14.40,-9.60,7.86,0.00,1.00,-9.60,-9.60,0 +-9.60,-9.60,7.90,0.00,1.00,-9.60,-4.80,0 +-9.60,-4.80,7.94,0.00,1.00,-4.80,-4.80,0 +-4.80,-4.80,7.98,0.00,1.00,-4.80,0.00,0 +0.00,0.00,8.02,0.00,1.00,0.00,4.80,0 +4.80,4.80,8.06,0.00,1.00,4.80,4.80,0 +9.60,4.80,8.10,0.00,1.00,4.80,9.60,0 +14.40,9.60,8.14,0.00,1.00,9.60,9.60,0 +14.40,9.60,8.18,0.00,1.00,9.60,14.40,0 +19.20,14.40,8.22,0.00,1.00,14.40,14.40,0 +24.00,14.40,8.26,0.00,1.00,14.40,19.20,0 +28.80,19.20,8.30,0.00,1.00,19.20,19.20,0 +33.60,19.20,8.34,0.00,1.00,24.00,24.00,0 +38.40,19.20,8.38,0.00,1.00,28.80,24.00,0 +43.20,24.00,8.42,0.00,1.00,28.80,24.00,0 +48.00,24.00,8.46,0.00,1.00,33.60,28.80,0 +52.80,28.80,8.50,0.00,1.00,38.40,28.80,0 +57.60,28.80,8.54,0.00,1.00,48.00,28.80,0 +62.40,28.80,8.58,0.00,1.00,52.80,33.60,0 +67.20,28.80,8.62,0.00,1.00,57.60,33.60,0 +76.80,33.60,8.66,0.00,1.00,67.20,33.60,0 +81.60,33.60,8.70,0.00,1.00,76.80,33.60,0 +86.40,33.60,8.74,0.00,1.00,81.60,33.60,0 +91.20,33.60,8.78,0.00,1.00,91.20,33.60,0 +96.00,33.60,8.82,0.00,1.00,100.80,33.60,0 +100.80,33.60,8.86,0.00,1.00,110.40,33.60,0 +110.40,28.80,8.90,0.00,1.00,115.20,33.60,0 +115.20,28.80,8.94,0.00,1.00,124.80,28.80,0 +120.00,28.80,8.98,0.00,1.00,129.60,28.80,0 +124.80,28.80,9.02,0.00,1.00,139.20,28.80,0 +129.60,24.00,9.06,0.00,1.00,144.00,24.00,0 +134.40,24.00,9.10,0.00,1.00,148.80,24.00,0 +139.20,24.00,9.14,0.00,1.00,153.60,19.20,0 +144.00,19.20,9.18,0.00,1.00,153.60,19.20,0 +148.80,19.20,9.22,0.00,1.00,158.40,14.40,0 +153.60,14.40,9.26,0.00,1.00,163.20,14.40,0 +158.40,14.40,9.30,0.00,1.00,163.20,9.60,0 +163.20,9.60,9.34,0.00,1.00,168.00,9.60,0 +168.00,9.60,9.38,0.00,1.00,172.80,4.80,0 +168.00,4.80,9.42,0.00,1.00,172.80,4.80,0 +172.80,4.80,9.46,0.00,1.00,177.60,0.00,0 +177.60,0.00,9.50,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,9.54,0.00,1.00,-177.60,-4.80,0 +-172.80,-4.80,9.58,0.00,1.00,-177.60,-4.80,0 +-168.00,-4.80,9.62,0.00,1.00,-172.80,-9.60,0 +-168.00,-9.60,9.66,0.00,1.00,-172.80,-9.60,0 +-163.20,-9.60,9.70,0.00,1.00,-168.00,-14.40,0 +-158.40,-14.40,9.74,0.00,1.00,-163.20,-14.40,0 +-153.60,-14.40,9.78,0.00,1.00,-163.20,-19.20,0 +-148.80,-19.20,9.82,0.00,1.00,-158.40,-19.20,0 +-144.00,-19.20,9.86,0.00,1.00,-153.60,-24.00,0 +-139.20,-24.00,9.90,0.00,1.00,-153.60,-24.00,0 +-134.40,-24.00,9.94,0.00,1.00,-148.80,-28.80,0 +-129.60,-24.00,9.98,0.00,1.00,-144.00,-28.80,0 +-124.80,-28.80,10.03,0.00,1.00,-139.20,-28.80,0 +-120.00,-28.80,10.07,0.00,1.00,-129.60,-33.60,0 +-115.20,-28.80,10.11,0.00,1.00,-124.80,-33.60,0 +-110.40,-28.80,10.15,0.00,1.00,-115.20,-33.60,0 +-100.80,-33.60,10.19,0.00,1.00,-110.40,-33.60,0 +-96.00,-33.60,10.23,0.00,1.00,-100.80,-33.60,0 +-91.20,-33.60,10.27,0.00,1.00,-91.20,-33.60,0 +-86.40,-33.60,10.31,0.00,1.00,-81.60,-33.60,0 +-81.60,-33.60,10.35,0.00,1.00,-76.80,-33.60,0 +-76.80,-33.60,10.39,0.00,1.00,-67.20,-33.60,0 +-67.20,-28.80,10.43,0.00,1.00,-57.60,-28.80,0 +-62.40,-28.80,10.47,0.00,1.00,-52.80,-28.80,0 +-57.60,-28.80,10.51,0.00,1.00,-48.00,-28.80,0 +-52.80,-28.80,10.55,0.00,1.00,-38.40,-24.00,0 +-48.00,-24.00,10.59,0.00,1.00,-33.60,-24.00,0 +-43.20,-24.00,10.63,0.00,1.00,-28.80,-24.00,0 +-38.40,-19.20,10.67,0.00,1.00,-28.80,-19.20,0 +-33.60,-19.20,10.71,0.00,1.00,-24.00,-19.20,0 +-28.80,-19.20,10.75,0.00,1.00,-19.20,-14.40,0 +-24.00,-14.40,10.79,0.00,1.00,-14.40,-14.40,0 +-19.20,-14.40,10.83,0.00,1.00,-14.40,-9.60,0 +-14.40,-9.60,10.87,0.00,1.00,-9.60,-9.60,0 +-14.40,-9.60,10.91,0.00,1.00,-9.60,-4.80,0 +-9.60,-4.80,10.95,0.00,1.00,-4.80,-4.80,0 +-4.80,-4.80,10.99,0.00,1.00,-4.80,0.00,0 +0.00,0.00,11.03,0.00,1.00,0.00,0.00,0 +4.80,0.00,11.07,0.00,1.00,0.00,4.80,0 +9.60,4.80,11.11,0.00,1.00,4.80,4.80,0 +14.40,4.80,11.15,0.00,1.00,4.80,9.60,0 +19.20,9.60,11.19,0.00,1.00,9.60,9.60,0 +19.20,9.60,11.23,0.00,1.00,9.60,14.40,0 +24.00,14.40,11.27,0.00,1.00,14.40,14.40,0 +28.80,14.40,11.31,0.00,1.00,19.20,19.20,0 +33.60,14.40,11.35,0.00,1.00,19.20,19.20,0 +38.40,19.20,11.39,0.00,1.00,24.00,19.20,0 +43.20,19.20,11.43,0.00,1.00,28.80,24.00,0 +48.00,24.00,11.47,0.00,1.00,33.60,24.00,0 +52.80,24.00,11.51,0.00,1.00,38.40,24.00,0 +57.60,24.00,11.55,0.00,1.00,43.20,24.00,0 +62.40,24.00,11.59,0.00,1.00,48.00,28.80,0 +72.00,24.00,11.63,0.00,1.00,52.80,28.80,0 +76.80,28.80,11.67,0.00,1.00,62.40,28.80,0 +81.60,28.80,11.71,0.00,1.00,72.00,28.80,0 +86.40,28.80,11.75,0.00,1.00,81.60,28.80,0 +91.20,28.80,11.79,0.00,1.00,91.20,28.80,0 +96.00,28.80,11.83,0.00,1.00,100.80,28.80,0 +100.80,28.80,11.87,0.00,1.00,110.40,28.80,0 +105.60,28.80,11.91,0.00,1.00,120.00,28.80,0 +110.40,24.00,11.95,0.00,1.00,129.60,24.00,0 +120.00,24.00,11.99,0.00,1.00,134.40,24.00,0 +124.80,24.00,12.03,0.00,1.00,139.20,24.00,0 +129.60,24.00,12.07,0.00,1.00,144.00,24.00,0 +134.40,19.20,12.11,0.00,1.00,148.80,19.20,0 +139.20,19.20,12.15,0.00,1.00,153.60,19.20,0 +144.00,19.20,12.19,0.00,1.00,158.40,14.40,0 +148.80,14.40,12.23,0.00,1.00,163.20,14.40,0 +153.60,14.40,12.27,0.00,1.00,163.20,14.40,0 +158.40,9.60,12.31,0.00,1.00,168.00,9.60,0 +158.40,9.60,12.35,0.00,1.00,168.00,9.60,0 +163.20,9.60,12.39,0.00,1.00,172.80,4.80,0 +168.00,4.80,12.43,0.00,1.00,172.80,4.80,0 +172.80,4.80,12.47,0.00,1.00,177.60,0.00,0 +177.60,0.00,12.51,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,12.55,0.00,1.00,-177.60,-4.80,0 +-172.80,-4.80,12.59,0.00,1.00,-177.60,-4.80,0 +-168.00,-4.80,12.63,0.00,1.00,-172.80,-9.60,0 +-163.20,-9.60,12.67,0.00,1.00,-172.80,-9.60,0 +-158.40,-9.60,12.71,0.00,1.00,-168.00,-14.40,0 +-158.40,-9.60,12.75,0.00,1.00,-168.00,-14.40,0 +-153.60,-14.40,12.79,0.00,1.00,-163.20,-14.40,0 +-148.80,-14.40,12.83,0.00,1.00,-163.20,-19.20,0 +-144.00,-19.20,12.87,0.00,1.00,-158.40,-19.20,0 +-139.20,-19.20,12.91,0.00,1.00,-153.60,-24.00,0 +-134.40,-19.20,12.95,0.00,1.00,-148.80,-24.00,0 +-129.60,-24.00,12.99,0.00,1.00,-144.00,-24.00,0 +-124.80,-24.00,13.03,0.00,1.00,-139.20,-24.00,0 +-120.00,-24.00,13.07,0.00,1.00,-134.40,-28.80,0 +-110.40,-24.00,13.11,0.00,1.00,-129.60,-28.80,0 +-105.60,-28.80,13.15,0.00,1.00,-120.00,-28.80,0 +-100.80,-28.80,13.19,0.00,1.00,-110.40,-28.80,0 +-96.00,-28.80,13.23,0.00,1.00,-100.80,-28.80,0 +-91.20,-28.80,13.27,0.00,1.00,-91.20,-28.80,0 +-86.40,-28.80,13.31,0.00,1.00,-81.60,-28.80,0 +-81.60,-28.80,13.35,0.00,1.00,-72.00,-28.80,0 +-76.80,-28.80,13.39,0.00,1.00,-62.40,-28.80,0 +-72.00,-24.00,13.43,0.00,1.00,-52.80,-24.00,0 +-62.40,-24.00,13.47,0.00,1.00,-48.00,-24.00,0 +-57.60,-24.00,13.51,0.00,1.00,-43.20,-24.00,0 +-52.80,-24.00,13.55,0.00,1.00,-38.40,-24.00,0 +-48.00,-24.00,13.59,0.00,1.00,-33.60,-19.20,0 +-43.20,-19.20,13.63,0.00,1.00,-28.80,-19.20,0 +-38.40,-19.20,13.67,0.00,1.00,-24.00,-19.20,0 +-33.60,-14.40,13.71,0.00,1.00,-19.20,-14.40,0 +-28.80,-14.40,13.75,0.00,1.00,-19.20,-14.40,0 +-24.00,-14.40,13.79,0.00,1.00,-14.40,-9.60,0 +-19.20,-9.60,13.83,0.00,1.00,-9.60,-9.60,0 +-19.20,-9.60,13.87,0.00,1.00,-9.60,-4.80,0 +-14.40,-4.80,13.91,0.00,1.00,-4.80,-4.80,0 +-9.60,-4.80,13.95,0.00,1.00,-4.80,-0.00,0 +-4.80,-0.00,13.99,0.00,1.00,-0.00,0.00,0 +0.00,0.00,14.04,0.00,1.00,0.00,0.00,0 +4.80,0.00,14.08,0.00,1.00,0.00,4.80,0 +9.60,4.80,14.12,0.00,1.00,4.80,4.80,0 +14.40,4.80,14.16,0.00,1.00,4.80,9.60,0 +19.20,9.60,14.20,0.00,1.00,9.60,9.60,0 +24.00,9.60,14.24,0.00,1.00,9.60,9.60,0 +28.80,9.60,14.28,0.00,1.00,14.40,14.40,0 +33.60,14.40,14.32,0.00,1.00,14.40,14.40,0 +38.40,14.40,14.36,0.00,1.00,19.20,14.40,0 +43.20,14.40,14.40,0.00,1.00,19.20,19.20,0 +48.00,14.40,14.44,0.00,1.00,24.00,19.20,0 +52.80,19.20,14.48,0.00,1.00,28.80,19.20,0 +57.60,19.20,14.52,0.00,1.00,33.60,19.20,0 +62.40,19.20,14.56,0.00,1.00,38.40,24.00,0 +67.20,19.20,14.60,0.00,1.00,43.20,24.00,0 +72.00,24.00,14.64,0.00,1.00,48.00,24.00,0 +76.80,24.00,14.68,0.00,1.00,57.60,24.00,0 +81.60,24.00,14.72,0.00,1.00,67.20,24.00,0 +86.40,24.00,14.76,0.00,1.00,81.60,24.00,0 +91.20,24.00,14.80,0.00,1.00,91.20,24.00,0 +96.00,24.00,14.84,0.00,1.00,105.60,24.00,0 +100.80,24.00,14.88,0.00,1.00,115.20,24.00,0 +105.60,24.00,14.92,0.00,1.00,124.80,24.00,0 +110.40,19.20,14.96,0.00,1.00,134.40,19.20,0 +115.20,19.20,15.00,0.00,1.00,139.20,19.20,0 +120.00,19.20,15.04,0.00,1.00,144.00,19.20,0 +124.80,19.20,15.08,0.00,1.00,148.80,19.20,0 +129.60,19.20,15.12,0.00,1.00,153.60,19.20,0 +134.40,14.40,15.16,0.00,1.00,158.40,14.40,0 +139.20,14.40,15.20,0.00,1.00,163.20,14.40,0 +144.00,14.40,15.24,0.00,1.00,163.20,14.40,0 +148.80,9.60,15.28,0.00,1.00,168.00,9.60,0 +153.60,9.60,15.32,0.00,1.00,168.00,9.60,0 +158.40,9.60,15.36,0.00,1.00,172.80,4.80,0 +163.20,4.80,15.40,0.00,1.00,172.80,4.80,0 +168.00,4.80,15.44,0.00,1.00,177.60,4.80,0 +172.80,4.80,15.48,0.00,1.00,177.60,0.00,0 +177.60,0.00,15.52,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,15.56,0.00,1.00,-177.60,-4.80,0 +-172.80,-4.80,15.60,0.00,1.00,-177.60,-4.80,0 +-168.00,-4.80,15.64,0.00,1.00,-177.60,-4.80,0 +-163.20,-4.80,15.68,0.00,1.00,-172.80,-9.60,0 +-158.40,-9.60,15.72,0.00,1.00,-172.80,-9.60,0 +-153.60,-9.60,15.76,0.00,1.00,-168.00,-14.40,0 +-148.80,-9.60,15.80,0.00,1.00,-168.00,-14.40,0 +-144.00,-14.40,15.84,0.00,1.00,-163.20,-14.40,0 +-139.20,-14.40,15.88,0.00,1.00,-163.20,-19.20,0 +-134.40,-14.40,15.92,0.00,1.00,-158.40,-19.20,0 +-129.60,-19.20,15.96,0.00,1.00,-153.60,-19.20,0 +-124.80,-19.20,16.00,0.00,1.00,-148.80,-19.20,0 +-120.00,-19.20,16.00,0.00,1.00,-144.00,-19.20,0 +-115.20,-19.20,15.96,0.00,1.00,-139.20,-24.00,0 +-110.40,-19.20,15.92,0.00,1.00,-134.40,-24.00,0 +-105.60,-24.00,15.88,0.00,1.00,-124.80,-24.00,0 +-100.80,-24.00,15.84,0.00,1.00,-115.20,-24.00,0 +-96.00,-24.00,15.80,0.00,1.00,-105.60,-24.00,0 +-91.20,-24.00,15.76,0.00,1.00,-91.20,-24.00,0 +-86.40,-24.00,15.72,0.00,1.00,-81.60,-24.00,0 +-81.60,-24.00,15.68,0.00,1.00,-67.20,-24.00,0 +-76.80,-24.00,15.64,0.00,1.00,-57.60,-24.00,0 +-72.00,-24.00,15.60,0.00,1.00,-48.00,-24.00,0 +-67.20,-19.20,15.56,0.00,1.00,-43.20,-19.20,0 +-62.40,-19.20,15.52,0.00,1.00,-38.40,-19.20,0 +-57.60,-19.20,15.48,0.00,1.00,-33.60,-19.20,0 +-52.80,-19.20,15.44,0.00,1.00,-28.80,-19.20,0 +-48.00,-14.40,15.40,0.00,1.00,-24.00,-14.40,0 +-43.20,-14.40,15.36,0.00,1.00,-19.20,-14.40,0 +-38.40,-14.40,15.32,0.00,1.00,-19.20,-14.40,0 +-33.60,-14.40,15.28,0.00,1.00,-14.40,-9.60,0 +-28.80,-9.60,15.24,0.00,1.00,-14.40,-9.60,0 +-24.00,-9.60,15.20,0.00,1.00,-9.60,-9.60,0 +-19.20,-9.60,15.16,0.00,1.00,-9.60,-4.80,0 +-14.40,-4.80,15.12,0.00,1.00,-4.80,-4.80,0 +-9.60,-4.80,15.08,0.00,1.00,-4.80,-0.00,0 +-4.80,-0.00,15.04,0.00,1.00,-0.00,0.00,0 +0.00,0.00,15.00,0.00,1.00,0.00,0.00,0 +4.80,0.00,14.96,0.00,1.00,0.00,4.80,0 +9.60,4.80,14.92,0.00,1.00,4.80,4.80,0 +14.40,4.80,14.88,0.00,1.00,4.80,4.80,0 +19.20,4.80,14.84,0.00,1.00,4.80,9.60,0 +24.00,9.60,14.80,0.00,1.00,9.60,9.60,0 +28.80,9.60,14.76,0.00,1.00,9.60,9.60,0 +33.60,9.60,14.72,0.00,1.00,9.60,9.60,0 +38.40,9.60,14.68,0.00,1.00,14.40,14.40,0 +43.20,14.40,14.64,0.00,1.00,14.40,14.40,0 +48.00,14.40,14.60,0.00,1.00,19.20,14.40,0 +52.80,14.40,14.56,0.00,1.00,24.00,14.40,0 +57.60,14.40,14.52,0.00,1.00,24.00,19.20,0 +62.40,14.40,14.48,0.00,1.00,28.80,19.20,0 +67.20,14.40,14.44,0.00,1.00,38.40,19.20,0 +72.00,19.20,14.40,0.00,1.00,43.20,19.20,0 +76.80,19.20,14.36,0.00,1.00,52.80,19.20,0 +81.60,19.20,14.32,0.00,1.00,62.40,19.20,0 +86.40,19.20,14.28,0.00,1.00,76.80,19.20,0 +91.20,19.20,14.24,0.00,1.00,96.00,19.20,0 +96.00,19.20,14.20,0.00,1.00,110.40,19.20,0 +100.80,19.20,14.16,0.00,1.00,120.00,19.20,0 +105.60,19.20,14.12,0.00,1.00,134.40,19.20,0 +110.40,19.20,14.08,0.00,1.00,139.20,19.20,0 +115.20,14.40,14.04,0.00,1.00,148.80,14.40,0 +120.00,14.40,13.99,0.00,1.00,153.60,14.40,0 +124.80,14.40,13.95,0.00,1.00,158.40,14.40,0 +129.60,14.40,13.91,0.00,1.00,158.40,14.40,0 +134.40,14.40,13.87,0.00,1.00,163.20,14.40,0 +139.20,9.60,13.83,0.00,1.00,163.20,9.60,0 +144.00,9.60,13.79,0.00,1.00,168.00,9.60,0 +148.80,9.60,13.75,0.00,1.00,168.00,9.60,0 +153.60,9.60,13.71,0.00,1.00,172.80,4.80,0 +158.40,4.80,13.67,0.00,1.00,172.80,4.80,0 +163.20,4.80,13.63,0.00,1.00,172.80,4.80,0 +168.00,4.80,13.59,0.00,1.00,177.60,0.00,0 +172.80,0.00,13.55,0.00,1.00,177.60,0.00,0 +177.60,0.00,13.51,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,13.47,0.00,1.00,-177.60,-0.00,0 +-172.80,-0.00,13.43,0.00,1.00,-177.60,-4.80,0 +-168.00,-4.80,13.39,0.00,1.00,-177.60,-4.80,0 +-163.20,-4.80,13.35,0.00,1.00,-172.80,-4.80,0 +-158.40,-4.80,13.31,0.00,1.00,-172.80,-9.60,0 +-153.60,-9.60,13.27,0.00,1.00,-172.80,-9.60,0 +-148.80,-9.60,13.23,0.00,1.00,-168.00,-9.60,0 +-144.00,-9.60,13.19,0.00,1.00,-168.00,-14.40,0 +-139.20,-9.60,13.15,0.00,1.00,-163.20,-14.40,0 +-134.40,-14.40,13.11,0.00,1.00,-163.20,-14.40,0 +-129.60,-14.40,13.07,0.00,1.00,-158.40,-14.40,0 +-124.80,-14.40,13.03,0.00,1.00,-158.40,-14.40,0 +-120.00,-14.40,12.99,0.00,1.00,-153.60,-19.20,0 +-115.20,-14.40,12.95,0.00,1.00,-148.80,-19.20,0 +-110.40,-19.20,12.91,0.00,1.00,-139.20,-19.20,0 +-105.60,-19.20,12.87,0.00,1.00,-134.40,-19.20,0 +-100.80,-19.20,12.83,0.00,1.00,-120.00,-19.20,0 +-96.00,-19.20,12.79,0.00,1.00,-110.40,-19.20,0 +-91.20,-19.20,12.75,0.00,1.00,-96.00,-19.20,0 +-86.40,-19.20,12.71,0.00,1.00,-76.80,-19.20,0 +-81.60,-19.20,12.67,0.00,1.00,-62.40,-19.20,0 +-76.80,-19.20,12.63,0.00,1.00,-52.80,-19.20,0 +-72.00,-19.20,12.59,0.00,1.00,-43.20,-19.20,0 +-67.20,-14.40,12.55,0.00,1.00,-38.40,-19.20,0 +-62.40,-14.40,12.51,0.00,1.00,-28.80,-14.40,0 +-57.60,-14.40,12.47,0.00,1.00,-24.00,-14.40,0 +-52.80,-14.40,12.43,0.00,1.00,-24.00,-14.40,0 +-48.00,-14.40,12.39,0.00,1.00,-19.20,-14.40,0 +-43.20,-14.40,12.35,0.00,1.00,-14.40,-9.60,0 +-38.40,-9.60,12.31,0.00,1.00,-14.40,-9.60,0 +-33.60,-9.60,12.27,0.00,1.00,-9.60,-9.60,0 +-28.80,-9.60,12.23,0.00,1.00,-9.60,-9.60,0 +-24.00,-9.60,12.19,0.00,1.00,-9.60,-4.80,0 +-19.20,-4.80,12.15,0.00,1.00,-4.80,-4.80,0 +-14.40,-4.80,12.11,0.00,1.00,-4.80,-4.80,0 +-9.60,-4.80,12.07,0.00,1.00,-4.80,-0.00,0 +-4.80,-0.00,12.03,0.00,1.00,-0.00,0.00,0 +0.00,0.00,11.99,0.00,1.00,0.00,0.00,0 +4.80,0.00,11.95,0.00,1.00,0.00,0.00,0 +9.60,0.00,11.91,0.00,1.00,0.00,4.80,0 +14.40,4.80,11.87,0.00,1.00,4.80,4.80,0 +19.20,4.80,11.83,0.00,1.00,4.80,4.80,0 +24.00,4.80,11.79,0.00,1.00,4.80,4.80,0 +28.80,4.80,11.75,0.00,1.00,4.80,9.60,0 +33.60,9.60,11.71,0.00,1.00,9.60,9.60,0 +38.40,9.60,11.67,0.00,1.00,9.60,9.60,0 +43.20,9.60,11.63,0.00,1.00,14.40,9.60,0 +48.00,9.60,11.59,0.00,1.00,14.40,9.60,0 +52.80,9.60,11.55,0.00,1.00,14.40,14.40,0 +57.60,9.60,11.51,0.00,1.00,19.20,14.40,0 +62.40,9.60,11.47,0.00,1.00,24.00,14.40,0 +67.20,14.40,11.43,0.00,1.00,28.80,14.40,0 +72.00,14.40,11.39,0.00,1.00,33.60,14.40,0 +76.80,14.40,11.35,0.00,1.00,43.20,14.40,0 +81.60,14.40,11.31,0.00,1.00,57.60,14.40,0 +86.40,14.40,11.27,0.00,1.00,76.80,14.40,0 +91.20,14.40,11.23,0.00,1.00,96.00,14.40,0 +96.00,14.40,11.19,0.00,1.00,115.20,14.40,0 +100.80,14.40,11.15,0.00,1.00,129.60,14.40,0 +105.60,14.40,11.11,0.00,1.00,139.20,14.40,0 +110.40,14.40,11.07,0.00,1.00,148.80,14.40,0 +115.20,9.60,11.03,0.00,1.00,153.60,14.40,0 +120.00,9.60,10.99,0.00,1.00,158.40,9.60,0 +124.80,9.60,10.95,0.00,1.00,163.20,9.60,0 +129.60,9.60,10.91,0.00,1.00,163.20,9.60,0 +134.40,9.60,10.87,0.00,1.00,168.00,9.60,0 +139.20,9.60,10.83,0.00,1.00,168.00,9.60,0 +144.00,9.60,10.79,0.00,1.00,172.80,9.60,0 +148.80,4.80,10.75,0.00,1.00,172.80,4.80,0 +153.60,4.80,10.71,0.00,1.00,172.80,4.80,0 +158.40,4.80,10.67,0.00,1.00,172.80,4.80,0 +163.20,4.80,10.63,0.00,1.00,177.60,4.80,0 +168.00,4.80,10.59,0.00,1.00,177.60,0.00,0 +172.80,0.00,10.55,0.00,1.00,177.60,0.00,0 +177.60,0.00,10.51,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,10.47,0.00,1.00,-177.60,-0.00,0 +-172.80,-0.00,10.43,0.00,1.00,-177.60,-4.80,0 +-168.00,-4.80,10.39,0.00,1.00,-177.60,-4.80,0 +-163.20,-4.80,10.35,0.00,1.00,-177.60,-4.80,0 +-158.40,-4.80,10.31,0.00,1.00,-172.80,-4.80,0 +-153.60,-4.80,10.27,0.00,1.00,-172.80,-9.60,0 +-148.80,-4.80,10.23,0.00,1.00,-172.80,-9.60,0 +-144.00,-9.60,10.19,0.00,1.00,-172.80,-9.60,0 +-139.20,-9.60,10.15,0.00,1.00,-168.00,-9.60,0 +-134.40,-9.60,10.11,0.00,1.00,-168.00,-9.60,0 +-129.60,-9.60,10.07,0.00,1.00,-163.20,-9.60,0 +-124.80,-9.60,10.03,0.00,1.00,-163.20,-14.40,0 +-120.00,-9.60,9.98,0.00,1.00,-158.40,-14.40,0 +-115.20,-9.60,9.94,0.00,1.00,-153.60,-14.40,0 +-110.40,-14.40,9.90,0.00,1.00,-148.80,-14.40,0 +-105.60,-14.40,9.86,0.00,1.00,-139.20,-14.40,0 +-100.80,-14.40,9.82,0.00,1.00,-129.60,-14.40,0 +-96.00,-14.40,9.78,0.00,1.00,-115.20,-14.40,0 +-91.20,-14.40,9.74,0.00,1.00,-96.00,-14.40,0 +-86.40,-14.40,9.70,0.00,1.00,-76.80,-14.40,0 +-81.60,-14.40,9.66,0.00,1.00,-57.60,-14.40,0 +-76.80,-14.40,9.62,0.00,1.00,-43.20,-14.40,0 +-72.00,-14.40,9.58,0.00,1.00,-33.60,-14.40,0 +-67.20,-14.40,9.54,0.00,1.00,-28.80,-14.40,0 +-62.40,-9.60,9.50,0.00,1.00,-24.00,-14.40,0 +-57.60,-9.60,9.46,0.00,1.00,-19.20,-9.60,0 +-52.80,-9.60,9.42,0.00,1.00,-14.40,-9.60,0 +-48.00,-9.60,9.38,0.00,1.00,-14.40,-9.60,0 +-43.20,-9.60,9.34,0.00,1.00,-14.40,-9.60,0 +-38.40,-9.60,9.30,0.00,1.00,-9.60,-9.60,0 +-33.60,-9.60,9.26,0.00,1.00,-9.60,-4.80,0 +-28.80,-4.80,9.22,0.00,1.00,-4.80,-4.80,0 +-24.00,-4.80,9.18,0.00,1.00,-4.80,-4.80,0 +-19.20,-4.80,9.14,0.00,1.00,-4.80,-4.80,0 +-14.40,-4.80,9.10,0.00,1.00,-4.80,-0.00,0 +-9.60,-0.00,9.06,0.00,1.00,-0.00,-0.00,0 +-4.80,-0.00,9.02,0.00,1.00,-0.00,0.00,0 +0.00,0.00,8.98,0.00,1.00,0.00,0.00,0 +4.80,0.00,8.94,0.00,1.00,0.00,0.00,0 +9.60,0.00,8.90,0.00,1.00,0.00,0.00,0 +14.40,0.00,8.86,0.00,1.00,0.00,4.80,0 +19.20,4.80,8.82,0.00,1.00,4.80,4.80,0 +24.00,4.80,8.78,0.00,1.00,4.80,4.80,0 +28.80,4.80,8.74,0.00,1.00,4.80,4.80,0 +33.60,4.80,8.70,0.00,1.00,4.80,4.80,0 +38.40,4.80,8.66,0.00,1.00,4.80,4.80,0 +43.20,4.80,8.62,0.00,1.00,9.60,4.80,0 +48.00,4.80,8.58,0.00,1.00,9.60,9.60,0 +52.80,4.80,8.54,0.00,1.00,9.60,9.60,0 +57.60,4.80,8.50,0.00,1.00,14.40,9.60,0 +62.40,9.60,8.46,0.00,1.00,14.40,9.60,0 +67.20,9.60,8.42,0.00,1.00,19.20,9.60,0 +72.00,9.60,8.38,0.00,1.00,24.00,9.60,0 +76.80,9.60,8.34,0.00,1.00,33.60,9.60,0 +81.60,9.60,8.30,0.00,1.00,43.20,9.60,0 +86.40,9.60,8.26,0.00,1.00,67.20,9.60,0 +91.20,9.60,8.22,0.00,1.00,96.00,9.60,0 +96.00,9.60,8.18,0.00,1.00,124.80,9.60,0 +100.80,9.60,8.14,0.00,1.00,144.00,9.60,0 +105.60,9.60,8.10,0.00,1.00,153.60,9.60,0 +110.40,9.60,8.06,0.00,1.00,158.40,9.60,0 +115.20,9.60,8.02,0.00,1.00,163.20,9.60,0 +120.00,9.60,7.98,0.00,1.00,168.00,9.60,0 +124.80,4.80,7.94,0.00,1.00,168.00,9.60,0 +129.60,4.80,7.90,0.00,1.00,168.00,4.80,0 +134.40,4.80,7.86,0.00,1.00,172.80,4.80,0 +139.20,4.80,7.82,0.00,1.00,172.80,4.80,0 +144.00,4.80,7.78,0.00,1.00,172.80,4.80,0 +148.80,4.80,7.74,0.00,1.00,172.80,4.80,0 +153.60,4.80,7.70,0.00,1.00,177.60,4.80,0 +158.40,4.80,7.66,0.00,1.00,177.60,4.80,0 +163.20,4.80,7.62,0.00,1.00,177.60,0.00,0 +168.00,0.00,7.58,0.00,1.00,177.60,0.00,0 +172.80,0.00,7.54,0.00,1.00,177.60,0.00,0 +177.60,0.00,7.50,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,7.46,0.00,1.00,-177.60,-0.00,0 +-172.80,-0.00,7.42,0.00,1.00,-177.60,-0.00,0 +-168.00,-0.00,7.38,0.00,1.00,-177.60,-4.80,0 +-163.20,-4.80,7.34,0.00,1.00,-177.60,-4.80,0 +-158.40,-4.80,7.30,0.00,1.00,-177.60,-4.80,0 +-153.60,-4.80,7.26,0.00,1.00,-177.60,-4.80,0 +-148.80,-4.80,7.22,0.00,1.00,-172.80,-4.80,0 +-144.00,-4.80,7.18,0.00,1.00,-172.80,-4.80,0 +-139.20,-4.80,7.14,0.00,1.00,-172.80,-4.80,0 +-134.40,-4.80,7.10,0.00,1.00,-172.80,-9.60,0 +-129.60,-4.80,7.06,0.00,1.00,-168.00,-9.60,0 +-124.80,-4.80,7.02,0.00,1.00,-168.00,-9.60,0 +-120.00,-9.60,6.98,0.00,1.00,-168.00,-9.60,0 +-115.20,-9.60,6.94,0.00,1.00,-163.20,-9.60,0 +-110.40,-9.60,6.90,0.00,1.00,-158.40,-9.60,0 +-105.60,-9.60,6.86,0.00,1.00,-153.60,-9.60,0 +-100.80,-9.60,6.82,0.00,1.00,-144.00,-9.60,0 +-96.00,-9.60,6.78,0.00,1.00,-124.80,-9.60,0 +-91.20,-9.60,6.74,0.00,1.00,-96.00,-9.60,0 +-86.40,-9.60,6.70,0.00,1.00,-67.20,-9.60,0 +-81.60,-9.60,6.66,0.00,1.00,-43.20,-9.60,0 +-76.80,-9.60,6.62,0.00,1.00,-33.60,-9.60,0 +-72.00,-9.60,6.58,0.00,1.00,-24.00,-9.60,0 +-67.20,-9.60,6.54,0.00,1.00,-19.20,-9.60,0 +-62.40,-9.60,6.50,0.00,1.00,-14.40,-9.60,0 +-57.60,-4.80,6.46,0.00,1.00,-14.40,-9.60,0 +-52.80,-4.80,6.42,0.00,1.00,-9.60,-4.80,0 +-48.00,-4.80,6.38,0.00,1.00,-9.60,-4.80,0 +-43.20,-4.80,6.34,0.00,1.00,-9.60,-4.80,0 +-38.40,-4.80,6.30,0.00,1.00,-4.80,-4.80,0 +-33.60,-4.80,6.26,0.00,1.00,-4.80,-4.80,0 +-28.80,-4.80,6.22,0.00,1.00,-4.80,-4.80,0 +-24.00,-4.80,6.18,0.00,1.00,-4.80,-4.80,0 +-19.20,-4.80,6.14,0.00,1.00,-4.80,-0.00,0 +-14.40,-0.00,6.10,0.00,1.00,-0.00,-0.00,0 +-9.60,-0.00,6.06,0.00,1.00,-0.00,-0.00,0 +-4.80,-0.00,6.02,0.00,1.00,-0.00,0.00,0 +0.00,0.00,5.97,0.00,1.00,0.00,0.00,0 +4.80,0.00,5.93,0.00,1.00,0.00,0.00,0 +9.60,0.00,5.89,0.00,1.00,0.00,0.00,0 +14.40,0.00,5.85,0.00,1.00,0.00,0.00,0 +19.20,0.00,5.81,0.00,1.00,0.00,0.00,0 +24.00,0.00,5.77,0.00,1.00,0.00,0.00,0 +28.80,0.00,5.73,0.00,1.00,0.00,4.80,0 +33.60,0.00,5.69,0.00,1.00,0.00,4.80,0 +38.40,0.00,5.65,0.00,1.00,4.80,4.80,0 +43.20,4.80,5.61,0.00,1.00,4.80,4.80,0 +48.00,4.80,5.57,0.00,1.00,4.80,4.80,0 +52.80,4.80,5.53,0.00,1.00,4.80,4.80,0 +57.60,4.80,5.49,0.00,1.00,4.80,4.80,0 +62.40,4.80,5.45,0.00,1.00,4.80,4.80,0 +67.20,4.80,5.41,0.00,1.00,9.60,4.80,0 +72.00,4.80,5.37,0.00,1.00,9.60,4.80,0 +76.80,4.80,5.33,0.00,1.00,14.40,4.80,0 +81.60,4.80,5.29,0.00,1.00,24.00,4.80,0 +86.40,4.80,5.25,0.00,1.00,43.20,4.80,0 +91.20,4.80,5.21,0.00,1.00,110.40,4.80,0 +96.00,4.80,5.17,0.00,1.00,148.80,4.80,0 +100.80,4.80,5.13,0.00,1.00,163.20,4.80,0 +105.60,4.80,5.09,0.00,1.00,168.00,4.80,0 +110.40,4.80,5.05,0.00,1.00,172.80,4.80,0 +115.20,4.80,5.01,0.00,1.00,172.80,4.80,0 +120.00,4.80,4.97,0.00,1.00,172.80,4.80,0 +124.80,4.80,4.93,0.00,1.00,172.80,4.80,0 +129.60,4.80,4.89,0.00,1.00,177.60,4.80,0 +134.40,4.80,4.85,0.00,1.00,177.60,4.80,0 +139.20,0.00,4.81,0.00,1.00,177.60,4.80,0 +144.00,0.00,4.77,0.00,1.00,177.60,4.80,0 +148.80,0.00,4.73,0.00,1.00,177.60,0.00,0 +153.60,0.00,4.69,0.00,1.00,177.60,0.00,0 +158.40,0.00,4.65,0.00,1.00,177.60,0.00,0 +163.20,0.00,4.61,0.00,1.00,177.60,0.00,0 +168.00,0.00,4.57,0.00,1.00,177.60,0.00,0 +172.80,0.00,4.53,0.00,1.00,177.60,0.00,0 +177.60,0.00,4.49,0.00,1.00,177.60,-0.00,0 +-177.60,-0.00,4.45,0.00,1.00,-177.60,-0.00,0 +-172.80,-0.00,4.41,0.00,1.00,-177.60,-0.00,0 +-168.00,-0.00,4.37,0.00,1.00,-177.60,-0.00,0 +-163.20,-0.00,4.33,0.00,1.00,-177.60,-0.00,0 +-158.40,-0.00,4.29,0.00,1.00,-177.60,-0.00,0 +-153.60,-0.00,4.25,0.00,1.00,-177.60,-4.80,0 +-148.80,-0.00,4.21,0.00,1.00,-177.60,-4.80,0 +-144.00,-0.00,4.17,0.00,1.00,-177.60,-4.80,0 +-139.20,-0.00,4.13,0.00,1.00,-177.60,-4.80,0 +-134.40,-4.80,4.09,0.00,1.00,-177.60,-4.80,0 +-129.60,-4.80,4.05,0.00,1.00,-177.60,-4.80,0 +-124.80,-4.80,4.01,0.00,1.00,-172.80,-4.80,0 +-120.00,-4.80,3.97,0.00,1.00,-172.80,-4.80,0 +-115.20,-4.80,3.93,0.00,1.00,-172.80,-4.80,0 +-110.40,-4.80,3.89,0.00,1.00,-172.80,-4.80,0 +-105.60,-4.80,3.85,0.00,1.00,-168.00,-4.80,0 +-100.80,-4.80,3.81,0.00,1.00,-163.20,-4.80,0 +-96.00,-4.80,3.77,0.00,1.00,-148.80,-4.80,0 +-91.20,-4.80,3.73,0.00,1.00,-110.40,-4.80,0 +-86.40,-4.80,3.69,0.00,1.00,-43.20,-4.80,0 +-81.60,-4.80,3.65,0.00,1.00,-24.00,-4.80,0 +-76.80,-4.80,3.61,0.00,1.00,-14.40,-4.80,0 +-72.00,-4.80,3.57,0.00,1.00,-9.60,-4.80,0 +-67.20,-4.80,3.53,0.00,1.00,-9.60,-4.80,0 +-62.40,-4.80,3.49,0.00,1.00,-4.80,-4.80,0 +-57.60,-4.80,3.45,0.00,1.00,-4.80,-4.80,0 +-52.80,-4.80,3.41,0.00,1.00,-4.80,-4.80,0 +-48.00,-4.80,3.37,0.00,1.00,-4.80,-4.80,0 +-43.20,-4.80,3.33,0.00,1.00,-4.80,-4.80,0 +-38.40,-0.00,3.29,0.00,1.00,-4.80,-4.80,0 +-33.60,-0.00,3.25,0.00,1.00,-0.00,-0.00,0 +-28.80,-0.00,3.21,0.00,1.00,-0.00,-0.00,0 +-24.00,-0.00,3.17,0.00,1.00,-0.00,-0.00,0 +-19.20,-0.00,3.13,0.00,1.00,-0.00,-0.00,0 +-14.40,-0.00,3.09,0.00,1.00,-0.00,-0.00,0 +-9.60,-0.00,3.05,0.00,1.00,-0.00,-0.00,0 +-4.80,-0.00,3.01,0.00,1.00,-0.00,0.00,0 +0.00,0.00,2.97,0.00,1.00,-0.00,0.00,0 +4.80,-0.00,2.93,0.00,1.00,-0.00,0.00,0 +9.60,-0.00,2.89,0.00,1.00,-0.00,0.00,0 +14.40,-0.00,2.85,0.00,1.00,-0.00,0.00,0 +19.20,-0.00,2.81,0.00,1.00,-0.00,0.00,0 +24.00,-0.00,2.77,0.00,1.00,-0.00,0.00,0 +28.80,-0.00,2.73,0.00,1.00,-0.00,0.00,0 +33.60,-0.00,2.69,0.00,1.00,-0.00,0.00,0 +38.40,-0.00,2.65,0.00,1.00,-0.00,0.00,0 +43.20,-0.00,2.61,0.00,1.00,-0.00,0.00,0 +48.00,-0.00,2.57,0.00,1.00,-0.00,0.00,0 +52.80,-0.00,2.53,0.00,1.00,-0.00,0.00,0 +57.60,-0.00,2.49,0.00,1.00,-0.00,0.00,0 +62.40,-0.00,2.45,0.00,1.00,-0.00,0.00,0 +67.20,-0.00,2.41,0.00,1.00,-4.80,0.00,0 +72.00,-0.00,2.37,0.00,1.00,-4.80,0.00,0 +76.80,-0.00,2.33,0.00,1.00,-4.80,0.00,0 +81.60,-0.00,2.29,0.00,1.00,-9.60,0.00,0 +86.40,-0.00,2.25,0.00,1.00,-19.20,0.00,0 +91.20,-0.00,2.21,0.00,1.00,-134.40,0.00,0 +96.00,-0.00,2.17,0.00,1.00,-168.00,0.00,0 +100.80,-0.00,2.13,0.00,1.00,-172.80,0.00,0 +105.60,-0.00,2.09,0.00,1.00,-177.60,0.00,0 +110.40,-0.00,2.05,0.00,1.00,-177.60,0.00,0 +115.20,-0.00,2.01,0.00,1.00,-177.60,0.00,0 +120.00,-0.00,1.96,0.00,1.00,-177.60,0.00,0 +124.80,-0.00,1.92,0.00,1.00,-177.60,0.00,0 +129.60,-0.00,1.88,0.00,1.00,-177.60,0.00,0 +134.40,-0.00,1.84,0.00,1.00,-177.60,0.00,0 +139.20,-0.00,1.80,0.00,1.00,-177.60,0.00,0 +144.00,-0.00,1.76,0.00,1.00,-177.60,0.00,0 +148.80,-0.00,1.72,0.00,1.00,-177.60,0.00,0 +153.60,-0.00,1.68,0.00,1.00,-177.60,0.00,0 +158.40,-0.00,1.64,0.00,1.00,-177.60,0.00,0 +163.20,-0.00,1.60,0.00,1.00,-177.60,0.00,0 +168.00,-0.00,1.56,0.00,1.00,-177.60,0.00,0 +172.80,-0.00,1.52,0.00,1.00,-177.60,0.00,0 +177.60,-0.00,1.48,0.00,1.00,-177.60,0.00,0 +-177.60,0.00,1.44,0.00,1.00,177.60,0.00,0 +-172.80,0.00,1.40,0.00,1.00,177.60,0.00,0 +-168.00,0.00,1.36,0.00,1.00,177.60,0.00,0 +-163.20,0.00,1.32,0.00,1.00,177.60,0.00,0 +-158.40,0.00,1.28,0.00,1.00,177.60,0.00,0 +-153.60,0.00,1.24,0.00,1.00,177.60,0.00,0 +-148.80,0.00,1.20,0.00,1.00,177.60,0.00,0 +-144.00,0.00,1.16,0.00,1.00,177.60,0.00,0 +-139.20,0.00,1.12,0.00,1.00,177.60,0.00,0 +-134.40,0.00,1.08,0.00,1.00,177.60,0.00,0 +-129.60,0.00,1.04,0.00,1.00,177.60,0.00,0 +-124.80,0.00,1.00,0.00,1.00,177.60,0.00,0 +-120.00,0.00,0.96,0.00,1.00,177.60,0.00,0 +-115.20,0.00,0.92,0.00,1.00,177.60,0.00,0 +-110.40,0.00,0.88,0.00,1.00,177.60,0.00,0 +-105.60,0.00,0.84,0.00,1.00,177.60,0.00,0 +-100.80,0.00,0.80,0.00,1.00,172.80,0.00,0 +-96.00,0.00,0.76,0.00,1.00,168.00,0.00,0 +-91.20,0.00,0.72,0.00,1.00,134.40,0.00,0 +-86.40,0.00,0.68,0.00,1.00,19.20,0.00,0 +-81.60,0.00,0.64,0.00,1.00,9.60,0.00,0 +-76.80,0.00,0.60,0.00,1.00,4.80,0.00,0 +-72.00,0.00,0.56,0.00,1.00,4.80,0.00,0 +-67.20,0.00,0.52,0.00,1.00,4.80,0.00,0 +-62.40,0.00,0.48,0.00,1.00,0.00,0.00,0 +-57.60,0.00,0.44,0.00,1.00,0.00,0.00,0 +-52.80,0.00,0.40,0.00,1.00,0.00,0.00,0 +-48.00,0.00,0.36,0.00,1.00,0.00,0.00,0 +-43.20,0.00,0.32,0.00,1.00,0.00,0.00,0 +-38.40,0.00,0.28,0.00,1.00,0.00,0.00,0 +-33.60,0.00,0.24,0.00,1.00,0.00,0.00,0 +-28.80,0.00,0.20,0.00,1.00,0.00,0.00,0 +-24.00,0.00,0.16,0.00,1.00,0.00,0.00,0 +-19.20,0.00,0.12,0.00,1.00,0.00,0.00,0 +-14.40,0.00,0.08,0.00,1.00,0.00,0.00,0 +-9.60,0.00,0.04,0.00,1.00,0.00,0.00,0 +-4.80,0.00,0.00,0.00,1.00,0.00,0.00,0 diff --git a/scripts/testv/stvISM_with_no_diegetic_switch.csv b/scripts/testv/stvISM_with_no_diegetic_switch.csv new file mode 100644 index 0000000000000000000000000000000000000000..ee0e7976379f1c1bc49ccfbef78a88e5b179820c --- /dev/null +++ b/scripts/testv/stvISM_with_no_diegetic_switch.csv @@ -0,0 +1,1500 @@ +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,0 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,0 +-8.83,0.00,1.00,0.00,1.00,0.00,0.00,0 +-13.24,0.00,1.00,0.00,1.00,0.00,0.00,0 +-17.64,0.00,1.00,0.00,1.00,0.00,0.00,0 +-22.03,0.00,1.00,0.00,1.00,0.00,0.00,0 +-26.41,0.00,1.00,0.00,1.00,0.00,0.00,0 +-30.77,0.00,1.00,0.00,1.00,0.00,0.00,0 +-35.12,0.00,1.00,0.00,1.00,0.00,0.00,0 +-39.44,0.00,1.00,0.00,1.00,0.00,0.00,0 +-43.74,0.00,1.00,0.00,1.00,0.00,0.00,0 +-48.01,0.00,1.00,0.00,1.00,0.00,0.00,0 +-52.25,0.00,1.00,0.00,1.00,0.00,0.00,0 +-56.46,0.00,1.00,0.00,1.00,0.00,0.00,0 +-60.64,0.00,1.00,0.00,1.00,0.00,0.00,0 +-64.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +-68.88,0.00,1.00,0.00,1.00,0.00,0.00,0 +-72.94,0.00,1.00,0.00,1.00,0.00,0.00,0 +-76.96,0.00,1.00,0.00,1.00,0.00,0.00,0 +-80.93,0.00,1.00,0.00,1.00,0.00,0.00,0 +-84.85,0.00,1.00,0.00,1.00,0.00,0.00,0 +-88.72,0.00,1.00,0.00,1.00,0.00,0.00,0 +-92.54,0.00,1.00,0.00,1.00,0.00,0.00,0 +-96.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +-100.00,0.00,1.00,0.00,1.00,0.00,0.00,0 +-103.65,0.00,1.00,0.00,1.00,0.00,0.00,0 +-107.23,0.00,1.00,0.00,1.00,0.00,0.00,0 +-110.74,0.00,1.00,0.00,1.00,0.00,0.00,0 +-114.19,0.00,1.00,0.00,1.00,0.00,0.00,0 +-117.57,0.00,1.00,0.00,1.00,0.00,0.00,0 +-120.88,0.00,1.00,0.00,1.00,0.00,0.00,0 +-124.12,0.00,1.00,0.00,1.00,0.00,0.00,0 +-127.28,0.00,1.00,0.00,1.00,0.00,0.00,0 +-130.36,0.00,1.00,0.00,1.00,0.00,0.00,0 +-133.37,0.00,1.00,0.00,1.00,0.00,0.00,0 +-136.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +-139.14,0.00,1.00,0.00,1.00,0.00,0.00,0 +-141.90,0.00,1.00,0.00,1.00,0.00,0.00,0 +-144.58,0.00,1.00,0.00,1.00,0.00,0.00,0 +-147.17,0.00,1.00,0.00,1.00,0.00,0.00,0 +-149.66,0.00,1.00,0.00,1.00,0.00,0.00,0 +-152.07,0.00,1.00,0.00,1.00,0.00,0.00,0 +-154.39,0.00,1.00,0.00,1.00,0.00,0.00,0 +-156.62,0.00,1.00,0.00,1.00,0.00,0.00,0 +-158.75,0.00,1.00,0.00,1.00,0.00,0.00,0 +-160.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +-162.72,0.00,1.00,0.00,1.00,0.00,0.00,0 +-164.56,0.00,1.00,0.00,1.00,0.00,0.00,0 +-166.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +-167.94,0.00,1.00,0.00,1.00,0.00,0.00,0 +-169.48,0.00,1.00,0.00,1.00,0.00,0.00,0 +-170.92,0.00,1.00,0.00,1.00,0.00,0.00,0 +-172.25,0.00,1.00,0.00,1.00,0.00,0.00,0 +-173.48,0.00,1.00,0.00,1.00,0.00,0.00,0 +-174.61,0.00,1.00,0.00,1.00,0.00,0.00,0 +-175.63,0.00,1.00,0.00,1.00,0.00,0.00,0 +-176.54,0.00,1.00,0.00,1.00,0.00,0.00,0 +-177.35,0.00,1.00,0.00,1.00,0.00,0.00,0 +-178.05,0.00,1.00,0.00,1.00,0.00,0.00,0 +-178.65,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.13,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.51,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.95,0.00,1.00,0.00,1.00,0.00,0.00,0 +-180.00,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.95,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.51,0.00,1.00,0.00,1.00,0.00,0.00,0 +-179.13,0.00,1.00,0.00,1.00,0.00,0.00,0 +-178.65,0.00,1.00,0.00,1.00,0.00,0.00,0 +-178.05,0.00,1.00,0.00,1.00,0.00,0.00,0 +-177.35,0.00,1.00,0.00,1.00,0.00,0.00,0 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-52.25,0.00,1.00,0.00,1.00,0.00,0.00,0 +-48.01,0.00,1.00,0.00,1.00,0.00,0.00,0 +-43.74,0.00,1.00,0.00,1.00,0.00,0.00,0 +-39.44,0.00,1.00,0.00,1.00,0.00,0.00,0 +-35.12,0.00,1.00,0.00,1.00,0.00,0.00,0 +-30.77,0.00,1.00,0.00,1.00,0.00,0.00,0 +-26.41,0.00,1.00,0.00,1.00,0.00,0.00,0 +-22.03,0.00,1.00,0.00,1.00,0.00,0.00,0 +-17.64,0.00,1.00,0.00,1.00,0.00,0.00,0 +-13.24,0.00,1.00,0.00,1.00,0.00,0.00,0 +-8.83,0.00,1.00,0.00,1.00,0.00,0.00,0 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,0 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,0 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,0 +8.83,0.00,1.00,0.00,1.00,0.00,0.00,0 +13.24,0.00,1.00,0.00,1.00,0.00,0.00,0 +17.64,0.00,1.00,0.00,1.00,0.00,0.00,0 +22.03,0.00,1.00,0.00,1.00,0.00,0.00,0 +26.41,0.00,1.00,0.00,1.00,0.00,0.00,0 +30.77,0.00,1.00,0.00,1.00,0.00,0.00,0 +35.12,0.00,1.00,0.00,1.00,0.00,0.00,0 +39.44,0.00,1.00,0.00,1.00,0.00,0.00,0 +43.74,0.00,1.00,0.00,1.00,0.00,0.00,0 +48.01,0.00,1.00,0.00,1.00,0.00,0.00,0 +52.25,0.00,1.00,0.00,1.00,0.00,0.00,0 +56.46,0.00,1.00,0.00,1.00,0.00,0.00,0 +60.64,0.00,1.00,0.00,1.00,0.00,0.00,0 +64.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +68.88,0.00,1.00,0.00,1.00,0.00,0.00,0 +72.94,0.00,1.00,0.00,1.00,0.00,0.00,0 +76.96,0.00,1.00,0.00,1.00,0.00,0.00,0 +80.93,0.00,1.00,0.00,1.00,0.00,0.00,0 +84.85,0.00,1.00,0.00,1.00,0.00,0.00,0 +88.72,0.00,1.00,0.00,1.00,0.00,0.00,0 +92.54,0.00,1.00,0.00,1.00,0.00,0.00,0 +96.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +100.00,0.00,1.00,0.00,1.00,0.00,0.00,0 +103.65,0.00,1.00,0.00,1.00,0.00,0.00,0 +107.23,0.00,1.00,0.00,1.00,0.00,0.00,0 +110.74,0.00,1.00,0.00,1.00,0.00,0.00,0 +114.19,0.00,1.00,0.00,1.00,0.00,0.00,0 +117.57,0.00,1.00,0.00,1.00,0.00,0.00,0 +120.88,0.00,1.00,0.00,1.00,0.00,0.00,0 +124.12,0.00,1.00,0.00,1.00,0.00,0.00,0 +127.28,0.00,1.00,0.00,1.00,0.00,0.00,0 +130.36,0.00,1.00,0.00,1.00,0.00,0.00,0 +133.37,0.00,1.00,0.00,1.00,0.00,0.00,0 +136.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +139.14,0.00,1.00,0.00,1.00,0.00,0.00,0 +141.90,0.00,1.00,0.00,1.00,0.00,0.00,0 +144.58,0.00,1.00,0.00,1.00,0.00,0.00,0 +147.17,0.00,1.00,0.00,1.00,0.00,0.00,0 +149.66,0.00,1.00,0.00,1.00,0.00,0.00,0 +152.07,0.00,1.00,0.00,1.00,0.00,0.00,0 +154.39,0.00,1.00,0.00,1.00,0.00,0.00,0 +156.62,0.00,1.00,0.00,1.00,0.00,0.00,0 +158.75,0.00,1.00,0.00,1.00,0.00,0.00,0 +160.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +162.72,0.00,1.00,0.00,1.00,0.00,0.00,0 +164.56,0.00,1.00,0.00,1.00,0.00,0.00,0 +166.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +167.94,0.00,1.00,0.00,1.00,0.00,0.00,0 +169.48,0.00,1.00,0.00,1.00,0.00,0.00,0 +170.92,0.00,1.00,0.00,1.00,0.00,0.00,0 +172.25,0.00,1.00,0.00,1.00,0.00,0.00,0 +173.48,0.00,1.00,0.00,1.00,0.00,0.00,0 +174.61,0.00,1.00,0.00,1.00,0.00,0.00,0 +175.63,0.00,1.00,0.00,1.00,0.00,0.00,0 +176.54,0.00,1.00,0.00,1.00,0.00,0.00,0 +177.35,0.00,1.00,0.00,1.00,0.00,0.00,0 +178.05,0.00,1.00,0.00,1.00,0.00,0.00,0 +178.65,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.13,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.51,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.95,0.00,1.00,0.00,1.00,0.00,0.00,0 +180.00,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.95,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.51,0.00,1.00,0.00,1.00,0.00,0.00,0 +179.13,0.00,1.00,0.00,1.00,0.00,0.00,0 +178.65,0.00,1.00,0.00,1.00,0.00,0.00,0 +178.05,0.00,1.00,0.00,1.00,0.00,0.00,0 +177.35,0.00,1.00,0.00,1.00,0.00,0.00,0 +176.54,0.00,1.00,0.00,1.00,0.00,0.00,0 +175.63,0.00,1.00,0.00,1.00,0.00,0.00,0 +174.61,0.00,1.00,0.00,1.00,0.00,0.00,0 +173.48,0.00,1.00,0.00,1.00,0.00,0.00,0 +172.25,0.00,1.00,0.00,1.00,0.00,0.00,0 +170.92,0.00,1.00,0.00,1.00,0.00,0.00,0 +169.48,0.00,1.00,0.00,1.00,0.00,0.00,0 +167.94,0.00,1.00,0.00,1.00,0.00,0.00,0 +166.30,0.00,1.00,0.00,1.00,0.00,0.00,0 +164.56,0.00,1.00,0.00,1.00,0.00,0.00,0 +162.72,0.00,1.00,0.00,1.00,0.00,0.00,0 +160.78,0.00,1.00,0.00,1.00,0.00,0.00,0 +158.75,0.00,1.00,0.00,1.00,0.00,0.00,0 +156.62,0.00,1.00,0.00,1.00,0.00,0.00,0 +154.39,0.00,1.00,0.00,1.00,0.00,0.00,0 +152.07,0.00,1.00,0.00,1.00,0.00,0.00,0 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +0.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-2.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-4.42,0.00,1.00,0.00,1.00,0.00,0.00,1 +-6.62,0.00,1.00,0.00,1.00,0.00,0.00,1 +-8.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-11.02,0.00,1.00,0.00,1.00,0.00,0.00,1 +-13.21,0.00,1.00,0.00,1.00,0.00,0.00,1 +-15.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-17.56,0.00,1.00,0.00,1.00,0.00,0.00,1 +-19.72,0.00,1.00,0.00,1.00,0.00,0.00,1 +-21.87,0.00,1.00,0.00,1.00,0.00,0.00,1 +-24.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-26.13,0.00,1.00,0.00,1.00,0.00,0.00,1 +-28.23,0.00,1.00,0.00,1.00,0.00,0.00,1 +-30.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-32.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-34.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-36.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-38.48,0.00,1.00,0.00,1.00,0.00,0.00,1 +-40.47,0.00,1.00,0.00,1.00,0.00,0.00,1 +-42.43,0.00,1.00,0.00,1.00,0.00,0.00,1 +-44.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-46.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-48.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-50.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-51.82,0.00,1.00,0.00,1.00,0.00,0.00,1 +-53.61,0.00,1.00,0.00,1.00,0.00,0.00,1 +-55.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-57.10,0.00,1.00,0.00,1.00,0.00,0.00,1 +-58.79,0.00,1.00,0.00,1.00,0.00,0.00,1 +-60.44,0.00,1.00,0.00,1.00,0.00,0.00,1 +-62.06,0.00,1.00,0.00,1.00,0.00,0.00,1 +-63.64,0.00,1.00,0.00,1.00,0.00,0.00,1 +-65.18,0.00,1.00,0.00,1.00,0.00,0.00,1 +-66.69,0.00,1.00,0.00,1.00,0.00,0.00,1 +-68.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-69.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-90.00,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.89,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.76,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.57,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.32,0.00,1.00,0.00,1.00,0.00,0.00,1 +-89.03,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.67,0.00,1.00,0.00,1.00,0.00,0.00,1 +-88.27,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.81,0.00,1.00,0.00,1.00,0.00,0.00,1 +-87.30,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-86.12,0.00,1.00,0.00,1.00,0.00,0.00,1 +-85.46,0.00,1.00,0.00,1.00,0.00,0.00,1 +-84.74,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.97,0.00,1.00,0.00,1.00,0.00,0.00,1 +-83.15,0.00,1.00,0.00,1.00,0.00,0.00,1 +-82.28,0.00,1.00,0.00,1.00,0.00,0.00,1 +-81.36,0.00,1.00,0.00,1.00,0.00,0.00,1 +-80.39,0.00,1.00,0.00,1.00,0.00,0.00,1 +-79.37,0.00,1.00,0.00,1.00,0.00,0.00,1 +-78.31,0.00,1.00,0.00,1.00,0.00,0.00,1 +-77.20,0.00,1.00,0.00,1.00,0.00,0.00,1 +-76.04,0.00,1.00,0.00,1.00,0.00,0.00,1 +-74.83,0.00,1.00,0.00,1.00,0.00,0.00,1 +-73.58,0.00,1.00,0.00,1.00,0.00,0.00,1 +-72.29,0.00,1.00,0.00,1.00,0.00,0.00,1 +-70.95,0.00,1.00,0.00,1.00,0.00,0.00,1 diff --git a/tests/conftest.py b/tests/conftest.py index ef5f46ffc9c13b590fee7485a18499c6b7daec4f..d7a35a36e03d2c55e7a50aeb1a2e66c482830574 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -196,7 +196,6 @@ class EncoderFrontend: sba_order: Optional[str] = None, dtx_mode: Optional[bool] = False, max_band: Optional[str] = None, - agc_op: Optional[int] = None, bypass_mode: Optional[int] = None, quiet_mode: Optional[bool] = True, add_option_list: Optional[list] = None, @@ -213,9 +212,6 @@ class EncoderFrontend: if max_band is not None: command.extend(["-max_band", max_band]) - if agc_op is not None: - command.extend(["-agc", str(agc_op)]) - if bypass_mode is not None: command.extend(["-bypass", str(bypass_mode)]) diff --git a/tests/renderer/constants.py b/tests/renderer/constants.py index c66f5e677c82a398ae3975fb808cbc2e1733c984..56b4d71e26de32cf12a9f16664808d5f8675a0c6 100644 --- a/tests/renderer/constants.py +++ b/tests/renderer/constants.py @@ -94,6 +94,7 @@ FORMAT_TO_FILE_SMOKETEST = { "ISM2": NCHAN_TO_FILE[2], "ISM3": NCHAN_TO_FILE[3], "ISM4": NCHAN_TO_FILE[4], + "NDP_ISM4": NCHAN_TO_FILE[4], # "ISM1": TEST_VECTOR_DIR.joinpath("spectral_test_ism1.txt"), # "ISM2": TEST_VECTOR_DIR.joinpath("spectral_test_ism2.txt"), # "ISM3": TEST_VECTOR_DIR.joinpath("spectral_test_ism3.txt"), @@ -148,6 +149,12 @@ FORMAT_TO_METADATA_FILES = { str(TESTV_DIR.joinpath("stvISM3.csv")), str(TESTV_DIR.joinpath("stvISM4.csv")), ], + "NDP_ISM4": [ + str(TESTV_DIR.joinpath("stvISM1.csv")), + str(TESTV_DIR.joinpath("stvISM2_non-diegetic-pan.csv")), + str(TESTV_DIR.joinpath("stvISM3.csv")), + str(TESTV_DIR.joinpath("stvISM4.csv")), + ], "MASA1": [str(TESTV_DIR.joinpath("stv1MASA1TC48c.met"))], "MASA2": [str(TESTV_DIR.joinpath("stv2MASA2TC48c.met"))], } diff --git a/tests/renderer/data/ism_0a_0e.csv b/tests/renderer/data/ism_0a_0e.csv index 7772c8c9169bc66f5c18ee25f78ce488eac3cc37..56a82f0fe379702d99a715eb2307ebb287590e92 100644 --- a/tests/renderer/data/ism_0a_0e.csv +++ b/tests/renderer/data/ism_0a_0e.csv @@ -1,750 +1,749 @@ -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 -0,0,1,0,1 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 +0,0,1,0,1,0,0,0 diff --git a/tests/renderer/test_renderer.py b/tests/renderer/test_renderer.py index d88d7a4a4299660e8891b395a75d3095332ac6d3..38b7bbf9e743c4f479790c58a91e782623c806ca 100644 --- a/tests/renderer/test_renderer.py +++ b/tests/renderer/test_renderer.py @@ -441,3 +441,20 @@ def test_metadata(test_info, in_fmt, out_fmt): out_fmt, metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), ) + + +""" non diegetic pan """ + + +@pytest.mark.parametrize("out_fmt", ["STEREO"]) +@pytest.mark.parametrize("in_fmt", ["MONO"]) +@pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) +def test_non_diegetic_pan_static(test_info, in_fmt, out_fmt, non_diegetic_pan): + run_renderer(in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan) + + +@pytest.mark.parametrize("out_fmt", ["STEREO"]) +@pytest.mark.parametrize("in_fmt", ["ISM1"]) +@pytest.mark.parametrize("non_diegetic_pan", ["0", "-30", "45", "90", "-90"]) +def test_non_diegetic_pan_ism_static(test_info, in_fmt, out_fmt, non_diegetic_pan): + run_renderer(in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan) diff --git a/tests/renderer/test_renderer_be_comparison.py b/tests/renderer/test_renderer_be_comparison.py index d3c0be22c6f906308624bca2c9d321430d2e9479..460ded4250421168864976c3941e2c2fbab34561 100644 --- a/tests/renderer/test_renderer_be_comparison.py +++ b/tests/renderer/test_renderer_be_comparison.py @@ -203,3 +203,22 @@ def test_metadata(test_info, in_fmt, out_fmt): metadata_input=TEST_VECTOR_DIR.joinpath(f"{in_fmt}.txt"), is_comparetest=True, ) + + +""" non diegetic pan """ + + +# @pytest.mark.parametrize("out_fmt", ["STEREO"]) +# @pytest.mark.parametrize("in_fmt", ["MONO"]) +# @pytest.mark.parametrize("non_diegetic_pan", ["0", "-0.2", "0.5", "1", "-1"]) +# def test_non_diegetic_pan_static(test_info, in_fmt, out_fmt, non_diegetic_pan): +# compare_renderer_vs_mergetarget( +# test_info, in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan) + + +# @pytest.mark.parametrize("out_fmt", ["STEREO"]) +# @pytest.mark.parametrize("in_fmt", ["ISM1"]) +# @pytest.mark.parametrize("non_diegetic_pan", ["0", "-0.2", "0.5", "1", "-1"]) +# def test_non_diegetic_pan_ism_static(test_info, in_fmt, out_fmt, non_diegetic_pan): +# compare_renderer_vs_mergetarget( +# test_info, in_fmt, out_fmt, non_diegetic_pan=non_diegetic_pan) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index bbc059bbd6aeab67f7729560873548e6b7aaf4ba..356902ff47674ff111dbe7541bde3bac8e24bf4e 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -105,6 +105,7 @@ def run_renderer( metadata_input: Optional[str] = None, in_meta_files: Optional[list] = None, trj_file: Optional[str] = None, + non_diegetic_pan: Optional[str] = None, name_extension: Optional[str] = None, refrot_file: Optional[str] = None, refvec_file: Optional[str] = None, @@ -162,7 +163,11 @@ def run_renderer( in_file = FORMAT_TO_FILE[in_fmt] in_name = in_fmt - out_file = str(output_path_base.joinpath(f"{in_name}_to_{out_name}{trj_name}{refrot_name}{refvec_name}{refveclev_name}{config_name}{name_extension}.wav")) + out_file = str( + output_path_base.joinpath( + f"{in_name}_to_{out_name}{trj_name}{non_diegetic_pan}{refrot_name}{refvec_name}{refveclev_name}{config_name}{name_extension}.wav" + ) + ) cmd = RENDERER_CMD[:] cmd[2] = str(in_file) @@ -178,6 +183,8 @@ def run_renderer( if trj_file is not None: cmd.extend(["-tf", str(trj_file)]) + if non_diegetic_pan is not None: + cmd.extend(["-non_diegetic_pan", str(non_diegetic_pan)]) if refrot_file is not None: cmd.extend(["-rf", str(refrot_file)]) cmd.extend(["-otr", "ref"]) diff --git a/tests/test_sba_bs_dec_plc.py b/tests/test_sba_bs_dec_plc.py index 4920a9c59cec4cae613850989fb2802065dbf37a..bead7cda93796a66ea8ba83d5ff487e9d47f7975 100644 --- a/tests/test_sba_bs_dec_plc.py +++ b/tests/test_sba_bs_dec_plc.py @@ -45,9 +45,9 @@ from conftest import DecoderFrontend tag_list = ['stvFOA'] plc_patterns = ['PLperc12mblen5', 'PLperc40mblen50', 'PLperc42mblen2'] dtx_set = ['0', '1'] -ivas_br_list = ['32000', '64000', '96000', '256000'] +ivas_br_list = ['13200','16400','32000', '64000', '96000', '256000'] sampling_rate_list = ['48', '32', '16'] -agc_list = [-1, 0, 1] +gain_list = [0, 1] AbsTol = '0' @@ -73,7 +73,7 @@ def check_and_makedir(dir_path): @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("plc_pattern", plc_patterns) @pytest.mark.parametrize("fs", sampling_rate_list) -@pytest.mark.parametrize("agc", agc_list) +@pytest.mark.parametrize("gain_flag", gain_list) def test_sba_plc_system( dut_decoder_frontend: DecoderFrontend, test_vector_path, @@ -87,12 +87,19 @@ def test_sba_plc_system( tag, plc_pattern, fs, - agc + gain_flag ): - if dtx == '1' and ivas_br not in ['32000', '64000']: + SID = 0 + if dtx == '1' and ivas_br not in ['13200','16400','24400','32000', '64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() - + if ivas_br == '13200' or ivas_br == '16400': + if dtx == '1' and gain_flag == 0 and fs != '16': + SID = 1 + else: + pytest.skip() + if gain_flag == 1 and ivas_br not in ['13200','16400','24400','32000']: + pytest.skip() tag = tag + fs + 'c' # dec @@ -106,9 +113,10 @@ def test_sba_plc_system( fs, ivas_br, dtx, + SID, plc_pattern, update_ref, - agc, + gain_flag, keep_files, ) @@ -125,17 +133,18 @@ def sba_dec_plc( sampling_rate, ivas_br, dtx, + SID, plc_pattern, update_ref, - agc, + gain_flag, keep_files, ): # ------------ run cmd ------------ tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" - if agc != -1: - tag_out += f'_AGC{agc}' + if gain_flag == 1: + tag_out += f'_Gain{gain_flag}' plc_tag_out = f"{tag_out}_{plc_pattern}" dut_out_dir = f"{dut_base_path}/sba_bs/raw" @@ -147,6 +156,9 @@ def sba_dec_plc( plc_file = f"{test_vector_path}/{plc_pattern}.g192" ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}.pkt" ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_dutenc.pkt" + if SID == 1: + ref_in_pkt = f"{reference_path}/sba_bs/pkt/{tag_out}_SID_cut.pkt" + ref_in_pkt_dutenc = f"{reference_path}/sba_bs/pkt/{tag_out}_SID_dutenc_cut.pkt" dut_out_raw = f"{dut_out_dir}/{plc_tag_out}.raw" ref_out_raw = f"{ref_out_dir}/{plc_tag_out}.raw" diff --git a/tests/test_sba_bs_enc.py b/tests/test_sba_bs_enc.py index 6825ee12ba3d162a21759cbab87d8a8aa8d2aaaa..09baebc9e1ecfb0eb16c6d4b3c9b44c03c492b34 100644 --- a/tests/test_sba_bs_enc.py +++ b/tests/test_sba_bs_enc.py @@ -42,8 +42,9 @@ import pytest from cmp_pcm import cmp_pcm from cut_pcm import cut_samples from conftest import EncoderFrontend, DecoderFrontend - +from cut_bs import cut_bs # params + tag_list = ['stvFOA'] tag_list_HOA2 = ['stv2OA'] tag_list_HOA3 = ['stv3OA'] @@ -53,13 +54,13 @@ dtx_set = ['0', '1'] dict_fsample_bw = {'48': '3', '32': '2', '16': '1'} dict_bw_idx = {'FB': '3', 'SWB': '2', 'WB': '1'} dict_bw_tag = {'SWB': '_ForceSWB', 'WB': '_ForceWB'} -ivas_br_FOA = ['32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] +ivas_br_FOA = ['13200','16400','32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] ivas_br_HOA2 = ['256000', '384000', '512000'] ivas_br_HOA3 = ['256000', '384000', '512000'] sample_rate_list = ['48', '32', '16'] bypass_list = [1, 2] -agc_list = [-1, 0, 1] +gain_list = [0, 1] sample_rate_bw_idx_list = [('48', 'SWB'), ('48', 'WB'), ('32', 'WB')] @@ -100,7 +101,7 @@ def test_bypass_enc( ivas_br = '256000' dtx = '0' max_bw = "FB" - agc = -1 + gain_flag = -1 sba_order = "+1" output_config = "FOA" @@ -116,11 +117,12 @@ def test_bypass_enc( fs, ivas_br, dtx, + None, max_bw, bypass, - agc, sba_order, update_ref, + gain_flag, cut_testv=True ) @@ -134,11 +136,12 @@ def test_bypass_enc( fs, ivas_br, dtx, + None, max_bw, bypass, - agc, output_config, update_ref, + gain_flag, keep_files, ) @@ -148,7 +151,7 @@ def test_bypass_enc( @pytest.mark.parametrize("dtx", dtx_set) @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) -@pytest.mark.parametrize("agc", agc_list) +@pytest.mark.parametrize("gain_flag", gain_list) def test_sba_enc_system( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, @@ -164,20 +167,27 @@ def test_sba_enc_system( dtx, tag, fs, - agc, + gain_flag, ): - if dtx == '1' and ivas_br not in ['32000', '64000']: + SID = 0 + if dtx == '1' and ivas_br not in ['13200','16400','24400','32000','64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() - if ivas_br == 'sw_24k4_256k.bin' and agc != 1: - pytest.skip() - + if ivas_br == 'sw_24k4_256k.bin' and gain_flag != 1: + pytest.skip() + if ivas_br == '13200' or ivas_br == '16400': + if dtx == '1' and gain_flag == 0 and fs != '16': + SID = 1 + else: + pytest.skip() + if gain_flag == 1 and ivas_br not in ['13200','16400','24400','32000']: + pytest.skip() tag = tag + fs + 'c' max_bw = "FB" bypass = -1 sba_order = "+1" output_config = "FOA" - if agc == 1: + if gain_flag == 1: cut_gain = "16.0" elif dtx == '1': cut_gain = ".004" @@ -195,11 +205,12 @@ def test_sba_enc_system( fs, ivas_br, dtx, + SID, max_bw, bypass, - agc, sba_order, update_ref, + gain_flag, cut_gain=cut_gain, create_dutenc=True, cut_testv=True @@ -215,11 +226,12 @@ def test_sba_enc_system( fs, ivas_br, dtx, + SID, max_bw, bypass, - agc, output_config, update_ref, + gain_flag, keep_files, ) @@ -242,7 +254,7 @@ def test_spar_hoa2_enc_system( ): fs = '48' dtx = '0' - agc = -1 + gain_flag = -1 tag = tag + fs + 'c' max_bw = "FB" @@ -262,11 +274,12 @@ def test_spar_hoa2_enc_system( fs, ivas_br, dtx, + None, max_bw, bypass, - agc, sba_order, update_ref, + gain_flag, ) # dec @@ -279,11 +292,12 @@ def test_spar_hoa2_enc_system( fs, ivas_br, dtx, + None, max_bw, bypass, - agc, output_config, update_ref, + gain_flag, keep_files, ) @@ -306,7 +320,7 @@ def test_spar_hoa3_enc_system( ): fs = '48' dtx = '0' - agc = -1 + gain_flag = -1 tag = tag + fs + 'c' max_bw = "FB" @@ -326,11 +340,12 @@ def test_spar_hoa3_enc_system( fs, ivas_br, dtx, + None, max_bw, bypass, - agc, sba_order, update_ref, + gain_flag, ) # dec @@ -343,11 +358,12 @@ def test_spar_hoa3_enc_system( fs, ivas_br, dtx, + None, max_bw, bypass, - agc, output_config, update_ref, + gain_flag, keep_files, ) @@ -372,16 +388,18 @@ def test_sba_enc_BWforce_system( tag, sample_rate_bw_idx, ): - if dtx == '1' and ivas_br not in ['32000', '64000']: + if dtx == '1' and ivas_br not in ['32000','64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() + if ivas_br == '13200' or ivas_br == '16400': + pytest.skip() if ivas_br == 'sw_24k4_256k.bin': pytest.skip() fs = sample_rate_bw_idx[0] bw = sample_rate_bw_idx[1] tag = tag + fs + 'c' bypass = -1 - agc = -1 + gain_flag = -1 sba_order = "+1" output_config = "FOA" @@ -397,11 +415,12 @@ def test_sba_enc_BWforce_system( fs, ivas_br, dtx, + None, bw, bypass, - agc, sba_order, update_ref, + gain_flag, cut_testv=True ) @@ -415,11 +434,12 @@ def test_sba_enc_BWforce_system( fs, ivas_br, dtx, + None, bw, bypass, - agc, output_config, update_ref, + gain_flag, keep_files, ) @@ -437,11 +457,12 @@ def sba_enc( sampling_rate, ivas_br, dtx, + SID, ivas_max_bw, bypass, - agc, sba_order, update_ref, + gain_flag, cut_gain='1.0', create_dutenc=False, cut_testv=False @@ -466,20 +487,28 @@ def sba_enc( if ivas_br == 'sw_24k4_256k.bin': ivas_br = f"{br_switch_file_path}/sw_24k4_256k.bin" short_tag_ext = "" - if agc != -1: - short_tag_ext += f'_AGC{agc}' + if gain_flag == 1: + short_tag_ext += f'_Gain{gain_flag}' + if SID == 1: + short_tag_ext += f'_SID' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" # to avoid conflicting names in case of parallel test execution, differentiate all cases - long_tag_ext = f"_AGC{agc}" if agc != -1 else "_AGC-unspecified" - long_tag_ext += f"_pca{bypass}" + if gain_flag == 1: + long_tag_ext = f"_Gain{gain_flag}" + else: + long_tag_ext = f"_pca{bypass}" + if SID == 1: + long_tag_ext += f"_SID" dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.pkt" ref_pkt_file = f"{ref_out_dir}/{tag_out}{short_tag_ext}.pkt" ref_pkt_file_dutenc = f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc.pkt" - + if SID == 1: + dut_pkt_file_cut = f"{dut_out_dir}/{tag_out}{long_tag_ext}_cut.pkt" + ref_pkt_file_cut = f"{ref_out_dir}/{tag_out}{short_tag_ext}_cut.pkt" + ref_pkt_file_dutenc_cut = f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc_cut.pkt" input_path = f"{test_vector_path}/{tag_in}{in_extension}" - agc_op = agc if agc != -1 else None bypass_mode = bypass if bypass >= 0 else None dtx_mode = dtx == '1' @@ -507,7 +536,6 @@ def sba_enc( ref_pkt_file, sba_order=sba_order, max_band=ivas_max_bw, - agc_op=agc_op, bypass_mode=bypass_mode, dtx_mode=dtx_mode, ) @@ -520,7 +548,6 @@ def sba_enc( ref_pkt_file_dutenc, sba_order=sba_order, max_band=ivas_max_bw, - agc_op=agc_op, bypass_mode=bypass_mode, dtx_mode=dtx_mode, ) @@ -534,12 +561,25 @@ def sba_enc( dut_pkt_file, sba_order=sba_order, max_band=ivas_max_bw, - agc_op=agc_op, bypass_mode=bypass_mode, dtx_mode=dtx_mode, ) - + if SID == 1: + if ref_encoder_path: + with open(ref_pkt_file, "rb") as fp_in: + with open(ref_pkt_file_cut, "wb") as fp_out: + fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) + with open(ref_pkt_file_dutenc, "rb") as fp_in: + with open(ref_pkt_file_dutenc_cut, "wb") as fp_out: + fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) + os.remove(ref_pkt_file) + os.remove(ref_pkt_file_dutenc) + if update_ref == 0: + with open(dut_pkt_file, "rb") as fp_in: + with open(dut_pkt_file_cut, "wb") as fp_out: + fr_cnt, cut_cnt = cut_bs(fp_in, fp_out, 0, True) + os.remove(dut_pkt_file) def sba_dec( decoder_frontend, ref_decoder_path, @@ -549,11 +589,12 @@ def sba_dec( sampling_rate, ivas_br, dtx, + SID, ivas_max_bw, bypass, - agc, output_config, update_ref, + gain_flag, keep_files, ): @@ -566,16 +607,20 @@ def sba_dec( tag_out = f"{tag}_ivasbr{ivas_br[:-3]}k_DTX{dtx}" short_tag_ext = "" - if agc != -1: - short_tag_ext += f'_AGC{agc}' + if gain_flag == 1: + short_tag_ext += f'_Gain{gain_flag}' # we update only bypass = 0/2 (bypass 1 is the same as the baseline) if bypass in [0, 2]: short_tag_ext += f"_pca{bypass}" - + if SID == 1: + short_tag_ext += f'_SID_cut' # to avoid conflicting names in case of parallel test execution, differentiate all cases - long_tag_ext = f"_AGC{agc}" if agc != -1 else "_AGC-unspecified" - long_tag_ext += f"_pca{bypass}" - + if gain_flag == 1: + long_tag_ext = f"_Gain{gain_flag}" + else: + long_tag_ext = f"_pca{bypass}" + if SID == 1: + long_tag_ext += f"_SID_cut" dut_out_dir = f"{dut_base_path}/sba_bs/raw" ref_out_dir = f"{reference_path}/sba_bs/raw"