From 04fbde0605af058f86838723bf4f6a3837eb4e12 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 5 Aug 2025 13:14:07 +0200 Subject: [PATCH 1/9] port MR, part1 --- apps/decoder.c | 88 +- apps/isar_post_rend.c | 43 +- apps/renderer.c | 45 +- lib_com/common_api_types.h | 5 +- lib_com/delay_comp_fx.c | 18 +- lib_com/ivas_prot_fx.h | 8 +- lib_com/prot_fx.h | 109 +- lib_dec/ivas_init_dec_fx.c | 236 +- lib_dec/ivas_jbm_dec_fx.c | 7 +- lib_dec/ivas_output_config_fx.c | 2 +- lib_dec/ivas_stat_dec.h | 10 +- lib_dec/lib_dec.h | 232 +- lib_dec/lib_dec_fx.c | 359 +- lib_enc/lib_enc_fx.c | 2 +- lib_isar/isar_MSPred.c | 71 +- lib_isar/isar_PredDecoder.c | 2 +- lib_isar/isar_PredEncoder.c | 28 +- lib_isar/isar_RMSEnvGrouping.c | 87 +- lib_isar/isar_cnst.h | 111 +- lib_isar/isar_lc3plus_common.h | 2 +- lib_isar/isar_lc3plus_enc.c | 66 +- lib_isar/isar_lcld_decoder.c | 158 +- lib_isar/isar_lcld_prot.h | 207 +- lib_isar/isar_lcld_rom_tables.c | 20626 +++++++++++----------- lib_isar/isar_lcld_rom_tables.h | 205 +- lib_isar/isar_prot.h | 211 +- lib_isar/isar_rom_post_rend.c | 2 +- lib_isar/isar_rom_post_rend.h | 2 +- lib_isar/isar_splitRendererPre.c | 99 +- lib_isar/isar_splitRenderer_utils.c | 8 +- lib_isar/lib_isar_post_rend.c | 15 +- lib_isar/lib_isar_post_rend.h | 64 +- lib_isar/lib_isar_pre_rend.h | 64 +- lib_rend/lib_rend.h | 37 +- lib_rend/lib_rend_fx.c | 36 +- lib_util/split_render_file_read_write.c | 4 +- 36 files changed, 11596 insertions(+), 11673 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index bf830ae2d..a864fc7c2 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -431,7 +431,7 @@ int main( { if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) { - fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + fprintf( stderr, "\nSplit rendering configure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } @@ -500,8 +500,7 @@ int main( renderConfig.directivity_fx[i * 3 + 2] = (Word16) ( renderConfig.directivity[i * 3 + 2] * ( ( 1u << 15 ) - 1 ) ); } - if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || - arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) + if ( ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { if ( asked_frame_size != IVAS_RENDER_FRAMESIZE_20MS && ( renderConfig.split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE || @@ -551,6 +550,7 @@ int main( } renderConfig.roomAcoustics.override = true; } + /* ISAR frame size is set from command line, not renderer config file. * This will be ignored if output format is not split rendering. */ renderConfig.split_rend_config.isar_frame_size_ms = (int16_t) arg.renderFramesize /* given in number of 5ms subframes */ * 5; @@ -1195,7 +1195,7 @@ static bool parseCmdlIVAS_dec( arg->outputMdFilename = argv[i + 1]; if ( arg->outputMdFilename[0] == '\0' ) { - fprintf( stderr, "Error: output metadata file path not specified\n\n" ); + fprintf( stderr, "Error: Split rendering output metadata file path not specified\n\n" ); usage_dec(); return false; } @@ -1620,6 +1620,7 @@ static ivas_error initOnFirstGoodFrame( uint16_t *pNumObj, /* o : */ SplitFileReadWrite **splitRendWriter ) { + int16_t isSplitRend, isSplitCoded; ivas_error error = IVAS_ERR_UNKNOWN; /* Now delay, number of output channels and frame size are known */ @@ -1629,7 +1630,19 @@ static ivas_error initOnFirstGoodFrame( return error; } - if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) + if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error ); + return error; + } + + if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); + return error; + } + + if ( isSplitRend ) { pFullDelayNumSamples[0] = 0; } @@ -1654,7 +1667,7 @@ static ivas_error initOnFirstGoodFrame( return error; } - if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) + if ( isSplitRend ) { /* Open split rendering metadata writer */ int16_t delayNumSamples_temp[3]; @@ -1671,29 +1684,15 @@ static ivas_error initOnFirstGoodFrame( return error; } - if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec, - &splitRendCodec, - &poseCorrection, - &splitRendIsarFrameSizeMs, - &splitRendCodecFrameSizeMs, - &lc3plusHighRes ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_GetSplitRendBitstreamHeader( hIvasDec, &splitRendCodec, &poseCorrection, &splitRendIsarFrameSizeMs, &splitRendCodecFrameSizeMs, &lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get split renderer bitstream header: %s\n", ivas_error_to_string( error ) ); return error; } - if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) ) + if ( isSplitCoded ) { - if ( ( error = split_rend_writer_open( splitRendWriter, - arg.outputWavFilename, - delayNumSamples_temp[0], - delayTimeScale_temp, - splitRendCodec, - poseCorrection, - splitRendCodecFrameSizeMs, - splitRendIsarFrameSizeMs, - arg.output_Fs, - lc3plusHighRes ) ) != IVAS_ERR_OK ) + if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); return error; @@ -1707,16 +1706,7 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_INVALID_SPLIT_REND_CONFIG; } - if ( ( error = split_rend_writer_open( splitRendWriter, - arg.outputMdFilename, - delayNumSamples_temp[0], - delayTimeScale_temp, - splitRendCodec, - poseCorrection, - splitRendCodecFrameSizeMs, - splitRendIsarFrameSizeMs, - arg.output_Fs, - lc3plusHighRes ) ) != IVAS_ERR_OK ) + if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); return error; @@ -1724,7 +1714,7 @@ static ivas_error initOnFirstGoodFrame( } } - if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) == 0 ) + if ( !isSplitCoded ) { /* Open audio writer and write all previously skipped bad frames now that frame size is known */ if ( ( error = AudioFileWriter_open( ppAfWriter, arg.outputWavFilename, arg.output_Fs, *pNumOutChannels ) ) != IVAS_ERR_OK ) @@ -1759,7 +1749,6 @@ static ivas_error initOnFirstGoodFrame( } else { - if ( *pRemainingDelayNumSamples < *numOutSamples ) { if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, *numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) @@ -1929,11 +1918,23 @@ static ivas_error decodeG192( IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0 } }; int16_t vec_pos_update, vec_pos_len; SplitFileReadWrite *splitRendWriter = NULL; - + int16_t isSplitRend, isSplitCoded; #ifdef FIX_1053_REVERB_RECONFIGURATION IVAS_RENDER_CONFIG_DATA renderConfig; RenderConfigReader *renderConfigReader = NULL; + if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_enabled, code: %d\n", error ); + return error; + } + + if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); + return error; + } + if ( arg.renderConfigEnabled ) { if ( ( error = RenderConfigReader_open( arg.renderConfigFilename, &renderConfigReader ) ) != IVAS_ERR_OK ) @@ -1964,7 +1965,6 @@ static ivas_error decodeG192( /* we always start with needing a new frame */ needNewFrame = true; - if ( !arg.quietModeEnabled ) { fprintf( stdout, "\n------ Running the decoder ------\n\n" ); @@ -1996,13 +1996,13 @@ static ivas_error decodeG192( return error; } - /*------------------------------------------------------------------------------------------* * 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 */ @@ -2172,7 +2172,7 @@ static ivas_error decodeG192( } } - if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) + if ( isSplitRend ) { if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (Word16 *) ( pcmBuf + nOutChannels * nSamplesRendered ), splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) { @@ -2237,7 +2237,7 @@ static ivas_error decodeG192( /* Write current frame */ if ( decodedGoodFrame ) { - if ( IVAS_DEC_is_split_rendering_enabled( hIvasDec ) ) + if ( isSplitRend ) { if ( split_rend_write_bitstream_to_file( splitRendWriter, splitRendBits->bits_buf, &splitRendBits->bits_read, &splitRendBits->bits_written ) != IVAS_ERR_OK ) { @@ -2246,7 +2246,7 @@ static ivas_error decodeG192( } } - if ( IVAS_DEC_is_split_rendering_coded_out( hIvasDec ) == 0 ) + if ( !isSplitCoded ) { if ( delayNumSamples < nOutSamples ) { @@ -2813,8 +2813,7 @@ static ivas_error decodeVoIP( { 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 ), - RotationFileReader_getFilePath( headRotReader ) ); + fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } } @@ -2822,8 +2821,7 @@ static ivas_error decodeVoIP( for ( i = 0; i < num_subframes; i++ ) { - if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, - DEFAULT_AXIS ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; diff --git a/apps/isar_post_rend.c b/apps/isar_post_rend.c index b4ff098ba..bbda6949d 100644 --- a/apps/isar_post_rend.c +++ b/apps/isar_post_rend.c @@ -31,9 +31,6 @@ *******************************************************************************************************/ #include "lib_isar_post_rend.h" -//#undef IVAS_FLOAT_FIXED - - #include #include #include @@ -268,9 +265,6 @@ static int16_t getTotalNumInChannels( return totalNumInChannels; } -/*------------------------------------------------------------------------------------------* - * Local functions - *------------------------------------------------------------------------------------------*/ static const CmdLnParser_Option *findOptionById( const int32_t id ) @@ -433,6 +427,7 @@ static bool checkRequiredArgs( return !missingRequiredArg; } + static CmdlnArgs defaultArgs( const char *executableName ) { @@ -463,6 +458,7 @@ static CmdlnArgs defaultArgs( return args; } + static void parseOption( const int32_t optionId, char **optionValues, @@ -555,6 +551,7 @@ static void parseOption( return; } + static CmdlnArgs parseCmdlnArgs( const int argc, char **argv ) @@ -631,6 +628,7 @@ static void convertInputBuffer( return; } + /*--------------------------------------------------------------------------* * convertOutputBuffer() * @@ -672,6 +670,7 @@ static void convertOutputBuffer( return; } + /*------------------------------------------------------------------------------------------* * main() * @@ -731,12 +730,20 @@ int main( bitsBuffer.config.isar_frame_size_ms = 20; bitsBuffer.config.lc3plusHighRes = 0; + /*------------------------------------------------------------------------------------------* + * Parse command-line arguments + *------------------------------------------------------------------------------------------*/ + CmdlnArgs args = parseCmdlnArgs( argc, argv ); convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); convert_backslash( args.headRotationFilePath ); + /*------------------------------------------------------------------------------------------* + * Open head-rotation file + *------------------------------------------------------------------------------------------*/ + if ( !isEmptyString( args.headRotationFilePath ) ) { if ( RotationFileReader_open( args.headRotationFilePath, &headRotReader ) != IVAS_ERR_OK ) @@ -746,6 +753,10 @@ int main( } } + /*------------------------------------------------------------------------------------------* + * Open BFI file + *------------------------------------------------------------------------------------------*/ + if ( !isEmptyString( args.splitRendBFIFilePath ) ) { convert_backslash( args.splitRendBFIFilePath ); @@ -844,6 +855,10 @@ int main( } } + /*------------------------------------------------------------------------------------------* + * Open ISAR handle + *------------------------------------------------------------------------------------------*/ + const int16_t frameSize_smpls = (int16_t) ( ( args.render_framesize ) * args.sampleRate * 5 / ( 1000 ) ); args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_BINAURAL; if ( ( error = ISAR_POST_REND_open( &hIsarPostRend, args.sampleRate, args.outConfig.audioConfig, true, 0, 0, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK ) @@ -852,7 +867,10 @@ int main( goto cleanup; } - /* === Configure === */ + /*------------------------------------------------------------------------------------------* + * Configuration + *------------------------------------------------------------------------------------------*/ + if ( ( error = ISAR_POST_REND_InitConfig( hIsarPostRend, args.outConfig.audioConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in Renderer Config Init: %s\n", ivas_error_to_string( error ) ); @@ -906,6 +924,10 @@ int main( goto cleanup; } + /*------------------------------------------------------------------------------------------* + * Allocate processing buffers + *------------------------------------------------------------------------------------------*/ + inBufferSize = frameSize_smpls * totalNumInChannels; outBufferSize = frameSize_smpls * numOutChannels; inpInt16Buffer = malloc( inBufferSize * sizeof( int16_t ) ); @@ -961,6 +983,13 @@ int main( fprintf( stdout, "\n\n-- Start the ISAR post renderer (quiet mode) --\n\n" ); } + /*------------------------------------------------------------------------------------------* + * Loop for every frame of data + * - Read the input data + * - Run the post-rendering + * - Write the data into output file + *------------------------------------------------------------------------------------------*/ + while ( 1 ) { int16_t num_in_channels; diff --git a/apps/renderer.c b/apps/renderer.c index 242b80fbf..9afef1d24 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -714,6 +714,7 @@ static int16_t get_cldfb_in_flag( return cldfb_in_flag; } + static int16_t is_split_pre_rend_mode( CmdlnArgs *args ) { @@ -1470,12 +1471,11 @@ int main( if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { - - IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, - &bitsBuffer.config.codec, - &bitsBuffer.config.poseCorrection, - &bitsBuffer.config.codec_frame_size_ms, - &bitsBuffer.config.isar_frame_size_ms ); + if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, &bitsBuffer.config.isar_frame_size_ms ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_REND_GetSplitRendBitstreamHeader(): %s!\n", ivas_error_to_string( error ) ); + goto cleanup; + } if ( IVAS_REND_GetDelay_fx( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK ) { @@ -1483,16 +1483,7 @@ int main( goto cleanup; } - if ( ( error = split_rend_writer_open( &hSplitRendFileReadWrite, - args.outputFilePath, - delayNumSamples_temp, - delayTimeScale_temp, - bitsBuffer.config.codec, - bitsBuffer.config.poseCorrection, - bitsBuffer.config.codec_frame_size_ms, - bitsBuffer.config.isar_frame_size_ms, - args.sampleRate, - bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) + if ( ( error = split_rend_writer_open( &hSplitRendFileReadWrite, args.outputFilePath, delayNumSamples_temp, delayTimeScale_temp, bitsBuffer.config.codec, bitsBuffer.config.poseCorrection, bitsBuffer.config.codec_frame_size_ms, bitsBuffer.config.isar_frame_size_ms, args.sampleRate, bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nCould not open split rend metadata file %s\n", args.outputFilePath ); goto cleanup; @@ -1503,12 +1494,11 @@ int main( { if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { - - IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, - &bitsBuffer.config.codec, - &bitsBuffer.config.poseCorrection, - &bitsBuffer.config.codec_frame_size_ms, - &bitsBuffer.config.isar_frame_size_ms ); + if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, &bitsBuffer.config.isar_frame_size_ms ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError in IVAS_REND_GetSplitRendBitstreamHeader(): %s!\n", ivas_error_to_string( error ) ); + goto cleanup; + } if ( IVAS_REND_GetDelay_fx( hIvasRend, &delayNumSamples_temp, &delayTimeScale_temp ) != IVAS_ERR_OK ) { @@ -1516,16 +1506,7 @@ int main( goto cleanup; } - if ( ( error = split_rend_writer_open( &hSplitRendFileReadWrite, - args.outMetadataFilePath, - delayNumSamples_temp, - delayTimeScale_temp, - bitsBuffer.config.codec, - bitsBuffer.config.poseCorrection, - bitsBuffer.config.codec_frame_size_ms, - bitsBuffer.config.isar_frame_size_ms, - args.sampleRate, - bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) + if ( ( error = split_rend_writer_open( &hSplitRendFileReadWrite, args.outMetadataFilePath, delayNumSamples_temp, delayTimeScale_temp, bitsBuffer.config.codec, bitsBuffer.config.poseCorrection, bitsBuffer.config.codec_frame_size_ms, bitsBuffer.config.isar_frame_size_ms, args.sampleRate, bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nCould not open split rend metadata file %s\n", args.outMetadataFilePath ); goto cleanup; diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 33013360e..3b99a74e7 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -289,7 +289,7 @@ typedef struct _ISAR_SPLIT_REND_CONFIG 2 - (2dof correction. By default YAW and PITCH correction) 3 - (3dof correction. By default YAW, PITCH and ROLL correction) */ - int16_t codec_delay_ms; /*PLACEHOLDER (currently being ignored) : look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/ + int16_t codec_delay_ms; /* look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/ int16_t isar_frame_size_ms; /* ISAR bit stream frame size in milliseconds */ int16_t codec_frame_size_ms; /* Codec frame size in milliseconds, only relevant with LC3plus */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode; @@ -347,6 +347,7 @@ typedef struct _IVAS_RENDER_CONFIG ISAR_SPLIT_REND_CONFIG_DATA split_rend_config; float directivity[IVAS_MAX_NUM_OBJECTS * 3]; Word16 directivity_fx[IVAS_MAX_NUM_OBJECTS * 3]; // has the following q-factor pattern: {6, 6, 15, 6, 6, 15, 6, 6, 15, 6, 6, 15} + } IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE; typedef struct @@ -354,6 +355,7 @@ typedef struct int16_t numSamplesPerChannel; int16_t numChannels; int16_t is_cldfb; + } IVAS_REND_AudioBufferConfig; typedef struct @@ -363,6 +365,7 @@ typedef struct Word16 *pq_fact; Word32 *data_fx; // Word16 Q_data; + } IVAS_REND_AudioBuffer; #endif /* COMMON_API_TYPES_H */ diff --git a/lib_com/delay_comp_fx.c b/lib_com/delay_comp_fx.c index 7bc574c3c..5d1b43065 100644 --- a/lib_com/delay_comp_fx.c +++ b/lib_com/delay_comp_fx.c @@ -47,13 +47,12 @@ *--------------------------------------------------------------------------*/ /*! r: delay value in ns */ -Word32 get_delay_fx( /* o : delay value in ms */ - const Word16 what_delay, /* i : what delay? (ENC or DEC) Q0*/ - const Word32 io_fs, /* i : input/output sampling frequency Q0*/ - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - HANDLE_CLDFB_FILTER_BANK hCldfb /* i : Handle of Cldfb analysis */ - , - const AUDIO_CONFIG output_config /* i : decoder output config */ +Word32 get_delay_fx( + const Word16 what_delay, /* i : what delay? (ENC or DEC) Q0*/ + const Word32 io_fs, /* i : input/output sampling frequency Q0*/ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ + const Word16 flag_binaural_split_coded /* i : split rendering on/off flag */ ) { Word32 delay; /*Q0*/ @@ -78,6 +77,7 @@ Word32 get_delay_fx( /* o : delay value in ms move32(); } } + test(); if ( EQ_16( ivas_format, SBA_FORMAT ) || EQ_16( ivas_format, SBA_ISM_FORMAT ) ) { @@ -105,8 +105,7 @@ Word32 get_delay_fx( /* o : delay value in ms delay = IVAS_DEC_DELAY_NS; /*Q0*/ move32(); - - IF( NE_16( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) + IF( !flag_binaural_split_coded ) { if ( hCldfb != NULL ) { @@ -114,6 +113,7 @@ Word32 get_delay_fx( /* o : delay value in ms delay = L_add( delay, IVAS_FB_DEC_DELAY_NS ); /*Q0*/ } } + test(); if ( EQ_16( ivas_format, MASA_FORMAT ) || EQ_16( ivas_format, MASA_ISM_FORMAT ) ) { diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 3c8ce9aa0..ea14f048f 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -3733,10 +3733,10 @@ ivas_error ivas_allocate_binaural_hrtf_fx( ); void ivas_binRenderer_fx( - BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ - const MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle*/ - const Word16 numTimeSlots, /* i : number of time slots to render */ + BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ + const MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle*/ + const Word16 numTimeSlots, /* i : number of time slots to render */ Word32 Cldfb_RealBuffer_Binaural_fx[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */ Word32 Cldfb_ImagBuffer_Binaural_fx[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */ Word32 RealBuffer_fx[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 4b9dbc46e..f1f70f662 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -1544,48 +1544,49 @@ void ifft_rel_fx32( const Word16 n, /* Q0 i : vector length */ const Word16 m /* Q0 i : log2 of vector length */ ); -// gs_gains_fx.c -Word16 gsc_gaindec_fx( /* o : average frequency gain */ - Decoder_State *st_fx, /* i/o: decoder state structure */ - Word16 y_gainQ_fx[], /* o : quantized gain per band */ - const Word32 core_brate_fx, /* i : core used */ - Word16 old_y_gain_fx[], /* i/o: AR gain quantizer for low rate */ - const Word16 coder_type, /* i : coding type */ - const Word16 bwidth_fx /* i : i signal bandwidth */ -); -Word16 gsc_gaindec_ivas_fx( /* o : average frequency gain */ - Decoder_State *st_fx, /* i/o: decoder state structure */ - Word16 y_gainQ_fx[], /* o : quantized gain per band */ - const Word32 core_brate_fx, /* i : core used */ - Word16 old_y_gain_fx[], /* i/o: AR gain quantizer for low rate */ - const Word16 coder_type, /* i : coding type */ - const Word16 bwidth_fx /* i : input signal bandwidth */ +// gs_gains_fx.c +/*! r: average frequency gain */ +Word16 gsc_gaindec_fx( + Decoder_State *st_fx, /* i/o: decoder state structure */ + Word16 y_gainQ_fx[], /* o : quantized gain per band */ + const Word32 core_brate_fx, /* i : core used */ + Word16 old_y_gain_fx[], /* i/o: AR gain quantizer for low rate */ + const Word16 coder_type, /* i : coding type */ + const Word16 bwidth_fx /* i : i signal bandwidth */ +); + +/*! r: average frequency gain */ +Word16 gsc_gaindec_ivas_fx( + Decoder_State *st_fx, /* i/o: decoder state structure */ + Word16 y_gainQ_fx[], /* o : quantized gain per band */ + const Word32 core_brate_fx, /* i : core used */ + Word16 old_y_gain_fx[], /* i/o: AR gain quantizer for low rate */ + const Word16 coder_type, /* i : coding type */ + const Word16 bwidth_fx /* i : input signal bandwidth */ ); Word16 gsc_gainQ_fx( - BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */ + BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */ const Word16 y_gain4[], /* i : Energy per band Q13 */ Word16 y_gainQ[], /* o : quantized energy per band Q13 */ const Word32 core_brate, /* i : Core rate */ const Word16 coder_type, /* i : coding type */ - const Word16 bwidth /* i : i signal bandwidth */ + const Word16 bwidth /* i : signal bandwidth */ ); Word16 gsc_gainQ_ivas_fx( - BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ - const Word16 element_mode, /* i : element mode */ - const Word16 idchan, /* i : channel ID */ - const Word16 y_gain4[], - /* i : Energy per band */ // Q12 - Word16 y_gainQ[], - /* o : quantized energy per band */ // Q12 - const Word32 core_brate, /* i : Core rate */ - const Word16 coder_type, /* i : coding type */ - const Word16 bwidth, /* i : input signal bandwidth */ - const Word16 L_frame, /* i : frame length */ - const Word16 tdm_LRTD_flag, /* i : LRTD stereo mode flag */ - const Word32 core_brate_inp /* i : true core bitrate */ + BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ + const Word16 element_mode, /* i : element mode */ + const Word16 idchan, /* i : channel ID */ + const Word16 y_gain4[], /* i : Energy per band Q12 */ + Word16 y_gainQ[], /* o : quantized energy per band Q12 */ + const Word32 core_brate, /* i : Core rate */ + const Word16 coder_type, /* i : coding type */ + const Word16 bwidth, /* i : input signal bandwidth */ + const Word16 L_frame, /* i : frame length */ + const Word16 tdm_LRTD_flag, /* i : LRTD stereo mode flag */ + const Word32 core_brate_inp /* i : true core bitrate */ ); // frame_ener.c @@ -1599,6 +1600,7 @@ void fer_energy_fx( const Word16 offset /* i : speech pointer offset (0 or L_frame) */ ); +/*! r: Frame erergy in Q8 */ Word16 frame_ener_fx( const Word16 L_frame, /* i : length of the frame */ const Word16 clas, /* i : frame classification */ @@ -1611,42 +1613,47 @@ Word16 frame_ener_fx( const Word16 enc /* i : Encoder/decoder */ ); -Word16 frame_energy_fx( /* o : Frame erergy in Q8 */ - Word16 L_frame, - const Word16 *pitch, /* i : pitch values for each subframe Q6 */ - const Word16 *speech, /* i : pointer to speech signal for E computation Q_syn*/ - const Word16 lp_speech, /* i : long term active speech energy average Q8 */ - Word16 *frame_ener, /* o : pitch-synchronous energy at frame end Q8 */ - const Word16 Q_syn /* i : Synthesis scaling */ +/*! r: Frame erergy in Q8 */ +Word16 frame_energy_fx( + Word16 L_frame, + const Word16 *pitch, /* i : pitch values for each subframe Q6 */ + const Word16 *speech, /* i : pointer to speech signal for E computation Q_syn*/ + const Word16 lp_speech, /* i : long term active speech energy average Q8 */ + Word16 *frame_ener, /* o : pitch-synchronous energy at frame end Q8 */ + const Word16 Q_syn /* i : Synthesis scaling */ ); -// delay_comp.c -Word32 get_delay_fx( /* o : delay value in ms */ - const Word16 what_delay, /* i : what delay? (ENC or DEC) */ - const Word32 io_fs, /* i : input/output sampling frequency */ - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - HANDLE_CLDFB_FILTER_BANK hCldfb /* i : Handle of Cldfb analysis */ - , - const AUDIO_CONFIG output_config /* i : decoder output config */ +/*! r: delay value in ms */ +Word32 get_delay_fx( + const Word16 what_delay, /* i : what delay? (ENC or DEC) */ + const Word32 io_fs, /* i : input/output sampling frequency */ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + HANDLE_CLDFB_FILTER_BANK hCldfb, /* i : Handle of Cldfb analysis */ + const Word16 flag_binaural_split_coded /* i : split rendering on/off flag */ ); // deemph.c void Deemph2( Word16 x[], /* i/o: i signal overwritten by the output Qx/Qx-1 */ - const Word16 mu, /* i : deemphasis factor Q15 */ - const Word16 L, /* i : vector size Q0 */ - Word16 *mem /* i/o: memory (y[-1]) Qx-1 */ + const Word16 mu, /* i : deemphasis factor Q15 */ + const Word16 L, /* i : vector size Q0 */ + Word16 *mem /* i/o: memory (y[-1]) Qx-1 */ ); void deemph_fx( - Word16 *signal, /* i/o: signal Qx */ + Word16 *signal, /* i/o: signal Qx */ const Word16 mu, /* i : deemphasis factor Q15 */ const Word16 L, /* i : vector size Q0 */ Word16 *mem /* i/o: memory (y[-1]) Qx */ ); -void E_UTIL_deemph2( Word16 shift, Word16 *x, const Word16 mu, const Word16 L, Word16 *mem ); +void E_UTIL_deemph2( + Word16 shift, + Word16 *x, + const Word16 mu, + const Word16 L, + Word16 *mem ); void deemph_fx_32( Word32 *signal, /* i/o: signal */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 7d623dc8c..412c53770 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -42,9 +42,6 @@ #include "prot_fx.h" #include "wmc_auto.h" #include "ivas_prot_fx.h" -#include "lib_isar_pre_rend.h" -#include "isar_prot.h" -#include "isar_stat.h" /*-------------------------------------------------------------------* @@ -55,207 +52,6 @@ static ivas_error ivas_read_format( Decoder_Struct *st_ivas, Word16 *num_bits_re static ivas_error doSanityChecks_IVAS( Decoder_Struct *st_ivas ); -static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas ); - - -/*-------------------------------------------------------------------* - * ivas_dec_reconfig_split_rend() - * - * IVAS decoder split rend reconfig - *-------------------------------------------------------------------*/ - -static ivas_error ivas_dec_reconfig_split_rend( - Decoder_Struct *st_ivas /* i : IVAS decoder structure */ -) -{ - ivas_error error; - Word16 cldfb_in_flag, num_ch, ch, isCldfbNeeded, i, pcm_out_flag; - SPLIT_REND_WRAPPER *hSplitRendWrapper; - - hSplitRendWrapper = &st_ivas->hSplitBinRend->splitrend; - move16(); - pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; - move16(); - cldfb_in_flag = 0; - move16(); - - IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || - EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || - EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || - EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) - { - cldfb_in_flag = 1; - move16(); - } - - ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &hSplitRendWrapper->multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS ); - - isCldfbNeeded = 0; - move16(); - - IF( ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) && EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) || - ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) ) - { - cldfb_in_flag = 0; - move16(); - } - - IF( NE_16( st_ivas->renderer_type, RENDERER_DISABLE ) ) - { - IF( EQ_16( cldfb_in_flag, 0 ) ) - { - isCldfbNeeded = 1; - move16(); - } - ELSE IF( EQ_16( st_ivas->hRenderConfig->split_rend_config.codec, ISAR_SPLIT_REND_CODEC_LC3PLUS ) && cldfb_in_flag ) - { - isCldfbNeeded = 1; - move16(); - } - ELSE IF( pcm_out_flag && cldfb_in_flag ) - { - isCldfbNeeded = 1; - move16(); - } - } - ELSE IF( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) - { - isCldfbNeeded = 1; - move16(); - } - - IF( EQ_16( isCldfbNeeded, 1 ) && hSplitRendWrapper->hCldfbHandles == NULL ) - { - IF( ( hSplitRendWrapper->hCldfbHandles = (CLDFB_HANDLES_WRAPPER_HANDLE) malloc( sizeof( CLDFB_HANDLES_WRAPPER ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CLDFB handles\n" ) ); - } - - num_ch = i_mult( MAX_HEAD_ROT_POSES, BINAURAL_CHANNELS ); - move16(); - FOR( ch = 0; ch < num_ch; ch++ ) - { - hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL; - move16(); - } - - num_ch = i_mult( hSplitRendWrapper->multiBinPoseData.num_poses, BINAURAL_CHANNELS ); - move16(); - - FOR( ch = 0; ch < num_ch; ch++ ) - { - IF( ( error = openCldfb_ivas_fx( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ), CLDFB_ANALYSIS, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not open CLDFB handles\n" ) ); - } - } - - FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - if ( ( error = openCldfb_ivas_fx( &( hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] ), CLDFB_SYNTHESIS, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) - { - return error; - } - } - } - ELSE IF( EQ_16( isCldfbNeeded, 0 ) && hSplitRendWrapper->hCldfbHandles != NULL ) - { - num_ch = i_mult( MAX_HEAD_ROT_POSES, BINAURAL_CHANNELS ); - move16(); - FOR( ch = 0; ch < num_ch; ch++ ) - { - IF( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] != NULL ) - { - deleteCldfb_ivas_fx( &hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ); - hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL; - move32(); - } - } - - FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) - { - IF( hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] != NULL ) - { - deleteCldfb_ivas_fx( &hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] ); - hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] = NULL; - move32(); - } - } - - free( hSplitRendWrapper->hCldfbHandles ); - hSplitRendWrapper->hCldfbHandles = NULL; - move32(); - } - - IF( ( NE_16( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) ) && - ( NE_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || NE_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) && - !( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) ) /* td-rend not needed? */ - { - FOR( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) - { - IF( st_ivas->hTdRendHandles[i] != NULL ) - { - st_ivas->hTdRendHandles[i]->HrFiltSet_p = NULL; - move32(); - ivas_td_binaural_close_fx( &st_ivas->hTdRendHandles[i] ); - } - } - } - - return IVAS_ERR_OK; -} - - -/*-------------------------------------------------------------------* - * ivas_dec_init_split_rend() - * - * IVAS decoder split rend init - *-------------------------------------------------------------------*/ - -static ivas_error ivas_dec_init_split_rend( - Decoder_Struct *st_ivas /* i : IVAS decoder structure */ -) -{ - ivas_error error; - Word16 cldfb_in_flag, pcm_out_flag; - Word16 mixed_td_cldfb_flag; - - pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; - cldfb_in_flag = 0; - move16(); - - IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || - EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || - EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || - EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) - { - cldfb_in_flag = 1; - move16(); - } - - ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS ); - - IF( EQ_16( cldfb_in_flag, 1 ) && ( EQ_16( st_ivas->hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode, ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) ) - { - IF( ( st_ivas->hSplitBinRend->hCldfbDataOut = (ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE) malloc( sizeof( ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for cldfb data out buffer\n" ) ); - } - } - - mixed_td_cldfb_flag = 0; - move16(); - IF( ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) && EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) || - ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) ) - { - mixed_td_cldfb_flag = 1; - move16(); - } - - error = ISAR_PRE_REND_open( &st_ivas->hSplitBinRend->splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, st_ivas->hDecoderConfig->render_framesize, mixed_td_cldfb_flag ); - move16(); - return error; -} /*-------------------------------------------------------------------* * ivas_dec_setup() @@ -266,7 +62,7 @@ static ivas_error ivas_dec_init_split_rend( ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ UWord16 *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ - Word16 *data /* o : output synthesis signal */ + Word16 *data /* o : output synthesis signal */ ) { Word16 k, idx, num_bits_read; @@ -760,18 +556,6 @@ ivas_error ivas_dec_setup( } } - /*-----------------------------------------------------------------* - * reconfig split rendering as renderer might change after bitrate switching - *-----------------------------------------------------------------*/ - - IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) - { - if ( ( error = ivas_dec_reconfig_split_rend( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } - } - /*----------------------------------------------------------------* * Reset bitstream pointers *----------------------------------------------------------------*/ @@ -1407,19 +1191,6 @@ ivas_error ivas_init_decoder_fx( } } - /*-----------------------------------------------------------------* - * Initialize binuaral split rendering - *-----------------------------------------------------------------*/ - - IF( st_ivas->hSplitBinRend != NULL && ( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) || - ( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && st_ivas->hDecoderConfig->Opt_non_diegetic_pan && EQ_16( st_ivas->hRenderConfig->split_rend_config.dof, 0 ) ) ) ) - { - IF( ( error = ivas_dec_init_split_rend( st_ivas ) ) != IVAS_ERR_OK ) - { - return error; - } - } - /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles *-----------------------------------------------------------------*/ @@ -3077,8 +2848,8 @@ void ivas_destroy_dec_fx( } /* MASA decoder structure */ - ivas_masa_dec_close_fx( &( st_ivas->hMasa ) ); + /* Qmetadata handle */ ivas_qmetadata_close_fx( &st_ivas->hQMetaData ); @@ -3099,6 +2870,7 @@ void ivas_destroy_dec_fx( /* VBAP handle */ vbap_free_data_fx( &( st_ivas->hVBAPdata ) ); + /* Fastconv binaural renderer handle */ ivas_binRenderer_close_fx( &st_ivas->hBinRenderer ); @@ -3135,11 +2907,11 @@ void ivas_destroy_dec_fx( ivas_mono_dmx_renderer_close( &st_ivas->hMonoDmxRenderer ); /* OSBA structure */ - ivas_osba_data_close_fx( &st_ivas->hSbaIsmData ); /* OMASA structure */ ivas_omasa_data_close_fx( &st_ivas->hMasaIsmData ); + /* Head track data handle */ ivas_headTrack_close_fx( &st_ivas->hHeadTrackData ); diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index f3f15daea..167014624 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -2421,7 +2421,7 @@ ivas_error ivas_jbm_dec_render_fx( /* Rendering */ IF( ( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ) && !st_ivas->hDecoderConfig->Opt_Headrotation ) { - /*handled in CLDFB domain already*/ + /* handled in CLDFB domain already */ IF( NE_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && NE_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { ivas_binaural_add_LFE_fx( st_ivas, *nSamplesRendered, p_output_fx, p_output_fx ); @@ -2642,7 +2642,7 @@ ivas_error ivas_jbm_dec_render_fx( nchan_out_syn_output = nchan_out; move16(); - IF( st_ivas->hDecoderConfig->Opt_Limiter ) + if ( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) == 0 ) { IF( NE_32( st_ivas->ivas_format, MONO_FORMAT ) ) { @@ -2929,8 +2929,9 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( *nSamplesRendered = n_samples_to_render; move16(); + /* Only write out the valid data*/ - IF( st_ivas->hDecoderConfig->Opt_Limiter ) + if ( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) == 0 ) { IF( NE_16( st_ivas->ivas_format, MONO_FORMAT ) ) { diff --git a/lib_dec/ivas_output_config_fx.c b/lib_dec/ivas_output_config_fx.c index c5a01180d..93657df00 100644 --- a/lib_dec/ivas_output_config_fx.c +++ b/lib_dec/ivas_output_config_fx.c @@ -141,6 +141,7 @@ void ivas_renderer_select( *internal_config = IVAS_AUDIO_CONFIG_HOA3; move16(); + test(); test(); IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { @@ -163,7 +164,6 @@ void ivas_renderer_select( test(); IF( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) { - nchan_internal = ivas_sba_get_nchan_metadata_fx( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); test(); test(); diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 339d7f034..013a54d15 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -40,7 +40,6 @@ #include "stat_dec.h" #include "ivas_stat_com.h" #include "ivas_stat_rend.h" -#include "isar_stat.h" /*----------------------------------------------------------------------------------* @@ -1055,7 +1054,7 @@ typedef struct decoder_config_structure Word16 Opt_tsm; /* indicates whether time scaling modification is activated */ IVAS_RENDER_FRAMESIZE render_framesize; Word16 Opt_delay_comp; /* flag indicating delay compensation active */ - int16_t Opt_Limiter; + } DECODER_CONFIG, *DECODER_CONFIG_HANDLE; @@ -1147,7 +1146,7 @@ typedef struct Decoder_Struct Word32 *hoa_dec_mtx; /* Pointer to decoder matrix for SBA */ HEAD_TRACK_DATA_HANDLE hHeadTrackData; /* Head tracking data structure */ RENDER_CONFIG_DATA *hRenderConfig; /* Renderer config pointer */ - Word32 binaural_latency_ns; /* Binauralization latency in ns */ + Word32 binaural_latency_ns; /* Binauralization latency in ns */ EXTERNAL_ORIENTATION_HANDLE hExtOrientationData; /* External orientation data structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData; /* Combined external and head orientation data structure */ DIRAC_REND_HANDLE hDirACRend; /* DirAC renderer handle */ @@ -1158,7 +1157,7 @@ typedef struct Decoder_Struct Word16 flag_omasa_brate; ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE hSplitBinRend; /* ISAR split binaural rendering handle */ - BINAURAL_TD_OBJECT_RENDERER_HANDLE hTdRendHandles[MAX_HEAD_ROT_POSES - 1]; + BINAURAL_TD_OBJECT_RENDERER_HANDLE hTdRendHandles[MAX_HEAD_ROT_POSES - 1]; /* TD object renderer handles */ /* JBM module */ DECODER_TC_BUFFER_HANDLE hTcBuffer; /* JBM structure */ @@ -1169,9 +1168,10 @@ typedef struct Decoder_Struct Word16 ism_extmeta_cnt; /* Change frame counter for extended metadata */ Word32 **mem_hp20_out_fx; Word32 *p_output_fx[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; /* Word32-output audio buffers */ - Word16 p_out_len;/*Stores the total no of channels for which memory is allocated to p_output_fx*/ + Word16 p_out_len; /*Stores the total no of channels for which memory is allocated to p_output_fx*/ Word16 num_src; Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; + } Decoder_Struct; /* clang-format on */ diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 3a6ea5b45..e4901c6ed 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -96,32 +96,32 @@ 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) */ + 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) */ ); /*! r: error code */ ivas_error IVAS_DEC_Configure( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const UWord32 sampleRate, /* i : output sampling frequency */ - const IVAS_AUDIO_CONFIG outputConfig, /* i : audio configuration */ - const Word16 tsmEnabled, /* i : enable TSM */ - const IVAS_RENDER_FRAMESIZE renderFramesize, /* i : rendering frame size */ - const Word16 customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ - const Word16 hrtfReaderEnabled, /* i : enable HRTF binary file input */ - const Word16 enableHeadRotation, /* i : enable head rotation for binaural output */ - const Word16 enableExternalOrientation, /* i : enable external orientations */ - const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ - const Word16 renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ - const Word16 Opt_non_diegetic_pan, /* i : diegetic or not */ - const Word16 non_diegetic_pan_gain_fx, /* i : non diegetic panning gain Q15 */ - const Word16 Opt_dpid_on, /* i : enable directivity pattern option */ - const UWord16 acousticEnvironmentId, /* i : Acoustic environment ID */ - const Word16 delayCompensationEnabled /* i : enable delay compensation */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const UWord32 sampleRate, /* i : output sampling frequency */ + const IVAS_AUDIO_CONFIG outputConfig, /* i : audio configuration */ + const Word16 tsmEnabled, /* i : enable TSM */ + const IVAS_RENDER_FRAMESIZE renderFramesize, /* i : rendering frame size */ + const Word16 customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */ + const Word16 hrtfReaderEnabled, /* i : enable HRTF binary file input */ + const Word16 enableHeadRotation, /* i : enable head rotation for binaural output */ + const Word16 enableExternalOrientation, /* i : enable external orientations */ + const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ + const Word16 renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ + const Word16 Opt_non_diegetic_pan, /* i : diegetic or not */ + const Word16 non_diegetic_pan_gain_fx, /* i : non diegetic panning gain Q15 */ + const Word16 Opt_dpid_on, /* i : enable directivity pattern option */ + const UWord16 acousticEnvironmentId, /* i : Acoustic environment ID */ + const Word16 delayCompensationEnabled /* i : enable delay compensation */ ); void IVAS_DEC_Close( - IVAS_DEC_HANDLE *phIvasDec /* i/o: pointer to IVAS decoder handle */ + IVAS_DEC_HANDLE *phIvasDec /* i/o: pointer to IVAS decoder handle */ ); @@ -129,132 +129,134 @@ void IVAS_DEC_Close( /*! r: error code */ ivas_error IVAS_DEC_FeedFrame_Serial( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - UWord16 *serial, /* i : buffer containing serial input bitstream. Each bit should be stored as a single UWord16 value */ - const UWord16 num_bits, /* i : number of bits in input bitstream */ - Word16 bfi /* i : bad frame indicator flag */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + UWord16 *serial, /* i : buffer containing serial input bitstream. Each bit should be stored as a single UWord16 value */ + const UWord16 num_bits, /* i : number of bits in input bitstream */ + Word16 bfi /* i : bad frame indicator flag */ ); /*! r: decoder error code */ ivas_error IVAS_DEC_GetSamples( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const Word16 nSamplesAsked, /* i : number of samples wanted by the caller */ - Word16 *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 Q0 */ - Word16 *nOutSamples, /* o : number of samples per channel written to output buffer */ - bool *needNewFrame /* o : indication that the decoder needs a new frame */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const Word16 nSamplesAsked, /* i : number of samples wanted by the caller */ + Word16 *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 Q0 */ + Word16 *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* o : indication that the decoder needs a new frame */ ); ivas_error IVAS_DEC_GetSplitBinauralBitstream( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - Word16 *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ - ISAR_SPLIT_REND_BITS_DATA *splitRendBits, /* o : output split rendering bits */ - Word16 *nOutSamples, /* o : number of samples per channel written to output buffer */ - bool *needNewFrame /* o : indication that the decoder needs a new frame */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word16 *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ + ISAR_SPLIT_REND_BITS_DATA *splitRendBits, /* o : output split rendering bits */ + Word16 *nOutSamples, /* o : number of samples per channel written to output buffer */ + bool *needNewFrame /* o : indication that the decoder needs a new frame */ ); /*! r: decoder error code */ ivas_error IVAS_DEC_GetSplitRendBitstreamHeader( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - ISAR_SPLIT_REND_CODEC *pCodec, /* o: pointer to codec setting */ - ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o: pointer to pose correction mode */ - Word16 *pIsar_frame_size_ms, /* o: pointer to isar frame size setting */ - Word16 *pCodec_frame_size_ms /* o: pointer to codec frame size setting */ - , - Word16 *pLc3plusHighRes /* o: pointer to LC3plus High-Res setting */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ + ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ + Word16 *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ + Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ + Word16 *pLc3plusHighRes /* o : pointer to LC3plus High-Res setting */ ); /*! r: decoder error code */ ivas_error IVAS_DEC_GetCldfbSamples( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - Word32 *out_real, /* o : buffer for decoded PCM real output in CLDFB domain */ - Word32 *out_imag, /* o : buffer for decoded PCM imag output in CLDFB domain */ - IVAS_AUDIO_CONFIG *audio_config, /* o : audio configuration */ - Word16 *nOutSamples /* o : number of samples per channel written to output buffer */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word32 *out_real, /* o : buffer for decoded PCM real output in CLDFB domain */ + Word32 *out_imag, /* o : buffer for decoded PCM imag output in CLDFB domain */ + IVAS_AUDIO_CONFIG *audio_config, /* o : audio configuration */ + Word16 *nOutSamples /* o : number of samples per channel written to output buffer */ ); int16_t IVAS_DEC_is_split_rendering_enabled( - IVAS_DEC_HANDLE hIvasDec /* i: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ + int16_t *isSplitRend /* o : flag to indicate if split rendering is enabled */ ); + int16_t IVAS_DEC_is_split_rendering_coded_out( - IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + int16_t *isSplitCoded /* o : flag to indicate if split rendering is enabled */ ); /*! r: error code */ ivas_error IVAS_DEC_GetObjectMetadata( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_ISM_METADATA *metadata, /* o : struct where metadata decoded in most recently decoded frame will be written */ - const UWord16 zero_flag, /* i : if this flag is enabled, this function outputs a zero-initialized metadata struct */ - const UWord16 objectIdx /* i : index of the queried object */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_ISM_METADATA *metadata, /* o : struct where metadata decoded in most recently decoded frame will be written */ + const UWord16 zero_flag, /* i : if this flag is enabled, this function outputs a zero-initialized metadata struct */ + const UWord16 objectIdx /* i : index of the queried object */ ); /*! r: error code */ ivas_error IVAS_DEC_GetMasaMetadata( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_MASA_DECODER_EXT_OUT_META_HANDLE *hMasaExtOutMeta, /* o : pointer to handle, which will be set to point to metadata from the most recently decoded frame */ - const UWord8 getFromJbmBuffer /* i : get metadata from a JBM buffer */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_MASA_DECODER_EXT_OUT_META_HANDLE *hMasaExtOutMeta, /* o : pointer to handle, which will be set to point to metadata from the most recently decoded frame */ + const UWord8 getFromJbmBuffer /* i : get metadata from a JBM buffer */ ); /*! r: error code */ ivas_error IVAS_DEC_FeedHeadTrackData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ - IVAS_VECTOR3 Pos, /* i : listener position */ - const Word16 subframe_idx, /* i : subframe index */ - const ISAR_SPLIT_REND_ROT_AXIS rot_axis /* i : external control for rotation axis for split rendering */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */ + IVAS_VECTOR3 Pos, /* i : listener position */ + const Word16 subframe_idx, /* i : subframe index */ + const ISAR_SPLIT_REND_ROT_AXIS rot_axis /* i : external control for rotation axis for split rendering */ ); /*! r: error code */ ivas_error IVAS_DEC_FeedRefRotData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION rotation /* i : reference rotation data */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_QUATERNION rotation /* i : reference rotation data */ ); /*! r: error code */ ivas_error IVAS_DEC_FeedRefVectorData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_VECTOR3 listenerPos, /* i : Listener position */ - IVAS_VECTOR3 refPos /* i : Reference position */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_VECTOR3 listenerPos, /* i : Listener position */ + IVAS_VECTOR3 refPos /* i : Reference position */ ); /*! r: error code */ ivas_error IVAS_DEC_FeedExternalOrientationData( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_QUATERNION orientation, /* i : external orientation data */ - Word8 enableHeadRotation, /* i : flag to enable head rotation for this frame */ - Word8 enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - Word8 enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - Word16 numFramesToTargetOrientation, /* i : number of frames until target orientation is reached */ - const Word16 subframe_idx /* i : subframe index */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_QUATERNION orientation, /* i : external orientation data */ + Word8 enableHeadRotation, /* i : flag to enable head rotation for this frame */ + Word8 enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + Word8 enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + Word16 numFramesToTargetOrientation, /* i : number of frames until target orientation is reached */ + const Word16 subframe_idx /* i : subframe index */ ); /*! r: error code */ ivas_error IVAS_DEC_VoIP_FeedFrame( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - UWord8 *au, /* i : buffer containing input access unit */ - const UWord16 auSize, /* i : size of the access unit */ - const UWord16 rtpSequenceNumber, /* i : RTP sequence number (16 bits) */ - const UWord32 rtpTimeStamp, /* i : RTP timestamp (32 bits) */ - const UWord32 rcvTime_ms, /* i : receive time of the RTP packet in milliseconds */ - const bool qBit /* i : Q bit for AMR-WB IO */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + UWord8 *au, /* i : buffer containing input access unit */ + const UWord16 auSize, /* i : size of the access unit */ + const UWord16 rtpSequenceNumber, /* i : RTP sequence number (16 bits) */ + const UWord32 rtpTimeStamp, /* i : RTP timestamp (32 bits) */ + const UWord32 rcvTime_ms, /* i : receive time of the RTP packet in milliseconds */ + const bool qBit /* i : Q bit for AMR-WB IO */ ); ivas_error IVAS_DEC_VoIP_SetScale( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const Word16 maxScaling, /* i : maximum allowed TSM scale */ - const Word16 scale /* i : TSM scale to set */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const Word16 maxScaling, /* i : maximum allowed TSM scale */ + const Word16 scale /* i : TSM scale to set */ ); ivas_error IVAS_DEC_TSM_SetQuality( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const Word16 quality /* i : target TSM quality Q14 */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const Word16 quality /* i : target TSM quality Q14 */ ); /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSamples( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - UWord16 nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - Word16 *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 Q0 */ - const UWord32 systemTimestamp_ms /* i : current system timestamp */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + UWord16 nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + Word16 *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 Q0 */ + const UWord32 systemTimestamp_ms /* i : current system timestamp */ #ifdef SUPPORT_JBM_TRACEFILE , JbmTraceFileWriterFn jbmWriterFn, void* jbmWriter @@ -262,54 +264,54 @@ ivas_error IVAS_DEC_VoIP_GetSamples( ); ivas_error IVAS_DEC_Flush( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const Word16 nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - Word16 *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 Q0 */ - Word16 *nSamplesFlushed /* o : number of samples flushed */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const Word16 nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + Word16 *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 Q0 */ + Word16 *nSamplesFlushed /* o : number of samples flushed */ ); /* Setter functions - apply changes to decoder configuration */ /*! r: error code */ ivas_error IVAS_DEC_EnableVoIP( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const Word16 jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ - const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const Word16 jbmSafetyMargin, /* i : allowed delay reserve for JBM, in milliseconds */ + const IVAS_DEC_INPUT_FORMAT inputFormat /* i : format of the input bitstream */ ); /*! r: error code */ ivas_error IVAS_DEC_EnableSplitRendering( - IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ ); ivas_error IVAS_DEC_SetRenderFramesize( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const IVAS_RENDER_FRAMESIZE render_framesize /* i : render framesize */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + const IVAS_RENDER_FRAMESIZE render_framesize /* i : render framesize */ ); ivas_error IVAS_DEC_GetRenderFramesize( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_RENDER_FRAMESIZE *render_framesize /* o : render framesize */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_RENDER_FRAMESIZE *render_framesize /* o : render framesize */ ); ivas_error IVAS_DEC_GetRenderFramesizeSamples( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - Word16 *render_framesize /* o : render framesize in samples Q0 */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word16 *render_framesize /* o : render framesize in samples Q0 */ ); ivas_error IVAS_DEC_GetReferencesUpdateFrequency( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - Word16 *update_frequency /* o : update frequency Q0 */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word16 *update_frequency /* o : update frequency Q0 */ ); ivas_error IVAS_DEC_GetNumOrientationSubframes( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - Word16 *num_subframes /* o : render framesize */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word16 *num_subframes /* o : render framesize */ ); ivas_error IVAS_DEC_GetRenderFramesizeMs( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - UWord32 *render_framesize /* o : render framesize in samples Q0 */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + UWord32 *render_framesize /* o : render framesize in samples Q0 */ ); @@ -317,26 +319,26 @@ ivas_error IVAS_DEC_GetRenderFramesizeMs( /*! r: error code */ ivas_error IVAS_DEC_GetNumObjects( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - UWord16 *numObjects /* o : number of objects for which the decoder has been configured */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + UWord16 *numObjects /* o : number of objects for which the decoder has been configured */ ); /*! r: error code */ ivas_error IVAS_DEC_GetFormat( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - IVAS_DEC_BS_FORMAT *format /* o : format detected from bitstream fed to the decoder */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + IVAS_DEC_BS_FORMAT *format /* o : format detected from bitstream fed to the decoder */ ); /*! r: error code */ ivas_error IVAS_DEC_GetOutputBufferSize( - const IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ - Word16 *outputBufferSize /* o : total number of samples expected in the output buffer for current decoder configuration */ + const IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ + Word16 *outputBufferSize /* o : total number of samples expected in the output buffer for current decoder configuration*/ ); /*! r: error code */ ivas_error IVAS_DEC_GetNumOutputChannels( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - Word16 *numOutputChannels /* o : number of PCM output channels */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word16 *numOutputChannels /* o : number of PCM output channels */ ); /*! r: error code */ diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 98bbfd3d5..244692ae4 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -40,7 +40,6 @@ #include "isar_prot.h" #include "lib_isar_pre_rend.h" #include "ivas_prot_fx.h" - #include "jbm_jb4sb.h" #include "jbm_pcmdsp_apa.h" #include "jbm_pcmdsp_fifo.h" @@ -53,6 +52,7 @@ /*---------------------------------------------------------------------* * Local structs *---------------------------------------------------------------------*/ + struct IVAS_DEC_VOIP { UWord16 nSamplesFrame; /* Total number of samples in a frame (includes number of channels) */ @@ -124,9 +124,12 @@ static Word16 get_render_frame_size_ms( IVAS_RENDER_FRAMESIZE render_framesize ) static void update_voip_rendered20ms( IVAS_DEC_HANDLE hIvasDec, const Word16 nSamplesRendered ); #endif static ivas_error isar_set_split_rend_setup( ISAR_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, const ISAR_SPLIT_REND_CONFIG_DATA *hSplitBinConfig, const COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, ISAR_SPLIT_REND_BITS_DATA *splitRendBits ); +static ivas_error ivas_dec_reconfig_split_rend( Decoder_Struct *st_ivas ); +static ivas_error ivas_dec_init_split_rend( Decoder_Struct *st_ivas ); static ivas_error ivas_create_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend_out ); static void ivas_destroy_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend_out ); + /*---------------------------------------------------------------------* * IVAS_DEC_Open() * @@ -299,7 +302,7 @@ static ivas_error isar_set_split_rend_setup( ISAR_DEC_SPLIT_REND_WRAPPER *hSplitBinRend, const ISAR_SPLIT_REND_CONFIG_DATA *hSplitBinConfig, const COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, - ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ + ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ ) { splitRendBits->bits_read = 0; @@ -347,8 +350,6 @@ static void init_decoder_config( hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain_fx = 0; // Q15 hDecoderConfig->Opt_tsm = 0; - hDecoderConfig->Opt_Limiter = 1; - move16(); hDecoderConfig->Opt_delay_comp = 0; hDecoderConfig->Opt_ExternalOrientation = 0; hDecoderConfig->Opt_dpid_on = 0; @@ -368,6 +369,7 @@ static void init_decoder_config( move16(); move16(); move16(); + return; } @@ -632,15 +634,10 @@ ivas_error IVAS_DEC_Configure( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_EnableSplitRendering( - IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ ) { DECODER_CONFIG_HANDLE hDecoderConfig; - ivas_error error; - - error = IVAS_ERR_OK; - move32(); - IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { @@ -655,12 +652,10 @@ ivas_error IVAS_DEC_EnableSplitRendering( hDecoderConfig->render_framesize = IVAS_RENDER_FRAMESIZE_20MS; move32(); - hDecoderConfig->Opt_Limiter = 0; - move16(); - - return error; + return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * get_render_framesize_ms( ) * @@ -1317,8 +1312,7 @@ return IVAS_ERR_OK; * *---------------------------------------------------------------------*/ -ivas_error -IVAS_DEC_GetSplitBinauralBitstream( +ivas_error IVAS_DEC_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ Word16 *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */ ISAR_SPLIT_REND_BITS_DATA *splitRendBits, /* o : output split rendering bits */ @@ -1332,6 +1326,7 @@ IVAS_DEC_GetSplitBinauralBitstream( Word32 *pOutput[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES]; Word32 Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; + FOR( Word32 i = 0; i < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; i++ ) { FOR( Word32 j = 0; j < CLDFB_NO_COL_MAX; j++ ) @@ -1345,6 +1340,7 @@ IVAS_DEC_GetSplitBinauralBitstream( } } } + Word16 numSamplesPerChannelToDecode; Word16 i, j; ivas_error error; @@ -1370,6 +1366,7 @@ IVAS_DEC_GetSplitBinauralBitstream( { return error; } + FOR( i = 0; i < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; i++ ) { FOR( j = 0; j < CLDFB_NO_COL_MAX; j++ ) @@ -1393,7 +1390,7 @@ IVAS_DEC_GetSplitBinauralBitstream( move16(); } - IF( EQ_16( IVAS_DEC_is_split_rendering_enabled( hIvasDec ), 0 ) ) + IF( EQ_16( IVAS_DEC_is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ), 0 ) ) { return IVAS_ERR_WRONG_PARAMS; } @@ -1415,14 +1412,12 @@ IVAS_DEC_GetSplitBinauralBitstream( } } - /* Decode and render */ - if ( ( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannelToDecode, pcmBuf_out, nOutSamples, needNewFrame ) ) != IVAS_ERR_OK ) + IF( ( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannelToDecode, pcmBuf_out, nOutSamples, needNewFrame ) ) != IVAS_ERR_OK ) { return error; } - FOR( i = 0; i < BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES; ++i ) { pOutput[i] = hSplitBinRend->hMultiBinCldfbData->output_fx[i]; @@ -1527,22 +1522,20 @@ IVAS_DEC_GetSplitBinauralBitstream( Q_out[1] = Q_out[0]; } - if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hSplitBinRend->splitrend, - Quaternion, - st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, - st_ivas->hRenderConfig->split_rend_config.codec, - st_ivas->hRenderConfig->split_rend_config.isar_frame_size_ms, - st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, - splitRendBits, - Cldfb_RealBuffer_Binaural, - Cldfb_ImagBuffer_Binaural, - max_band, pOutput, 1, !td_input, pcm_out_flag, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) - + IF( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hSplitBinRend->splitrend, + Quaternion, + st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, + st_ivas->hRenderConfig->split_rend_config.codec, + st_ivas->hRenderConfig->split_rend_config.isar_frame_size_ms, + st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, + splitRendBits, + Cldfb_RealBuffer_Binaural, + Cldfb_ImagBuffer_Binaural, + max_band, pOutput, 1, !td_input, pcm_out_flag, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) { return error; } - /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ IF( pcm_out_flag ) { @@ -1566,7 +1559,7 @@ IVAS_DEC_GetSplitBinauralBitstream( free( st_ivas->hSplitBinRend->hMultiBinCldfbData ); - return error; + return IVAS_ERR_OK; } @@ -1742,6 +1735,30 @@ static ivas_error IVAS_DEC_Setup( move16(); move16(); move16(); + + /*-----------------------------------------------------------------* + * ISAR: + * - initialize ISAR handle at the first frame + * - reconfigure the ISAR handle in case of bitrate switching (renderer might change) + *-----------------------------------------------------------------*/ + + test(); + IF( st_ivas->ini_frame == 0 && ( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) ) ) + { + IF( ( error = ivas_dec_init_split_rend( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } + + test(); + IF( EQ_16( (Word16) st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( (Word16) st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) + { + IF( ( error = ivas_dec_reconfig_split_rend( st_ivas ) ) != IVAS_ERR_OK ) + { + return error; + } + } } return IVAS_ERR_OK; @@ -1922,7 +1939,7 @@ static ivas_error IVAS_DEC_GetRenderedSamples( const UWord16 nSamplesForRendering, /* i : number of TC samples wanted from the renderer */ UWord16 *nSamplesRendered, /* o : number of samples rendered */ UWord16 *nSamplesAvailableNext, /* o : number of samples still available in the renerer pipeline */ - Word16 *pcmBuf // Q0 + Word16 *pcmBuf /* o : output synthesis signal Q0 */ ) { Decoder_Struct *st_ivas; @@ -2704,26 +2721,7 @@ static ivas_error copyRendererConfigStruct( Copy32( hRCin->roomAcoustics.pAcoustic_dsr_fx, hRCout->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX ); // Q30 Copy( hRCin->directivity_fx, hRCout->directivity_fx, 3 * MAX_NUM_OBJECTS ); - hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; - hRCout->split_rend_config.dof = 3; - hRCout->split_rend_config.hq_mode = 0; - hRCout->split_rend_config.codec_delay_ms = 0; - hRCout->split_rend_config.isar_frame_size_ms = 20; - move16(); - hRCout->split_rend_config.codec_frame_size_ms = 0; /* 0 means "use default for selected codec" */ - hRCout->split_rend_config.codec = ISAR_SPLIT_REND_CODEC_DEFAULT; - hRCout->split_rend_config.poseCorrectionMode = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; - hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; - hRCout->split_rend_config.lc3plus_highres = hRCin->split_rend_config.lc3plus_highres; - move16(); - move32(); - move16(); - move16(); - move16(); - move16(); - move32(); - move32(); - move32(); + hRCout->split_rend_config = hRCin->split_rend_config; hRCout->roomAcoustics.use_er = hRCin->roomAcoustics.use_er; hRCout->roomAcoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity; @@ -2895,7 +2893,7 @@ ivas_error IVAS_DEC_GetDelay( } move32(); #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT - nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], hDecoderConfig->output_config ) ); + nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], EQ_16( (Word16) hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); move16(); #else nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], hDecoderConfig->output_config ) ); @@ -3003,7 +3001,10 @@ static bool isSidFrame( return false; } -static void bsCompactToSerial( const UWord8 *compact, UWord16 *serial, UWord16 num_bits ) +static void bsCompactToSerial( + const UWord8 *compact, + UWord16 *serial, + UWord16 num_bits ) { /* Bitstream conversion is not counted towards complexity and memory usage */ #define WMC_TOOL_SKIP @@ -4203,14 +4204,12 @@ static ivas_error IVAS_DEC_VoIP_reconfigure( * *---------------------------------------------------------------------*/ -ivas_error -IVAS_DEC_GetSplitRendBitstreamHeader( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - ISAR_SPLIT_REND_CODEC *pCodec, /* o: pointer to codec setting */ - ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o: pointer to pose correction mode */ - Word16 *pIsar_frame_size_ms, /* o: pointer to isar frame size setting */ - Word16 *pCodec_frame_size_ms /* o: pointer to codec frame size setting */ - , +ivas_error IVAS_DEC_GetSplitRendBitstreamHeader( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ + ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ + Word16 *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ + Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ Word16 *pLc3plusHighRes ) { if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) @@ -4223,6 +4222,7 @@ IVAS_DEC_GetSplitRendBitstreamHeader( *poseCorrection = hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode; *pIsar_frame_size_ms = hIvasDec->st_ivas->hRenderConfig->split_rend_config.isar_frame_size_ms; *pLc3plusHighRes = hIvasDec->st_ivas->hRenderConfig->split_rend_config.lc3plus_highres; + return IVAS_ERR_OK; } @@ -4349,26 +4349,223 @@ static void ivas_destroy_handle_isar( *---------------------------------------------------------------------*/ int16_t IVAS_DEC_is_split_rendering_enabled( - IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + Word16 *isSplitRend /* o : flag to indicate if split rendering is enabled */ ) { Decoder_Struct *st_ivas; - Word16 isSplitRend; IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + st_ivas = hIvasDec->st_ivas; - isSplitRend = 0; - IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || - ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->Opt_non_diegetic_pan && st_ivas->hRenderConfig->split_rend_config.dof == 0 ) ) + *isSplitRend = is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ); + + return IVAS_ERR_OK; +} + + +/*-------------------------------------------------------------------* + * ivas_dec_reconfig_split_rend() + * + * IVAS decoder split rend reconfig + *-------------------------------------------------------------------*/ + +static ivas_error ivas_dec_reconfig_split_rend( + Decoder_Struct *st_ivas /* i : IVAS decoder structure */ +) +{ + ivas_error error; + Word16 cldfb_in_flag, num_ch, ch, isCldfbNeeded, i, pcm_out_flag; + SPLIT_REND_WRAPPER *hSplitRendWrapper; + + hSplitRendWrapper = &st_ivas->hSplitBinRend->splitrend; + move16(); + pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + move16(); + cldfb_in_flag = 0; + move16(); + + IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || + EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || + EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || + EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + cldfb_in_flag = 1; + move16(); + } + + ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &hSplitRendWrapper->multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS ); + + isCldfbNeeded = 0; + move16(); + + IF( ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) && EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) || + ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) ) + { + cldfb_in_flag = 0; + move16(); + } + + IF( NE_16( st_ivas->renderer_type, RENDERER_DISABLE ) ) + { + IF( EQ_16( cldfb_in_flag, 0 ) ) + { + isCldfbNeeded = 1; + move16(); + } + ELSE IF( EQ_16( st_ivas->hRenderConfig->split_rend_config.codec, ISAR_SPLIT_REND_CODEC_LC3PLUS ) && cldfb_in_flag ) + { + isCldfbNeeded = 1; + move16(); + } + ELSE IF( pcm_out_flag && cldfb_in_flag ) + { + isCldfbNeeded = 1; + move16(); + } + } + ELSE IF( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) + { + isCldfbNeeded = 1; + move16(); + } + + IF( EQ_16( isCldfbNeeded, 1 ) && hSplitRendWrapper->hCldfbHandles == NULL ) { - isSplitRend = 1; + IF( ( hSplitRendWrapper->hCldfbHandles = (CLDFB_HANDLES_WRAPPER_HANDLE) malloc( sizeof( CLDFB_HANDLES_WRAPPER ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for CLDFB handles\n" ) ); + } + + num_ch = i_mult( MAX_HEAD_ROT_POSES, BINAURAL_CHANNELS ); + move16(); + FOR( ch = 0; ch < num_ch; ch++ ) + { + hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL; + move16(); + } + + num_ch = i_mult( hSplitRendWrapper->multiBinPoseData.num_poses, BINAURAL_CHANNELS ); + move16(); + + FOR( ch = 0; ch < num_ch; ch++ ) + { + IF( ( error = openCldfb_ivas_fx( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ), CLDFB_ANALYSIS, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not open CLDFB handles\n" ) ); + } + } + + FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + if ( ( error = openCldfb_ivas_fx( &( hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] ), CLDFB_SYNTHESIS, st_ivas->hDecoderConfig->output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) + { + return error; + } + } + } + ELSE IF( EQ_16( isCldfbNeeded, 0 ) && hSplitRendWrapper->hCldfbHandles != NULL ) + { + num_ch = i_mult( MAX_HEAD_ROT_POSES, BINAURAL_CHANNELS ); + move16(); + FOR( ch = 0; ch < num_ch; ch++ ) + { + IF( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] != NULL ) + { + deleteCldfb_ivas_fx( &hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ); + hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] = NULL; + move32(); + } + } + + FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) + { + IF( hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] != NULL ) + { + deleteCldfb_ivas_fx( &hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] ); + hSplitRendWrapper->hCldfbHandles->cldfbSyn[ch] = NULL; + move32(); + } + } + + free( hSplitRendWrapper->hCldfbHandles ); + hSplitRendWrapper->hCldfbHandles = NULL; + move32(); } - return isSplitRend; + IF( ( NE_16( st_ivas->renderer_type, RENDERER_BINAURAL_OBJECTS_TD ) ) && + ( NE_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || NE_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) && + !( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) ) /* td-rend not needed? */ + { + FOR( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) + { + IF( st_ivas->hTdRendHandles[i] != NULL ) + { + st_ivas->hTdRendHandles[i]->HrFiltSet_p = NULL; + move32(); + ivas_td_binaural_close_fx( &st_ivas->hTdRendHandles[i] ); + } + } + } + + return IVAS_ERR_OK; +} + + +/*-------------------------------------------------------------------* + * ivas_dec_init_split_rend() + * + * IVAS decoder split rendering initialization + *-------------------------------------------------------------------*/ + +static ivas_error ivas_dec_init_split_rend( + Decoder_Struct *st_ivas /* i : IVAS decoder structure */ +) +{ + ivas_error error; + Word16 cldfb_in_flag, pcm_out_flag; + Word16 mixed_td_cldfb_flag; + + pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; + cldfb_in_flag = 0; + move16(); + + IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || + EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) || + EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || + EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) + { + cldfb_in_flag = 1; + move16(); + } + + ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS ); + + IF( EQ_16( cldfb_in_flag, 1 ) && ( EQ_16( st_ivas->hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode, ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) ) + { + IF( ( st_ivas->hSplitBinRend->hCldfbDataOut = (ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE) malloc( sizeof( ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA ) ) ) == NULL ) + { + return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for cldfb data out buffer\n" ) ); + } + } + + mixed_td_cldfb_flag = 0; + move16(); + IF( ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) && EQ_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) || + ( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) && EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) ) ) + { + mixed_td_cldfb_flag = 1; + move16(); + } + + error = ISAR_PRE_REND_open( &st_ivas->hSplitBinRend->splitrend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hDecoderConfig->output_Fs, cldfb_in_flag, pcm_out_flag, st_ivas->hDecoderConfig->render_framesize, mixed_td_cldfb_flag ); + move16(); + + return error; } @@ -4379,24 +4576,30 @@ int16_t IVAS_DEC_is_split_rendering_enabled( *---------------------------------------------------------------------*/ Word16 IVAS_DEC_is_split_rendering_coded_out( - IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + int16_t *isSplitCoded /* o : flag to indicate if split rendering is enabled */ ) { Decoder_Struct *st_ivas; - Word16 isSplitCoded; IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + st_ivas = hIvasDec->st_ivas; - isSplitCoded = 0; + *isSplitCoded = 0; + move16(); - IF( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || - ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->Opt_non_diegetic_pan && st_ivas->hRenderConfig->split_rend_config.dof == 0 ) ) + test(); + test(); + test(); + IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || + ( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && st_ivas->hDecoderConfig->Opt_non_diegetic_pan && st_ivas->hRenderConfig->split_rend_config.dof == 0 ) ) { - isSplitCoded = 1; + *isSplitCoded = 1; + move16(); } - return isSplitCoded; + return IVAS_ERR_OK; } diff --git a/lib_enc/lib_enc_fx.c b/lib_enc/lib_enc_fx.c index dece7ba26..295608d6f 100644 --- a/lib_enc/lib_enc_fx.c +++ b/lib_enc/lib_enc_fx.c @@ -1191,7 +1191,7 @@ ivas_error IVAS_ENC_GetDelay( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - *delay = NS2SA_FX2( hEncoderConfig->input_Fs, get_delay_fx( ENC, hEncoderConfig->input_Fs, hEncoderConfig->ivas_format, NULL, IVAS_AUDIO_CONFIG_INVALID ) ); + *delay = NS2SA_FX2( hEncoderConfig->input_Fs, get_delay_fx( ENC, hEncoderConfig->input_Fs, hEncoderConfig->ivas_format, NULL, 0 ) ); move16(); *delay = imult1616( *delay, hEncoderConfig->nchan_inp ); /*Q0*/ diff --git a/lib_isar/isar_MSPred.c b/lib_isar/isar_MSPred.c index 040fcc3a9..86088be8e 100644 --- a/lib_isar/isar_MSPred.c +++ b/lib_isar/isar_MSPred.c @@ -73,51 +73,7 @@ Word32 quantPhase_fx( return phaseQ; } -int32_t quantPhase( - float phase ) -{ - int32_t phaseQ; - - phaseQ = _round( phase * PHASE_QUANT_FACTOR ); - if ( phaseQ == PHASE_MAX_VAL ) - { - phaseQ = PHASE_MIN_VAL; - } - return phaseQ; -} - -/*-------------------------------------------------------------------* - * Function cplxmult() - * - * - *-------------------------------------------------------------------*/ -void cplxmult_fx( - Word32 *pr1, - Word32 *pi1, - Word32 r2, - Word32 i2 ) -{ - Word32 r1 = *pr1, i1 = *pi1; - - *pr1 = L_sub( Mpy_32_32( r1, r2 ), Mpy_32_32( i1, i2 ) ); - *pi1 = L_add( Mpy_32_32( r1, i2 ), Mpy_32_32( i1, r2 ) ); - - return; -} -void cplxmult( - float *pr1, - float *pi1, - float r2, - float i2 ) -{ - float r1 = *pr1, i1 = *pi1; - - *pr1 = r1 * r2 - i1 * i2; - *pi1 = r1 * i2 + i1 * r2; - - return; -} /*-------------------------------------------------------------------* * Function requantPhase() * @@ -167,28 +123,6 @@ Word32 quantPred_fx( return predQ; } -int32_t quantPred( - const float pred ) -{ - int32_t predQ = _round( pred * PRED_QUANT_FACTOR ); - predQ = predQ > PRED_MAX_VAL ? PRED_MAX_VAL : predQ; - predQ = predQ < PRED_MIN_VAL ? PRED_MIN_VAL : predQ; - - return predQ; -} - - -/*-------------------------------------------------------------------* - * Function dequantPhase() - * - * - *-------------------------------------------------------------------*/ - -float dequantPhase( - const int32_t phaseQ ) -{ - return (float) phaseQ / PHASE_QUANT_FACTOR; -} /*-------------------------------------------------------------------* @@ -196,6 +130,7 @@ float dequantPhase( * * *-------------------------------------------------------------------*/ + Word32 dequantPred_fx( Word32 predQ ) { if ( predQ == 12 ) @@ -212,10 +147,6 @@ Word32 dequantPred_fx( Word32 predQ ) value = L_shl( tmp, sub( 31, negate( add( 1, tmp_e ) ) ) ); // Q31 return value; } -float dequantPred( int32_t predQ ) -{ - return (float) predQ / PRED_QUANT_FACTOR; -} /*-------------------------------------------------------------------* diff --git a/lib_isar/isar_PredDecoder.c b/lib_isar/isar_PredDecoder.c index a202aaa1c..777514b34 100644 --- a/lib_isar/isar_PredDecoder.c +++ b/lib_isar/isar_PredDecoder.c @@ -253,7 +253,7 @@ void DeletePredictionDecoder_fx( * *-------------------------------------------------------------------*/ -Word32 ReadPredictors_fx( +Word16 ReadPredictors_fx( PredictionDecoder *psPredictionDecoder, ISAR_SPLIT_REND_BITS_HANDLE pBits ) { diff --git a/lib_isar/isar_PredEncoder.c b/lib_isar/isar_PredEncoder.c index 8eed33ca6..df78fa873 100644 --- a/lib_isar/isar_PredEncoder.c +++ b/lib_isar/isar_PredEncoder.c @@ -49,11 +49,14 @@ * * *-------------------------------------------------------------------*/ + static void activate_bit( Word32 *state, const Word32 bit_id ) { ( *state ) = L_or( ( *state ), L_shl( 1, extract_l( bit_id ) ) ); + + return; } /*-------------------------------------------------------------------* @@ -67,15 +70,24 @@ static void deactivate_bit( const Word32 bit_id ) { ( *state ) = L_and( ( *state ), ~L_shl( 1, extract_l( bit_id ) ) ); + + return; } -void UpdatePredictionSubSetId( PredictionEncoder *psPredictionEncoder ) + + +void UpdatePredictionSubSetId( + PredictionEncoder *psPredictionEncoder ) { IF( EQ_32( ++psPredictionEncoder->iSubSetId, psPredictionEncoder->iNumSubSets ) ) { psPredictionEncoder->iSubSetId = 0; move32(); } + + return; } + + /*-------------------------------------------------------------------* * Function CreatePredictionEncoder() * @@ -500,10 +512,13 @@ void DeletePredictionEncoder_fx( return; } + + void DeletePredictionEncoder( PredictionEncoder *psPredictionEncoder ) { int32_t n; + for ( n = 0; n < psPredictionEncoder->iChannels; n++ ) { int32_t k; @@ -731,15 +746,17 @@ void ComputePredictors( } } } + + return; } + void ComputePredictors_fx( PredictionEncoder *psPredictionEncoder, Word32 ***pppfReal_fx, // Q12? Word32 ***pppfImag_fx ) // Q12? { Word32 c; - Word32 b0 = psPredictionEncoder->iSubSetId; Word32 bstep = psPredictionEncoder->iNumSubSets; Word32 iNumBlocks = psPredictionEncoder->iNumBlocks; @@ -1128,13 +1145,10 @@ void ComputePredictors_fx( } } } + + return; } -/*-------------------------------------------------------------------* - * Function ApplyForwardPredictors() - * - * - *-------------------------------------------------------------------*/ /*-------------------------------------------------------------------* * Function WritePredictors() diff --git a/lib_isar/isar_RMSEnvGrouping.c b/lib_isar/isar_RMSEnvGrouping.c index 9a7b2ba54..0128fe7d2 100644 --- a/lib_isar/isar_RMSEnvGrouping.c +++ b/lib_isar/isar_RMSEnvGrouping.c @@ -42,6 +42,14 @@ #include "prot_fx.h" #include "basop_util.h" #include "enh64.h" + + +/*-------------------------------------------------------------------* + * Local ROM tables + * + * + *-------------------------------------------------------------------*/ + Word32 Inv_grp_length[17] = { // Q31 0, @@ -64,11 +72,6 @@ Word32 Inv_grp_length[17] = { }; -/*-------------------------------------------------------------------* - * Local ROM tables - * - * - *-------------------------------------------------------------------*/ static const Word32 c_afThreshQuiet48_fx[23] = { // Q23 -705191424, @@ -123,12 +126,12 @@ static const Word32 c_fiDefaultTheta48_fx[MAX_BANDS_48] = { }; typedef struct GMNODE { - int32_t iGroupStart; - int32_t iGroupLength; + Word32 iGroupStart; + Word32 iGroupLength; Word32 *pfMergedEnergydB_fx; - int32_t *piQRMSEnvelope; + Word32 *piQRMSEnvelope; - int32_t iGroupRMSEnvelopeCost; + Word32 iGroupRMSEnvelopeCost; Word32 fGroupSNRPenalty_fx; Word16 fGroupSNRPenalty_exp; struct GMNODE *psNext; @@ -136,8 +139,8 @@ typedef struct GMNODE struct RMS_ENVELOPE_GROUPING { - int32_t iNumBlocks; - int32_t iMaxGroups; + Word32 iNumBlocks; + Word32 iMaxGroups; Word32 **ppfWeight_man; Word16 **ppfWeight_exp; Word32 **ppfBandEnergy_man; @@ -171,7 +174,7 @@ RMSEnvelopeGrouping *CreateRMSEnvelopeGrouping( psRMSEnvelopeGrouping->ppfWeight_man = (Word32 **) malloc( psRMSEnvelopeGrouping->iNumBlocks * sizeof( Word32 * ) ); psRMSEnvelopeGrouping->ppfWeight_exp = (Word16 **) malloc( psRMSEnvelopeGrouping->iNumBlocks * sizeof( Word16 * ) ); - for ( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) + FOR( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) { psRMSEnvelopeGrouping->ppfBandEnergy_man[n] = (Word32 *) malloc( MAX_BANDS * 2 * sizeof( Word32 ) ); /* 2 for stereo joint group calc */ psRMSEnvelopeGrouping->ppfBandEnergy_exp[n] = (Word16 *) malloc( MAX_BANDS * 2 * sizeof( Word16 ) ); /* 2 for stereo joint group calc */ @@ -181,6 +184,7 @@ RMSEnvelopeGrouping *CreateRMSEnvelopeGrouping( } psRMSEnvelopeGrouping->psGMNodes = (GMNode *) malloc( psRMSEnvelopeGrouping->iNumBlocks * sizeof( GMNode ) ); + for ( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) { psRMSEnvelopeGrouping->psGMNodes[n].pfMergedEnergydB_fx = (Word32 *) malloc( MAX_BANDS * 2 * sizeof( float ) ); @@ -203,9 +207,9 @@ RMSEnvelopeGrouping *CreateRMSEnvelopeGrouping( void DeleteRMSEnvelopeGrouping( RMSEnvelopeGrouping *psRMSEnvelopeGrouping ) { - int32_t n; + Word32 n; - for ( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) + FOR( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) { free( psRMSEnvelopeGrouping->ppfBandEnergy_man[n] ); free( psRMSEnvelopeGrouping->ppfBandEnergy_exp[n] ); @@ -219,8 +223,7 @@ void DeleteRMSEnvelopeGrouping( free( psRMSEnvelopeGrouping->ppfWeight_man ); free( psRMSEnvelopeGrouping->ppfWeight_exp ); - - for ( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) + FOR( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) { free( psRMSEnvelopeGrouping->psGMNodes[n].pfMergedEnergydB_fx ); free( psRMSEnvelopeGrouping->psGMNodes[n].piQRMSEnvelope ); @@ -238,6 +241,7 @@ void DeleteRMSEnvelopeGrouping( * * *-------------------------------------------------------------------*/ + static void ComputeBandEnergy( const Word32 iChannels, const Word32 iNumBlocks, @@ -252,7 +256,6 @@ static void ComputeBandEnergy( Word16 **ppfWeight_exp, Word16 q_final ) { - Word32 n; Word32 constant = 1616142483; // Q29 of(1/log2(10))*10 Word32 const_comp3, const_comp1; @@ -394,15 +397,17 @@ static void ComputeBandEnergy( } } } - /* fclose( fp ); - fclose( fp1 );*/ + return; } + + /*-------------------------------------------------------------------* * Function ComputeMergeRMS() * * *-------------------------------------------------------------------*/ + static void ComputeMergeRMS( const Word32 iNumBands, const Word32 iStartBlock, @@ -413,8 +418,6 @@ static void ComputeMergeRMS( Word16 **ppfBandEnergy_exp ) { Word32 b; - /* FILE *fp = fopen( "float_fGroupEnergy.txt","ab+" ); - FILE *fp1 = fopen( "fixed_fGroupEnergy.txt","ab+" );*/ Word32 constant = 1616142483; // Q29 of(1/log2(10))*10 // Note epsolon was added when computing BandEnergy; move32(); Word32 fGroupEnergy32_fx; @@ -453,13 +456,17 @@ static void ComputeMergeRMS( pfMergedEnergydB[b] = fGroupEnergy32_fx; // Q23 piQRMSEnvelope[b] = iQRMSEnvelope_fx; // Q25 } + return; } + + /*-------------------------------------------------------------------* * Function ComputeRMSEnvelopeBits() * * *-------------------------------------------------------------------*/ + static Word32 ComputeRMSEnvelopeBits( const Word32 iChannels, const Word32 iNumBands, @@ -498,11 +505,14 @@ static Word32 ComputeRMSEnvelopeBits( return iRMSEnvelopeBits; } + + /*-------------------------------------------------------------------* * Function ComputeSNRPenalty() * * *-------------------------------------------------------------------*/ + static Word32 ComputeSNRPenalty( const Word32 iChannels, const Word32 iNumBands, @@ -522,10 +532,7 @@ static Word32 ComputeSNRPenalty( move32(); Word32 mul_temp; Word16 fSNRPenaltycnst_exp = 0, exp = 0; - /*FILE *fp = fopen( "float_SNRpenalty.txt", "ab+" ); - FILE *fp1 = fopen( "fixed_SNRpenalty.txt", "ab+" );*/ - // f2me( 1e10f, &fSNRPenaltyconst_fx, &fSNRPenaltycnst_exp );// - /*For 1e10f*/ + fSNRPenaltyconst_fx = 1250000000; fSNRPenaltycnst_exp = 34; iChanOffset = 0; @@ -564,17 +571,17 @@ static Word32 ComputeSNRPenalty( iChanOffset = L_add( iChanOffset, iNumBands ); } - // fprintf( fp,"%f\n", fSNRPenalty ); - // fprintf( fp1,"%f\n", fSNRPenalty ); - /* fclose( fp ); - fclose( fp1 );*/ + return fSNRPenalty_fx; } + + /*-------------------------------------------------------------------* * Function TryMerge2() * * *-------------------------------------------------------------------*/ + static Word32 TryMerge2( const Word32 iChannels, const Word32 iNumBands, @@ -612,11 +619,13 @@ static Word32 TryMerge2( move16(); Word16 flag = 0; move16(); + IF( EQ_32( psGMNode1->fGroupSNRPenalty_fx, one_in_mant ) && EQ_16( psGMNode1->fGroupSNRPenalty_exp, one_in_exp ) ) { flag = 1; move16(); } + /* First compute current RMS Envelope for each group */ IF( EQ_32( psGMNode1->iGroupRMSEnvelopeCost, -1 ) || flag ) { @@ -644,6 +653,7 @@ static Word32 TryMerge2( flag = 1; move16(); } + IF( EQ_32( psGMNode2->iGroupRMSEnvelopeCost, -1 ) || flag ) { @@ -666,6 +676,7 @@ static Word32 TryMerge2( fSNRPenalty2_exp = psGMNode2->fGroupSNRPenalty_exp; move16(); } + ComputeMergeRMS( iNumBands * iChannels, psGMNode1->iGroupStart, psGMNode1->iGroupLength + psGMNode2->iGroupLength, psGMNode1->pfMergedEnergydB_fx, psGMNode1->piQRMSEnvelope, ppfBandEnergy_man, ppfBandEnergy_exp ); /* Compute the RMS Envelope cost for merged group */ @@ -679,14 +690,17 @@ static Word32 TryMerge2( fMergedCost_fx = BASOP_Util_Add_Mant32Exp( temp, temp_exp, L_negate( fSNRPenalty2_fx ), fSNRPenalty2_exp, fMergedCost_exp ); fMergedCost_fx = BASOP_Util_Add_Mant32Exp( fMergedCost_fx, *fMergedCost_exp, RMSEnvBits_fx, 21, fMergedCost_exp ); // fMergedCost = fSNRPenaltyMerged - fSNRPenalty1 - fSNRPenalty2 + (float) iRMSEnvBitsMerged - (float) iRMSEnvBits1 - (float) iRMSEnvBits2; + return fMergedCost_fx; } + /*-------------------------------------------------------------------* * Function ComputeGreedyGroups3() * * *-------------------------------------------------------------------*/ + static void ComputeGreedyGroups3( RMSEnvelopeGrouping *psRMSEnvelopeGrouping, const int32_t iChannels, @@ -762,13 +776,17 @@ static void ComputeGreedyGroups3( iDone++; // This only catches a problem } } + return; } + + /*-------------------------------------------------------------------* * Function ComputeRMSEnvelope() * * *-------------------------------------------------------------------*/ + static void ComputeRMSEnvelope( const Word32 iChannels, const Word32 iNumBands, @@ -782,8 +800,7 @@ static void ComputeRMSEnvelope( Word32 fGroupEnergy_fx; Word16 fGroupEnergy_exp; Word32 temp; - // FILE *fp = fopen( "RmsEnvelope_fixed", "ab+" ); - // FILE *fp1 = fopen( "RmsEnvelope_float", "ab+" ); + FOR( n = 0; n < iChannels; n++ ) { Word32 b; @@ -817,20 +834,20 @@ static void ComputeRMSEnvelope( temp = ( temp > ENV_MIN ) ? temp : ENV_MIN; temp = ( temp < ENV_MAX ) ? temp : ENV_MAX; pppiRMSEnvelope[n][k][b] = temp; - // fprintf( fp,"%d\n", pppiRMSEnvelope[n][k][b] ); } } } - // fclose( fp ); - /* fclose( fp1 );*/ + return; } + /*-------------------------------------------------------------------* * Function LimitRMSEnvelope() * * *-------------------------------------------------------------------*/ + static void LimitRMSEnvelope( const Word32 iBandCount, const Word32 iRMSDeltaMax, @@ -884,11 +901,13 @@ static void LimitRMSEnvelope( return; } + /*-------------------------------------------------------------------* * Function ComputeEnvelopeGrouping() * * *-------------------------------------------------------------------*/ + void ComputeEnvelopeGrouping( RMSEnvelopeGrouping *psRMSEnvelopeGrouping, const Word32 iChannels, diff --git a/lib_isar/isar_cnst.h b/lib_isar/isar_cnst.h index 4aef03cf2..2fcfb13f1 100644 --- a/lib_isar/isar_cnst.h +++ b/lib_isar/isar_cnst.h @@ -37,8 +37,6 @@ #include "options.h" /* clang-format off */ - - /*----------------------------------------------------------------------------------* * Split Binaural Rendering Constants *----------------------------------------------------------------------------------*/ @@ -62,89 +60,90 @@ typedef enum } ISAR_SPLIT_REND_POSE_TYPE; -#define CLDFB_PLC_XF 2 /* Length of cross-fade into first good frame after frame loss in CLDFB cols. */ +#define CLDFB_PLC_XF 2 /* Length of cross-fade into first good frame after frame loss in CLDFB cols. */ -#define SPLIT_REND_MAX_YAW_ONLY_POSES 2 -#define SPLIT_REND_MAX_PITCH_ONLY_POSES 2 -#define SPLIT_REND_MAX_ROLL_ONLY_POSES 2 -#define SPLIT_REND_MAX_ONE_AXIS_MD_POSES 2 -#define MAX_EXTRAPOLATION_ANGLE 15.0f /* this means additional 15 degrees can be extrapolated on top of MD probing poses*/ +#define SPLIT_REND_MAX_YAW_ONLY_POSES 2 +#define SPLIT_REND_MAX_PITCH_ONLY_POSES 2 +#define SPLIT_REND_MAX_ROLL_ONLY_POSES 2 +#define SPLIT_REND_MAX_ONE_AXIS_MD_POSES 2 +#define MAX_EXTRAPOLATION_ANGLE 15.0f /* this means additional 15 degrees can be extrapolated on top of MD probing poses*/ #define MAX_EXTRAPOLATION_ANGLE_Q22 (62914560) /* this means additional 15 degrees can be extrapolated on top of MD probing poses*/ -#define MAX_HEAD_ROT_POSES ( 2 + SPLIT_REND_MAX_YAW_ONLY_POSES + SPLIT_REND_MAX_PITCH_ONLY_POSES + SPLIT_REND_MAX_ROLL_ONLY_POSES ) -#define MAX_SPLIT_REND_MD_BANDS 20 -#define MAX_SPLIT_MD_SUBFRAMES 1 -#define COMPLEX_MD_BAND_THRESH MAX_SPLIT_REND_MD_BANDS -#define COMPLEX_MD_BAND_THRESH_LOW 4 -#define COMPLEX_MD_BAND_THRESH_HIGH 10 -#define SPLIT_REND_RO_MD_BAND_THRESH 4 +#define MAX_HEAD_ROT_POSES ( 2 + SPLIT_REND_MAX_YAW_ONLY_POSES + SPLIT_REND_MAX_PITCH_ONLY_POSES + SPLIT_REND_MAX_ROLL_ONLY_POSES ) +#define MAX_SPLIT_REND_MD_BANDS 20 +#define MAX_SPLIT_MD_SUBFRAMES 1 +#define COMPLEX_MD_BAND_THRESH MAX_SPLIT_REND_MD_BANDS +#define COMPLEX_MD_BAND_THRESH_LOW 4 +#define COMPLEX_MD_BAND_THRESH_HIGH 10 +#define SPLIT_REND_RO_MD_BAND_THRESH 4 #define ISAR_SPLIT_REND_PRED_63QUANT_PNTS_LOG2_CEIL 6 #define ISAR_SPLIT_REND_PRED_31QUANT_PNTS_LOG2_CEIL 5 #define ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS_LOG2_CEIL 5 #define ISAR_SPLIT_REND_D_QUANT_PNTS_LOG2_CEIL 4 -#define ISAR_SPLIT_REND_PRED_MIN_VAL_Q30 -1503238553 //Q30 -#define ISAR_SPLIT_REND_PRED_MAX_VAL_Q30 1503238553 //Q30 - -#define ISAR_SPLIT_REND_NUM_QUANT_STRATS 4 -#define ISAR_SPLIT_REND_PRED_63QUANT_PNTS 63 -#define ISAR_SPLIT_REND_PRED_31QUANT_PNTS 31 -#define ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS 31 -#define ISAR_SPLIT_REND_D_QUANT_PNTS 15 -#define ISAR_SPLIT_REND_PRED_MIN_VAL -1.4f -#define ISAR_SPLIT_REND_PRED_MAX_VAL 1.4f - -#define ISAR_SPLIT_REND_PITCH_G_MIN_VAL 0.5f -#define ISAR_SPLIT_REND_PITCH_G_MAX_VAL 1.5f -#define ISAR_SPLIT_REND_PITCH_G_MIN_VAL_Q30 (1<<29) //0.5f in Q30 -#define ISAR_SPLIT_REND_PITCH_G_MAX_VAL_Q30 1610612736 //1.5f in Q30 -#define ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS ISAR_SPLIT_REND_D_QUANT_PNTS -#define ISAR_SPLIT_REND_D_MIN_VAL 0.0f -#define ISAR_SPLIT_REND_D_MAX_VAL 1.0f +#define ISAR_SPLIT_REND_PRED_MIN_VAL_Q30 -1503238553 //Q30 +#define ISAR_SPLIT_REND_PRED_MAX_VAL_Q30 1503238553 //Q30 + +#define ISAR_SPLIT_REND_NUM_QUANT_STRATS 4 +#define ISAR_SPLIT_REND_PRED_63QUANT_PNTS 63 +#define ISAR_SPLIT_REND_PRED_31QUANT_PNTS 31 +#define ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS 31 +#define ISAR_SPLIT_REND_D_QUANT_PNTS 15 +#define ISAR_SPLIT_REND_PRED_MIN_VAL -1.4f +#define ISAR_SPLIT_REND_PRED_MAX_VAL 1.4f + +#define ISAR_SPLIT_REND_PITCH_G_MIN_VAL 0.5f +#define ISAR_SPLIT_REND_PITCH_G_MAX_VAL 1.5f +#define ISAR_SPLIT_REND_PITCH_G_MIN_VAL_Q30 (1<<29) //0.5f in Q30 +#define ISAR_SPLIT_REND_PITCH_G_MAX_VAL_Q30 1610612736 //1.5f in Q30 +#define ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS ISAR_SPLIT_REND_D_QUANT_PNTS +#define ISAR_SPLIT_REND_D_MIN_VAL 0.0f +#define ISAR_SPLIT_REND_D_MAX_VAL 1.0f #define ISAR_SPLIT_REND_D_MIN_VAL_FX 0 //Q31 #define ISAR_SPLIT_REND_D_MAX_VAL_FX MAX_32 //Q31 -#define ISAR_SPLIT_REND_PRED_ROLL_Q_STEP ( ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) / ( ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 ) ) +#define ISAR_SPLIT_REND_PRED_ROLL_Q_STEP ( ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) / ( ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 ) ) #define ISAR_SPLIT_REND_PRED_ROLL_Q_STEP_Q31 200431807 #define ISAR_SPLIT_REND_PRED_ROLL_1BYQ_STEP_Q26 719023543 -#define ISAR_SPLIT_REND_PRED_ROLL_1BYQ_STEP ( ( ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) ) -#define ISAR_SPLIT_REND_PRED31_Q_STEP ( ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) / ( ISAR_SPLIT_REND_PRED_31QUANT_PNTS - 1 ) ) -#define ISAR_SPLIT_REND_PRED31_1BYQ_STEP ( ( ISAR_SPLIT_REND_PRED_31QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) ) -#define ISAR_SPLIT_REND_PRED63_Q_STEP ( ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) / ( ISAR_SPLIT_REND_PRED_63QUANT_PNTS - 1 ) ) -#define ISAR_SPLIT_REND_PRED63_1BYQ_STEP ( ( ISAR_SPLIT_REND_PRED_63QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) ) +#define ISAR_SPLIT_REND_PRED_ROLL_1BYQ_STEP ( ( ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) ) +#define ISAR_SPLIT_REND_PRED31_Q_STEP ( ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) / ( ISAR_SPLIT_REND_PRED_31QUANT_PNTS - 1 ) ) +#define ISAR_SPLIT_REND_PRED31_1BYQ_STEP ( ( ISAR_SPLIT_REND_PRED_31QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) ) +#define ISAR_SPLIT_REND_PRED63_Q_STEP ( ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) / ( ISAR_SPLIT_REND_PRED_63QUANT_PNTS - 1 ) ) +#define ISAR_SPLIT_REND_PRED63_1BYQ_STEP ( ( ISAR_SPLIT_REND_PRED_63QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PRED_MAX_VAL - ISAR_SPLIT_REND_PRED_MIN_VAL ) ) #define ISAR_SPLIT_REND_PRED31_Q_STEP_FX_Q31 200431807 #define ISAR_SPLIT_REND_PRED31_1BYQ_STEP_FX_Q26 719023543 #define ISAR_SPLIT_REND_PRED63_Q_STEP_FX_Q31 96983132 #define ISAR_SPLIT_REND_PRED63_1BYQ_STEP_FX_Q26 1485981989 -#define ISAR_SPLIT_REND_D_Q_STEP ( ( ISAR_SPLIT_REND_D_MAX_VAL - ISAR_SPLIT_REND_D_MIN_VAL ) / ( ISAR_SPLIT_REND_D_QUANT_PNTS - 1 ) ) -#define ISAR_SPLIT_REND_D_1BYQ_STEP ( ( ISAR_SPLIT_REND_D_QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_D_MAX_VAL - ISAR_SPLIT_REND_D_MIN_VAL ) ) -#define ISAR_SPLIT_REND_PITCH_G_Q_STEP ( ( ISAR_SPLIT_REND_PITCH_G_MAX_VAL - ISAR_SPLIT_REND_PITCH_G_MIN_VAL ) / ( ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS - 1 ) ) -#define ISAR_SPLIT_REND_PITCH_G_1BYQ_STEP ( ( ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PITCH_G_MAX_VAL - ISAR_SPLIT_REND_PITCH_G_MIN_VAL ) ) +#define ISAR_SPLIT_REND_D_Q_STEP ( ( ISAR_SPLIT_REND_D_MAX_VAL - ISAR_SPLIT_REND_D_MIN_VAL ) / ( ISAR_SPLIT_REND_D_QUANT_PNTS - 1 ) ) +#define ISAR_SPLIT_REND_D_1BYQ_STEP ( ( ISAR_SPLIT_REND_D_QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_D_MAX_VAL - ISAR_SPLIT_REND_D_MIN_VAL ) ) +#define ISAR_SPLIT_REND_PITCH_G_Q_STEP ( ( ISAR_SPLIT_REND_PITCH_G_MAX_VAL - ISAR_SPLIT_REND_PITCH_G_MIN_VAL ) / ( ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS - 1 ) ) +#define ISAR_SPLIT_REND_PITCH_G_1BYQ_STEP ( ( ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS - 1 ) / ( ISAR_SPLIT_REND_PITCH_G_MAX_VAL - ISAR_SPLIT_REND_PITCH_G_MIN_VAL ) ) #define ISAR_SPLIT_REND_D_Q_STEP_Q31 153391689 -#define ISAR_SPLIT_REND_D_1BYQ_STEP_Q27 (14 << 27) //Q27 +#define ISAR_SPLIT_REND_D_1BYQ_STEP_Q27 (14 << 27) //Q27 #define ISAR_SPLIT_REND_PITCH_G_Q_STEP_Q31 153391689 -#define ISAR_SPLIT_REND_PITCH_G_1BYQ_STEP_Q27 (14 << 27) //Q27 +#define ISAR_SPLIT_REND_PITCH_G_1BYQ_STEP_Q27 (14 << 27) //Q27 + +#define ISAR_SPLIT_REND_HEAD_POSE_BITS 9 +#define ISAR_SPLIT_REND_DOF_BITS 2 +#define ISAR_SPLIT_REND_HQ_MODE_BITS 1 +#define ISAR_SPLIT_REND_ROT_AXIS_BITS 3 +#define ISAR_SPLIT_REND_RO_FLAG_BITS 1 -#define ISAR_SPLIT_REND_HEAD_POSE_BITS 9 -#define ISAR_SPLIT_REND_DOF_BITS 2 -#define ISAR_SPLIT_REND_HQ_MODE_BITS 1 -#define ISAR_SPLIT_REND_ROT_AXIS_BITS 3 -#define ISAR_SPLIT_REND_RO_FLAG_BITS 1 +#define IVAS_LC3PLUS_MAX_NUM_DECODERS 2 -#define IVAS_LC3PLUS_MAX_NUM_DECODERS 2 /*----------------------------------------------------------------------------------* * Split rendering bitrate constants *----------------------------------------------------------------------------------*/ -#define SPLIT_REND_256k 256000 -#define SPLIT_REND_320k 320000 -#define SPLIT_REND_384k 384000 -#define SPLIT_REND_512k 512000 -#define SPLIT_REND_768k 768000 +#define SPLIT_REND_256k 256000 +#define SPLIT_REND_320k 320000 +#define SPLIT_REND_384k 384000 +#define SPLIT_REND_512k 512000 +#define SPLIT_REND_768k 768000 #endif /*ISAR_CNST_H */ diff --git a/lib_isar/isar_lc3plus_common.h b/lib_isar/isar_lc3plus_common.h index 2638ea8a9..b99348e0e 100644 --- a/lib_isar/isar_lc3plus_common.h +++ b/lib_isar/isar_lc3plus_common.h @@ -45,7 +45,7 @@ typedef struct LC3PLUS_CONFIG { /*! frame duration in microseconds [10000, 5000, 2500] */ int16_t lc3plus_frame_duration_us; - /*! isar frame duration in microseconds [20000, 10000, 5000] */ + /*! ISAR frame duration in microseconds [20000, 10000, 5000] */ int16_t isar_frame_duration_us; /*! sampling rate*/ int32_t samplerate; diff --git a/lib_isar/isar_lc3plus_enc.c b/lib_isar/isar_lc3plus_enc.c index 7b11084af..2ed3cdb7b 100644 --- a/lib_isar/isar_lc3plus_enc.c +++ b/lib_isar/isar_lc3plus_enc.c @@ -252,22 +252,23 @@ ivas_error ISAR_LC3PLUS_ENC_Open( ivas_error IVAS_LC3PLUS_ENC_SetBitrate( ISAR_LC3PLUS_ENC_HANDLE handle, /* o : LC3plus encoder handle */ - const uint32_t bitsPerSecond /* i : new target bit rate */ + const UWord32 bitsPerSecond /* i : new target bit rate */ ) { - int32_t numLc3plusMediaTimesPerIvasFrame; - int32_t lc3plus_num_bytes_per_frame; - int32_t availableOctetsPerIsarFrame; - int32_t actualOctetsPerFrame; + Word32 numLc3plusMediaTimesPerIvasFrame; + Word32 lc3plus_num_bytes_per_frame; + Word32 availableOctetsPerIsarFrame; + Word32 actualOctetsPerFrame; LC3PLUS_Error err; - int32_t iFtd; - int32_t fdrLength; - int32_t lc3plusPacketRate; - int32_t numSubframes; - int32_t minPayloadOverhead; - int32_t targetLc3PlusBitratePerChannel; - int32_t targetLc3PlusOctetCount; - int32_t lc3plusFdlLength; + ivas_error ivas_err; + Word32 iFtd; + Word32 fdrLength; + Word32 lc3plusPacketRate; + Word32 numSubframes; + Word32 minPayloadOverhead; + Word32 targetLc3PlusBitratePerChannel; + Word32 targetLc3PlusOctetCount; + Word32 lc3plusFdlLength; if ( NULL == handle ) { @@ -303,7 +304,7 @@ ivas_error IVAS_LC3PLUS_ENC_SetBitrate( targetLc3PlusBitratePerChannel = ( targetLc3PlusOctetCount - ( lc3plusFdlLength - LC3PLUS_RTP_FDL_MIN_LENGTH ) ) / handle->config.channels * 8 * lc3plusPacketRate; } - for ( int32_t iCh = 0; iCh < handle->config.channels; iCh++ ) + for ( Word32 iCh = 0; iCh < handle->config.channels; iCh++ ) { err = lc3plus_enc_set_bitrate( handle->handles[iCh], targetLc3PlusBitratePerChannel ); if ( err != LC3PLUS_OK ) @@ -312,10 +313,10 @@ ivas_error IVAS_LC3PLUS_ENC_SetBitrate( } } - // update FTD settings after bitrate change + /* update FTD settings after bitrate change */ for ( int32_t iMediaTime = 0; iMediaTime < numLc3plusMediaTimesPerIvasFrame; ++iMediaTime ) { - for ( uint32_t iEnc = 0; iEnc < handle->num_encs; ++iEnc ) + for ( UWord32 iEnc = 0; iEnc < handle->num_encs; ++iEnc ) { iFtd = iEnc + iMediaTime * handle->num_encs; lc3plus_num_bytes_per_frame = lc3plus_enc_get_num_bytes( handle->handles[iEnc] ); @@ -327,15 +328,16 @@ ivas_error IVAS_LC3PLUS_ENC_SetBitrate( } } - // TODO: remove sanity checks? - if ( ISAR_LC3PLUS_ENC_GetOutputBitstreamSize( handle, &actualOctetsPerFrame ) != IVAS_ERR_OK ) + if ( ( ivas_err = ISAR_LC3PLUS_ENC_GetOutputBitstreamSize( handle, &actualOctetsPerFrame ) ) != IVAS_ERR_OK ) { - return IVAS_ERROR( IVAS_ERR_INTERNAL, "ISAR_LC3PLUS_ENC_GetOutputBitstreamSize failed\n" ); + return ivas_err; } + if ( actualOctetsPerFrame > availableOctetsPerIsarFrame ) { return IVAS_ERROR( IVAS_ERR_INTERNAL, "Bitrate reduction logic failed\n" ); } + return IVAS_ERR_OK; } @@ -348,10 +350,10 @@ ivas_error IVAS_LC3PLUS_ENC_SetBitrate( ivas_error ISAR_LC3PLUS_ENC_GetDelay( ISAR_LC3PLUS_ENC_HANDLE handle, /* i : LC3plus encoder handle */ - int32_t *delayInSamples /* o : encoder delay in number of samples per channel */ + Word32 *delayInSamples /* o : encoder delay in number of samples per channel */ ) { - int32_t tmpDelayInSamples; + Word32 tmpDelayInSamples; if ( NULL == handle ) { @@ -364,7 +366,7 @@ ivas_error ISAR_LC3PLUS_ENC_GetDelay( *delayInSamples = 0; /* sanity check whether all encoders are actually configured identically */ - for ( uint32_t iEnc = 0; iEnc < handle->num_encs; iEnc++ ) + for ( UWord32 iEnc = 0; iEnc < handle->num_encs; iEnc++ ) { if ( NULL == handle->handles[iEnc] ) { @@ -473,7 +475,7 @@ void ISAR_LC3PLUS_ENC_Close( { free( ( *handle )->frame_type_descriptors ); } - for ( uint32_t iEnc = 0; iEnc < ( *handle )->num_encs; iEnc++ ) + for ( UWord32 iEnc = 0; iEnc < ( *handle )->num_encs; iEnc++ ) { if ( NULL != ( *handle )->handles[iEnc] ) { @@ -504,6 +506,7 @@ void ISAR_LC3PLUS_ENC_Close( * * *-------------------------------------------------------------------*/ + ivas_error ISAR_LC3PLUS_ENC_Encode( ISAR_LC3PLUS_ENC_HANDLE handle, /* i : LC3plus encoder handle */ Word32 **pcm_in, /* i : pointer input samples */ @@ -511,12 +514,12 @@ ivas_error ISAR_LC3PLUS_ENC_Encode( const Word32 bitstream_out_size, /* i : size of the bitstream_out buffer in bytes. Must be equal to ISAR_LC3PLUS_ENC_GetOutputBitstreamSize. */ Word16 q_in[16] ) { - int32_t ftdIndex; + Word32 ftdIndex; LC3PLUS_RTP_ERR rtpErr; - uint32_t num_media_times; - uint32_t numSamplesPerLC3plusChannel; - int32_t ivasSampleIndex; - int32_t num_bytes = 0; + UWord32 num_media_times; + UWord32 numSamplesPerLC3plusChannel; + Word32 ivasSampleIndex; + Word32 num_bytes = 0; LC3PLUS_Error err; push_wmops( "ISAR_LC3PLUS_ENC_Encode" ); @@ -547,11 +550,12 @@ ivas_error ISAR_LC3PLUS_ENC_Encode( { return IVAS_ERROR( IVAS_LC3PLUS_LC3plusRtpErrToIvasErr( rtpErr ), "LC3PLUS_RTP_payload_serialize failed\n" ); } - for ( uint32_t iEnc = 0; iEnc < handle->num_encs; iEnc++ ) + + FOR( UWord32 iEnc = 0; iEnc < handle->num_encs; iEnc++ ) { - for ( uint32_t iMediaTime = 0; iMediaTime < num_media_times; iMediaTime++ ) + FOR( UWord32 iMediaTime = 0; iMediaTime < num_media_times; iMediaTime++ ) { - for ( uint32_t iSampleInt16 = 0; iSampleInt16 < numSamplesPerLC3plusChannel; iSampleInt16++ ) + FOR( UWord32 iSampleInt16 = 0; iSampleInt16 < numSamplesPerLC3plusChannel; iSampleInt16++ ) { ivasSampleIndex = iSampleInt16 + iMediaTime * numSamplesPerLC3plusChannel; handle->pcm_conversion_buffer[iSampleInt16] = (Word16) max( INT16_MIN, min( L_shr( pcm_in[iEnc][ivasSampleIndex], q_in[iEnc] ), INT16_MAX ) ); diff --git a/lib_isar/isar_lcld_decoder.c b/lib_isar/isar_lcld_decoder.c index ce517a492..dfc6b5311 100644 --- a/lib_isar/isar_lcld_decoder.c +++ b/lib_isar/isar_lcld_decoder.c @@ -124,8 +124,7 @@ static TableNode *CreateTableList( Word32 iReadLength ) TableNode *ptable_top; iMaxTables = L_shl( 1, (Word16) iReadLength ); ptable_top = (TableNode *) malloc( sizeof( TableNode ) ); - ptable_top->ppoNextTable = - (TableNode **) malloc( iMaxTables * sizeof( TableNode * ) ); + ptable_top->ppoNextTable = (TableNode **) malloc( iMaxTables * sizeof( TableNode * ) ); ptable_top->piCodeIndex = (Word32 *) malloc( iMaxTables * sizeof( Word32 ) ); ptable_top->piDifference = (Word32 *) malloc( iMaxTables * sizeof( Word32 ) ); ptable_top->piLength = (Word32 *) malloc( iMaxTables * sizeof( Word32 ) ); @@ -143,7 +142,10 @@ static TableNode *CreateTableList( Word32 iReadLength ) return ptable_top; } -static void DeleteTableList( TableList *ptable_list, Word32 iTables ) + +static void DeleteTableList( + TableList *ptable_list, + Word32 iTables ) { TableNode *node; @@ -176,13 +178,22 @@ static void DeleteTableList( TableList *ptable_list, Word32 iTables ) } iTables--; } + IF( ptable_list != NULL ) { free( ptable_list ); } + + return; } -static TableNode *GetNextTable( Word32 iIndex, TableList *table_list, TableNode *poParent, Word32 iReadLength, UWord32 *iTablesCreated ) + +static TableNode *GetNextTable( + Word32 iIndex, + TableList *table_list, + TableNode *poParent, + Word32 iReadLength, + UWord32 *iTablesCreated ) { TableNode *poNextNode; @@ -205,7 +216,13 @@ static TableNode *GetNextTable( Word32 iIndex, TableList *table_list, TableNode return poNextNode; } -static void CompleteTables( LCLDDecoder *psLCLDDecoder, Word32 n, TableList *ptable_list, Word32 iReadLength, Word32 iTablesCreated ) + +static void CompleteTables( + LCLDDecoder *psLCLDDecoder, + Word32 n, + TableList *ptable_list, + Word32 iReadLength, + Word32 iTablesCreated ) { Word32 iMaxTables; @@ -235,9 +252,18 @@ static void CompleteTables( LCLDDecoder *psLCLDDecoder, Word32 n, TableList *pta } poNode = poNode->poOrderedNext; } + + return; } -static void AddcodeTableList( TableList *ptable_list, Word32 iLength, Word32 iCode, Word32 iCodeIndex, Word32 iReadLength, UWord32 *iTables ) + +static void AddcodeTableList( + TableList *ptable_list, + Word32 iLength, + Word32 iCode, + Word32 iCodeIndex, + Word32 iReadLength, + UWord32 *iTables ) { Word32 iDifference; Word32 iMask; @@ -276,7 +302,13 @@ static void AddcodeTableList( TableList *ptable_list, Word32 iLength, Word32 iCo } } -static void CreateDecodeTable( LCLDDecoder *psLCLDDecoder, Word32 num, const UWord16 ( *ppuiEncTable )[2], Word32 iSize, Word32 iReadLength, UWord32 *iTables ) +static void CreateDecodeTable( + LCLDDecoder *psLCLDDecoder, + Word32 num, + const UWord16 ( *ppuiEncTable )[2], + Word32 iSize, + Word32 iReadLength, + UWord32 *iTables ) { Word32 n; UWord32 **ppsort_enc_table; @@ -369,6 +401,8 @@ static void CreateDecodeTable( LCLDDecoder *psLCLDDecoder, Word32 num, const UWo free( ppsort_enc_table[n] ); } free( ppsort_enc_table ); + + return; } @@ -583,7 +617,8 @@ ivas_error CreateLCLDDecoder( * *------------------------------------------------------------------------------------------*/ -void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder ) +void DeleteLCLDDecoder( + LCLDDecoder *psLCLDDecoder ) { Word32 k, n; @@ -738,20 +773,24 @@ void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder ) free( psLCLDDecoder ); } + + return; } + /*------------------------------------------------------------------------------------------* * Local function declarations * * *------------------------------------------------------------------------------------------*/ -static void ApplyRMSEnvelope_fx( const int32_t iNumBands, const int32_t *piBandwidths, const int32_t iNumGroups, const int32_t *piGroupLengths, int32_t **ppiRMSEnvelope, Word32 **ppfReal_fx, Word32 **ppfImag_fx ); +static void ApplyRMSEnvelope_fx( const Word32 iNumBands, const Word32 *piBandwidths, const Word32 iNumGroups, const Word32 *piGroupLengths, Word32 **ppiRMSEnvelope, Word32 **ppfReal_fx, Word32 **ppfImag_fx ); + static void ReplaceSign_fx( const Word32 iNumBlocks, const Word32 iNumLCLDBands, Word32 **ppiSignReal, Word32 **ppiSignImag, Word32 **ppfReal, Word32 **ppfImag, const Word32 *piBandwidths ); static void InvQuantizeSpectrum_fx( const Word32 iNumGroups, const Word32 *piGroupLengths, const Word32 iNumBands, const Word32 *piBandwidths, Word32 **ppiAlloc, Word32 **ppiQReal, Word32 **ppiQImag, Word32 **ppfReal, Word32 **ppfImag, NoiseGen *psNoiseGen ); + static void InvMSCoding_fx( const Word32 iNumBlocks, const Word32 iNumBands, const Word32 *piBandwidths, const Word32 iMSMode, const Word32 *piMSFlags, const Word32 *piLRPhaseDiffs, const Word32 *piMSPredCoefs, Word32 ***pppfReal, Word32 ***pppfImag ); -// static void InvMSCoding_fx( const int32_t iNumBlocks, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t iMSMode, const int32_t *piMSFlags, const int32_t *piLRPhaseDiffs, const int32_t *piMSPredCoefs, float ***pppfReal, float ***pppfImag, Word32 ***pppfReal_fx, Word32 ***pppfImag_fx,Word16 exp ); static Word32 ReadHeaderInformation( Word32 *piNumBands, ISAR_SPLIT_REND_BITS_HANDLE pBits ); @@ -765,15 +804,17 @@ static Word32 ReadRMSEnvelope( const Word32 iChannels, const Word32 *piNumGroups static Word32 ReadAllocInformation( Word32 *piAllocOffset, ISAR_SPLIT_REND_BITS_HANDLE pBits ); -// static int32_t -// ReadLCLDData( const int32_t iNumGroups, const int32_t *piGroupLengths, const int32_t iNumBands, const int32_t *piBandwidths, const int32_t *piPredEnable, int32_t **ppiAlloc, int32_t **ppiSignReal, int32_t **ppiSignImag, int32_t **ppiQReal, int32_t **ppiQImag, ISAR_SPLIT_REND_BITS_HANDLE pBits, uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] ); static Word32 ReadLCLDData_fx( const Word32 *piNumGroups, Word32 **ppiGroupLengths, const Word32 iNumBands, const Word32 iNumChannels, Word32 **ppiDecodingUnresolved, Word32 **ppiPredEnable, const Word32 iNumSubSets, const Word32 iSubSetId, Word32 ***pppiAlloc, Word32 ***pppiSignReal, Word32 ***pppiSignImag, Word32 ***pppiQReal, Word32 ***pppiQImag, Word32 **ppiDecodingFailed, ISAR_SPLIT_REND_BITS_HANDLE pBits, UWord32 ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] ); + static void ComputeAllocation( const Word32 iChannels, const Word32 *piNumGroups, const Word32 iNumBands, Word32 ***pppiSMR, const Word32 iAllocOffset, Word32 ***pppiAlloc ); -void SetDecodingUnresolved( LCLDDecoder *psLCLDDecoder ) + +void SetDecodingUnresolved( + LCLDDecoder *psLCLDDecoder ) { - int32_t n, ch; + Word32 n, ch; PredictionDecoder *psPredictionDecoder = psLCLDDecoder->psPredictionDecoder; + for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) @@ -783,15 +824,20 @@ void SetDecodingUnresolved( LCLDDecoder *psLCLDDecoder ) psPredictionDecoder->ppiDecodingFailedPrev[ch][n] = 1; } } + + return; } -int32_t AnyDecodingFailedPrev( LCLDDecoder *psLCLDDecoder ) + +Word16 AnyDecodingFailedPrev( + LCLDDecoder *psLCLDDecoder ) { - int32_t n, ch; + Word32 n, ch; PredictionDecoder *psPredictionDecoder = psLCLDDecoder->psPredictionDecoder; - for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) + + FOR( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { - for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) + FOR( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) { if ( psPredictionDecoder->ppiDecodingFailedPrev[ch][n] == 1 ) { @@ -799,16 +845,20 @@ int32_t AnyDecodingFailedPrev( LCLDDecoder *psLCLDDecoder ) } } } + return 0; } -int32_t AnyDecodingFailed( LCLDDecoder *psLCLDDecoder ) + +Word16 AnyDecodingFailed( + LCLDDecoder *psLCLDDecoder ) { - int32_t n, ch; + Word32 n, ch; PredictionDecoder *psPredictionDecoder = psLCLDDecoder->psPredictionDecoder; - for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) + + FOR( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { - for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) + FOR( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) { if ( psPredictionDecoder->ppiDecodingFailed[ch][n] == 1 ) { @@ -816,24 +866,32 @@ int32_t AnyDecodingFailed( LCLDDecoder *psLCLDDecoder ) } } } + return 0; } -int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder ) + +Word32 **GetDecodingFailedStatus( + LCLDDecoder *psLCLDDecoder ) { return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailed; } -int16_t GetNumSubSets( LCLDDecoder *psLCLDDecoder ) + +Word16 GetNumSubSets( + LCLDDecoder *psLCLDDecoder ) { - return (int16_t) psLCLDDecoder->psPredictionDecoder->iNumSubSets; + return (Word16) psLCLDDecoder->psPredictionDecoder->iNumSubSets; } -int32_t **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ) + +Word32 **GetDecodingFailedPrevStatus( + LCLDDecoder *psLCLDDecoder ) { return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailedPrev; } + static void UnpackReal_fx( const Word32 iChannels, const Word32 iNumBlocks, @@ -841,6 +899,7 @@ static void UnpackReal_fx( Word32 ***pppfImag_fx ) { Word32 ch, b, n; + FOR( ch = 0; ch < iChannels; ch++ ) { FOR( b = 0; b < LCLD_BANDS; b++ ) @@ -856,7 +915,11 @@ static void UnpackReal_fx( } } } + + return; } + + /*------------------------------------------------------------------------------------------* * Function DecodeLCLDFrame() * @@ -892,7 +955,6 @@ Word32 DecodeLCLDFrame( ReadRMSEnvelope( psLCLDDecoder->iChannels, (const Word32 *) psLCLDDecoder->piNumGroups, psLCLDDecoder->iNumBands, psLCLDDecoder->pppiRMSEnvelope, pBits ); - ReadAllocInformation( &psLCLDDecoder->iAllocOffset, pBits ); IF( EQ_32( psLCLDDecoder->iChannels, 2 ) && EQ_32( psLCLDDecoder->iCommonGrouping, 1 ) ) @@ -1052,6 +1114,7 @@ Word32 DecodeLCLDFrame( } } } + InvMSCoding_fx( psLCLDDecoder->iNumBlocks, psLCLDDecoder->iNumBands, psLCLDDecoder->piBandwidths, psLCLDDecoder->iMSMode, (const Word32 *) psLCLDDecoder->piMSFlags, @@ -1082,21 +1145,22 @@ Word32 DecodeLCLDFrame( } #endif } + IF( EQ_32( psLCLDDecoder->iRealOnlyOut, 1 ) ) { - UnpackReal_fx( psLCLDDecoder->iChannels, - psLCLDDecoder->iNumBlocks * 2, - pppfLCLDReal_fx, - pppfLCLDImag_fx ); + UnpackReal_fx( psLCLDDecoder->iChannels, psLCLDDecoder->iNumBlocks * 2, pppfLCLDReal_fx, pppfLCLDImag_fx ); } return AnyDecodingUnresolved( psLCLDDecoder->psPredictionDecoder ); } + + /*------------------------------------------------------------------------------------------* * Local functions * * *------------------------------------------------------------------------------------------*/ + static void ApplyRMSEnvelope_fx( const Word32 iNumBands, const Word32 *piBandwidths, @@ -1107,17 +1171,6 @@ static void ApplyRMSEnvelope_fx( Word32 **ppfImag_fx ) { Word32 b, k, n; - -#ifdef DEBUG - FILE *fp_real, *fp_imag, *fp_real_fx, *fp_imag_fx, *fp_real_inp, *fp_imag_inp, *fp_real_inp_fx, *fp_imag_inp_fx; - fp_real = fopen( "Float_code_real1.txt", "ab+" ); - fp_imag = fopen( "Float_code_imag1.txt", "ab+" ); - fp_real_fx = fopen( "Fixed_code_real1.txt", "ab+" ); - fp_imag_fx = fopen( "Fixed_code_imag1.txt", "ab+" ); - fp_real_inp = fopen( "real_input.txt", "ab+" ); - fp_imag_inp = fopen( "imag_input.txt", "ab+" ); -#endif - Word32 iBlockOffset, iFBOffset; iBlockOffset = 0; @@ -1174,18 +1227,11 @@ static void ApplyRMSEnvelope_fx( iBlockOffset++; } } -#ifdef DEBUG - fclose( fp_real ); - fclose( fp_imag ); - fclose( fp_imag_fx ); - fclose( fp_real_fx ); - fclose( fp_real_inp ); - fclose( fp_imag_inp ); -#endif return; } + static void ReplaceSign_fx( const Word32 iNumBlocks, const Word32 iNumLCLDBands, @@ -1221,9 +1267,11 @@ static void ReplaceSign_fx( } } } + return; } + static void InvQuantizeSpectrum_fx( const Word32 iNumGroups, const Word32 *piGroupLengths, @@ -1299,6 +1347,7 @@ static void InvQuantizeSpectrum_fx( return; } + static void InvMSCoding_fx( const Word32 iNumBlocks, const Word32 iNumBands, @@ -1310,7 +1359,6 @@ static void InvMSCoding_fx( Word32 ***pppfReal, Word32 ***pppfImag ) { - IF( GT_32( iMSMode, 0 ) ) { Word32 b; @@ -1326,7 +1374,6 @@ static void InvMSCoding_fx( { Word32 n; Word32 phaseIdx; - Word32 fPred; phaseIdx = piLRPhaseDiffs[bMSPred] - PHASE_MIN_VAL; @@ -1385,6 +1432,7 @@ static void InvMSCoding_fx( return; } + /* Currently only the number of bands in frame */ static Word32 ReadHeaderInformation( Word32 *piNumBands, @@ -1543,6 +1591,7 @@ static Word32 ReadMSInformation( return iBitsRead; } + static Word32 ReadGroupInformation( const Word32 iChannels, const Word32 iNumBlocks, @@ -1665,6 +1714,7 @@ static Word32 ReadGroupInformation( return iBitsRead; } + static Word32 BSForceBack( ISAR_SPLIT_REND_BITS_HANDLE pBits, Word32 iValue, @@ -1773,6 +1823,7 @@ static Word32 ReadAllocInformation( return iBitsRead; } + static Word32 ReadLCLDData_fx( const Word32 *piNumGroups, Word32 **ppiGroupLengths, @@ -1857,7 +1908,7 @@ static Word32 ReadLCLDData_fx( Word32 iQuantValue1 = 0; Word32 iQuantValue2 = 0; #ifdef USE_DEMOD_TABLES - const int32_t( *paiDemodTable )[2] = NULL; + const Word32( *paiDemodTable )[2] = NULL; #endif #define WMC_TOOL_SKIP pauiHuffmanTable = (const UWord32( * )[HUFF_DEC_TABLE_SIZE]) c_apauiHuffDecTables[iAlloc]; @@ -1963,6 +2014,7 @@ static Word32 ReadLCLDData_fx( return iBitsRead; } + static void ComputeAllocation( const Word32 iChannels, const Word32 *piNumGroups, diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 3f79a2c12..4495882e1 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -50,6 +50,7 @@ ivas_error CreateLCLDEncoder( const Word16 iNumBlocks, const Word16 iNumSubSets, const Word32 iRealOnlyOut); + void DeleteLCLDEncoder( LCLDEncoder *psLCLDEncoder ); @@ -61,7 +62,8 @@ Word32 EncodeLCLDFrame( Word32 *piNumiBites, const Word32 available_bits, ISAR_SPLIT_REND_BITS_HANDLE pBits, - Word16 *q_final); + Word16 *q_final +); Word32 GetNumGroups( LCLDEncoder *psLCLDEncoder @@ -75,8 +77,9 @@ ivas_error CreateLCLDDecoder( const Word32 iSampleRate, const Word32 iChannels, const Word32 iNumBlocks, - const Word32 iRealOnlyOut); + const Word32 iRealOnlyOut +); void DeleteLCLDDecoder( LCLDDecoder *psLCLDDecoder @@ -94,20 +97,12 @@ Word32 DecodeLCLDFrame( /*----------------------------------------------------------------------------------* * MSPred prototypes *----------------------------------------------------------------------------------*/ + Word32 quantPhase_fx( Word32 phase, - Word16 exp); - -int32_t quantPhase( - float phase + Word16 exp ); -void cplxmult( - float *pr1, - float *pi1, - float r2, - float i2 -); void cplxmult_fx( Word32 *pr1, Word32 *pi1, @@ -121,21 +116,13 @@ Word32 requantPhase( Word32 quantPred_fx( const Word32 pred, - Word16 exp); -int32_t quantPred( - const float pred + Word16 exp ); -float dequantPhase( - const int32_t phaseQ -); - -float dequantPred( - int32_t predQ -); Word32 dequantPred_fx( Word32 predQ ); + Word32 PrepEncode( Word32 *piQuant, const Word32 *piMSFlags, @@ -165,13 +152,13 @@ void DecodePredCoef( ); void writeMSPred( - int32_t *phaseQuant, - int32_t *predQuant, - const int32_t MSMode, - const int32_t numMSBands, - int32_t numBands, + Word32 *phaseQuant, + Word32 *predQuant, + const Word32 MSMode, + const Word32 numMSBands, + Word32 numBands, void *fid, - int32_t *piMsFlags + Word32 *piMsFlags ); Word32 CountMSBits( @@ -189,9 +176,9 @@ Word32 CountMSBits( typedef struct NOISE_GEN { - int32_t iNoiseBufferLength; - int32_t iNoiseBufferMask; - int32_t iNoiseBufferIndex; + Word32 iNoiseBufferLength; + Word32 iNoiseBufferMask; + Word32 iNoiseBufferIndex; float *pfNoiseBuffer; } NoiseGen; @@ -209,6 +196,7 @@ inline float GetNoise( NoiseGen *psNoiseGen ) return fNoiseSample; } + inline Word32 GetNoise_fx( NoiseGen *psNoiseGen ) { Word32 fNoiseSample; @@ -225,11 +213,12 @@ inline Word32 GetNoise_fx( NoiseGen *psNoiseGen ) *----------------------------------------------------------------------------------*/ extern void PerceptualModel( - const int32_t iMaxQuantBands, - const int32_t *piRMSEnvelope, - int32_t *piExcitation, - int32_t *piSMR + const Word32 iMaxQuantBands, + const Word32 *piRMSEnvelope, + Word32 *piExcitation, + Word32 *piSMR ); + extern void PerceptualModel_fx( const Word32 iMaxQuantBands, const Word32 *piRMSEnvelope, @@ -247,15 +236,16 @@ extern void PerceptualModelStereo_fx( Word32 *piSMR0, Word32 *piSMR1 ); + extern void PerceptualModelStereo( - const int32_t iMaxQuantBands, - const int32_t *piMSFlags, - const int32_t *piRMSEnvelope0, - const int32_t *piRMSEnvelope1, - int32_t *piExcitation0, - int32_t *piExcitation1, - int32_t *piSMR0, - int32_t *piSMR1 + const Word32 iMaxQuantBands, + const Word32 *piMSFlags, + const Word32 *piRMSEnvelope0, + const Word32 *piRMSEnvelope1, + Word32 *piExcitation0, + Word32 *piExcitation1, + Word32 *piSMR0, + Word32 *piSMR1 ); @@ -265,12 +255,12 @@ extern void PerceptualModelStereo( typedef struct PREDICTION_ENCODER { - int32_t iChannels; - int32_t iNumBlocks; + Word32 iChannels; + Word32 iNumBlocks; - int32_t iSubSetId; - int32_t iNumSubSets; - int32_t iMaxNumPredBands; + Word32 iSubSetId; + Word32 iNumSubSets; + Word32 iMaxNumPredBands; Word32 ***pppfInpBufReal_fx; /* channels, LCLD_PRED_WIN_LEN, bands */ Word32 ***pppfInpBufImag_fx; Word32 **ppfPredStateReal_fx; /* channels, bands */ @@ -292,17 +282,17 @@ typedef struct PREDICTION_ENCODER float pfRxxReal[2]; float pfRxxImag[2]; - int32_t *piPredChanEnable; - int32_t *piNumPredBands; - int32_t **ppiPredBandEnable; + Word32 *piPredChanEnable; + Word32 *piNumPredBands; + Word32 **ppiPredBandEnable; Word32 **ppfA1Real_fx; Word32 **ppfA1Imag_fx; float **ppfA1Real; float **ppfA1Imag; - int32_t **ppiA1Mag; - int32_t **ppiA1Phase; + Word32 **ppiA1Mag; + Word32 **ppiA1Phase; } PredictionEncoder; ivas_error CreatePredictionEncoder_fx( @@ -310,16 +300,17 @@ ivas_error CreatePredictionEncoder_fx( const Word32 iChannels, const Word32 iNumBlocks, const Word32 iNumSubSets, - const Word32 iMaxNumPredBands ); + const Word32 iMaxNumPredBands +); void DeletePredictionEncoder_fx( PredictionEncoder *psPredictionEncoder ); ivas_error CreatePredictionEncoder( PredictionEncoder **psPredictionEncoder_out, - const int32_t iChannels, - const int32_t iNumBlocks, - const int32_t iNumSubSets, - const int32_t iMaxNumPredBands + const Word32 iChannels, + const Word32 iNumBlocks, + const Word32 iNumSubSets, + const Word32 iMaxNumPredBands ); void DeletePredictionEncoder( @@ -334,33 +325,35 @@ void ComputePredictors( void ComputePredictors_fx( PredictionEncoder *psPredictionEncoder, Word32 ***pppfReal_fx, //Q12? - Word32 ***pppfImag_fx); //Q12? - + Word32 ***pppfImag_fx //Q12? + ); Word32 WritePredictors( PredictionEncoder *psPredictionEncoder, - ISAR_SPLIT_REND_BITS_HANDLE pBits ); + ISAR_SPLIT_REND_BITS_HANDLE pBits +); typedef struct PREDICTION_DECODER { - int32_t iChannels; - int32_t iNumBlocks; - int32_t iSubSetId; - int32_t iNumSubSets; + Word32 iChannels; + Word32 iNumBlocks; + Word32 iSubSetId; + Word32 iNumSubSets; Word32 **ppfPredStateReal_fx; Word32 **ppfPredStateImag_fx; - int32_t *piPredChanEnable; - int32_t **ppiPredBandEnable; - /* PLC_IMPROVEMENT */ - int32_t **ppiDecodingUnresolved; - int32_t **ppiDecodingFailed; - int32_t **ppiDecodingFailedPrev; + Word32 *piPredChanEnable; + Word32 **ppiPredBandEnable; + + /* PLC_IMPROVEMENT */ + Word32 **ppiDecodingUnresolved; + Word32 **ppiDecodingFailed; + Word32 **ppiDecodingFailedPrev; Word32 **ppfA1Real_fx; /* Q31 */ Word32 **ppfA1Imag_fx; /* Q31 */ - int32_t **ppiA1Mag; - int32_t **ppiA1Phase; + Word32 **ppiA1Mag; + Word32 **ppiA1Phase; Word32 pfMagLUT_fx[1 << PRED_QUNAT_FILTER_MAG_BITS]; /* Q31 */ Word32 pfP2RRealLUT_fx[1 << PRED_QUANT_FILTER_PHASE_BITS]; /* Q31 */ @@ -372,49 +365,62 @@ typedef struct PREDICTION_DECODER ivas_error CreatePredictionDecoder_fx( PredictionDecoder **psPredictionDecoder_out, const Word32 iChannels, - const Word32 iNumBlocks ); + const Word32 iNumBlocks +); void DeletePredictionDecoder_fx( - PredictionDecoder *psPredictionDecoder ); + PredictionDecoder *psPredictionDecoder +); -Word32 ReadPredictors_fx( +Word16 ReadPredictors_fx( PredictionDecoder *psPredictionDecoder, ISAR_SPLIT_REND_BITS_HANDLE pBits ); /* PLC_IMPROVEMENT */ void UpdatePredictionSubSetId( - PredictionEncoder *psPredictionEncoder); + PredictionEncoder *psPredictionEncoder +); void SetDecodingUnresolved( - LCLDDecoder *psLCLDDecoder); + LCLDDecoder *psLCLDDecoder +); -int32_t AnyDecodingFailedPrev( - LCLDDecoder *psLCLDDecoder); +Word16 AnyDecodingFailedPrev( + LCLDDecoder *psLCLDDecoder +); -int32_t AnyDecodingFailed( - LCLDDecoder *psLCLDDecoder); +Word16 AnyDecodingFailed( + LCLDDecoder *psLCLDDecoder +); -int32_t **GetDecodingFailedStatus( - LCLDDecoder *psLCLDDecoder); +Word32 **GetDecodingFailedStatus( + LCLDDecoder *psLCLDDecoder +); -int16_t GetNumSubSets( - LCLDDecoder *psLCLDDecoder); +Word16 GetNumSubSets( + LCLDDecoder *psLCLDDecoder +); -int32_t **GetDecodingFailedPrevStatus( - LCLDDecoder *psLCLDDecoder); +Word32 **GetDecodingFailedPrevStatus( + LCLDDecoder *psLCLDDecoder +); void SetDecodingPassed( - PredictionDecoder *psPredictionDecoder); + PredictionDecoder *psPredictionDecoder +); void UpdateDecodingUnresolved( - PredictionDecoder *psPredictionDecoder); + PredictionDecoder *psPredictionDecoder +); void UpdateDecodingFailedStatus( - PredictionDecoder *psPredictionDecoder); + PredictionDecoder *psPredictionDecoder +); -int32_t AnyDecodingUnresolved( - PredictionDecoder *psPredictionDecoder); +Word32 AnyDecodingUnresolved( + PredictionDecoder *psPredictionDecoder +); void ApplyInversePredictors_fx( PredictionDecoder *psPredictionDecoder, @@ -430,22 +436,23 @@ void ApplyInversePredictors_fx( typedef struct RMS_ENVELOPE_GROUPING RMSEnvelopeGrouping; RMSEnvelopeGrouping *CreateRMSEnvelopeGrouping( - const int32_t iNumBlocks + const Word32 iNumBlocks ); void DeleteRMSEnvelopeGrouping( RMSEnvelopeGrouping *psRMSEnvelopeGrouping ); + void ComputeEnvelopeGrouping( RMSEnvelopeGrouping *psRMSEnvelopeGrouping, - const int32_t iChannels, - const int32_t iNumBands, - const int32_t *piBandwidths, + const Word32 iChannels, + const Word32 iNumBands, + const Word32 *piBandwidths, Word32 ***pppfReal_fx, Word32 ***pppfImag_fx, - int32_t *piNumGroups, - int32_t *piGroupLengths, - int32_t ***pppiRMSEnvelope , + Word32 *piNumGroups, + Word32 *piGroupLengths, + Word32 ***pppiRMSEnvelope , Word16 q_final ); diff --git a/lib_isar/isar_lcld_rom_tables.c b/lib_isar/isar_lcld_rom_tables.c index 42554611f..d0274c153 100644 --- a/lib_isar/isar_lcld_rom_tables.c +++ b/lib_isar/isar_lcld_rom_tables.c @@ -37,77 +37,126 @@ #include "isar_lcld_prot.h" #include -/* clang-format off */ -const int32_t c_aiNumLcldBandsPerBand[MAX_BANDS_48] = { +/*----------------------------------------------------------------------* + * ISAR binaural rendering LCLD ROM tables + *-----------------------------------------------------------------------*/ + +const Word32 c_aiNumLcldBandsPerBand[MAX_BANDS_48] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 21, 24, 27, 31, 37, 43, 50, 60 }; -const int32_t c_aiBandIdPerLcldBand[LCLD_BANDS] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, - 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 -}; -/* phi = (-12:12)'/12 *pi; tmp = [cos(phi),sin(phi)]; tmp = tmp';sprintf('{%.8ff, %.8ff},\n',tmp(:)) */ -const float c_afRotRealImag[PHASE_MAX_VAL - PHASE_MIN_VAL + 1][2] = -{ - { -1.00000000f, -0.00000000f }, - { -0.96592583f, -0.25881905f }, - { -0.86602540f, -0.50000000f }, - { -0.70710678f, -0.70710678f }, - { -0.50000000f, -0.86602540f }, - { -0.25881905f, -0.96592583f }, - { 0.00000000f, -1.00000000f }, - { 0.25881905f, -0.96592583f }, - { 0.50000000f, -0.86602540f }, - { 0.70710678f, -0.70710678f }, - { 0.86602540f, -0.50000000f }, - { 0.96592583f, -0.25881905f }, - { 1.00000000f, 0.00000000f }, - { 0.96592583f, 0.25881905f }, - { 0.86602540f, 0.50000000f }, - { 0.70710678f, 0.70710678f }, - { 0.50000000f, 0.86602540f }, - { 0.25881905f, 0.96592583f }, - { 0.00000000f, 1.00000000f }, - { -0.25881905f, 0.96592583f }, - { -0.50000000f, 0.86602540f }, - { -0.70710678f, 0.70710678f }, - { -0.86602540f, 0.50000000f }, - { -0.96592583f, 0.25881905f }, - { -1.00000000f, 0.00000000f } +const Word32 c_aiBandIdPerLcldBand[LCLD_BANDS] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, + 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 }; const Word32 c_afRotRealImag_fx[PHASE_MAX_VAL - PHASE_MIN_VAL + 1][2] = /*Q31*/ -{ - {-2147483647,0,}, - {-2074309888,-555809664,}, - {-1859775360,-1073741824,}, - {-1518500224,-1518500224,}, - {-1073741824,-1859775360,}, - {-555809664,-2074309888,}, - {0,-2147483647,}, - {555809664,-2074309888,}, - {1073741824,-1859775360,}, - {1518500224,-1518500224,}, - {1859775360,-1073741824,}, - {2074309888,-555809664,}, - {2147483647,0,}, - {2074309888,555809664,}, - {1859775360,1073741824,}, - {1518500224,1518500224,}, - {1073741824,1859775360,}, - {555809664,2074309888,}, - {0,2147483647,}, - {-555809664,2074309888,}, - {-1073741824,1859775360,}, - {-1518500224,1518500224,}, - {-1859775360,1073741824,}, - {-2074309888,555809664,}, - {-2147483647,0,}, + { + { + -2147483647, + 0, + }, + { + -2074309888, + -555809664, + }, + { + -1859775360, + -1073741824, + }, + { + -1518500224, + -1518500224, + }, + { + -1073741824, + -1859775360, + }, + { + -555809664, + -2074309888, + }, + { + 0, + -2147483647, + }, + { + 555809664, + -2074309888, + }, + { + 1073741824, + -1859775360, + }, + { + 1518500224, + -1518500224, + }, + { + 1859775360, + -1073741824, + }, + { + 2074309888, + -555809664, + }, + { + 2147483647, + 0, + }, + { + 2074309888, + 555809664, + }, + { + 1859775360, + 1073741824, + }, + { + 1518500224, + 1518500224, + }, + { + 1073741824, + 1859775360, + }, + { + 555809664, + 2074309888, + }, + { + 0, + 2147483647, + }, + { + -555809664, + 2074309888, + }, + { + -1073741824, + 1859775360, + }, + { + -1518500224, + 1518500224, + }, + { + -1859775360, + 1073741824, + }, + { + -2074309888, + 555809664, + }, + { + -2147483647, + 0, + }, + + }; -}; /* Move this to perceptual model ? */ -const int32_t c_aiBandwidths48[MAX_BANDS_48] = -{ +const Word32 c_aiBandwidths48[MAX_BANDS_48] = { 1, 1, 1, @@ -133,44 +182,9 @@ const int32_t c_aiBandwidths48[MAX_BANDS_48] = 10, }; - -const float c_afScaleFactor[ALLOC_TABLE_SIZE] = { - 0.0f, - 0.353553390593f, - 0.420448207627f, - 0.500000000000f, - 0.594603557501f, - 0.707106781187f, - 0.840896415254f, - 1.000000000000f, - 1.189207115003f, - 1.414213562373f, - 1.681792830507f, - 2.000000000000f, - 2.378414230005f, - 2.828427124746f, - 3.363585661015f, - 4.0f, - 4.756828460011f, - 5.656854249492f, - 6.727171322030f, - 8.0f, - 9.513656920022f, - 11.31370849898f, - 13.45434264406f, - 16.00000000000f, - 19.02731384004f, - 22.62741699797f, - 26.90868528812f, - 32.000000000000000f, - 38.054627680087073f, - 45.254833995939038f, - 53.817370576237735f, - 64.000000000000000f, -}; const Word32 c_afScaleFactor_fx[ALLOC_TABLE_SIZE] = { //Q24 - 0, + 0, 5931641, 7053950, 8388608, @@ -203,40 +217,7 @@ const Word32 c_afScaleFactor_fx[ALLOC_TABLE_SIZE] = { 902905664, 1073741824, }; -const float c_afInvScaleFactor[ALLOC_TABLE_SIZE] = { - 0.0f, - 2.367513562373095f, - 2.046407115002721f, - 1.775900000000000f, - 1.536446415253715f, - 1.323056781186548f, - 1.132903557501360f, - 0.965800000000000f, - 0.821348207626857f, - 0.695103390593274f, - 0.587801778750680f, - 0.495800000000000f, - 0.418124103813429f, - 0.352176695296637f, - 0.296200889375340f, - 0.249400000000000f, - 0.209812051906714f, - 0.176538347648318f, - 0.148525444687670f, - 0.124900000000000f, - 0.105056025953357f, - 0.088388347648318f, - 0.074325444687670f, - 0.062500000000000f, - 0.052556025953357f, - 0.044194173824159f, - 0.037162722343835f, - 0.031250000000000f, - 0.026278012976679f, - 0.022097086912080f, - 0.018581361171918f, - 0.015625000000000f, -}; + const Word32 c_afInvScaleFactor_fx[ALLOC_TABLE_SIZE] = { //Q29 0, @@ -272,178 +253,48 @@ const Word32 c_afInvScaleFactor_fx[ALLOC_TABLE_SIZE] = { 9975792, 8388608, }; -const float c_afRMSEnvReconstructTable[ENV_RECONSTRUCT_TABLE_SIZE] = { - 2.32830644e-10f, - 3.29272254e-10f, - 4.65661287e-10f, - 6.58544508e-10f, - 9.31322575e-10f, - 1.31708902e-09f, - 1.86264515e-09f, - 2.63417803e-09f, - 3.72529030e-09f, - 5.26835606e-09f, - 7.45058060e-09f, - 1.05367121e-08f, - 1.49011612e-08f, - 2.10734243e-08f, - 2.98023224e-08f, - 4.21468485e-08f, - 5.96046448e-08f, - 8.42936970e-08f, - 1.19209290e-07f, - 1.68587394e-07f, - 2.38418579e-07f, - 3.37174788e-07f, - 4.76837158e-07f, - 6.74349576e-07f, - 9.53674316e-07f, - 1.34869915e-06f, - 1.90734863e-06f, - 2.69739830e-06f, - 3.81469727e-06f, - 5.39479661e-06f, - 7.62939453e-06f, - 1.07895932e-05f, - 1.52587891e-05f, - 2.15791864e-05f, - 3.05175781e-05f, - 4.31583729e-05f, - 6.10351562e-05f, - 8.63167458e-05f, - 1.22070312e-04f, - 1.72633492e-04f, - 2.44140625e-04f, - 3.45266983e-04f, - 4.88281250e-04f, - 6.90533966e-04f, - 9.76562500e-04f, - 1.38106793e-03f, - 1.95312500e-03f, - 2.76213586e-03f, - 3.90625000e-03f, - 5.52427173e-03f, - 7.81250000e-03f, - 1.10485435e-02f, - 1.56250000e-02f, - 2.20970869e-02f, - 3.12500000e-02f, - 4.41941738e-02f, - 6.25000000e-02f, - 8.83883476e-02f, - 1.25000000e-01f, - 1.76776695e-01f, - 2.50000000e-01f, - 3.53553391e-01f, - 5.00000000e-01f, - 7.07106781e-01f, - 1.00000000e+00f, - 1.41421356e+00f, - 2.00000000e+00f, - 2.82842712e+00f, - 4.00000000e+00f, - 5.65685425e+00f, - 8.00000000e+00f, - 1.13137085e+01f, - 1.60000000e+01f, - 2.26274170e+01f, - 3.20000000e+01f, - 4.52548340e+01f, - 6.40000000e+01f, - 9.05096680e+01f, - 1.28000000e+02f, - 1.81019336e+02f, - 2.56000000e+02f, - 3.62038672e+02f, - 5.12000000e+02f, - 7.24077344e+02f, - 1.02400000e+03f, - 1.44815469e+03f, - 2.04800000e+03f, - 2.89630938e+03f, - 4.09600000e+03f, - 5.79261875e+03f, - 8.19200000e+03f, - 1.15852375e+04f, - 1.63840000e+04f, - 2.31704750e+04f, - 3.27680000e+04f, - 4.63409500e+04f, - 6.55360000e+04f, - 9.26819000e+04f, - 1.31072000e+05f, - 1.85363800e+05f, - 2.62144000e+05f, - 3.70727600e+05f, - 5.24288000e+05f, - 7.41455200e+05f, - 1.04857600e+06f, - 1.48291040e+06f, - 2.09715200e+06f, - 2.96582080e+06f, - 4.19430400e+06f, - 5.93164160e+06f, - 8.38860800e+06f, - 1.18632832e+07f, - 1.67772160e+07f, - 2.37265664e+07f, - 3.35544320e+07f, - 4.74531328e+07f, - 6.71088640e+07f, - 9.49062656e+07f, - 1.34217728e+08f, - 1.89812531e+08f, - 2.68435456e+08f, - 3.79625062e+08f, - 5.36870912e+08f, - 7.59250125e+08f, - 1.07374182e+09f, - 1.51850025e+09f, - 2.14748365e+09f, - 3.03700050e+09f, - 4.29496730e+09f, -}; -const int16_t c_afRMSEnvReconstructTable_exp[ENV_RECONSTRUCT_TABLE_SIZE] = -{ +const Word16 c_afRMSEnvReconstructTable_exp[ENV_RECONSTRUCT_TABLE_SIZE] = { 62, 62, 61, 61, 60, 60, 59, 59, 58, 58, 57, 57, 56, 56, 55, 55, 54, 54, 53, 53, 52, 52, 51, 51, 50, 50, 49, 49, 48, 48, 47, 47, 46, 46, 45, 45, 44, 44, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 38, 38, 37, 37, 36, 36, 35, 35, 34, 34, 33, 33, 32, 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2 }; + const Word32 c_aiQuantMaxValues_fx[ALLOC_TABLE_SIZE] = { //Q21 - 0, -6291456, -6291456, -8388608, -10485760, -10485760, -12582912, -14680064, -16777216, -18874368, -25165824, -27262976, -33554432, -35651584, -39845888, -48234496, -54525952, -54525952, -56623104, -58720256, -65011712, -75497472, -79691776, -94371840, -113246208, -134217728, -159383552, -188743680, -226492416, -268435456, -318767104, -377487360, + 0, + 6291456, + 6291456, + 8388608, + 10485760, + 10485760, + 12582912, + 14680064, + 16777216, + 18874368, + 25165824, + 27262976, + 33554432, + 35651584, + 39845888, + 48234496, + 54525952, + 54525952, + 56623104, + 58720256, + 65011712, + 75497472, + 79691776, + 94371840, + 113246208, + 134217728, + 159383552, + 188743680, + 226492416, + 268435456, + 318767104, + 377487360, }; -const int32_t c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { + +const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { 0, 3, 3, @@ -477,6 +328,7 @@ const int32_t c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { 152, 180, }; + const Word32 c_aiHuffmanDim_fx[ALLOC_TABLE_SIZE] = { 2, 2, @@ -547,7 +399,7 @@ const Word32 c_aiHuffmanMod_fx[ALLOC_TABLE_SIZE] = { 1, }; -const int32_t c_aiHuffmanDim[ALLOC_TABLE_SIZE] = { +const Word32 c_aiHuffmanDim[ALLOC_TABLE_SIZE] = { 2, 2, 2, @@ -582,7 +434,7 @@ const int32_t c_aiHuffmanDim[ALLOC_TABLE_SIZE] = { 1, }; -const int32_t c_aiHuffmanMod[ALLOC_TABLE_SIZE] = { +const Word32 c_aiHuffmanMod[ALLOC_TABLE_SIZE] = { 0, 4, 4, @@ -616,7 +468,7 @@ const int32_t c_aiHuffmanMod[ALLOC_TABLE_SIZE] = { 1, 1, }; -const int32_t c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { +const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { 1, 16, 16, @@ -651,7 +503,7 @@ const int32_t c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { 181, }; -const uint32_t c_aaiRMSEnvHuffEnc[64][2] = { +const UWord32 c_aaiRMSEnvHuffEnc[64][2] = { { 0x0014, 0x0000 }, { 0x0014, 0x0001 }, { 0x0014, 0x0002 }, @@ -718,7 +570,7 @@ const uint32_t c_aaiRMSEnvHuffEnc[64][2] = { { 0x0013, 0x0015 }, }; -const uint32_t c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE] = { +const UWord32 c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE] = { { 0x0002ffff, 0x0001ffff, @@ -955,10197 +807,10136 @@ const uint32_t c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE] = { }, }; -const uint16_t c_aauiLCLDHuffEnc1[16][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0005, 0x0001 }, - { 0x000b, 0x0000 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - }; +const UWord16 c_aauiLCLDHuffEnc1[16][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0005, 0x0001 }, + { 0x000b, 0x0000 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, +}; -const uint16_t c_aauiLCLDHuffEnc2[16][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0005, 0x0001 }, - { 0x000c, 0x0000 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000b, 0x0003 }, - }; +const UWord16 c_aauiLCLDHuffEnc2[16][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0005, 0x0001 }, + { 0x000c, 0x0000 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000b, 0x0003 }, +}; -const uint16_t c_aauiLCLDHuffEnc3[25][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000d, 0x0000 }, - { 0x000d, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000d, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x0009, 0x0001 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000d, 0x000a }, - { 0x000d, 0x000b }, - { 0x000d, 0x000c }, - { 0x000d, 0x000d }, +const UWord16 c_aauiLCLDHuffEnc3[25][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000d, 0x0000 }, + { 0x000d, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000d, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x0009, 0x0001 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000d, 0x000a }, + { 0x000d, 0x000b }, + { 0x000d, 0x000c }, + { 0x000d, 0x000d }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc4[36][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x0010, 0x0000 }, - { 0x0010, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x000e, 0x0006 }, - { 0x0010, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000e, 0x0007 }, - { 0x0010, 0x0006 }, - { 0x0010, 0x0007 }, - { 0x0010, 0x0008 }, - { 0x0010, 0x0009 }, - { 0x0010, 0x000a }, - { 0x0010, 0x000b }, - { 0x0010, 0x000c }, - { 0x0010, 0x000d }, - { 0x0010, 0x000e }, - { 0x0010, 0x000f }, - { 0x0010, 0x0010 }, - { 0x0010, 0x0011 }, - { 0x000f, 0x0009 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, +const UWord16 c_aauiLCLDHuffEnc4[36][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x0010, 0x0000 }, + { 0x0010, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x000e, 0x0006 }, + { 0x0010, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000e, 0x0007 }, + { 0x0010, 0x0006 }, + { 0x0010, 0x0007 }, + { 0x0010, 0x0008 }, + { 0x0010, 0x0009 }, + { 0x0010, 0x000a }, + { 0x0010, 0x000b }, + { 0x0010, 0x000c }, + { 0x0010, 0x000d }, + { 0x0010, 0x000e }, + { 0x0010, 0x000f }, + { 0x0010, 0x0010 }, + { 0x0010, 0x0011 }, + { 0x000f, 0x0009 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc5[36][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000f, 0x0003 }, - { 0x0012, 0x0000 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x0011, 0x0008 }, - { 0x0012, 0x0001 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000d, 0x0001 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0011, 0x0009 }, - { 0x0011, 0x000a }, - { 0x0012, 0x0007 }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, - { 0x0012, 0x000c }, - { 0x0012, 0x000d }, - { 0x0012, 0x000e }, - { 0x0012, 0x000f }, - { 0x0011, 0x000b }, +const UWord16 c_aauiLCLDHuffEnc5[36][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000f, 0x0003 }, + { 0x0012, 0x0000 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x0011, 0x0008 }, + { 0x0012, 0x0001 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000d, 0x0001 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0011, 0x0009 }, + { 0x0011, 0x000a }, + { 0x0012, 0x0007 }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, + { 0x0012, 0x000c }, + { 0x0012, 0x000d }, + { 0x0012, 0x000e }, + { 0x0012, 0x000f }, + { 0x0011, 0x000b }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc6[49][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x0010, 0x0003 }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000a, 0x0002 }, - { 0x0010, 0x0004 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x0012, 0x0007 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x000a, 0x0003 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x0011, 0x0004 }, - { 0x0014, 0x0006 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0010, 0x0005 }, - { 0x000f, 0x0003 }, - { 0x0011, 0x0005 }, - { 0x0014, 0x0009 }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0014, 0x000c }, - { 0x0014, 0x000d }, - { 0x0013, 0x000d }, - { 0x0014, 0x000e }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0014, 0x0013 }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, +const UWord16 c_aauiLCLDHuffEnc6[49][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x0010, 0x0003 }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000a, 0x0002 }, + { 0x0010, 0x0004 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x0012, 0x0007 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x000a, 0x0003 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x0011, 0x0004 }, + { 0x0014, 0x0006 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0010, 0x0005 }, + { 0x000f, 0x0003 }, + { 0x0011, 0x0005 }, + { 0x0014, 0x0009 }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0014, 0x000c }, + { 0x0014, 0x000d }, + { 0x0013, 0x000d }, + { 0x0014, 0x000e }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0014, 0x0013 }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc7[64][2] = - { - { 0x0002, 0x0001 }, - { 0x0002, 0x0002 }, - { 0x0005, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000f, 0x0002 }, - { 0x0015, 0x0000 }, - { 0x0015, 0x0001 }, - { 0x0015, 0x0002 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0009, 0x0002 }, - { 0x000f, 0x0003 }, - { 0x0014, 0x0011 }, - { 0x0015, 0x0003 }, - { 0x0015, 0x0004 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0007, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x0010, 0x0002 }, - { 0x0015, 0x0005 }, - { 0x0015, 0x0006 }, - { 0x0015, 0x0007 }, - { 0x000a, 0x0001 }, - { 0x0009, 0x0003 }, - { 0x000c, 0x0001 }, - { 0x000f, 0x0004 }, - { 0x0012, 0x0006 }, - { 0x0015, 0x0008 }, - { 0x0015, 0x0009 }, - { 0x0015, 0x000a }, - { 0x000f, 0x0005 }, - { 0x000e, 0x0003 }, - { 0x0010, 0x0003 }, - { 0x0012, 0x0007 }, - { 0x0014, 0x0012 }, - { 0x0015, 0x000b }, - { 0x0015, 0x000c }, - { 0x0015, 0x000d }, - { 0x0014, 0x0013 }, - { 0x0014, 0x0014 }, - { 0x0013, 0x000b }, - { 0x0014, 0x0015 }, - { 0x0015, 0x000e }, - { 0x0015, 0x000f }, - { 0x0015, 0x0010 }, - { 0x0015, 0x0011 }, - { 0x0015, 0x0012 }, - { 0x0015, 0x0013 }, - { 0x0015, 0x0014 }, - { 0x0015, 0x0015 }, - { 0x0015, 0x0016 }, - { 0x0015, 0x0017 }, - { 0x0015, 0x0018 }, - { 0x0015, 0x0019 }, - { 0x0015, 0x001a }, - { 0x0015, 0x001b }, - { 0x0015, 0x001c }, - { 0x0015, 0x001d }, - { 0x0015, 0x001e }, - { 0x0015, 0x001f }, - { 0x0015, 0x0020 }, - { 0x0015, 0x0021 }, - }; +const UWord16 c_aauiLCLDHuffEnc7[64][2] = { + { 0x0002, 0x0001 }, + { 0x0002, 0x0002 }, + { 0x0005, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000f, 0x0002 }, + { 0x0015, 0x0000 }, + { 0x0015, 0x0001 }, + { 0x0015, 0x0002 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0009, 0x0002 }, + { 0x000f, 0x0003 }, + { 0x0014, 0x0011 }, + { 0x0015, 0x0003 }, + { 0x0015, 0x0004 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0007, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x0010, 0x0002 }, + { 0x0015, 0x0005 }, + { 0x0015, 0x0006 }, + { 0x0015, 0x0007 }, + { 0x000a, 0x0001 }, + { 0x0009, 0x0003 }, + { 0x000c, 0x0001 }, + { 0x000f, 0x0004 }, + { 0x0012, 0x0006 }, + { 0x0015, 0x0008 }, + { 0x0015, 0x0009 }, + { 0x0015, 0x000a }, + { 0x000f, 0x0005 }, + { 0x000e, 0x0003 }, + { 0x0010, 0x0003 }, + { 0x0012, 0x0007 }, + { 0x0014, 0x0012 }, + { 0x0015, 0x000b }, + { 0x0015, 0x000c }, + { 0x0015, 0x000d }, + { 0x0014, 0x0013 }, + { 0x0014, 0x0014 }, + { 0x0013, 0x000b }, + { 0x0014, 0x0015 }, + { 0x0015, 0x000e }, + { 0x0015, 0x000f }, + { 0x0015, 0x0010 }, + { 0x0015, 0x0011 }, + { 0x0015, 0x0012 }, + { 0x0015, 0x0013 }, + { 0x0015, 0x0014 }, + { 0x0015, 0x0015 }, + { 0x0015, 0x0016 }, + { 0x0015, 0x0017 }, + { 0x0015, 0x0018 }, + { 0x0015, 0x0019 }, + { 0x0015, 0x001a }, + { 0x0015, 0x001b }, + { 0x0015, 0x001c }, + { 0x0015, 0x001d }, + { 0x0015, 0x001e }, + { 0x0015, 0x001f }, + { 0x0015, 0x0020 }, + { 0x0015, 0x0021 }, +}; -const uint16_t c_aauiLCLDHuffEnc8[81][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000f, 0x0002 }, - { 0x0014, 0x0008 }, - { 0x0017, 0x0000 }, - { 0x0017, 0x0001 }, - { 0x0017, 0x0002 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000f, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0015, 0x000d }, - { 0x0017, 0x0003 }, - { 0x0017, 0x0004 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0007, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x0010, 0x0002 }, - { 0x0013, 0x0005 }, - { 0x0017, 0x0005 }, - { 0x0017, 0x0006 }, - { 0x0017, 0x0007 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000b, 0x0001 }, - { 0x000f, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0016, 0x0015 }, - { 0x0017, 0x0008 }, - { 0x0017, 0x0009 }, - { 0x0017, 0x000a }, - { 0x000f, 0x0005 }, - { 0x000e, 0x0003 }, - { 0x0010, 0x0003 }, - { 0x0012, 0x0006 }, - { 0x0014, 0x0009 }, - { 0x0017, 0x000b }, - { 0x0017, 0x000c }, - { 0x0017, 0x000d }, - { 0x0017, 0x000e }, - { 0x0013, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0013, 0x0007 }, - { 0x0015, 0x000e }, - { 0x0017, 0x000f }, - { 0x0017, 0x0010 }, - { 0x0017, 0x0011 }, - { 0x0017, 0x0012 }, - { 0x0017, 0x0013 }, - { 0x0016, 0x0016 }, - { 0x0016, 0x0017 }, - { 0x0015, 0x000f }, - { 0x0016, 0x0018 }, - { 0x0017, 0x0014 }, - { 0x0017, 0x0015 }, - { 0x0017, 0x0016 }, - { 0x0017, 0x0017 }, - { 0x0017, 0x0018 }, - { 0x0017, 0x0019 }, - { 0x0017, 0x001a }, - { 0x0017, 0x001b }, - { 0x0017, 0x001c }, - { 0x0017, 0x001d }, - { 0x0017, 0x001e }, - { 0x0017, 0x001f }, - { 0x0017, 0x0020 }, - { 0x0017, 0x0021 }, - { 0x0017, 0x0022 }, - { 0x0017, 0x0023 }, - { 0x0017, 0x0024 }, - { 0x0017, 0x0025 }, - { 0x0017, 0x0026 }, - { 0x0017, 0x0027 }, - { 0x0017, 0x0028 }, - { 0x0017, 0x0029 }, - { 0x0016, 0x0019 }, +const UWord16 c_aauiLCLDHuffEnc8[81][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000f, 0x0002 }, + { 0x0014, 0x0008 }, + { 0x0017, 0x0000 }, + { 0x0017, 0x0001 }, + { 0x0017, 0x0002 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000f, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0015, 0x000d }, + { 0x0017, 0x0003 }, + { 0x0017, 0x0004 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0007, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x0010, 0x0002 }, + { 0x0013, 0x0005 }, + { 0x0017, 0x0005 }, + { 0x0017, 0x0006 }, + { 0x0017, 0x0007 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000b, 0x0001 }, + { 0x000f, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0016, 0x0015 }, + { 0x0017, 0x0008 }, + { 0x0017, 0x0009 }, + { 0x0017, 0x000a }, + { 0x000f, 0x0005 }, + { 0x000e, 0x0003 }, + { 0x0010, 0x0003 }, + { 0x0012, 0x0006 }, + { 0x0014, 0x0009 }, + { 0x0017, 0x000b }, + { 0x0017, 0x000c }, + { 0x0017, 0x000d }, + { 0x0017, 0x000e }, + { 0x0013, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0013, 0x0007 }, + { 0x0015, 0x000e }, + { 0x0017, 0x000f }, + { 0x0017, 0x0010 }, + { 0x0017, 0x0011 }, + { 0x0017, 0x0012 }, + { 0x0017, 0x0013 }, + { 0x0016, 0x0016 }, + { 0x0016, 0x0017 }, + { 0x0015, 0x000f }, + { 0x0016, 0x0018 }, + { 0x0017, 0x0014 }, + { 0x0017, 0x0015 }, + { 0x0017, 0x0016 }, + { 0x0017, 0x0017 }, + { 0x0017, 0x0018 }, + { 0x0017, 0x0019 }, + { 0x0017, 0x001a }, + { 0x0017, 0x001b }, + { 0x0017, 0x001c }, + { 0x0017, 0x001d }, + { 0x0017, 0x001e }, + { 0x0017, 0x001f }, + { 0x0017, 0x0020 }, + { 0x0017, 0x0021 }, + { 0x0017, 0x0022 }, + { 0x0017, 0x0023 }, + { 0x0017, 0x0024 }, + { 0x0017, 0x0025 }, + { 0x0017, 0x0026 }, + { 0x0017, 0x0027 }, + { 0x0017, 0x0028 }, + { 0x0017, 0x0029 }, + { 0x0016, 0x0019 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc9[100][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000d, 0x0002 }, - { 0x0011, 0x0004 }, - { 0x0014, 0x000a }, - { 0x0017, 0x0000 }, - { 0x0017, 0x0001 }, - { 0x0017, 0x0002 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0009, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x0010, 0x0004 }, - { 0x0013, 0x0007 }, - { 0x0016, 0x0018 }, - { 0x0017, 0x0003 }, - { 0x0017, 0x0004 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0008, 0x0002 }, - { 0x000b, 0x0002 }, - { 0x000e, 0x0002 }, - { 0x0011, 0x0005 }, - { 0x0014, 0x000b }, - { 0x0016, 0x0019 }, - { 0x0017, 0x0005 }, - { 0x0017, 0x0006 }, - { 0x0009, 0x0003 }, - { 0x0008, 0x0003 }, - { 0x000b, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0015, 0x000f }, - { 0x0017, 0x0007 }, - { 0x0017, 0x0008 }, - { 0x0017, 0x0009 }, - { 0x000d, 0x0005 }, - { 0x000c, 0x0003 }, - { 0x000e, 0x0003 }, - { 0x0010, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0014, 0x000c }, - { 0x0017, 0x000a }, - { 0x0016, 0x001a }, - { 0x0017, 0x000b }, - { 0x0017, 0x000c }, - { 0x0011, 0x0006 }, - { 0x0010, 0x0007 }, - { 0x0011, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0015, 0x0010 }, - { 0x0017, 0x000d }, - { 0x0017, 0x000e }, - { 0x0017, 0x000f }, - { 0x0017, 0x0010 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0014, 0x000d }, - { 0x0015, 0x0011 }, - { 0x0017, 0x0011 }, - { 0x0016, 0x001b }, - { 0x0017, 0x0012 }, - { 0x0017, 0x0013 }, - { 0x0017, 0x0014 }, - { 0x0017, 0x0015 }, - { 0x0017, 0x0016 }, - { 0x0015, 0x0012 }, - { 0x0015, 0x0013 }, - { 0x0017, 0x0017 }, - { 0x0016, 0x001c }, - { 0x0017, 0x0018 }, - { 0x0017, 0x0019 }, - { 0x0017, 0x001a }, - { 0x0017, 0x001b }, - { 0x0017, 0x001c }, - { 0x0017, 0x001d }, - { 0x0017, 0x001e }, - { 0x0017, 0x001f }, - { 0x0017, 0x0020 }, - { 0x0017, 0x0021 }, - { 0x0017, 0x0022 }, - { 0x0017, 0x0023 }, - { 0x0017, 0x0024 }, - { 0x0017, 0x0025 }, - { 0x0017, 0x0026 }, - { 0x0017, 0x0027 }, - { 0x0017, 0x0028 }, - { 0x0017, 0x0029 }, - { 0x0017, 0x002a }, - { 0x0017, 0x002b }, - { 0x0017, 0x002c }, - { 0x0017, 0x002d }, - { 0x0017, 0x002e }, - { 0x0017, 0x002f }, - { 0x0016, 0x001d }, +const UWord16 c_aauiLCLDHuffEnc9[100][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000d, 0x0002 }, + { 0x0011, 0x0004 }, + { 0x0014, 0x000a }, + { 0x0017, 0x0000 }, + { 0x0017, 0x0001 }, + { 0x0017, 0x0002 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0009, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x0010, 0x0004 }, + { 0x0013, 0x0007 }, + { 0x0016, 0x0018 }, + { 0x0017, 0x0003 }, + { 0x0017, 0x0004 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0008, 0x0002 }, + { 0x000b, 0x0002 }, + { 0x000e, 0x0002 }, + { 0x0011, 0x0005 }, + { 0x0014, 0x000b }, + { 0x0016, 0x0019 }, + { 0x0017, 0x0005 }, + { 0x0017, 0x0006 }, + { 0x0009, 0x0003 }, + { 0x0008, 0x0003 }, + { 0x000b, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0015, 0x000f }, + { 0x0017, 0x0007 }, + { 0x0017, 0x0008 }, + { 0x0017, 0x0009 }, + { 0x000d, 0x0005 }, + { 0x000c, 0x0003 }, + { 0x000e, 0x0003 }, + { 0x0010, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0014, 0x000c }, + { 0x0017, 0x000a }, + { 0x0016, 0x001a }, + { 0x0017, 0x000b }, + { 0x0017, 0x000c }, + { 0x0011, 0x0006 }, + { 0x0010, 0x0007 }, + { 0x0011, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0015, 0x0010 }, + { 0x0017, 0x000d }, + { 0x0017, 0x000e }, + { 0x0017, 0x000f }, + { 0x0017, 0x0010 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0014, 0x000d }, + { 0x0015, 0x0011 }, + { 0x0017, 0x0011 }, + { 0x0016, 0x001b }, + { 0x0017, 0x0012 }, + { 0x0017, 0x0013 }, + { 0x0017, 0x0014 }, + { 0x0017, 0x0015 }, + { 0x0017, 0x0016 }, + { 0x0015, 0x0012 }, + { 0x0015, 0x0013 }, + { 0x0017, 0x0017 }, + { 0x0016, 0x001c }, + { 0x0017, 0x0018 }, + { 0x0017, 0x0019 }, + { 0x0017, 0x001a }, + { 0x0017, 0x001b }, + { 0x0017, 0x001c }, + { 0x0017, 0x001d }, + { 0x0017, 0x001e }, + { 0x0017, 0x001f }, + { 0x0017, 0x0020 }, + { 0x0017, 0x0021 }, + { 0x0017, 0x0022 }, + { 0x0017, 0x0023 }, + { 0x0017, 0x0024 }, + { 0x0017, 0x0025 }, + { 0x0017, 0x0026 }, + { 0x0017, 0x0027 }, + { 0x0017, 0x0028 }, + { 0x0017, 0x0029 }, + { 0x0017, 0x002a }, + { 0x0017, 0x002b }, + { 0x0017, 0x002c }, + { 0x0017, 0x002d }, + { 0x0017, 0x002e }, + { 0x0017, 0x002f }, + { 0x0016, 0x001d }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc10[169][2] = - { - { 0x0001, 0x0001 }, - { 0x0004, 0x0002 }, - { 0x0005, 0x0002 }, - { 0x0007, 0x0002 }, - { 0x000a, 0x0002 }, - { 0x000e, 0x0004 }, - { 0x0011, 0x0007 }, - { 0x0013, 0x0012 }, - { 0x0016, 0x0000 }, - { 0x0016, 0x0001 }, - { 0x0016, 0x0002 }, - { 0x0016, 0x0003 }, - { 0x0016, 0x0004 }, - { 0x0004, 0x0003 }, - { 0x0003, 0x0003 }, - { 0x0004, 0x0004 }, - { 0x0007, 0x0003 }, - { 0x000a, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x0010, 0x0007 }, - { 0x0013, 0x0013 }, - { 0x0015, 0x0035 }, - { 0x0016, 0x0005 }, - { 0x0016, 0x0006 }, - { 0x0016, 0x0007 }, - { 0x0016, 0x0008 }, - { 0x0005, 0x0003 }, - { 0x0004, 0x0005 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0002 }, - { 0x000b, 0x0002 }, - { 0x000e, 0x0005 }, - { 0x0010, 0x0008 }, - { 0x0013, 0x0014 }, - { 0x0014, 0x001d }, - { 0x0016, 0x0009 }, - { 0x0016, 0x000a }, - { 0x0016, 0x000b }, - { 0x0016, 0x000c }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0008, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000f, 0x0005 }, - { 0x0011, 0x0008 }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0016, 0x000d }, - { 0x0016, 0x000e }, - { 0x0016, 0x000f }, - { 0x0016, 0x0010 }, - { 0x000a, 0x0005 }, - { 0x0009, 0x0003 }, - { 0x000b, 0x0003 }, - { 0x000d, 0x0006 }, - { 0x000f, 0x0006 }, - { 0x0011, 0x0009 }, - { 0x0013, 0x0015 }, - { 0x0014, 0x0020 }, - { 0x0016, 0x0011 }, - { 0x0016, 0x0012 }, - { 0x0016, 0x0013 }, - { 0x0016, 0x0014 }, - { 0x0016, 0x0015 }, - { 0x000e, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0007 }, - { 0x000f, 0x0007 }, - { 0x0011, 0x000a }, - { 0x0012, 0x000c }, - { 0x0016, 0x0016 }, - { 0x0016, 0x0017 }, - { 0x0016, 0x0018 }, - { 0x0016, 0x0019 }, - { 0x0016, 0x001a }, - { 0x0016, 0x001b }, - { 0x0016, 0x001c }, - { 0x0011, 0x000b }, - { 0x0010, 0x0009 }, - { 0x0011, 0x000c }, - { 0x0011, 0x000d }, - { 0x0013, 0x0016 }, - { 0x0016, 0x001d }, - { 0x0016, 0x001e }, - { 0x0016, 0x001f }, - { 0x0016, 0x0020 }, - { 0x0016, 0x0021 }, - { 0x0016, 0x0022 }, - { 0x0016, 0x0023 }, - { 0x0016, 0x0024 }, - { 0x0014, 0x0021 }, - { 0x0014, 0x0022 }, - { 0x0012, 0x000d }, - { 0x0013, 0x0017 }, - { 0x0016, 0x0025 }, - { 0x0016, 0x0026 }, - { 0x0016, 0x0027 }, - { 0x0016, 0x0028 }, - { 0x0016, 0x0029 }, - { 0x0016, 0x002a }, - { 0x0016, 0x002b }, - { 0x0016, 0x002c }, - { 0x0016, 0x002d }, - { 0x0015, 0x0036 }, - { 0x0015, 0x0037 }, - { 0x0014, 0x0023 }, - { 0x0015, 0x0038 }, - { 0x0016, 0x002e }, - { 0x0016, 0x002f }, - { 0x0016, 0x0030 }, - { 0x0016, 0x0031 }, - { 0x0016, 0x0032 }, - { 0x0016, 0x0033 }, - { 0x0016, 0x0034 }, - { 0x0016, 0x0035 }, - { 0x0016, 0x0036 }, - { 0x0016, 0x0037 }, - { 0x0016, 0x0038 }, - { 0x0016, 0x0039 }, - { 0x0016, 0x003a }, - { 0x0016, 0x003b }, - { 0x0016, 0x003c }, - { 0x0016, 0x003d }, - { 0x0016, 0x003e }, - { 0x0016, 0x003f }, - { 0x0016, 0x0040 }, - { 0x0016, 0x0041 }, - { 0x0016, 0x0042 }, - { 0x0016, 0x0043 }, - { 0x0016, 0x0044 }, - { 0x0016, 0x0045 }, - { 0x0016, 0x0046 }, - { 0x0016, 0x0047 }, - { 0x0016, 0x0048 }, - { 0x0016, 0x0049 }, - { 0x0016, 0x004a }, - { 0x0016, 0x004b }, - { 0x0016, 0x004c }, - { 0x0016, 0x004d }, - { 0x0016, 0x004e }, - { 0x0016, 0x004f }, - { 0x0016, 0x0050 }, - { 0x0016, 0x0051 }, - { 0x0016, 0x0052 }, - { 0x0016, 0x0053 }, - { 0x0016, 0x0054 }, - { 0x0016, 0x0055 }, - { 0x0016, 0x0056 }, - { 0x0016, 0x0057 }, - { 0x0016, 0x0058 }, - { 0x0016, 0x0059 }, - { 0x0016, 0x005a }, - { 0x0016, 0x005b }, - { 0x0016, 0x005c }, - { 0x0016, 0x005d }, - { 0x0016, 0x005e }, - { 0x0016, 0x005f }, - { 0x0016, 0x0060 }, - { 0x0016, 0x0061 }, - { 0x0016, 0x0062 }, - { 0x0016, 0x0063 }, - { 0x0016, 0x0064 }, - { 0x0016, 0x0065 }, - { 0x0016, 0x0066 }, - { 0x0016, 0x0067 }, - { 0x0016, 0x0068 }, - { 0x0016, 0x0069 }, - { 0x0015, 0x0039 }, +const UWord16 c_aauiLCLDHuffEnc10[169][2] = { + { 0x0001, 0x0001 }, + { 0x0004, 0x0002 }, + { 0x0005, 0x0002 }, + { 0x0007, 0x0002 }, + { 0x000a, 0x0002 }, + { 0x000e, 0x0004 }, + { 0x0011, 0x0007 }, + { 0x0013, 0x0012 }, + { 0x0016, 0x0000 }, + { 0x0016, 0x0001 }, + { 0x0016, 0x0002 }, + { 0x0016, 0x0003 }, + { 0x0016, 0x0004 }, + { 0x0004, 0x0003 }, + { 0x0003, 0x0003 }, + { 0x0004, 0x0004 }, + { 0x0007, 0x0003 }, + { 0x000a, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x0010, 0x0007 }, + { 0x0013, 0x0013 }, + { 0x0015, 0x0035 }, + { 0x0016, 0x0005 }, + { 0x0016, 0x0006 }, + { 0x0016, 0x0007 }, + { 0x0016, 0x0008 }, + { 0x0005, 0x0003 }, + { 0x0004, 0x0005 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0002 }, + { 0x000b, 0x0002 }, + { 0x000e, 0x0005 }, + { 0x0010, 0x0008 }, + { 0x0013, 0x0014 }, + { 0x0014, 0x001d }, + { 0x0016, 0x0009 }, + { 0x0016, 0x000a }, + { 0x0016, 0x000b }, + { 0x0016, 0x000c }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0008, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000f, 0x0005 }, + { 0x0011, 0x0008 }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0016, 0x000d }, + { 0x0016, 0x000e }, + { 0x0016, 0x000f }, + { 0x0016, 0x0010 }, + { 0x000a, 0x0005 }, + { 0x0009, 0x0003 }, + { 0x000b, 0x0003 }, + { 0x000d, 0x0006 }, + { 0x000f, 0x0006 }, + { 0x0011, 0x0009 }, + { 0x0013, 0x0015 }, + { 0x0014, 0x0020 }, + { 0x0016, 0x0011 }, + { 0x0016, 0x0012 }, + { 0x0016, 0x0013 }, + { 0x0016, 0x0014 }, + { 0x0016, 0x0015 }, + { 0x000e, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0007 }, + { 0x000f, 0x0007 }, + { 0x0011, 0x000a }, + { 0x0012, 0x000c }, + { 0x0016, 0x0016 }, + { 0x0016, 0x0017 }, + { 0x0016, 0x0018 }, + { 0x0016, 0x0019 }, + { 0x0016, 0x001a }, + { 0x0016, 0x001b }, + { 0x0016, 0x001c }, + { 0x0011, 0x000b }, + { 0x0010, 0x0009 }, + { 0x0011, 0x000c }, + { 0x0011, 0x000d }, + { 0x0013, 0x0016 }, + { 0x0016, 0x001d }, + { 0x0016, 0x001e }, + { 0x0016, 0x001f }, + { 0x0016, 0x0020 }, + { 0x0016, 0x0021 }, + { 0x0016, 0x0022 }, + { 0x0016, 0x0023 }, + { 0x0016, 0x0024 }, + { 0x0014, 0x0021 }, + { 0x0014, 0x0022 }, + { 0x0012, 0x000d }, + { 0x0013, 0x0017 }, + { 0x0016, 0x0025 }, + { 0x0016, 0x0026 }, + { 0x0016, 0x0027 }, + { 0x0016, 0x0028 }, + { 0x0016, 0x0029 }, + { 0x0016, 0x002a }, + { 0x0016, 0x002b }, + { 0x0016, 0x002c }, + { 0x0016, 0x002d }, + { 0x0015, 0x0036 }, + { 0x0015, 0x0037 }, + { 0x0014, 0x0023 }, + { 0x0015, 0x0038 }, + { 0x0016, 0x002e }, + { 0x0016, 0x002f }, + { 0x0016, 0x0030 }, + { 0x0016, 0x0031 }, + { 0x0016, 0x0032 }, + { 0x0016, 0x0033 }, + { 0x0016, 0x0034 }, + { 0x0016, 0x0035 }, + { 0x0016, 0x0036 }, + { 0x0016, 0x0037 }, + { 0x0016, 0x0038 }, + { 0x0016, 0x0039 }, + { 0x0016, 0x003a }, + { 0x0016, 0x003b }, + { 0x0016, 0x003c }, + { 0x0016, 0x003d }, + { 0x0016, 0x003e }, + { 0x0016, 0x003f }, + { 0x0016, 0x0040 }, + { 0x0016, 0x0041 }, + { 0x0016, 0x0042 }, + { 0x0016, 0x0043 }, + { 0x0016, 0x0044 }, + { 0x0016, 0x0045 }, + { 0x0016, 0x0046 }, + { 0x0016, 0x0047 }, + { 0x0016, 0x0048 }, + { 0x0016, 0x0049 }, + { 0x0016, 0x004a }, + { 0x0016, 0x004b }, + { 0x0016, 0x004c }, + { 0x0016, 0x004d }, + { 0x0016, 0x004e }, + { 0x0016, 0x004f }, + { 0x0016, 0x0050 }, + { 0x0016, 0x0051 }, + { 0x0016, 0x0052 }, + { 0x0016, 0x0053 }, + { 0x0016, 0x0054 }, + { 0x0016, 0x0055 }, + { 0x0016, 0x0056 }, + { 0x0016, 0x0057 }, + { 0x0016, 0x0058 }, + { 0x0016, 0x0059 }, + { 0x0016, 0x005a }, + { 0x0016, 0x005b }, + { 0x0016, 0x005c }, + { 0x0016, 0x005d }, + { 0x0016, 0x005e }, + { 0x0016, 0x005f }, + { 0x0016, 0x0060 }, + { 0x0016, 0x0061 }, + { 0x0016, 0x0062 }, + { 0x0016, 0x0063 }, + { 0x0016, 0x0064 }, + { 0x0016, 0x0065 }, + { 0x0016, 0x0066 }, + { 0x0016, 0x0067 }, + { 0x0016, 0x0068 }, + { 0x0016, 0x0069 }, + { 0x0015, 0x0039 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc11[196][2] = - { - { 0x0001, 0x0001 }, - { 0x0004, 0x0003 }, - { 0x0005, 0x0003 }, - { 0x0007, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x0012, 0x000d }, - { 0x0014, 0x001f }, - { 0x0016, 0x0000 }, - { 0x0016, 0x0001 }, - { 0x0016, 0x0002 }, - { 0x0016, 0x0003 }, - { 0x0016, 0x0004 }, - { 0x0004, 0x0004 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0006, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x000b, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x0010, 0x0007 }, - { 0x0012, 0x000e }, - { 0x0014, 0x0020 }, - { 0x0016, 0x0005 }, - { 0x0016, 0x0006 }, - { 0x0016, 0x0007 }, - { 0x0016, 0x0008 }, - { 0x0005, 0x0005 }, - { 0x0004, 0x0005 }, - { 0x0006, 0x0004 }, - { 0x0007, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000e, 0x0006 }, - { 0x0011, 0x000a }, - { 0x0012, 0x000f }, - { 0x0015, 0x003b }, - { 0x0016, 0x0009 }, - { 0x0016, 0x000a }, - { 0x0016, 0x000b }, - { 0x0016, 0x000c }, - { 0x0007, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0005 }, - { 0x0009, 0x0005 }, - { 0x000b, 0x0005 }, - { 0x000d, 0x0005 }, - { 0x000f, 0x0006 }, - { 0x0012, 0x0010 }, - { 0x0014, 0x0021 }, - { 0x0016, 0x000d }, - { 0x0016, 0x000e }, - { 0x0016, 0x000f }, - { 0x0016, 0x0010 }, - { 0x0016, 0x0011 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x000a, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000d, 0x0006 }, - { 0x000f, 0x0007 }, - { 0x0011, 0x000b }, - { 0x0013, 0x0017 }, - { 0x0014, 0x0022 }, - { 0x0016, 0x0012 }, - { 0x0016, 0x0013 }, - { 0x0016, 0x0014 }, - { 0x0016, 0x0015 }, - { 0x0016, 0x0016 }, - { 0x000c, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0007 }, - { 0x0010, 0x0008 }, - { 0x0012, 0x0011 }, - { 0x0014, 0x0023 }, - { 0x0015, 0x003c }, - { 0x0016, 0x0017 }, - { 0x0016, 0x0018 }, - { 0x0016, 0x0019 }, - { 0x0016, 0x001a }, - { 0x0016, 0x001b }, - { 0x000f, 0x0008 }, - { 0x000e, 0x0008 }, - { 0x000e, 0x0009 }, - { 0x000f, 0x0009 }, - { 0x0011, 0x000c }, - { 0x0013, 0x0018 }, - { 0x0014, 0x0024 }, - { 0x0016, 0x001c }, - { 0x0016, 0x001d }, - { 0x0016, 0x001e }, - { 0x0016, 0x001f }, - { 0x0016, 0x0020 }, - { 0x0016, 0x0021 }, - { 0x0016, 0x0022 }, - { 0x0011, 0x000d }, - { 0x0010, 0x0009 }, - { 0x0012, 0x0012 }, - { 0x0012, 0x0013 }, - { 0x0014, 0x0025 }, - { 0x0015, 0x003d }, - { 0x0014, 0x0026 }, - { 0x0016, 0x0023 }, - { 0x0016, 0x0024 }, - { 0x0016, 0x0025 }, - { 0x0016, 0x0026 }, - { 0x0016, 0x0027 }, - { 0x0016, 0x0028 }, - { 0x0016, 0x0029 }, - { 0x0014, 0x0027 }, - { 0x0013, 0x0019 }, - { 0x0014, 0x0028 }, - { 0x0014, 0x0029 }, - { 0x0014, 0x002a }, - { 0x0016, 0x002a }, - { 0x0016, 0x002b }, - { 0x0016, 0x002c }, - { 0x0016, 0x002d }, - { 0x0016, 0x002e }, - { 0x0016, 0x002f }, - { 0x0016, 0x0030 }, - { 0x0016, 0x0031 }, - { 0x0016, 0x0032 }, - { 0x0014, 0x002b }, - { 0x0014, 0x002c }, - { 0x0014, 0x002d }, - { 0x0016, 0x0033 }, - { 0x0016, 0x0034 }, - { 0x0016, 0x0035 }, - { 0x0016, 0x0036 }, - { 0x0016, 0x0037 }, - { 0x0016, 0x0038 }, - { 0x0016, 0x0039 }, - { 0x0016, 0x003a }, - { 0x0016, 0x003b }, - { 0x0016, 0x003c }, - { 0x0016, 0x003d }, - { 0x0016, 0x003e }, - { 0x0016, 0x003f }, - { 0x0016, 0x0040 }, - { 0x0016, 0x0041 }, - { 0x0016, 0x0042 }, - { 0x0016, 0x0043 }, - { 0x0016, 0x0044 }, - { 0x0016, 0x0045 }, - { 0x0016, 0x0046 }, - { 0x0016, 0x0047 }, - { 0x0016, 0x0048 }, - { 0x0016, 0x0049 }, - { 0x0016, 0x004a }, - { 0x0016, 0x004b }, - { 0x0016, 0x004c }, - { 0x0016, 0x004d }, - { 0x0016, 0x004e }, - { 0x0016, 0x004f }, - { 0x0016, 0x0050 }, - { 0x0016, 0x0051 }, - { 0x0016, 0x0052 }, - { 0x0016, 0x0053 }, - { 0x0016, 0x0054 }, - { 0x0016, 0x0055 }, - { 0x0016, 0x0056 }, - { 0x0016, 0x0057 }, - { 0x0016, 0x0058 }, - { 0x0016, 0x0059 }, - { 0x0016, 0x005a }, - { 0x0016, 0x005b }, - { 0x0016, 0x005c }, - { 0x0016, 0x005d }, - { 0x0016, 0x005e }, - { 0x0016, 0x005f }, - { 0x0016, 0x0060 }, - { 0x0016, 0x0061 }, - { 0x0016, 0x0062 }, - { 0x0016, 0x0063 }, - { 0x0016, 0x0064 }, - { 0x0016, 0x0065 }, - { 0x0016, 0x0066 }, - { 0x0016, 0x0067 }, - { 0x0016, 0x0068 }, - { 0x0016, 0x0069 }, - { 0x0016, 0x006a }, - { 0x0016, 0x006b }, - { 0x0016, 0x006c }, - { 0x0016, 0x006d }, - { 0x0016, 0x006e }, - { 0x0016, 0x006f }, - { 0x0016, 0x0070 }, - { 0x0016, 0x0071 }, - { 0x0016, 0x0072 }, - { 0x0016, 0x0073 }, - { 0x0016, 0x0074 }, - { 0x0016, 0x0075 }, +const UWord16 c_aauiLCLDHuffEnc11[196][2] = { + { 0x0001, 0x0001 }, + { 0x0004, 0x0003 }, + { 0x0005, 0x0003 }, + { 0x0007, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x0012, 0x000d }, + { 0x0014, 0x001f }, + { 0x0016, 0x0000 }, + { 0x0016, 0x0001 }, + { 0x0016, 0x0002 }, + { 0x0016, 0x0003 }, + { 0x0016, 0x0004 }, + { 0x0004, 0x0004 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0006, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x000b, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x0010, 0x0007 }, + { 0x0012, 0x000e }, + { 0x0014, 0x0020 }, + { 0x0016, 0x0005 }, + { 0x0016, 0x0006 }, + { 0x0016, 0x0007 }, + { 0x0016, 0x0008 }, + { 0x0005, 0x0005 }, + { 0x0004, 0x0005 }, + { 0x0006, 0x0004 }, + { 0x0007, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000e, 0x0006 }, + { 0x0011, 0x000a }, + { 0x0012, 0x000f }, + { 0x0015, 0x003b }, + { 0x0016, 0x0009 }, + { 0x0016, 0x000a }, + { 0x0016, 0x000b }, + { 0x0016, 0x000c }, + { 0x0007, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0005 }, + { 0x0009, 0x0005 }, + { 0x000b, 0x0005 }, + { 0x000d, 0x0005 }, + { 0x000f, 0x0006 }, + { 0x0012, 0x0010 }, + { 0x0014, 0x0021 }, + { 0x0016, 0x000d }, + { 0x0016, 0x000e }, + { 0x0016, 0x000f }, + { 0x0016, 0x0010 }, + { 0x0016, 0x0011 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x000a, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000d, 0x0006 }, + { 0x000f, 0x0007 }, + { 0x0011, 0x000b }, + { 0x0013, 0x0017 }, + { 0x0014, 0x0022 }, + { 0x0016, 0x0012 }, + { 0x0016, 0x0013 }, + { 0x0016, 0x0014 }, + { 0x0016, 0x0015 }, + { 0x0016, 0x0016 }, + { 0x000c, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0007 }, + { 0x0010, 0x0008 }, + { 0x0012, 0x0011 }, + { 0x0014, 0x0023 }, + { 0x0015, 0x003c }, + { 0x0016, 0x0017 }, + { 0x0016, 0x0018 }, + { 0x0016, 0x0019 }, + { 0x0016, 0x001a }, + { 0x0016, 0x001b }, + { 0x000f, 0x0008 }, + { 0x000e, 0x0008 }, + { 0x000e, 0x0009 }, + { 0x000f, 0x0009 }, + { 0x0011, 0x000c }, + { 0x0013, 0x0018 }, + { 0x0014, 0x0024 }, + { 0x0016, 0x001c }, + { 0x0016, 0x001d }, + { 0x0016, 0x001e }, + { 0x0016, 0x001f }, + { 0x0016, 0x0020 }, + { 0x0016, 0x0021 }, + { 0x0016, 0x0022 }, + { 0x0011, 0x000d }, + { 0x0010, 0x0009 }, + { 0x0012, 0x0012 }, + { 0x0012, 0x0013 }, + { 0x0014, 0x0025 }, + { 0x0015, 0x003d }, + { 0x0014, 0x0026 }, + { 0x0016, 0x0023 }, + { 0x0016, 0x0024 }, + { 0x0016, 0x0025 }, + { 0x0016, 0x0026 }, + { 0x0016, 0x0027 }, + { 0x0016, 0x0028 }, + { 0x0016, 0x0029 }, + { 0x0014, 0x0027 }, + { 0x0013, 0x0019 }, + { 0x0014, 0x0028 }, + { 0x0014, 0x0029 }, + { 0x0014, 0x002a }, + { 0x0016, 0x002a }, + { 0x0016, 0x002b }, + { 0x0016, 0x002c }, + { 0x0016, 0x002d }, + { 0x0016, 0x002e }, + { 0x0016, 0x002f }, + { 0x0016, 0x0030 }, + { 0x0016, 0x0031 }, + { 0x0016, 0x0032 }, + { 0x0014, 0x002b }, + { 0x0014, 0x002c }, + { 0x0014, 0x002d }, + { 0x0016, 0x0033 }, + { 0x0016, 0x0034 }, + { 0x0016, 0x0035 }, + { 0x0016, 0x0036 }, + { 0x0016, 0x0037 }, + { 0x0016, 0x0038 }, + { 0x0016, 0x0039 }, + { 0x0016, 0x003a }, + { 0x0016, 0x003b }, + { 0x0016, 0x003c }, + { 0x0016, 0x003d }, + { 0x0016, 0x003e }, + { 0x0016, 0x003f }, + { 0x0016, 0x0040 }, + { 0x0016, 0x0041 }, + { 0x0016, 0x0042 }, + { 0x0016, 0x0043 }, + { 0x0016, 0x0044 }, + { 0x0016, 0x0045 }, + { 0x0016, 0x0046 }, + { 0x0016, 0x0047 }, + { 0x0016, 0x0048 }, + { 0x0016, 0x0049 }, + { 0x0016, 0x004a }, + { 0x0016, 0x004b }, + { 0x0016, 0x004c }, + { 0x0016, 0x004d }, + { 0x0016, 0x004e }, + { 0x0016, 0x004f }, + { 0x0016, 0x0050 }, + { 0x0016, 0x0051 }, + { 0x0016, 0x0052 }, + { 0x0016, 0x0053 }, + { 0x0016, 0x0054 }, + { 0x0016, 0x0055 }, + { 0x0016, 0x0056 }, + { 0x0016, 0x0057 }, + { 0x0016, 0x0058 }, + { 0x0016, 0x0059 }, + { 0x0016, 0x005a }, + { 0x0016, 0x005b }, + { 0x0016, 0x005c }, + { 0x0016, 0x005d }, + { 0x0016, 0x005e }, + { 0x0016, 0x005f }, + { 0x0016, 0x0060 }, + { 0x0016, 0x0061 }, + { 0x0016, 0x0062 }, + { 0x0016, 0x0063 }, + { 0x0016, 0x0064 }, + { 0x0016, 0x0065 }, + { 0x0016, 0x0066 }, + { 0x0016, 0x0067 }, + { 0x0016, 0x0068 }, + { 0x0016, 0x0069 }, + { 0x0016, 0x006a }, + { 0x0016, 0x006b }, + { 0x0016, 0x006c }, + { 0x0016, 0x006d }, + { 0x0016, 0x006e }, + { 0x0016, 0x006f }, + { 0x0016, 0x0070 }, + { 0x0016, 0x0071 }, + { 0x0016, 0x0072 }, + { 0x0016, 0x0073 }, + { 0x0016, 0x0074 }, + { 0x0016, 0x0075 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc12[289][2] = - { - { 0x0001, 0x0001 }, - { 0x0004, 0x0004 }, - { 0x0005, 0x0004 }, - { 0x0007, 0x0004 }, - { 0x0008, 0x0002 }, - { 0x000b, 0x0004 }, - { 0x000e, 0x0006 }, - { 0x0010, 0x0009 }, - { 0x0012, 0x0014 }, - { 0x0013, 0x001f }, - { 0x0016, 0x0000 }, - { 0x0016, 0x0001 }, - { 0x0016, 0x0002 }, - { 0x0016, 0x0003 }, - { 0x0016, 0x0004 }, - { 0x0016, 0x0005 }, - { 0x0016, 0x0006 }, - { 0x0004, 0x0005 }, - { 0x0004, 0x0006 }, - { 0x0005, 0x0005 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000d, 0x0006 }, - { 0x000f, 0x0008 }, - { 0x0011, 0x000c }, - { 0x0013, 0x0020 }, - { 0x0016, 0x0007 }, - { 0x0015, 0x0063 }, - { 0x0016, 0x0008 }, - { 0x0016, 0x0009 }, - { 0x0016, 0x000a }, - { 0x0016, 0x000b }, - { 0x0016, 0x000c }, - { 0x0005, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0005, 0x0007 }, - { 0x0006, 0x0004 }, - { 0x0008, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000d, 0x0007 }, - { 0x0010, 0x000a }, - { 0x0012, 0x0015 }, - { 0x0015, 0x0064 }, - { 0x0016, 0x000d }, - { 0x0016, 0x000e }, - { 0x0016, 0x000f }, - { 0x0016, 0x0010 }, - { 0x0016, 0x0011 }, - { 0x0016, 0x0012 }, - { 0x0016, 0x0013 }, - { 0x0006, 0x0005 }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0008, 0x0005 }, - { 0x000a, 0x0005 }, - { 0x000c, 0x0005 }, - { 0x000e, 0x0007 }, - { 0x0010, 0x000b }, - { 0x0012, 0x0016 }, - { 0x0014, 0x0037 }, - { 0x0015, 0x0065 }, - { 0x0016, 0x0014 }, - { 0x0016, 0x0015 }, - { 0x0016, 0x0016 }, - { 0x0016, 0x0017 }, - { 0x0016, 0x0018 }, - { 0x0016, 0x0019 }, - { 0x0008, 0x0006 }, - { 0x0007, 0x0005 }, - { 0x0008, 0x0007 }, - { 0x000a, 0x0006 }, - { 0x000c, 0x0006 }, - { 0x000e, 0x0008 }, - { 0x0010, 0x000c }, - { 0x0011, 0x000d }, - { 0x0013, 0x0021 }, - { 0x0015, 0x0066 }, - { 0x0016, 0x001a }, - { 0x0016, 0x001b }, - { 0x0016, 0x001c }, - { 0x0016, 0x001d }, - { 0x0016, 0x001e }, - { 0x0016, 0x001f }, - { 0x0016, 0x0020 }, - { 0x000b, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0007 }, - { 0x000e, 0x0009 }, - { 0x000f, 0x0009 }, - { 0x0011, 0x000e }, - { 0x0013, 0x0022 }, - { 0x0015, 0x0067 }, - { 0x0015, 0x0068 }, - { 0x0016, 0x0021 }, - { 0x0016, 0x0022 }, - { 0x0016, 0x0023 }, - { 0x0016, 0x0024 }, - { 0x0016, 0x0025 }, - { 0x0016, 0x0026 }, - { 0x0016, 0x0027 }, - { 0x000e, 0x000a }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000e, 0x000b }, - { 0x000f, 0x000a }, - { 0x0011, 0x000f }, - { 0x0013, 0x0023 }, - { 0x0014, 0x0038 }, - { 0x0016, 0x0028 }, - { 0x0016, 0x0029 }, - { 0x0016, 0x002a }, - { 0x0016, 0x002b }, - { 0x0016, 0x002c }, - { 0x0016, 0x002d }, - { 0x0016, 0x002e }, - { 0x0016, 0x002f }, - { 0x0016, 0x0030 }, - { 0x0010, 0x000d }, - { 0x000f, 0x000b }, - { 0x0010, 0x000e }, - { 0x0010, 0x000f }, - { 0x0012, 0x0017 }, - { 0x0013, 0x0024 }, - { 0x0014, 0x0039 }, - { 0x0016, 0x0031 }, - { 0x0016, 0x0032 }, - { 0x0016, 0x0033 }, - { 0x0016, 0x0034 }, - { 0x0016, 0x0035 }, - { 0x0016, 0x0036 }, - { 0x0016, 0x0037 }, - { 0x0016, 0x0038 }, - { 0x0016, 0x0039 }, - { 0x0016, 0x003a }, - { 0x0013, 0x0025 }, - { 0x0011, 0x0010 }, - { 0x0011, 0x0011 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0014, 0x003a }, - { 0x0014, 0x003b }, - { 0x0016, 0x003b }, - { 0x0016, 0x003c }, - { 0x0016, 0x003d }, - { 0x0016, 0x003e }, - { 0x0016, 0x003f }, - { 0x0016, 0x0040 }, - { 0x0016, 0x0041 }, - { 0x0016, 0x0042 }, - { 0x0016, 0x0043 }, - { 0x0016, 0x0044 }, - { 0x0015, 0x0069 }, - { 0x0014, 0x003c }, - { 0x0014, 0x003d }, - { 0x0015, 0x006a }, - { 0x0015, 0x006b }, - { 0x0015, 0x006c }, - { 0x0016, 0x0045 }, - { 0x0016, 0x0046 }, - { 0x0016, 0x0047 }, - { 0x0016, 0x0048 }, - { 0x0016, 0x0049 }, - { 0x0016, 0x004a }, - { 0x0016, 0x004b }, - { 0x0016, 0x004c }, - { 0x0016, 0x004d }, - { 0x0016, 0x004e }, - { 0x0016, 0x004f }, - { 0x0016, 0x0050 }, - { 0x0016, 0x0051 }, - { 0x0015, 0x006d }, - { 0x0016, 0x0052 }, - { 0x0016, 0x0053 }, - { 0x0016, 0x0054 }, - { 0x0016, 0x0055 }, - { 0x0016, 0x0056 }, - { 0x0016, 0x0057 }, - { 0x0016, 0x0058 }, - { 0x0016, 0x0059 }, - { 0x0016, 0x005a }, - { 0x0016, 0x005b }, - { 0x0016, 0x005c }, - { 0x0016, 0x005d }, - { 0x0016, 0x005e }, - { 0x0016, 0x005f }, - { 0x0016, 0x0060 }, - { 0x0016, 0x0061 }, - { 0x0016, 0x0062 }, - { 0x0016, 0x0063 }, - { 0x0016, 0x0064 }, - { 0x0016, 0x0065 }, - { 0x0016, 0x0066 }, - { 0x0016, 0x0067 }, - { 0x0016, 0x0068 }, - { 0x0016, 0x0069 }, - { 0x0016, 0x006a }, - { 0x0016, 0x006b }, - { 0x0016, 0x006c }, - { 0x0016, 0x006d }, - { 0x0016, 0x006e }, - { 0x0016, 0x006f }, - { 0x0016, 0x0070 }, - { 0x0016, 0x0071 }, - { 0x0016, 0x0072 }, - { 0x0016, 0x0073 }, - { 0x0016, 0x0074 }, - { 0x0016, 0x0075 }, - { 0x0016, 0x0076 }, - { 0x0016, 0x0077 }, - { 0x0016, 0x0078 }, - { 0x0016, 0x0079 }, - { 0x0016, 0x007a }, - { 0x0016, 0x007b }, - { 0x0016, 0x007c }, - { 0x0016, 0x007d }, - { 0x0016, 0x007e }, - { 0x0016, 0x007f }, - { 0x0016, 0x0080 }, - { 0x0016, 0x0081 }, - { 0x0016, 0x0082 }, - { 0x0016, 0x0083 }, - { 0x0016, 0x0084 }, - { 0x0016, 0x0085 }, - { 0x0016, 0x0086 }, - { 0x0016, 0x0087 }, - { 0x0016, 0x0088 }, - { 0x0016, 0x0089 }, - { 0x0016, 0x008a }, - { 0x0016, 0x008b }, - { 0x0016, 0x008c }, - { 0x0016, 0x008d }, - { 0x0016, 0x008e }, - { 0x0016, 0x008f }, - { 0x0016, 0x0090 }, - { 0x0016, 0x0091 }, - { 0x0016, 0x0092 }, - { 0x0016, 0x0093 }, - { 0x0016, 0x0094 }, - { 0x0016, 0x0095 }, - { 0x0016, 0x0096 }, - { 0x0016, 0x0097 }, - { 0x0016, 0x0098 }, - { 0x0016, 0x0099 }, - { 0x0016, 0x009a }, - { 0x0016, 0x009b }, - { 0x0016, 0x009c }, - { 0x0016, 0x009d }, - { 0x0016, 0x009e }, - { 0x0016, 0x009f }, - { 0x0016, 0x00a0 }, - { 0x0016, 0x00a1 }, - { 0x0016, 0x00a2 }, - { 0x0016, 0x00a3 }, - { 0x0016, 0x00a4 }, - { 0x0016, 0x00a5 }, - { 0x0016, 0x00a6 }, - { 0x0016, 0x00a7 }, - { 0x0016, 0x00a8 }, - { 0x0016, 0x00a9 }, - { 0x0016, 0x00aa }, - { 0x0016, 0x00ab }, - { 0x0016, 0x00ac }, - { 0x0016, 0x00ad }, - { 0x0016, 0x00ae }, - { 0x0016, 0x00af }, - { 0x0016, 0x00b0 }, - { 0x0016, 0x00b1 }, - { 0x0016, 0x00b2 }, - { 0x0016, 0x00b3 }, - { 0x0016, 0x00b4 }, - { 0x0016, 0x00b5 }, - { 0x0016, 0x00b6 }, - { 0x0016, 0x00b7 }, - { 0x0016, 0x00b8 }, - { 0x0016, 0x00b9 }, - { 0x0016, 0x00ba }, - { 0x0016, 0x00bb }, - { 0x0016, 0x00bc }, - { 0x0016, 0x00bd }, - { 0x0016, 0x00be }, - { 0x0016, 0x00bf }, - { 0x0016, 0x00c0 }, - { 0x0016, 0x00c1 }, - { 0x0016, 0x00c2 }, - { 0x0016, 0x00c3 }, - { 0x0016, 0x00c4 }, - { 0x0016, 0x00c5 }, +const UWord16 c_aauiLCLDHuffEnc12[289][2] = { + { 0x0001, 0x0001 }, + { 0x0004, 0x0004 }, + { 0x0005, 0x0004 }, + { 0x0007, 0x0004 }, + { 0x0008, 0x0002 }, + { 0x000b, 0x0004 }, + { 0x000e, 0x0006 }, + { 0x0010, 0x0009 }, + { 0x0012, 0x0014 }, + { 0x0013, 0x001f }, + { 0x0016, 0x0000 }, + { 0x0016, 0x0001 }, + { 0x0016, 0x0002 }, + { 0x0016, 0x0003 }, + { 0x0016, 0x0004 }, + { 0x0016, 0x0005 }, + { 0x0016, 0x0006 }, + { 0x0004, 0x0005 }, + { 0x0004, 0x0006 }, + { 0x0005, 0x0005 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000d, 0x0006 }, + { 0x000f, 0x0008 }, + { 0x0011, 0x000c }, + { 0x0013, 0x0020 }, + { 0x0016, 0x0007 }, + { 0x0015, 0x0063 }, + { 0x0016, 0x0008 }, + { 0x0016, 0x0009 }, + { 0x0016, 0x000a }, + { 0x0016, 0x000b }, + { 0x0016, 0x000c }, + { 0x0005, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0005, 0x0007 }, + { 0x0006, 0x0004 }, + { 0x0008, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000d, 0x0007 }, + { 0x0010, 0x000a }, + { 0x0012, 0x0015 }, + { 0x0015, 0x0064 }, + { 0x0016, 0x000d }, + { 0x0016, 0x000e }, + { 0x0016, 0x000f }, + { 0x0016, 0x0010 }, + { 0x0016, 0x0011 }, + { 0x0016, 0x0012 }, + { 0x0016, 0x0013 }, + { 0x0006, 0x0005 }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0008, 0x0005 }, + { 0x000a, 0x0005 }, + { 0x000c, 0x0005 }, + { 0x000e, 0x0007 }, + { 0x0010, 0x000b }, + { 0x0012, 0x0016 }, + { 0x0014, 0x0037 }, + { 0x0015, 0x0065 }, + { 0x0016, 0x0014 }, + { 0x0016, 0x0015 }, + { 0x0016, 0x0016 }, + { 0x0016, 0x0017 }, + { 0x0016, 0x0018 }, + { 0x0016, 0x0019 }, + { 0x0008, 0x0006 }, + { 0x0007, 0x0005 }, + { 0x0008, 0x0007 }, + { 0x000a, 0x0006 }, + { 0x000c, 0x0006 }, + { 0x000e, 0x0008 }, + { 0x0010, 0x000c }, + { 0x0011, 0x000d }, + { 0x0013, 0x0021 }, + { 0x0015, 0x0066 }, + { 0x0016, 0x001a }, + { 0x0016, 0x001b }, + { 0x0016, 0x001c }, + { 0x0016, 0x001d }, + { 0x0016, 0x001e }, + { 0x0016, 0x001f }, + { 0x0016, 0x0020 }, + { 0x000b, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0007 }, + { 0x000e, 0x0009 }, + { 0x000f, 0x0009 }, + { 0x0011, 0x000e }, + { 0x0013, 0x0022 }, + { 0x0015, 0x0067 }, + { 0x0015, 0x0068 }, + { 0x0016, 0x0021 }, + { 0x0016, 0x0022 }, + { 0x0016, 0x0023 }, + { 0x0016, 0x0024 }, + { 0x0016, 0x0025 }, + { 0x0016, 0x0026 }, + { 0x0016, 0x0027 }, + { 0x000e, 0x000a }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000e, 0x000b }, + { 0x000f, 0x000a }, + { 0x0011, 0x000f }, + { 0x0013, 0x0023 }, + { 0x0014, 0x0038 }, + { 0x0016, 0x0028 }, + { 0x0016, 0x0029 }, + { 0x0016, 0x002a }, + { 0x0016, 0x002b }, + { 0x0016, 0x002c }, + { 0x0016, 0x002d }, + { 0x0016, 0x002e }, + { 0x0016, 0x002f }, + { 0x0016, 0x0030 }, + { 0x0010, 0x000d }, + { 0x000f, 0x000b }, + { 0x0010, 0x000e }, + { 0x0010, 0x000f }, + { 0x0012, 0x0017 }, + { 0x0013, 0x0024 }, + { 0x0014, 0x0039 }, + { 0x0016, 0x0031 }, + { 0x0016, 0x0032 }, + { 0x0016, 0x0033 }, + { 0x0016, 0x0034 }, + { 0x0016, 0x0035 }, + { 0x0016, 0x0036 }, + { 0x0016, 0x0037 }, + { 0x0016, 0x0038 }, + { 0x0016, 0x0039 }, + { 0x0016, 0x003a }, + { 0x0013, 0x0025 }, + { 0x0011, 0x0010 }, + { 0x0011, 0x0011 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0014, 0x003a }, + { 0x0014, 0x003b }, + { 0x0016, 0x003b }, + { 0x0016, 0x003c }, + { 0x0016, 0x003d }, + { 0x0016, 0x003e }, + { 0x0016, 0x003f }, + { 0x0016, 0x0040 }, + { 0x0016, 0x0041 }, + { 0x0016, 0x0042 }, + { 0x0016, 0x0043 }, + { 0x0016, 0x0044 }, + { 0x0015, 0x0069 }, + { 0x0014, 0x003c }, + { 0x0014, 0x003d }, + { 0x0015, 0x006a }, + { 0x0015, 0x006b }, + { 0x0015, 0x006c }, + { 0x0016, 0x0045 }, + { 0x0016, 0x0046 }, + { 0x0016, 0x0047 }, + { 0x0016, 0x0048 }, + { 0x0016, 0x0049 }, + { 0x0016, 0x004a }, + { 0x0016, 0x004b }, + { 0x0016, 0x004c }, + { 0x0016, 0x004d }, + { 0x0016, 0x004e }, + { 0x0016, 0x004f }, + { 0x0016, 0x0050 }, + { 0x0016, 0x0051 }, + { 0x0015, 0x006d }, + { 0x0016, 0x0052 }, + { 0x0016, 0x0053 }, + { 0x0016, 0x0054 }, + { 0x0016, 0x0055 }, + { 0x0016, 0x0056 }, + { 0x0016, 0x0057 }, + { 0x0016, 0x0058 }, + { 0x0016, 0x0059 }, + { 0x0016, 0x005a }, + { 0x0016, 0x005b }, + { 0x0016, 0x005c }, + { 0x0016, 0x005d }, + { 0x0016, 0x005e }, + { 0x0016, 0x005f }, + { 0x0016, 0x0060 }, + { 0x0016, 0x0061 }, + { 0x0016, 0x0062 }, + { 0x0016, 0x0063 }, + { 0x0016, 0x0064 }, + { 0x0016, 0x0065 }, + { 0x0016, 0x0066 }, + { 0x0016, 0x0067 }, + { 0x0016, 0x0068 }, + { 0x0016, 0x0069 }, + { 0x0016, 0x006a }, + { 0x0016, 0x006b }, + { 0x0016, 0x006c }, + { 0x0016, 0x006d }, + { 0x0016, 0x006e }, + { 0x0016, 0x006f }, + { 0x0016, 0x0070 }, + { 0x0016, 0x0071 }, + { 0x0016, 0x0072 }, + { 0x0016, 0x0073 }, + { 0x0016, 0x0074 }, + { 0x0016, 0x0075 }, + { 0x0016, 0x0076 }, + { 0x0016, 0x0077 }, + { 0x0016, 0x0078 }, + { 0x0016, 0x0079 }, + { 0x0016, 0x007a }, + { 0x0016, 0x007b }, + { 0x0016, 0x007c }, + { 0x0016, 0x007d }, + { 0x0016, 0x007e }, + { 0x0016, 0x007f }, + { 0x0016, 0x0080 }, + { 0x0016, 0x0081 }, + { 0x0016, 0x0082 }, + { 0x0016, 0x0083 }, + { 0x0016, 0x0084 }, + { 0x0016, 0x0085 }, + { 0x0016, 0x0086 }, + { 0x0016, 0x0087 }, + { 0x0016, 0x0088 }, + { 0x0016, 0x0089 }, + { 0x0016, 0x008a }, + { 0x0016, 0x008b }, + { 0x0016, 0x008c }, + { 0x0016, 0x008d }, + { 0x0016, 0x008e }, + { 0x0016, 0x008f }, + { 0x0016, 0x0090 }, + { 0x0016, 0x0091 }, + { 0x0016, 0x0092 }, + { 0x0016, 0x0093 }, + { 0x0016, 0x0094 }, + { 0x0016, 0x0095 }, + { 0x0016, 0x0096 }, + { 0x0016, 0x0097 }, + { 0x0016, 0x0098 }, + { 0x0016, 0x0099 }, + { 0x0016, 0x009a }, + { 0x0016, 0x009b }, + { 0x0016, 0x009c }, + { 0x0016, 0x009d }, + { 0x0016, 0x009e }, + { 0x0016, 0x009f }, + { 0x0016, 0x00a0 }, + { 0x0016, 0x00a1 }, + { 0x0016, 0x00a2 }, + { 0x0016, 0x00a3 }, + { 0x0016, 0x00a4 }, + { 0x0016, 0x00a5 }, + { 0x0016, 0x00a6 }, + { 0x0016, 0x00a7 }, + { 0x0016, 0x00a8 }, + { 0x0016, 0x00a9 }, + { 0x0016, 0x00aa }, + { 0x0016, 0x00ab }, + { 0x0016, 0x00ac }, + { 0x0016, 0x00ad }, + { 0x0016, 0x00ae }, + { 0x0016, 0x00af }, + { 0x0016, 0x00b0 }, + { 0x0016, 0x00b1 }, + { 0x0016, 0x00b2 }, + { 0x0016, 0x00b3 }, + { 0x0016, 0x00b4 }, + { 0x0016, 0x00b5 }, + { 0x0016, 0x00b6 }, + { 0x0016, 0x00b7 }, + { 0x0016, 0x00b8 }, + { 0x0016, 0x00b9 }, + { 0x0016, 0x00ba }, + { 0x0016, 0x00bb }, + { 0x0016, 0x00bc }, + { 0x0016, 0x00bd }, + { 0x0016, 0x00be }, + { 0x0016, 0x00bf }, + { 0x0016, 0x00c0 }, + { 0x0016, 0x00c1 }, + { 0x0016, 0x00c2 }, + { 0x0016, 0x00c3 }, + { 0x0016, 0x00c4 }, + { 0x0016, 0x00c5 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc13[324][2] = - { - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0006, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x000a, 0x0005 }, - { 0x000c, 0x0007 }, - { 0x000e, 0x000b }, - { 0x0010, 0x0011 }, - { 0x0012, 0x002d }, - { 0x0015, 0x0000 }, - { 0x0014, 0x0035 }, - { 0x0015, 0x0001 }, - { 0x0015, 0x0002 }, - { 0x0015, 0x0003 }, - { 0x0015, 0x0004 }, - { 0x0015, 0x0005 }, - { 0x0004, 0x0008 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0009 }, - { 0x0004, 0x000a }, - { 0x0006, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0009, 0x0006 }, - { 0x000c, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x0010, 0x0012 }, - { 0x0011, 0x001a }, - { 0x0015, 0x0006 }, - { 0x0015, 0x0007 }, - { 0x0015, 0x0008 }, - { 0x0015, 0x0009 }, - { 0x0015, 0x000a }, - { 0x0015, 0x000b }, - { 0x0015, 0x000c }, - { 0x0005, 0x0007 }, - { 0x0004, 0x000b }, - { 0x0004, 0x000c }, - { 0x0005, 0x0008 }, - { 0x0006, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x000a, 0x0006 }, - { 0x000c, 0x0009 }, - { 0x000e, 0x000c }, - { 0x0010, 0x0013 }, - { 0x0012, 0x002e }, - { 0x0015, 0x000d }, - { 0x0015, 0x000e }, - { 0x0015, 0x000f }, - { 0x0015, 0x0010 }, - { 0x0015, 0x0011 }, - { 0x0015, 0x0012 }, - { 0x0015, 0x0013 }, - { 0x0005, 0x0009 }, - { 0x0004, 0x000d }, - { 0x0005, 0x000a }, - { 0x0006, 0x0007 }, - { 0x0007, 0x0005 }, - { 0x0009, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000d, 0x000a }, - { 0x000f, 0x000e }, - { 0x0010, 0x0014 }, - { 0x0011, 0x001b }, - { 0x0014, 0x0036 }, - { 0x0015, 0x0014 }, - { 0x0015, 0x0015 }, - { 0x0015, 0x0016 }, - { 0x0015, 0x0017 }, - { 0x0015, 0x0018 }, - { 0x0015, 0x0019 }, - { 0x0006, 0x0008 }, - { 0x0005, 0x000b }, - { 0x0006, 0x0009 }, - { 0x0007, 0x0006 }, - { 0x0009, 0x0008 }, - { 0x000a, 0x0007 }, - { 0x000c, 0x000a }, - { 0x000e, 0x000d }, - { 0x0010, 0x0015 }, - { 0x0011, 0x001c }, - { 0x0013, 0x0053 }, - { 0x0015, 0x001a }, - { 0x0015, 0x001b }, - { 0x0015, 0x001c }, - { 0x0015, 0x001d }, - { 0x0015, 0x001e }, - { 0x0015, 0x001f }, - { 0x0015, 0x0020 }, - { 0x0008, 0x0008 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0009 }, - { 0x0009, 0x0009 }, - { 0x000a, 0x0008 }, - { 0x000c, 0x000b }, - { 0x000d, 0x000b }, - { 0x000f, 0x000f }, - { 0x0010, 0x0016 }, - { 0x0011, 0x001d }, - { 0x0014, 0x0037 }, - { 0x0015, 0x0021 }, - { 0x0015, 0x0022 }, - { 0x0015, 0x0023 }, - { 0x0015, 0x0024 }, - { 0x0015, 0x0025 }, - { 0x0015, 0x0026 }, - { 0x0015, 0x0027 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000b, 0x0009 }, - { 0x000c, 0x000c }, - { 0x000d, 0x000c }, - { 0x000f, 0x0010 }, - { 0x0010, 0x0017 }, - { 0x0012, 0x002f }, - { 0x0015, 0x0028 }, - { 0x0015, 0x0029 }, - { 0x0015, 0x002a }, - { 0x0015, 0x002b }, - { 0x0015, 0x002c }, - { 0x0015, 0x002d }, - { 0x0015, 0x002e }, - { 0x0015, 0x002f }, - { 0x0015, 0x0030 }, - { 0x000c, 0x000d }, - { 0x000c, 0x000e }, - { 0x000c, 0x000f }, - { 0x000d, 0x000d }, - { 0x000e, 0x000e }, - { 0x000f, 0x0011 }, - { 0x0010, 0x0018 }, - { 0x0011, 0x001e }, - { 0x0014, 0x0038 }, - { 0x0015, 0x0031 }, - { 0x0015, 0x0032 }, - { 0x0015, 0x0033 }, - { 0x0015, 0x0034 }, - { 0x0015, 0x0035 }, - { 0x0015, 0x0036 }, - { 0x0015, 0x0037 }, - { 0x0015, 0x0038 }, - { 0x0015, 0x0039 }, - { 0x000f, 0x0012 }, - { 0x000e, 0x000f }, - { 0x000e, 0x0010 }, - { 0x000e, 0x0011 }, - { 0x000f, 0x0013 }, - { 0x0010, 0x0019 }, - { 0x0011, 0x001f }, - { 0x0013, 0x0054 }, - { 0x0015, 0x003a }, - { 0x0014, 0x0039 }, - { 0x0015, 0x003b }, - { 0x0015, 0x003c }, - { 0x0015, 0x003d }, - { 0x0015, 0x003e }, - { 0x0015, 0x003f }, - { 0x0015, 0x0040 }, - { 0x0015, 0x0041 }, - { 0x0015, 0x0042 }, - { 0x0010, 0x001a }, - { 0x000f, 0x0014 }, - { 0x000f, 0x0015 }, - { 0x0010, 0x001b }, - { 0x0011, 0x0020 }, - { 0x0012, 0x0030 }, - { 0x0013, 0x0055 }, - { 0x0015, 0x0043 }, - { 0x0015, 0x0044 }, - { 0x0014, 0x003a }, - { 0x0015, 0x0045 }, - { 0x0015, 0x0046 }, - { 0x0015, 0x0047 }, - { 0x0015, 0x0048 }, - { 0x0015, 0x0049 }, - { 0x0015, 0x004a }, - { 0x0015, 0x004b }, - { 0x0015, 0x004c }, - { 0x0012, 0x0031 }, - { 0x0011, 0x0021 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0012, 0x0032 }, - { 0x0015, 0x004d }, - { 0x0015, 0x004e }, - { 0x0015, 0x004f }, - { 0x0015, 0x0050 }, - { 0x0015, 0x0051 }, - { 0x0015, 0x0052 }, - { 0x0015, 0x0053 }, - { 0x0015, 0x0054 }, - { 0x0015, 0x0055 }, - { 0x0015, 0x0056 }, - { 0x0015, 0x0057 }, - { 0x0015, 0x0058 }, - { 0x0015, 0x0059 }, - { 0x0015, 0x005a }, - { 0x0014, 0x003b }, - { 0x0012, 0x0033 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0015, 0x005b }, - { 0x0015, 0x005c }, - { 0x0015, 0x005d }, - { 0x0015, 0x005e }, - { 0x0015, 0x005f }, - { 0x0015, 0x0060 }, - { 0x0015, 0x0061 }, - { 0x0015, 0x0062 }, - { 0x0015, 0x0063 }, - { 0x0015, 0x0064 }, - { 0x0015, 0x0065 }, - { 0x0015, 0x0066 }, - { 0x0015, 0x0067 }, - { 0x0015, 0x0068 }, - { 0x0015, 0x0069 }, - { 0x0014, 0x003c }, - { 0x0014, 0x003d }, - { 0x0014, 0x003e }, - { 0x0014, 0x003f }, - { 0x0014, 0x0040 }, - { 0x0014, 0x0041 }, - { 0x0014, 0x0042 }, - { 0x0014, 0x0043 }, - { 0x0014, 0x0044 }, - { 0x0014, 0x0045 }, - { 0x0014, 0x0046 }, - { 0x0014, 0x0047 }, - { 0x0014, 0x0048 }, - { 0x0014, 0x0049 }, - { 0x0014, 0x004a }, - { 0x0014, 0x004b }, - { 0x0014, 0x004c }, - { 0x0014, 0x004d }, - { 0x0014, 0x004e }, - { 0x0014, 0x004f }, - { 0x0014, 0x0050 }, - { 0x0014, 0x0051 }, - { 0x0014, 0x0052 }, - { 0x0014, 0x0053 }, - { 0x0014, 0x0054 }, - { 0x0014, 0x0055 }, - { 0x0014, 0x0056 }, - { 0x0014, 0x0057 }, - { 0x0014, 0x0058 }, - { 0x0014, 0x0059 }, - { 0x0014, 0x005a }, - { 0x0014, 0x005b }, - { 0x0014, 0x005c }, - { 0x0014, 0x005d }, - { 0x0014, 0x005e }, - { 0x0014, 0x005f }, - { 0x0014, 0x0060 }, - { 0x0014, 0x0061 }, - { 0x0014, 0x0062 }, - { 0x0014, 0x0063 }, - { 0x0014, 0x0064 }, - { 0x0014, 0x0065 }, - { 0x0014, 0x0066 }, - { 0x0014, 0x0067 }, - { 0x0014, 0x0068 }, - { 0x0014, 0x0069 }, - { 0x0014, 0x006a }, - { 0x0014, 0x006b }, - { 0x0014, 0x006c }, - { 0x0014, 0x006d }, - { 0x0014, 0x006e }, - { 0x0014, 0x006f }, - { 0x0014, 0x0070 }, - { 0x0014, 0x0071 }, - { 0x0014, 0x0072 }, - { 0x0014, 0x0073 }, - { 0x0014, 0x0074 }, - { 0x0014, 0x0075 }, - { 0x0014, 0x0076 }, - { 0x0014, 0x0077 }, - { 0x0014, 0x0078 }, - { 0x0014, 0x0079 }, - { 0x0014, 0x007a }, - { 0x0014, 0x007b }, - { 0x0014, 0x007c }, - { 0x0014, 0x007d }, - { 0x0014, 0x007e }, - { 0x0014, 0x007f }, - { 0x0014, 0x0080 }, - { 0x0014, 0x0081 }, - { 0x0014, 0x0082 }, - { 0x0014, 0x0083 }, - { 0x0014, 0x0084 }, - { 0x0014, 0x0085 }, - { 0x0014, 0x0086 }, - { 0x0014, 0x0087 }, - { 0x0014, 0x0088 }, - { 0x0014, 0x0089 }, - { 0x0014, 0x008a }, - { 0x0014, 0x008b }, - { 0x0014, 0x008c }, - { 0x0014, 0x008d }, - { 0x0014, 0x008e }, - { 0x0014, 0x008f }, - { 0x0014, 0x0090 }, - { 0x0014, 0x0091 }, - { 0x0014, 0x0092 }, - { 0x0014, 0x0093 }, - { 0x0014, 0x0094 }, - { 0x0014, 0x0095 }, - { 0x0014, 0x0096 }, - { 0x0014, 0x0097 }, - { 0x0014, 0x0098 }, - { 0x0014, 0x0099 }, - { 0x0014, 0x009a }, - { 0x0014, 0x009b }, - { 0x0014, 0x009c }, - { 0x0014, 0x009d }, - { 0x0014, 0x009e }, - { 0x0014, 0x009f }, - { 0x0014, 0x00a0 }, - { 0x0014, 0x00a1 }, - { 0x0014, 0x00a2 }, - { 0x0014, 0x00a3 }, - { 0x0014, 0x00a4 }, - { 0x0014, 0x00a5 }, +const UWord16 c_aauiLCLDHuffEnc13[324][2] = { + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0006, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x000a, 0x0005 }, + { 0x000c, 0x0007 }, + { 0x000e, 0x000b }, + { 0x0010, 0x0011 }, + { 0x0012, 0x002d }, + { 0x0015, 0x0000 }, + { 0x0014, 0x0035 }, + { 0x0015, 0x0001 }, + { 0x0015, 0x0002 }, + { 0x0015, 0x0003 }, + { 0x0015, 0x0004 }, + { 0x0015, 0x0005 }, + { 0x0004, 0x0008 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0009 }, + { 0x0004, 0x000a }, + { 0x0006, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0009, 0x0006 }, + { 0x000c, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x0010, 0x0012 }, + { 0x0011, 0x001a }, + { 0x0015, 0x0006 }, + { 0x0015, 0x0007 }, + { 0x0015, 0x0008 }, + { 0x0015, 0x0009 }, + { 0x0015, 0x000a }, + { 0x0015, 0x000b }, + { 0x0015, 0x000c }, + { 0x0005, 0x0007 }, + { 0x0004, 0x000b }, + { 0x0004, 0x000c }, + { 0x0005, 0x0008 }, + { 0x0006, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x000a, 0x0006 }, + { 0x000c, 0x0009 }, + { 0x000e, 0x000c }, + { 0x0010, 0x0013 }, + { 0x0012, 0x002e }, + { 0x0015, 0x000d }, + { 0x0015, 0x000e }, + { 0x0015, 0x000f }, + { 0x0015, 0x0010 }, + { 0x0015, 0x0011 }, + { 0x0015, 0x0012 }, + { 0x0015, 0x0013 }, + { 0x0005, 0x0009 }, + { 0x0004, 0x000d }, + { 0x0005, 0x000a }, + { 0x0006, 0x0007 }, + { 0x0007, 0x0005 }, + { 0x0009, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000d, 0x000a }, + { 0x000f, 0x000e }, + { 0x0010, 0x0014 }, + { 0x0011, 0x001b }, + { 0x0014, 0x0036 }, + { 0x0015, 0x0014 }, + { 0x0015, 0x0015 }, + { 0x0015, 0x0016 }, + { 0x0015, 0x0017 }, + { 0x0015, 0x0018 }, + { 0x0015, 0x0019 }, + { 0x0006, 0x0008 }, + { 0x0005, 0x000b }, + { 0x0006, 0x0009 }, + { 0x0007, 0x0006 }, + { 0x0009, 0x0008 }, + { 0x000a, 0x0007 }, + { 0x000c, 0x000a }, + { 0x000e, 0x000d }, + { 0x0010, 0x0015 }, + { 0x0011, 0x001c }, + { 0x0013, 0x0053 }, + { 0x0015, 0x001a }, + { 0x0015, 0x001b }, + { 0x0015, 0x001c }, + { 0x0015, 0x001d }, + { 0x0015, 0x001e }, + { 0x0015, 0x001f }, + { 0x0015, 0x0020 }, + { 0x0008, 0x0008 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0009 }, + { 0x0009, 0x0009 }, + { 0x000a, 0x0008 }, + { 0x000c, 0x000b }, + { 0x000d, 0x000b }, + { 0x000f, 0x000f }, + { 0x0010, 0x0016 }, + { 0x0011, 0x001d }, + { 0x0014, 0x0037 }, + { 0x0015, 0x0021 }, + { 0x0015, 0x0022 }, + { 0x0015, 0x0023 }, + { 0x0015, 0x0024 }, + { 0x0015, 0x0025 }, + { 0x0015, 0x0026 }, + { 0x0015, 0x0027 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000b, 0x0009 }, + { 0x000c, 0x000c }, + { 0x000d, 0x000c }, + { 0x000f, 0x0010 }, + { 0x0010, 0x0017 }, + { 0x0012, 0x002f }, + { 0x0015, 0x0028 }, + { 0x0015, 0x0029 }, + { 0x0015, 0x002a }, + { 0x0015, 0x002b }, + { 0x0015, 0x002c }, + { 0x0015, 0x002d }, + { 0x0015, 0x002e }, + { 0x0015, 0x002f }, + { 0x0015, 0x0030 }, + { 0x000c, 0x000d }, + { 0x000c, 0x000e }, + { 0x000c, 0x000f }, + { 0x000d, 0x000d }, + { 0x000e, 0x000e }, + { 0x000f, 0x0011 }, + { 0x0010, 0x0018 }, + { 0x0011, 0x001e }, + { 0x0014, 0x0038 }, + { 0x0015, 0x0031 }, + { 0x0015, 0x0032 }, + { 0x0015, 0x0033 }, + { 0x0015, 0x0034 }, + { 0x0015, 0x0035 }, + { 0x0015, 0x0036 }, + { 0x0015, 0x0037 }, + { 0x0015, 0x0038 }, + { 0x0015, 0x0039 }, + { 0x000f, 0x0012 }, + { 0x000e, 0x000f }, + { 0x000e, 0x0010 }, + { 0x000e, 0x0011 }, + { 0x000f, 0x0013 }, + { 0x0010, 0x0019 }, + { 0x0011, 0x001f }, + { 0x0013, 0x0054 }, + { 0x0015, 0x003a }, + { 0x0014, 0x0039 }, + { 0x0015, 0x003b }, + { 0x0015, 0x003c }, + { 0x0015, 0x003d }, + { 0x0015, 0x003e }, + { 0x0015, 0x003f }, + { 0x0015, 0x0040 }, + { 0x0015, 0x0041 }, + { 0x0015, 0x0042 }, + { 0x0010, 0x001a }, + { 0x000f, 0x0014 }, + { 0x000f, 0x0015 }, + { 0x0010, 0x001b }, + { 0x0011, 0x0020 }, + { 0x0012, 0x0030 }, + { 0x0013, 0x0055 }, + { 0x0015, 0x0043 }, + { 0x0015, 0x0044 }, + { 0x0014, 0x003a }, + { 0x0015, 0x0045 }, + { 0x0015, 0x0046 }, + { 0x0015, 0x0047 }, + { 0x0015, 0x0048 }, + { 0x0015, 0x0049 }, + { 0x0015, 0x004a }, + { 0x0015, 0x004b }, + { 0x0015, 0x004c }, + { 0x0012, 0x0031 }, + { 0x0011, 0x0021 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0012, 0x0032 }, + { 0x0015, 0x004d }, + { 0x0015, 0x004e }, + { 0x0015, 0x004f }, + { 0x0015, 0x0050 }, + { 0x0015, 0x0051 }, + { 0x0015, 0x0052 }, + { 0x0015, 0x0053 }, + { 0x0015, 0x0054 }, + { 0x0015, 0x0055 }, + { 0x0015, 0x0056 }, + { 0x0015, 0x0057 }, + { 0x0015, 0x0058 }, + { 0x0015, 0x0059 }, + { 0x0015, 0x005a }, + { 0x0014, 0x003b }, + { 0x0012, 0x0033 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0015, 0x005b }, + { 0x0015, 0x005c }, + { 0x0015, 0x005d }, + { 0x0015, 0x005e }, + { 0x0015, 0x005f }, + { 0x0015, 0x0060 }, + { 0x0015, 0x0061 }, + { 0x0015, 0x0062 }, + { 0x0015, 0x0063 }, + { 0x0015, 0x0064 }, + { 0x0015, 0x0065 }, + { 0x0015, 0x0066 }, + { 0x0015, 0x0067 }, + { 0x0015, 0x0068 }, + { 0x0015, 0x0069 }, + { 0x0014, 0x003c }, + { 0x0014, 0x003d }, + { 0x0014, 0x003e }, + { 0x0014, 0x003f }, + { 0x0014, 0x0040 }, + { 0x0014, 0x0041 }, + { 0x0014, 0x0042 }, + { 0x0014, 0x0043 }, + { 0x0014, 0x0044 }, + { 0x0014, 0x0045 }, + { 0x0014, 0x0046 }, + { 0x0014, 0x0047 }, + { 0x0014, 0x0048 }, + { 0x0014, 0x0049 }, + { 0x0014, 0x004a }, + { 0x0014, 0x004b }, + { 0x0014, 0x004c }, + { 0x0014, 0x004d }, + { 0x0014, 0x004e }, + { 0x0014, 0x004f }, + { 0x0014, 0x0050 }, + { 0x0014, 0x0051 }, + { 0x0014, 0x0052 }, + { 0x0014, 0x0053 }, + { 0x0014, 0x0054 }, + { 0x0014, 0x0055 }, + { 0x0014, 0x0056 }, + { 0x0014, 0x0057 }, + { 0x0014, 0x0058 }, + { 0x0014, 0x0059 }, + { 0x0014, 0x005a }, + { 0x0014, 0x005b }, + { 0x0014, 0x005c }, + { 0x0014, 0x005d }, + { 0x0014, 0x005e }, + { 0x0014, 0x005f }, + { 0x0014, 0x0060 }, + { 0x0014, 0x0061 }, + { 0x0014, 0x0062 }, + { 0x0014, 0x0063 }, + { 0x0014, 0x0064 }, + { 0x0014, 0x0065 }, + { 0x0014, 0x0066 }, + { 0x0014, 0x0067 }, + { 0x0014, 0x0068 }, + { 0x0014, 0x0069 }, + { 0x0014, 0x006a }, + { 0x0014, 0x006b }, + { 0x0014, 0x006c }, + { 0x0014, 0x006d }, + { 0x0014, 0x006e }, + { 0x0014, 0x006f }, + { 0x0014, 0x0070 }, + { 0x0014, 0x0071 }, + { 0x0014, 0x0072 }, + { 0x0014, 0x0073 }, + { 0x0014, 0x0074 }, + { 0x0014, 0x0075 }, + { 0x0014, 0x0076 }, + { 0x0014, 0x0077 }, + { 0x0014, 0x0078 }, + { 0x0014, 0x0079 }, + { 0x0014, 0x007a }, + { 0x0014, 0x007b }, + { 0x0014, 0x007c }, + { 0x0014, 0x007d }, + { 0x0014, 0x007e }, + { 0x0014, 0x007f }, + { 0x0014, 0x0080 }, + { 0x0014, 0x0081 }, + { 0x0014, 0x0082 }, + { 0x0014, 0x0083 }, + { 0x0014, 0x0084 }, + { 0x0014, 0x0085 }, + { 0x0014, 0x0086 }, + { 0x0014, 0x0087 }, + { 0x0014, 0x0088 }, + { 0x0014, 0x0089 }, + { 0x0014, 0x008a }, + { 0x0014, 0x008b }, + { 0x0014, 0x008c }, + { 0x0014, 0x008d }, + { 0x0014, 0x008e }, + { 0x0014, 0x008f }, + { 0x0014, 0x0090 }, + { 0x0014, 0x0091 }, + { 0x0014, 0x0092 }, + { 0x0014, 0x0093 }, + { 0x0014, 0x0094 }, + { 0x0014, 0x0095 }, + { 0x0014, 0x0096 }, + { 0x0014, 0x0097 }, + { 0x0014, 0x0098 }, + { 0x0014, 0x0099 }, + { 0x0014, 0x009a }, + { 0x0014, 0x009b }, + { 0x0014, 0x009c }, + { 0x0014, 0x009d }, + { 0x0014, 0x009e }, + { 0x0014, 0x009f }, + { 0x0014, 0x00a0 }, + { 0x0014, 0x00a1 }, + { 0x0014, 0x00a2 }, + { 0x0014, 0x00a3 }, + { 0x0014, 0x00a4 }, + { 0x0014, 0x00a5 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc14[400][2] = - { - { 0x0005, 0x0007 }, - { 0x0004, 0x0009 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0006, 0x0006 }, - { 0x0007, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000d, 0x000c }, - { 0x000f, 0x0013 }, - { 0x0010, 0x001b }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0014, 0x0006 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0004, 0x000c }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0006, 0x0007 }, - { 0x0008, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000c, 0x000a }, - { 0x000e, 0x000e }, - { 0x000f, 0x0014 }, - { 0x0011, 0x002a }, - { 0x0012, 0x004a }, - { 0x0013, 0x0084 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0014, 0x0009 }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0014, 0x000c }, - { 0x0005, 0x000c }, - { 0x0004, 0x000d }, - { 0x0004, 0x000e }, - { 0x0005, 0x000d }, - { 0x0006, 0x0008 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0007 }, - { 0x000a, 0x0008 }, - { 0x000c, 0x000b }, - { 0x000e, 0x000f }, - { 0x000f, 0x0015 }, - { 0x0012, 0x004b }, - { 0x0013, 0x0085 }, - { 0x0014, 0x000d }, - { 0x0014, 0x000e }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0014, 0x0013 }, - { 0x0005, 0x000e }, - { 0x0004, 0x000f }, - { 0x0005, 0x000f }, - { 0x0005, 0x0010 }, - { 0x0006, 0x0009 }, - { 0x0008, 0x0008 }, - { 0x0009, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000d, 0x000d }, - { 0x000e, 0x0010 }, - { 0x0010, 0x001c }, - { 0x0011, 0x002b }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, - { 0x0014, 0x001a }, - { 0x0014, 0x001b }, - { 0x0006, 0x000a }, - { 0x0005, 0x0011 }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0007, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x000a, 0x0009 }, - { 0x000c, 0x000c }, - { 0x000e, 0x0011 }, - { 0x000f, 0x0016 }, - { 0x0010, 0x001d }, - { 0x0012, 0x004c }, - { 0x0014, 0x001c }, - { 0x0014, 0x001d }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0014, 0x0020 }, - { 0x0014, 0x0021 }, - { 0x0014, 0x0022 }, - { 0x0014, 0x0023 }, - { 0x0007, 0x0009 }, - { 0x0006, 0x000d }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0009, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000b, 0x000a }, - { 0x000d, 0x000e }, - { 0x000f, 0x0017 }, - { 0x0011, 0x002c }, - { 0x0010, 0x001e }, - { 0x0014, 0x0024 }, - { 0x0014, 0x0025 }, - { 0x0014, 0x0026 }, - { 0x0014, 0x0027 }, - { 0x0014, 0x0028 }, - { 0x0014, 0x0029 }, - { 0x0014, 0x002a }, - { 0x0014, 0x002b }, - { 0x0014, 0x002c }, - { 0x0009, 0x000a }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0009, 0x000b }, - { 0x000a, 0x000b }, - { 0x000b, 0x000b }, - { 0x000d, 0x000f }, - { 0x000e, 0x0012 }, - { 0x000f, 0x0018 }, - { 0x0011, 0x002d }, - { 0x0011, 0x002e }, - { 0x0013, 0x0086 }, - { 0x0014, 0x002d }, - { 0x0014, 0x002e }, - { 0x0014, 0x002f }, - { 0x0014, 0x0030 }, - { 0x0014, 0x0031 }, - { 0x0014, 0x0032 }, - { 0x0014, 0x0033 }, - { 0x0014, 0x0034 }, - { 0x000b, 0x000c }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000b, 0x000d }, - { 0x000c, 0x000d }, - { 0x000d, 0x0010 }, - { 0x000e, 0x0013 }, - { 0x000f, 0x0019 }, - { 0x0010, 0x001f }, - { 0x0013, 0x0087 }, - { 0x0014, 0x0035 }, - { 0x0014, 0x0036 }, - { 0x0013, 0x0088 }, - { 0x0014, 0x0037 }, - { 0x0014, 0x0038 }, - { 0x0014, 0x0039 }, - { 0x0014, 0x003a }, - { 0x0014, 0x003b }, - { 0x0014, 0x003c }, - { 0x0014, 0x003d }, - { 0x000d, 0x0011 }, - { 0x000c, 0x000e }, - { 0x000c, 0x000f }, - { 0x000d, 0x0012 }, - { 0x000d, 0x0013 }, - { 0x000e, 0x0014 }, - { 0x0010, 0x0020 }, - { 0x0010, 0x0021 }, - { 0x0012, 0x004d }, - { 0x0011, 0x002f }, - { 0x0014, 0x003e }, - { 0x0014, 0x003f }, - { 0x0014, 0x0040 }, - { 0x0014, 0x0041 }, - { 0x0014, 0x0042 }, - { 0x0014, 0x0043 }, - { 0x0014, 0x0044 }, - { 0x0014, 0x0045 }, - { 0x0014, 0x0046 }, - { 0x0014, 0x0047 }, - { 0x000f, 0x001a }, - { 0x000e, 0x0015 }, - { 0x000e, 0x0016 }, - { 0x000e, 0x0017 }, - { 0x000f, 0x001b }, - { 0x0011, 0x0030 }, - { 0x0011, 0x0031 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x0013, 0x008b }, - { 0x0014, 0x0048 }, - { 0x0014, 0x0049 }, - { 0x0014, 0x004a }, - { 0x0014, 0x004b }, - { 0x0014, 0x004c }, - { 0x0014, 0x004d }, - { 0x0014, 0x004e }, - { 0x0014, 0x004f }, - { 0x0014, 0x0050 }, - { 0x0014, 0x0051 }, - { 0x0010, 0x0022 }, - { 0x0010, 0x0023 }, - { 0x0010, 0x0024 }, - { 0x0010, 0x0025 }, - { 0x0011, 0x0032 }, - { 0x0011, 0x0033 }, - { 0x0012, 0x004e }, - { 0x0012, 0x004f }, - { 0x0014, 0x0052 }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0014, 0x0053 }, - { 0x0014, 0x0054 }, - { 0x0014, 0x0055 }, - { 0x0014, 0x0056 }, - { 0x0014, 0x0057 }, - { 0x0014, 0x0058 }, - { 0x0014, 0x0059 }, - { 0x0014, 0x005a }, - { 0x0014, 0x005b }, - { 0x0011, 0x0034 }, - { 0x0011, 0x0035 }, - { 0x0012, 0x0050 }, - { 0x0012, 0x0051 }, - { 0x0013, 0x008e }, - { 0x0014, 0x005c }, - { 0x0014, 0x005d }, - { 0x0014, 0x005e }, - { 0x0014, 0x005f }, - { 0x0014, 0x0060 }, - { 0x0014, 0x0061 }, - { 0x0014, 0x0062 }, - { 0x0014, 0x0063 }, - { 0x0014, 0x0064 }, - { 0x0014, 0x0065 }, - { 0x0014, 0x0066 }, - { 0x0014, 0x0067 }, - { 0x0014, 0x0068 }, - { 0x0014, 0x0069 }, - { 0x0014, 0x006a }, - { 0x0012, 0x0052 }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0014, 0x006b }, - { 0x0013, 0x0091 }, - { 0x0014, 0x006c }, - { 0x0014, 0x006d }, - { 0x0014, 0x006e }, - { 0x0014, 0x006f }, - { 0x0014, 0x0070 }, - { 0x0014, 0x0071 }, - { 0x0014, 0x0072 }, - { 0x0014, 0x0073 }, - { 0x0014, 0x0074 }, - { 0x0014, 0x0075 }, - { 0x0014, 0x0076 }, - { 0x0014, 0x0077 }, - { 0x0014, 0x0078 }, - { 0x0014, 0x0079 }, - { 0x0014, 0x007a }, - { 0x0014, 0x007b }, - { 0x0014, 0x007c }, - { 0x0013, 0x0092 }, - { 0x0012, 0x0053 }, - { 0x0014, 0x007d }, - { 0x0014, 0x007e }, - { 0x0014, 0x007f }, - { 0x0014, 0x0080 }, - { 0x0014, 0x0081 }, - { 0x0014, 0x0082 }, - { 0x0014, 0x0083 }, - { 0x0014, 0x0084 }, - { 0x0014, 0x0085 }, - { 0x0014, 0x0086 }, - { 0x0014, 0x0087 }, - { 0x0014, 0x0088 }, - { 0x0014, 0x0089 }, - { 0x0014, 0x008a }, - { 0x0014, 0x008b }, - { 0x0014, 0x008c }, - { 0x0014, 0x008d }, - { 0x0014, 0x008e }, - { 0x0013, 0x0093 }, - { 0x0014, 0x008f }, - { 0x0014, 0x0090 }, - { 0x0014, 0x0091 }, - { 0x0014, 0x0092 }, - { 0x0014, 0x0093 }, - { 0x0014, 0x0094 }, - { 0x0014, 0x0095 }, - { 0x0014, 0x0096 }, - { 0x0014, 0x0097 }, - { 0x0014, 0x0098 }, - { 0x0014, 0x0099 }, - { 0x0014, 0x009a }, - { 0x0014, 0x009b }, - { 0x0014, 0x009c }, - { 0x0014, 0x009d }, - { 0x0014, 0x009e }, - { 0x0014, 0x009f }, - { 0x0014, 0x00a0 }, - { 0x0014, 0x00a1 }, - { 0x0014, 0x00a2 }, - { 0x0014, 0x00a3 }, - { 0x0014, 0x00a4 }, - { 0x0014, 0x00a5 }, - { 0x0014, 0x00a6 }, - { 0x0014, 0x00a7 }, - { 0x0014, 0x00a8 }, - { 0x0014, 0x00a9 }, - { 0x0014, 0x00aa }, - { 0x0014, 0x00ab }, - { 0x0014, 0x00ac }, - { 0x0014, 0x00ad }, - { 0x0014, 0x00ae }, - { 0x0014, 0x00af }, - { 0x0014, 0x00b0 }, - { 0x0014, 0x00b1 }, - { 0x0014, 0x00b2 }, - { 0x0014, 0x00b3 }, - { 0x0014, 0x00b4 }, - { 0x0014, 0x00b5 }, - { 0x0014, 0x00b6 }, - { 0x0014, 0x00b7 }, - { 0x0014, 0x00b8 }, - { 0x0014, 0x00b9 }, - { 0x0014, 0x00ba }, - { 0x0014, 0x00bb }, - { 0x0014, 0x00bc }, - { 0x0014, 0x00bd }, - { 0x0014, 0x00be }, - { 0x0014, 0x00bf }, - { 0x0014, 0x00c0 }, - { 0x0014, 0x00c1 }, - { 0x0014, 0x00c2 }, - { 0x0014, 0x00c3 }, - { 0x0014, 0x00c4 }, - { 0x0014, 0x00c5 }, - { 0x0014, 0x00c6 }, - { 0x0014, 0x00c7 }, - { 0x0014, 0x00c8 }, - { 0x0014, 0x00c9 }, - { 0x0014, 0x00ca }, - { 0x0014, 0x00cb }, - { 0x0014, 0x00cc }, - { 0x0014, 0x00cd }, - { 0x0014, 0x00ce }, - { 0x0014, 0x00cf }, - { 0x0014, 0x00d0 }, - { 0x0014, 0x00d1 }, - { 0x0014, 0x00d2 }, - { 0x0014, 0x00d3 }, - { 0x0014, 0x00d4 }, - { 0x0014, 0x00d5 }, - { 0x0014, 0x00d6 }, - { 0x0014, 0x00d7 }, - { 0x0014, 0x00d8 }, - { 0x0014, 0x00d9 }, - { 0x0014, 0x00da }, - { 0x0014, 0x00db }, - { 0x0014, 0x00dc }, - { 0x0014, 0x00dd }, - { 0x0014, 0x00de }, - { 0x0014, 0x00df }, - { 0x0014, 0x00e0 }, - { 0x0014, 0x00e1 }, - { 0x0014, 0x00e2 }, - { 0x0014, 0x00e3 }, - { 0x0014, 0x00e4 }, - { 0x0014, 0x00e5 }, - { 0x0014, 0x00e6 }, - { 0x0014, 0x00e7 }, - { 0x0014, 0x00e8 }, - { 0x0014, 0x00e9 }, - { 0x0014, 0x00ea }, - { 0x0014, 0x00eb }, - { 0x0014, 0x00ec }, - { 0x0014, 0x00ed }, - { 0x0014, 0x00ee }, - { 0x0014, 0x00ef }, - { 0x0014, 0x00f0 }, - { 0x0014, 0x00f1 }, - { 0x0014, 0x00f2 }, - { 0x0014, 0x00f3 }, - { 0x0014, 0x00f4 }, - { 0x0014, 0x00f5 }, - { 0x0014, 0x00f6 }, - { 0x0014, 0x00f7 }, - { 0x0014, 0x00f8 }, - { 0x0014, 0x00f9 }, - { 0x0014, 0x00fa }, - { 0x0014, 0x00fb }, - { 0x0014, 0x00fc }, - { 0x0014, 0x00fd }, - { 0x0014, 0x00fe }, - { 0x0014, 0x00ff }, - { 0x0014, 0x0100 }, - { 0x0014, 0x0101 }, - { 0x0014, 0x0102 }, - { 0x0014, 0x0103 }, - }; +const UWord16 c_aauiLCLDHuffEnc14[400][2] = { + { 0x0005, 0x0007 }, + { 0x0004, 0x0009 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0006, 0x0006 }, + { 0x0007, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000d, 0x000c }, + { 0x000f, 0x0013 }, + { 0x0010, 0x001b }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0014, 0x0006 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0004, 0x000c }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0006, 0x0007 }, + { 0x0008, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000c, 0x000a }, + { 0x000e, 0x000e }, + { 0x000f, 0x0014 }, + { 0x0011, 0x002a }, + { 0x0012, 0x004a }, + { 0x0013, 0x0084 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0014, 0x0009 }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0014, 0x000c }, + { 0x0005, 0x000c }, + { 0x0004, 0x000d }, + { 0x0004, 0x000e }, + { 0x0005, 0x000d }, + { 0x0006, 0x0008 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0007 }, + { 0x000a, 0x0008 }, + { 0x000c, 0x000b }, + { 0x000e, 0x000f }, + { 0x000f, 0x0015 }, + { 0x0012, 0x004b }, + { 0x0013, 0x0085 }, + { 0x0014, 0x000d }, + { 0x0014, 0x000e }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0014, 0x0013 }, + { 0x0005, 0x000e }, + { 0x0004, 0x000f }, + { 0x0005, 0x000f }, + { 0x0005, 0x0010 }, + { 0x0006, 0x0009 }, + { 0x0008, 0x0008 }, + { 0x0009, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000d, 0x000d }, + { 0x000e, 0x0010 }, + { 0x0010, 0x001c }, + { 0x0011, 0x002b }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, + { 0x0014, 0x001a }, + { 0x0014, 0x001b }, + { 0x0006, 0x000a }, + { 0x0005, 0x0011 }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0007, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x000a, 0x0009 }, + { 0x000c, 0x000c }, + { 0x000e, 0x0011 }, + { 0x000f, 0x0016 }, + { 0x0010, 0x001d }, + { 0x0012, 0x004c }, + { 0x0014, 0x001c }, + { 0x0014, 0x001d }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0014, 0x0020 }, + { 0x0014, 0x0021 }, + { 0x0014, 0x0022 }, + { 0x0014, 0x0023 }, + { 0x0007, 0x0009 }, + { 0x0006, 0x000d }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0009, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000b, 0x000a }, + { 0x000d, 0x000e }, + { 0x000f, 0x0017 }, + { 0x0011, 0x002c }, + { 0x0010, 0x001e }, + { 0x0014, 0x0024 }, + { 0x0014, 0x0025 }, + { 0x0014, 0x0026 }, + { 0x0014, 0x0027 }, + { 0x0014, 0x0028 }, + { 0x0014, 0x0029 }, + { 0x0014, 0x002a }, + { 0x0014, 0x002b }, + { 0x0014, 0x002c }, + { 0x0009, 0x000a }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0009, 0x000b }, + { 0x000a, 0x000b }, + { 0x000b, 0x000b }, + { 0x000d, 0x000f }, + { 0x000e, 0x0012 }, + { 0x000f, 0x0018 }, + { 0x0011, 0x002d }, + { 0x0011, 0x002e }, + { 0x0013, 0x0086 }, + { 0x0014, 0x002d }, + { 0x0014, 0x002e }, + { 0x0014, 0x002f }, + { 0x0014, 0x0030 }, + { 0x0014, 0x0031 }, + { 0x0014, 0x0032 }, + { 0x0014, 0x0033 }, + { 0x0014, 0x0034 }, + { 0x000b, 0x000c }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000b, 0x000d }, + { 0x000c, 0x000d }, + { 0x000d, 0x0010 }, + { 0x000e, 0x0013 }, + { 0x000f, 0x0019 }, + { 0x0010, 0x001f }, + { 0x0013, 0x0087 }, + { 0x0014, 0x0035 }, + { 0x0014, 0x0036 }, + { 0x0013, 0x0088 }, + { 0x0014, 0x0037 }, + { 0x0014, 0x0038 }, + { 0x0014, 0x0039 }, + { 0x0014, 0x003a }, + { 0x0014, 0x003b }, + { 0x0014, 0x003c }, + { 0x0014, 0x003d }, + { 0x000d, 0x0011 }, + { 0x000c, 0x000e }, + { 0x000c, 0x000f }, + { 0x000d, 0x0012 }, + { 0x000d, 0x0013 }, + { 0x000e, 0x0014 }, + { 0x0010, 0x0020 }, + { 0x0010, 0x0021 }, + { 0x0012, 0x004d }, + { 0x0011, 0x002f }, + { 0x0014, 0x003e }, + { 0x0014, 0x003f }, + { 0x0014, 0x0040 }, + { 0x0014, 0x0041 }, + { 0x0014, 0x0042 }, + { 0x0014, 0x0043 }, + { 0x0014, 0x0044 }, + { 0x0014, 0x0045 }, + { 0x0014, 0x0046 }, + { 0x0014, 0x0047 }, + { 0x000f, 0x001a }, + { 0x000e, 0x0015 }, + { 0x000e, 0x0016 }, + { 0x000e, 0x0017 }, + { 0x000f, 0x001b }, + { 0x0011, 0x0030 }, + { 0x0011, 0x0031 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x0013, 0x008b }, + { 0x0014, 0x0048 }, + { 0x0014, 0x0049 }, + { 0x0014, 0x004a }, + { 0x0014, 0x004b }, + { 0x0014, 0x004c }, + { 0x0014, 0x004d }, + { 0x0014, 0x004e }, + { 0x0014, 0x004f }, + { 0x0014, 0x0050 }, + { 0x0014, 0x0051 }, + { 0x0010, 0x0022 }, + { 0x0010, 0x0023 }, + { 0x0010, 0x0024 }, + { 0x0010, 0x0025 }, + { 0x0011, 0x0032 }, + { 0x0011, 0x0033 }, + { 0x0012, 0x004e }, + { 0x0012, 0x004f }, + { 0x0014, 0x0052 }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0014, 0x0053 }, + { 0x0014, 0x0054 }, + { 0x0014, 0x0055 }, + { 0x0014, 0x0056 }, + { 0x0014, 0x0057 }, + { 0x0014, 0x0058 }, + { 0x0014, 0x0059 }, + { 0x0014, 0x005a }, + { 0x0014, 0x005b }, + { 0x0011, 0x0034 }, + { 0x0011, 0x0035 }, + { 0x0012, 0x0050 }, + { 0x0012, 0x0051 }, + { 0x0013, 0x008e }, + { 0x0014, 0x005c }, + { 0x0014, 0x005d }, + { 0x0014, 0x005e }, + { 0x0014, 0x005f }, + { 0x0014, 0x0060 }, + { 0x0014, 0x0061 }, + { 0x0014, 0x0062 }, + { 0x0014, 0x0063 }, + { 0x0014, 0x0064 }, + { 0x0014, 0x0065 }, + { 0x0014, 0x0066 }, + { 0x0014, 0x0067 }, + { 0x0014, 0x0068 }, + { 0x0014, 0x0069 }, + { 0x0014, 0x006a }, + { 0x0012, 0x0052 }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0014, 0x006b }, + { 0x0013, 0x0091 }, + { 0x0014, 0x006c }, + { 0x0014, 0x006d }, + { 0x0014, 0x006e }, + { 0x0014, 0x006f }, + { 0x0014, 0x0070 }, + { 0x0014, 0x0071 }, + { 0x0014, 0x0072 }, + { 0x0014, 0x0073 }, + { 0x0014, 0x0074 }, + { 0x0014, 0x0075 }, + { 0x0014, 0x0076 }, + { 0x0014, 0x0077 }, + { 0x0014, 0x0078 }, + { 0x0014, 0x0079 }, + { 0x0014, 0x007a }, + { 0x0014, 0x007b }, + { 0x0014, 0x007c }, + { 0x0013, 0x0092 }, + { 0x0012, 0x0053 }, + { 0x0014, 0x007d }, + { 0x0014, 0x007e }, + { 0x0014, 0x007f }, + { 0x0014, 0x0080 }, + { 0x0014, 0x0081 }, + { 0x0014, 0x0082 }, + { 0x0014, 0x0083 }, + { 0x0014, 0x0084 }, + { 0x0014, 0x0085 }, + { 0x0014, 0x0086 }, + { 0x0014, 0x0087 }, + { 0x0014, 0x0088 }, + { 0x0014, 0x0089 }, + { 0x0014, 0x008a }, + { 0x0014, 0x008b }, + { 0x0014, 0x008c }, + { 0x0014, 0x008d }, + { 0x0014, 0x008e }, + { 0x0013, 0x0093 }, + { 0x0014, 0x008f }, + { 0x0014, 0x0090 }, + { 0x0014, 0x0091 }, + { 0x0014, 0x0092 }, + { 0x0014, 0x0093 }, + { 0x0014, 0x0094 }, + { 0x0014, 0x0095 }, + { 0x0014, 0x0096 }, + { 0x0014, 0x0097 }, + { 0x0014, 0x0098 }, + { 0x0014, 0x0099 }, + { 0x0014, 0x009a }, + { 0x0014, 0x009b }, + { 0x0014, 0x009c }, + { 0x0014, 0x009d }, + { 0x0014, 0x009e }, + { 0x0014, 0x009f }, + { 0x0014, 0x00a0 }, + { 0x0014, 0x00a1 }, + { 0x0014, 0x00a2 }, + { 0x0014, 0x00a3 }, + { 0x0014, 0x00a4 }, + { 0x0014, 0x00a5 }, + { 0x0014, 0x00a6 }, + { 0x0014, 0x00a7 }, + { 0x0014, 0x00a8 }, + { 0x0014, 0x00a9 }, + { 0x0014, 0x00aa }, + { 0x0014, 0x00ab }, + { 0x0014, 0x00ac }, + { 0x0014, 0x00ad }, + { 0x0014, 0x00ae }, + { 0x0014, 0x00af }, + { 0x0014, 0x00b0 }, + { 0x0014, 0x00b1 }, + { 0x0014, 0x00b2 }, + { 0x0014, 0x00b3 }, + { 0x0014, 0x00b4 }, + { 0x0014, 0x00b5 }, + { 0x0014, 0x00b6 }, + { 0x0014, 0x00b7 }, + { 0x0014, 0x00b8 }, + { 0x0014, 0x00b9 }, + { 0x0014, 0x00ba }, + { 0x0014, 0x00bb }, + { 0x0014, 0x00bc }, + { 0x0014, 0x00bd }, + { 0x0014, 0x00be }, + { 0x0014, 0x00bf }, + { 0x0014, 0x00c0 }, + { 0x0014, 0x00c1 }, + { 0x0014, 0x00c2 }, + { 0x0014, 0x00c3 }, + { 0x0014, 0x00c4 }, + { 0x0014, 0x00c5 }, + { 0x0014, 0x00c6 }, + { 0x0014, 0x00c7 }, + { 0x0014, 0x00c8 }, + { 0x0014, 0x00c9 }, + { 0x0014, 0x00ca }, + { 0x0014, 0x00cb }, + { 0x0014, 0x00cc }, + { 0x0014, 0x00cd }, + { 0x0014, 0x00ce }, + { 0x0014, 0x00cf }, + { 0x0014, 0x00d0 }, + { 0x0014, 0x00d1 }, + { 0x0014, 0x00d2 }, + { 0x0014, 0x00d3 }, + { 0x0014, 0x00d4 }, + { 0x0014, 0x00d5 }, + { 0x0014, 0x00d6 }, + { 0x0014, 0x00d7 }, + { 0x0014, 0x00d8 }, + { 0x0014, 0x00d9 }, + { 0x0014, 0x00da }, + { 0x0014, 0x00db }, + { 0x0014, 0x00dc }, + { 0x0014, 0x00dd }, + { 0x0014, 0x00de }, + { 0x0014, 0x00df }, + { 0x0014, 0x00e0 }, + { 0x0014, 0x00e1 }, + { 0x0014, 0x00e2 }, + { 0x0014, 0x00e3 }, + { 0x0014, 0x00e4 }, + { 0x0014, 0x00e5 }, + { 0x0014, 0x00e6 }, + { 0x0014, 0x00e7 }, + { 0x0014, 0x00e8 }, + { 0x0014, 0x00e9 }, + { 0x0014, 0x00ea }, + { 0x0014, 0x00eb }, + { 0x0014, 0x00ec }, + { 0x0014, 0x00ed }, + { 0x0014, 0x00ee }, + { 0x0014, 0x00ef }, + { 0x0014, 0x00f0 }, + { 0x0014, 0x00f1 }, + { 0x0014, 0x00f2 }, + { 0x0014, 0x00f3 }, + { 0x0014, 0x00f4 }, + { 0x0014, 0x00f5 }, + { 0x0014, 0x00f6 }, + { 0x0014, 0x00f7 }, + { 0x0014, 0x00f8 }, + { 0x0014, 0x00f9 }, + { 0x0014, 0x00fa }, + { 0x0014, 0x00fb }, + { 0x0014, 0x00fc }, + { 0x0014, 0x00fd }, + { 0x0014, 0x00fe }, + { 0x0014, 0x00ff }, + { 0x0014, 0x0100 }, + { 0x0014, 0x0101 }, + { 0x0014, 0x0102 }, + { 0x0014, 0x0103 }, +}; -const uint16_t c_aauiLCLDHuffEnc15[576][2] = - { - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0007, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0009, 0x0008 }, - { 0x000b, 0x000b }, - { 0x000d, 0x000e }, - { 0x000e, 0x0011 }, - { 0x000f, 0x001a }, - { 0x0012, 0x006e }, - { 0x0014, 0x0000 }, - { 0x0013, 0x00cc }, - { 0x0014, 0x0001 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0014, 0x0006 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0014, 0x0009 }, - { 0x0005, 0x000d }, - { 0x0004, 0x000c }, - { 0x0004, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0006, 0x000b }, - { 0x0007, 0x0009 }, - { 0x0008, 0x000a }, - { 0x000a, 0x000a }, - { 0x000c, 0x000c }, - { 0x000d, 0x000f }, - { 0x000f, 0x001b }, - { 0x0011, 0x003d }, - { 0x0011, 0x003e }, - { 0x0013, 0x00cd }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0014, 0x000c }, - { 0x0014, 0x000d }, - { 0x0014, 0x000e }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0005, 0x0010 }, - { 0x0004, 0x000e }, - { 0x0004, 0x000f }, - { 0x0005, 0x0011 }, - { 0x0005, 0x0012 }, - { 0x0006, 0x000c }, - { 0x0007, 0x000a }, - { 0x0009, 0x0009 }, - { 0x000a, 0x000b }, - { 0x000c, 0x000d }, - { 0x000e, 0x0012 }, - { 0x0010, 0x0027 }, - { 0x0011, 0x003f }, - { 0x0012, 0x006f }, - { 0x0014, 0x0013 }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, - { 0x0014, 0x001a }, - { 0x0014, 0x001b }, - { 0x0014, 0x001c }, - { 0x0006, 0x000d }, - { 0x0005, 0x0013 }, - { 0x0005, 0x0014 }, - { 0x0005, 0x0015 }, - { 0x0006, 0x000e }, - { 0x0007, 0x000b }, - { 0x0008, 0x000b }, - { 0x0009, 0x000a }, - { 0x000b, 0x000c }, - { 0x000c, 0x000e }, - { 0x000e, 0x0013 }, - { 0x000f, 0x001c }, - { 0x0011, 0x0040 }, - { 0x0012, 0x0070 }, - { 0x0014, 0x001d }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0014, 0x0020 }, - { 0x0014, 0x0021 }, - { 0x0014, 0x0022 }, - { 0x0014, 0x0023 }, - { 0x0014, 0x0024 }, - { 0x0014, 0x0025 }, - { 0x0014, 0x0026 }, - { 0x0006, 0x000f }, - { 0x0005, 0x0016 }, - { 0x0005, 0x0017 }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0007, 0x000c }, - { 0x0009, 0x000b }, - { 0x000a, 0x000c }, - { 0x000b, 0x000d }, - { 0x000d, 0x0010 }, - { 0x000e, 0x0014 }, - { 0x0010, 0x0028 }, - { 0x0011, 0x0041 }, - { 0x0013, 0x00ce }, - { 0x0014, 0x0027 }, - { 0x0014, 0x0028 }, - { 0x0014, 0x0029 }, - { 0x0014, 0x002a }, - { 0x0014, 0x002b }, - { 0x0014, 0x002c }, - { 0x0014, 0x002d }, - { 0x0014, 0x002e }, - { 0x0014, 0x002f }, - { 0x0014, 0x0030 }, - { 0x0007, 0x000d }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0008, 0x000c }, - { 0x0009, 0x000c }, - { 0x000b, 0x000e }, - { 0x000c, 0x000f }, - { 0x000e, 0x0015 }, - { 0x0010, 0x0029 }, - { 0x0011, 0x0042 }, - { 0x0014, 0x0031 }, - { 0x0014, 0x0032 }, - { 0x0014, 0x0033 }, - { 0x0014, 0x0034 }, - { 0x0014, 0x0035 }, - { 0x0014, 0x0036 }, - { 0x0014, 0x0037 }, - { 0x0014, 0x0038 }, - { 0x0014, 0x0039 }, - { 0x0014, 0x003a }, - { 0x0014, 0x003b }, - { 0x0014, 0x003c }, - { 0x0008, 0x000d }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0008, 0x000e }, - { 0x0009, 0x000d }, - { 0x0009, 0x000e }, - { 0x000b, 0x000f }, - { 0x000c, 0x0010 }, - { 0x000d, 0x0011 }, - { 0x000f, 0x001d }, - { 0x0010, 0x002a }, - { 0x0011, 0x0043 }, - { 0x0014, 0x003d }, - { 0x0013, 0x00cf }, - { 0x0014, 0x003e }, - { 0x0014, 0x003f }, - { 0x0014, 0x0040 }, - { 0x0014, 0x0041 }, - { 0x0014, 0x0042 }, - { 0x0014, 0x0043 }, - { 0x0014, 0x0044 }, - { 0x0014, 0x0045 }, - { 0x0014, 0x0046 }, - { 0x0014, 0x0047 }, - { 0x0009, 0x000f }, - { 0x0008, 0x000f }, - { 0x0009, 0x0010 }, - { 0x0009, 0x0011 }, - { 0x000a, 0x000d }, - { 0x000b, 0x0010 }, - { 0x000c, 0x0011 }, - { 0x000d, 0x0012 }, - { 0x000e, 0x0016 }, - { 0x0010, 0x002b }, - { 0x0011, 0x0044 }, - { 0x0012, 0x0071 }, - { 0x0014, 0x0048 }, - { 0x0014, 0x0049 }, - { 0x0014, 0x004a }, - { 0x0014, 0x004b }, - { 0x0014, 0x004c }, - { 0x0014, 0x004d }, - { 0x0014, 0x004e }, - { 0x0014, 0x004f }, - { 0x0014, 0x0050 }, - { 0x0014, 0x0051 }, - { 0x0014, 0x0052 }, - { 0x0014, 0x0053 }, - { 0x000b, 0x0011 }, - { 0x000a, 0x000e }, - { 0x000a, 0x000f }, - { 0x000b, 0x0012 }, - { 0x000b, 0x0013 }, - { 0x000c, 0x0012 }, - { 0x000d, 0x0013 }, - { 0x000e, 0x0017 }, - { 0x0010, 0x002c }, - { 0x0012, 0x0072 }, - { 0x0011, 0x0045 }, - { 0x0013, 0x00d0 }, - { 0x0013, 0x00d1 }, - { 0x0014, 0x0054 }, - { 0x0014, 0x0055 }, - { 0x0014, 0x0056 }, - { 0x0014, 0x0057 }, - { 0x0014, 0x0058 }, - { 0x0014, 0x0059 }, - { 0x0014, 0x005a }, - { 0x0014, 0x005b }, - { 0x0014, 0x005c }, - { 0x0014, 0x005d }, - { 0x0014, 0x005e }, - { 0x000c, 0x0013 }, - { 0x000c, 0x0014 }, - { 0x000c, 0x0015 }, - { 0x000d, 0x0014 }, - { 0x000d, 0x0015 }, - { 0x000e, 0x0018 }, - { 0x000f, 0x001e }, - { 0x0010, 0x002d }, - { 0x0011, 0x0046 }, - { 0x0011, 0x0047 }, - { 0x0011, 0x0048 }, - { 0x0014, 0x005f }, - { 0x0014, 0x0060 }, - { 0x0014, 0x0061 }, - { 0x0014, 0x0062 }, - { 0x0014, 0x0063 }, - { 0x0014, 0x0064 }, - { 0x0014, 0x0065 }, - { 0x0014, 0x0066 }, - { 0x0014, 0x0067 }, - { 0x0014, 0x0068 }, - { 0x0014, 0x0069 }, - { 0x0014, 0x006a }, - { 0x0014, 0x006b }, - { 0x000e, 0x0019 }, - { 0x000d, 0x0016 }, - { 0x000d, 0x0017 }, - { 0x000e, 0x001a }, - { 0x000e, 0x001b }, - { 0x000f, 0x001f }, - { 0x0010, 0x002e }, - { 0x0011, 0x0049 }, - { 0x0012, 0x0073 }, - { 0x0014, 0x006c }, - { 0x0014, 0x006d }, - { 0x0014, 0x006e }, - { 0x0014, 0x006f }, - { 0x0014, 0x0070 }, - { 0x0014, 0x0071 }, - { 0x0014, 0x0072 }, - { 0x0014, 0x0073 }, - { 0x0014, 0x0074 }, - { 0x0014, 0x0075 }, - { 0x0014, 0x0076 }, - { 0x0014, 0x0077 }, - { 0x0014, 0x0078 }, - { 0x0014, 0x0079 }, - { 0x0014, 0x007a }, - { 0x0010, 0x002f }, - { 0x000f, 0x0020 }, - { 0x0010, 0x0030 }, - { 0x000f, 0x0021 }, - { 0x0010, 0x0031 }, - { 0x0011, 0x004a }, - { 0x0011, 0x004b }, - { 0x0012, 0x0074 }, - { 0x0014, 0x007b }, - { 0x0014, 0x007c }, - { 0x0013, 0x00d2 }, - { 0x0014, 0x007d }, - { 0x0014, 0x007e }, - { 0x0014, 0x007f }, - { 0x0014, 0x0080 }, - { 0x0014, 0x0081 }, - { 0x0014, 0x0082 }, - { 0x0014, 0x0083 }, - { 0x0014, 0x0084 }, - { 0x0014, 0x0085 }, - { 0x0014, 0x0086 }, - { 0x0014, 0x0087 }, - { 0x0014, 0x0088 }, - { 0x0014, 0x0089 }, - { 0x0012, 0x0075 }, - { 0x0010, 0x0032 }, - { 0x0010, 0x0033 }, - { 0x0011, 0x004c }, - { 0x0011, 0x004d }, - { 0x0013, 0x00d3 }, - { 0x0013, 0x00d4 }, - { 0x0012, 0x0076 }, - { 0x0013, 0x00d5 }, - { 0x0014, 0x008a }, - { 0x0014, 0x008b }, - { 0x0014, 0x008c }, - { 0x0014, 0x008d }, - { 0x0014, 0x008e }, - { 0x0014, 0x008f }, - { 0x0014, 0x0090 }, - { 0x0014, 0x0091 }, - { 0x0014, 0x0092 }, - { 0x0014, 0x0093 }, - { 0x0014, 0x0094 }, - { 0x0014, 0x0095 }, - { 0x0014, 0x0096 }, - { 0x0014, 0x0097 }, - { 0x0014, 0x0098 }, - { 0x0013, 0x00d6 }, - { 0x0013, 0x00d7 }, - { 0x0012, 0x0077 }, - { 0x0012, 0x0078 }, - { 0x0014, 0x0099 }, - { 0x0014, 0x009a }, - { 0x0013, 0x00d8 }, - { 0x0014, 0x009b }, - { 0x0014, 0x009c }, - { 0x0014, 0x009d }, - { 0x0014, 0x009e }, - { 0x0014, 0x009f }, - { 0x0014, 0x00a0 }, - { 0x0014, 0x00a1 }, - { 0x0014, 0x00a2 }, - { 0x0014, 0x00a3 }, - { 0x0014, 0x00a4 }, - { 0x0014, 0x00a5 }, - { 0x0014, 0x00a6 }, - { 0x0014, 0x00a7 }, - { 0x0014, 0x00a8 }, - { 0x0014, 0x00a9 }, - { 0x0014, 0x00aa }, - { 0x0014, 0x00ab }, - { 0x0014, 0x00ac }, - { 0x0014, 0x00ad }, - { 0x0014, 0x00ae }, - { 0x0014, 0x00af }, - { 0x0012, 0x0079 }, - { 0x0014, 0x00b0 }, - { 0x0014, 0x00b1 }, - { 0x0014, 0x00b2 }, - { 0x0014, 0x00b3 }, - { 0x0014, 0x00b4 }, - { 0x0014, 0x00b5 }, - { 0x0014, 0x00b6 }, - { 0x0014, 0x00b7 }, - { 0x0014, 0x00b8 }, - { 0x0014, 0x00b9 }, - { 0x0014, 0x00ba }, - { 0x0014, 0x00bb }, - { 0x0014, 0x00bc }, - { 0x0014, 0x00bd }, - { 0x0014, 0x00be }, - { 0x0014, 0x00bf }, - { 0x0014, 0x00c0 }, - { 0x0014, 0x00c1 }, - { 0x0014, 0x00c2 }, - { 0x0014, 0x00c3 }, - { 0x0014, 0x00c4 }, - { 0x0014, 0x00c5 }, - { 0x0014, 0x00c6 }, - { 0x0013, 0x00d9 }, - { 0x0013, 0x00da }, - { 0x0014, 0x00c7 }, - { 0x0014, 0x00c8 }, - { 0x0014, 0x00c9 }, - { 0x0014, 0x00ca }, - { 0x0014, 0x00cb }, - { 0x0014, 0x00cc }, - { 0x0014, 0x00cd }, - { 0x0014, 0x00ce }, - { 0x0014, 0x00cf }, - { 0x0014, 0x00d0 }, - { 0x0014, 0x00d1 }, - { 0x0014, 0x00d2 }, - { 0x0014, 0x00d3 }, - { 0x0014, 0x00d4 }, - { 0x0014, 0x00d5 }, - { 0x0014, 0x00d6 }, - { 0x0014, 0x00d7 }, - { 0x0014, 0x00d8 }, - { 0x0014, 0x00d9 }, - { 0x0014, 0x00da }, - { 0x0014, 0x00db }, - { 0x0014, 0x00dc }, - { 0x0014, 0x00dd }, - { 0x0014, 0x00de }, - { 0x0014, 0x00df }, - { 0x0014, 0x00e0 }, - { 0x0014, 0x00e1 }, - { 0x0014, 0x00e2 }, - { 0x0014, 0x00e3 }, - { 0x0014, 0x00e4 }, - { 0x0014, 0x00e5 }, - { 0x0014, 0x00e6 }, - { 0x0014, 0x00e7 }, - { 0x0014, 0x00e8 }, - { 0x0014, 0x00e9 }, - { 0x0014, 0x00ea }, - { 0x0014, 0x00eb }, - { 0x0014, 0x00ec }, - { 0x0014, 0x00ed }, - { 0x0014, 0x00ee }, - { 0x0014, 0x00ef }, - { 0x0014, 0x00f0 }, - { 0x0014, 0x00f1 }, - { 0x0014, 0x00f2 }, - { 0x0014, 0x00f3 }, - { 0x0014, 0x00f4 }, - { 0x0014, 0x00f5 }, - { 0x0014, 0x00f6 }, - { 0x0014, 0x00f7 }, - { 0x0014, 0x00f8 }, - { 0x0014, 0x00f9 }, - { 0x0014, 0x00fa }, - { 0x0014, 0x00fb }, - { 0x0014, 0x00fc }, - { 0x0014, 0x00fd }, - { 0x0014, 0x00fe }, - { 0x0014, 0x00ff }, - { 0x0014, 0x0100 }, - { 0x0014, 0x0101 }, - { 0x0014, 0x0102 }, - { 0x0014, 0x0103 }, - { 0x0014, 0x0104 }, - { 0x0014, 0x0105 }, - { 0x0014, 0x0106 }, - { 0x0014, 0x0107 }, - { 0x0014, 0x0108 }, - { 0x0014, 0x0109 }, - { 0x0014, 0x010a }, - { 0x0014, 0x010b }, - { 0x0014, 0x010c }, - { 0x0014, 0x010d }, - { 0x0014, 0x010e }, - { 0x0014, 0x010f }, - { 0x0014, 0x0110 }, - { 0x0014, 0x0111 }, - { 0x0014, 0x0112 }, - { 0x0014, 0x0113 }, - { 0x0014, 0x0114 }, - { 0x0014, 0x0115 }, - { 0x0014, 0x0116 }, - { 0x0014, 0x0117 }, - { 0x0014, 0x0118 }, - { 0x0014, 0x0119 }, - { 0x0014, 0x011a }, - { 0x0014, 0x011b }, - { 0x0014, 0x011c }, - { 0x0014, 0x011d }, - { 0x0014, 0x011e }, - { 0x0014, 0x011f }, - { 0x0014, 0x0120 }, - { 0x0014, 0x0121 }, - { 0x0014, 0x0122 }, - { 0x0014, 0x0123 }, - { 0x0014, 0x0124 }, - { 0x0014, 0x0125 }, - { 0x0014, 0x0126 }, - { 0x0014, 0x0127 }, - { 0x0014, 0x0128 }, - { 0x0014, 0x0129 }, - { 0x0014, 0x012a }, - { 0x0014, 0x012b }, - { 0x0014, 0x012c }, - { 0x0014, 0x012d }, - { 0x0014, 0x012e }, - { 0x0014, 0x012f }, - { 0x0014, 0x0130 }, - { 0x0014, 0x0131 }, - { 0x0014, 0x0132 }, - { 0x0014, 0x0133 }, - { 0x0014, 0x0134 }, - { 0x0014, 0x0135 }, - { 0x0014, 0x0136 }, - { 0x0014, 0x0137 }, - { 0x0014, 0x0138 }, - { 0x0014, 0x0139 }, - { 0x0014, 0x013a }, - { 0x0014, 0x013b }, - { 0x0014, 0x013c }, - { 0x0014, 0x013d }, - { 0x0014, 0x013e }, - { 0x0014, 0x013f }, - { 0x0014, 0x0140 }, - { 0x0014, 0x0141 }, - { 0x0014, 0x0142 }, - { 0x0014, 0x0143 }, - { 0x0014, 0x0144 }, - { 0x0014, 0x0145 }, - { 0x0014, 0x0146 }, - { 0x0014, 0x0147 }, - { 0x0014, 0x0148 }, - { 0x0014, 0x0149 }, - { 0x0014, 0x014a }, - { 0x0014, 0x014b }, - { 0x0014, 0x014c }, - { 0x0014, 0x014d }, - { 0x0014, 0x014e }, - { 0x0014, 0x014f }, - { 0x0014, 0x0150 }, - { 0x0014, 0x0151 }, - { 0x0014, 0x0152 }, - { 0x0014, 0x0153 }, - { 0x0014, 0x0154 }, - { 0x0014, 0x0155 }, - { 0x0014, 0x0156 }, - { 0x0014, 0x0157 }, - { 0x0014, 0x0158 }, - { 0x0014, 0x0159 }, - { 0x0014, 0x015a }, - { 0x0014, 0x015b }, - { 0x0014, 0x015c }, - { 0x0014, 0x015d }, - { 0x0014, 0x015e }, - { 0x0014, 0x015f }, - { 0x0014, 0x0160 }, - { 0x0014, 0x0161 }, - { 0x0014, 0x0162 }, - { 0x0014, 0x0163 }, - { 0x0014, 0x0164 }, - { 0x0014, 0x0165 }, - { 0x0014, 0x0166 }, - { 0x0014, 0x0167 }, - { 0x0014, 0x0168 }, - { 0x0014, 0x0169 }, - { 0x0014, 0x016a }, - { 0x0014, 0x016b }, - { 0x0014, 0x016c }, - { 0x0014, 0x016d }, - { 0x0014, 0x016e }, - { 0x0014, 0x016f }, - { 0x0014, 0x0170 }, - { 0x0014, 0x0171 }, - { 0x0014, 0x0172 }, - { 0x0014, 0x0173 }, - { 0x0014, 0x0174 }, - { 0x0014, 0x0175 }, - { 0x0014, 0x0176 }, - { 0x0014, 0x0177 }, - { 0x0014, 0x0178 }, - { 0x0014, 0x0179 }, - { 0x0014, 0x017a }, - { 0x0014, 0x017b }, - { 0x0014, 0x017c }, - { 0x0014, 0x017d }, - { 0x0014, 0x017e }, - { 0x0014, 0x017f }, - { 0x0014, 0x0180 }, - { 0x0014, 0x0181 }, - { 0x0014, 0x0182 }, - { 0x0014, 0x0183 }, - { 0x0014, 0x0184 }, - { 0x0014, 0x0185 }, - { 0x0014, 0x0186 }, - { 0x0014, 0x0187 }, - { 0x0014, 0x0188 }, - { 0x0014, 0x0189 }, - { 0x0014, 0x018a }, - { 0x0014, 0x018b }, - { 0x0014, 0x018c }, - { 0x0014, 0x018d }, - { 0x0014, 0x018e }, - { 0x0014, 0x018f }, - { 0x0014, 0x0190 }, - { 0x0014, 0x0191 }, - { 0x0014, 0x0192 }, - { 0x0014, 0x0193 }, - { 0x0014, 0x0194 }, - { 0x0014, 0x0195 }, - { 0x0014, 0x0196 }, - { 0x0014, 0x0197 }, - { 0x0013, 0x00db }, - }; +const UWord16 c_aauiLCLDHuffEnc15[576][2] = { + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0007, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0009, 0x0008 }, + { 0x000b, 0x000b }, + { 0x000d, 0x000e }, + { 0x000e, 0x0011 }, + { 0x000f, 0x001a }, + { 0x0012, 0x006e }, + { 0x0014, 0x0000 }, + { 0x0013, 0x00cc }, + { 0x0014, 0x0001 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0014, 0x0006 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0014, 0x0009 }, + { 0x0005, 0x000d }, + { 0x0004, 0x000c }, + { 0x0004, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0006, 0x000b }, + { 0x0007, 0x0009 }, + { 0x0008, 0x000a }, + { 0x000a, 0x000a }, + { 0x000c, 0x000c }, + { 0x000d, 0x000f }, + { 0x000f, 0x001b }, + { 0x0011, 0x003d }, + { 0x0011, 0x003e }, + { 0x0013, 0x00cd }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0014, 0x000c }, + { 0x0014, 0x000d }, + { 0x0014, 0x000e }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0005, 0x0010 }, + { 0x0004, 0x000e }, + { 0x0004, 0x000f }, + { 0x0005, 0x0011 }, + { 0x0005, 0x0012 }, + { 0x0006, 0x000c }, + { 0x0007, 0x000a }, + { 0x0009, 0x0009 }, + { 0x000a, 0x000b }, + { 0x000c, 0x000d }, + { 0x000e, 0x0012 }, + { 0x0010, 0x0027 }, + { 0x0011, 0x003f }, + { 0x0012, 0x006f }, + { 0x0014, 0x0013 }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, + { 0x0014, 0x001a }, + { 0x0014, 0x001b }, + { 0x0014, 0x001c }, + { 0x0006, 0x000d }, + { 0x0005, 0x0013 }, + { 0x0005, 0x0014 }, + { 0x0005, 0x0015 }, + { 0x0006, 0x000e }, + { 0x0007, 0x000b }, + { 0x0008, 0x000b }, + { 0x0009, 0x000a }, + { 0x000b, 0x000c }, + { 0x000c, 0x000e }, + { 0x000e, 0x0013 }, + { 0x000f, 0x001c }, + { 0x0011, 0x0040 }, + { 0x0012, 0x0070 }, + { 0x0014, 0x001d }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0014, 0x0020 }, + { 0x0014, 0x0021 }, + { 0x0014, 0x0022 }, + { 0x0014, 0x0023 }, + { 0x0014, 0x0024 }, + { 0x0014, 0x0025 }, + { 0x0014, 0x0026 }, + { 0x0006, 0x000f }, + { 0x0005, 0x0016 }, + { 0x0005, 0x0017 }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0007, 0x000c }, + { 0x0009, 0x000b }, + { 0x000a, 0x000c }, + { 0x000b, 0x000d }, + { 0x000d, 0x0010 }, + { 0x000e, 0x0014 }, + { 0x0010, 0x0028 }, + { 0x0011, 0x0041 }, + { 0x0013, 0x00ce }, + { 0x0014, 0x0027 }, + { 0x0014, 0x0028 }, + { 0x0014, 0x0029 }, + { 0x0014, 0x002a }, + { 0x0014, 0x002b }, + { 0x0014, 0x002c }, + { 0x0014, 0x002d }, + { 0x0014, 0x002e }, + { 0x0014, 0x002f }, + { 0x0014, 0x0030 }, + { 0x0007, 0x000d }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0008, 0x000c }, + { 0x0009, 0x000c }, + { 0x000b, 0x000e }, + { 0x000c, 0x000f }, + { 0x000e, 0x0015 }, + { 0x0010, 0x0029 }, + { 0x0011, 0x0042 }, + { 0x0014, 0x0031 }, + { 0x0014, 0x0032 }, + { 0x0014, 0x0033 }, + { 0x0014, 0x0034 }, + { 0x0014, 0x0035 }, + { 0x0014, 0x0036 }, + { 0x0014, 0x0037 }, + { 0x0014, 0x0038 }, + { 0x0014, 0x0039 }, + { 0x0014, 0x003a }, + { 0x0014, 0x003b }, + { 0x0014, 0x003c }, + { 0x0008, 0x000d }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0008, 0x000e }, + { 0x0009, 0x000d }, + { 0x0009, 0x000e }, + { 0x000b, 0x000f }, + { 0x000c, 0x0010 }, + { 0x000d, 0x0011 }, + { 0x000f, 0x001d }, + { 0x0010, 0x002a }, + { 0x0011, 0x0043 }, + { 0x0014, 0x003d }, + { 0x0013, 0x00cf }, + { 0x0014, 0x003e }, + { 0x0014, 0x003f }, + { 0x0014, 0x0040 }, + { 0x0014, 0x0041 }, + { 0x0014, 0x0042 }, + { 0x0014, 0x0043 }, + { 0x0014, 0x0044 }, + { 0x0014, 0x0045 }, + { 0x0014, 0x0046 }, + { 0x0014, 0x0047 }, + { 0x0009, 0x000f }, + { 0x0008, 0x000f }, + { 0x0009, 0x0010 }, + { 0x0009, 0x0011 }, + { 0x000a, 0x000d }, + { 0x000b, 0x0010 }, + { 0x000c, 0x0011 }, + { 0x000d, 0x0012 }, + { 0x000e, 0x0016 }, + { 0x0010, 0x002b }, + { 0x0011, 0x0044 }, + { 0x0012, 0x0071 }, + { 0x0014, 0x0048 }, + { 0x0014, 0x0049 }, + { 0x0014, 0x004a }, + { 0x0014, 0x004b }, + { 0x0014, 0x004c }, + { 0x0014, 0x004d }, + { 0x0014, 0x004e }, + { 0x0014, 0x004f }, + { 0x0014, 0x0050 }, + { 0x0014, 0x0051 }, + { 0x0014, 0x0052 }, + { 0x0014, 0x0053 }, + { 0x000b, 0x0011 }, + { 0x000a, 0x000e }, + { 0x000a, 0x000f }, + { 0x000b, 0x0012 }, + { 0x000b, 0x0013 }, + { 0x000c, 0x0012 }, + { 0x000d, 0x0013 }, + { 0x000e, 0x0017 }, + { 0x0010, 0x002c }, + { 0x0012, 0x0072 }, + { 0x0011, 0x0045 }, + { 0x0013, 0x00d0 }, + { 0x0013, 0x00d1 }, + { 0x0014, 0x0054 }, + { 0x0014, 0x0055 }, + { 0x0014, 0x0056 }, + { 0x0014, 0x0057 }, + { 0x0014, 0x0058 }, + { 0x0014, 0x0059 }, + { 0x0014, 0x005a }, + { 0x0014, 0x005b }, + { 0x0014, 0x005c }, + { 0x0014, 0x005d }, + { 0x0014, 0x005e }, + { 0x000c, 0x0013 }, + { 0x000c, 0x0014 }, + { 0x000c, 0x0015 }, + { 0x000d, 0x0014 }, + { 0x000d, 0x0015 }, + { 0x000e, 0x0018 }, + { 0x000f, 0x001e }, + { 0x0010, 0x002d }, + { 0x0011, 0x0046 }, + { 0x0011, 0x0047 }, + { 0x0011, 0x0048 }, + { 0x0014, 0x005f }, + { 0x0014, 0x0060 }, + { 0x0014, 0x0061 }, + { 0x0014, 0x0062 }, + { 0x0014, 0x0063 }, + { 0x0014, 0x0064 }, + { 0x0014, 0x0065 }, + { 0x0014, 0x0066 }, + { 0x0014, 0x0067 }, + { 0x0014, 0x0068 }, + { 0x0014, 0x0069 }, + { 0x0014, 0x006a }, + { 0x0014, 0x006b }, + { 0x000e, 0x0019 }, + { 0x000d, 0x0016 }, + { 0x000d, 0x0017 }, + { 0x000e, 0x001a }, + { 0x000e, 0x001b }, + { 0x000f, 0x001f }, + { 0x0010, 0x002e }, + { 0x0011, 0x0049 }, + { 0x0012, 0x0073 }, + { 0x0014, 0x006c }, + { 0x0014, 0x006d }, + { 0x0014, 0x006e }, + { 0x0014, 0x006f }, + { 0x0014, 0x0070 }, + { 0x0014, 0x0071 }, + { 0x0014, 0x0072 }, + { 0x0014, 0x0073 }, + { 0x0014, 0x0074 }, + { 0x0014, 0x0075 }, + { 0x0014, 0x0076 }, + { 0x0014, 0x0077 }, + { 0x0014, 0x0078 }, + { 0x0014, 0x0079 }, + { 0x0014, 0x007a }, + { 0x0010, 0x002f }, + { 0x000f, 0x0020 }, + { 0x0010, 0x0030 }, + { 0x000f, 0x0021 }, + { 0x0010, 0x0031 }, + { 0x0011, 0x004a }, + { 0x0011, 0x004b }, + { 0x0012, 0x0074 }, + { 0x0014, 0x007b }, + { 0x0014, 0x007c }, + { 0x0013, 0x00d2 }, + { 0x0014, 0x007d }, + { 0x0014, 0x007e }, + { 0x0014, 0x007f }, + { 0x0014, 0x0080 }, + { 0x0014, 0x0081 }, + { 0x0014, 0x0082 }, + { 0x0014, 0x0083 }, + { 0x0014, 0x0084 }, + { 0x0014, 0x0085 }, + { 0x0014, 0x0086 }, + { 0x0014, 0x0087 }, + { 0x0014, 0x0088 }, + { 0x0014, 0x0089 }, + { 0x0012, 0x0075 }, + { 0x0010, 0x0032 }, + { 0x0010, 0x0033 }, + { 0x0011, 0x004c }, + { 0x0011, 0x004d }, + { 0x0013, 0x00d3 }, + { 0x0013, 0x00d4 }, + { 0x0012, 0x0076 }, + { 0x0013, 0x00d5 }, + { 0x0014, 0x008a }, + { 0x0014, 0x008b }, + { 0x0014, 0x008c }, + { 0x0014, 0x008d }, + { 0x0014, 0x008e }, + { 0x0014, 0x008f }, + { 0x0014, 0x0090 }, + { 0x0014, 0x0091 }, + { 0x0014, 0x0092 }, + { 0x0014, 0x0093 }, + { 0x0014, 0x0094 }, + { 0x0014, 0x0095 }, + { 0x0014, 0x0096 }, + { 0x0014, 0x0097 }, + { 0x0014, 0x0098 }, + { 0x0013, 0x00d6 }, + { 0x0013, 0x00d7 }, + { 0x0012, 0x0077 }, + { 0x0012, 0x0078 }, + { 0x0014, 0x0099 }, + { 0x0014, 0x009a }, + { 0x0013, 0x00d8 }, + { 0x0014, 0x009b }, + { 0x0014, 0x009c }, + { 0x0014, 0x009d }, + { 0x0014, 0x009e }, + { 0x0014, 0x009f }, + { 0x0014, 0x00a0 }, + { 0x0014, 0x00a1 }, + { 0x0014, 0x00a2 }, + { 0x0014, 0x00a3 }, + { 0x0014, 0x00a4 }, + { 0x0014, 0x00a5 }, + { 0x0014, 0x00a6 }, + { 0x0014, 0x00a7 }, + { 0x0014, 0x00a8 }, + { 0x0014, 0x00a9 }, + { 0x0014, 0x00aa }, + { 0x0014, 0x00ab }, + { 0x0014, 0x00ac }, + { 0x0014, 0x00ad }, + { 0x0014, 0x00ae }, + { 0x0014, 0x00af }, + { 0x0012, 0x0079 }, + { 0x0014, 0x00b0 }, + { 0x0014, 0x00b1 }, + { 0x0014, 0x00b2 }, + { 0x0014, 0x00b3 }, + { 0x0014, 0x00b4 }, + { 0x0014, 0x00b5 }, + { 0x0014, 0x00b6 }, + { 0x0014, 0x00b7 }, + { 0x0014, 0x00b8 }, + { 0x0014, 0x00b9 }, + { 0x0014, 0x00ba }, + { 0x0014, 0x00bb }, + { 0x0014, 0x00bc }, + { 0x0014, 0x00bd }, + { 0x0014, 0x00be }, + { 0x0014, 0x00bf }, + { 0x0014, 0x00c0 }, + { 0x0014, 0x00c1 }, + { 0x0014, 0x00c2 }, + { 0x0014, 0x00c3 }, + { 0x0014, 0x00c4 }, + { 0x0014, 0x00c5 }, + { 0x0014, 0x00c6 }, + { 0x0013, 0x00d9 }, + { 0x0013, 0x00da }, + { 0x0014, 0x00c7 }, + { 0x0014, 0x00c8 }, + { 0x0014, 0x00c9 }, + { 0x0014, 0x00ca }, + { 0x0014, 0x00cb }, + { 0x0014, 0x00cc }, + { 0x0014, 0x00cd }, + { 0x0014, 0x00ce }, + { 0x0014, 0x00cf }, + { 0x0014, 0x00d0 }, + { 0x0014, 0x00d1 }, + { 0x0014, 0x00d2 }, + { 0x0014, 0x00d3 }, + { 0x0014, 0x00d4 }, + { 0x0014, 0x00d5 }, + { 0x0014, 0x00d6 }, + { 0x0014, 0x00d7 }, + { 0x0014, 0x00d8 }, + { 0x0014, 0x00d9 }, + { 0x0014, 0x00da }, + { 0x0014, 0x00db }, + { 0x0014, 0x00dc }, + { 0x0014, 0x00dd }, + { 0x0014, 0x00de }, + { 0x0014, 0x00df }, + { 0x0014, 0x00e0 }, + { 0x0014, 0x00e1 }, + { 0x0014, 0x00e2 }, + { 0x0014, 0x00e3 }, + { 0x0014, 0x00e4 }, + { 0x0014, 0x00e5 }, + { 0x0014, 0x00e6 }, + { 0x0014, 0x00e7 }, + { 0x0014, 0x00e8 }, + { 0x0014, 0x00e9 }, + { 0x0014, 0x00ea }, + { 0x0014, 0x00eb }, + { 0x0014, 0x00ec }, + { 0x0014, 0x00ed }, + { 0x0014, 0x00ee }, + { 0x0014, 0x00ef }, + { 0x0014, 0x00f0 }, + { 0x0014, 0x00f1 }, + { 0x0014, 0x00f2 }, + { 0x0014, 0x00f3 }, + { 0x0014, 0x00f4 }, + { 0x0014, 0x00f5 }, + { 0x0014, 0x00f6 }, + { 0x0014, 0x00f7 }, + { 0x0014, 0x00f8 }, + { 0x0014, 0x00f9 }, + { 0x0014, 0x00fa }, + { 0x0014, 0x00fb }, + { 0x0014, 0x00fc }, + { 0x0014, 0x00fd }, + { 0x0014, 0x00fe }, + { 0x0014, 0x00ff }, + { 0x0014, 0x0100 }, + { 0x0014, 0x0101 }, + { 0x0014, 0x0102 }, + { 0x0014, 0x0103 }, + { 0x0014, 0x0104 }, + { 0x0014, 0x0105 }, + { 0x0014, 0x0106 }, + { 0x0014, 0x0107 }, + { 0x0014, 0x0108 }, + { 0x0014, 0x0109 }, + { 0x0014, 0x010a }, + { 0x0014, 0x010b }, + { 0x0014, 0x010c }, + { 0x0014, 0x010d }, + { 0x0014, 0x010e }, + { 0x0014, 0x010f }, + { 0x0014, 0x0110 }, + { 0x0014, 0x0111 }, + { 0x0014, 0x0112 }, + { 0x0014, 0x0113 }, + { 0x0014, 0x0114 }, + { 0x0014, 0x0115 }, + { 0x0014, 0x0116 }, + { 0x0014, 0x0117 }, + { 0x0014, 0x0118 }, + { 0x0014, 0x0119 }, + { 0x0014, 0x011a }, + { 0x0014, 0x011b }, + { 0x0014, 0x011c }, + { 0x0014, 0x011d }, + { 0x0014, 0x011e }, + { 0x0014, 0x011f }, + { 0x0014, 0x0120 }, + { 0x0014, 0x0121 }, + { 0x0014, 0x0122 }, + { 0x0014, 0x0123 }, + { 0x0014, 0x0124 }, + { 0x0014, 0x0125 }, + { 0x0014, 0x0126 }, + { 0x0014, 0x0127 }, + { 0x0014, 0x0128 }, + { 0x0014, 0x0129 }, + { 0x0014, 0x012a }, + { 0x0014, 0x012b }, + { 0x0014, 0x012c }, + { 0x0014, 0x012d }, + { 0x0014, 0x012e }, + { 0x0014, 0x012f }, + { 0x0014, 0x0130 }, + { 0x0014, 0x0131 }, + { 0x0014, 0x0132 }, + { 0x0014, 0x0133 }, + { 0x0014, 0x0134 }, + { 0x0014, 0x0135 }, + { 0x0014, 0x0136 }, + { 0x0014, 0x0137 }, + { 0x0014, 0x0138 }, + { 0x0014, 0x0139 }, + { 0x0014, 0x013a }, + { 0x0014, 0x013b }, + { 0x0014, 0x013c }, + { 0x0014, 0x013d }, + { 0x0014, 0x013e }, + { 0x0014, 0x013f }, + { 0x0014, 0x0140 }, + { 0x0014, 0x0141 }, + { 0x0014, 0x0142 }, + { 0x0014, 0x0143 }, + { 0x0014, 0x0144 }, + { 0x0014, 0x0145 }, + { 0x0014, 0x0146 }, + { 0x0014, 0x0147 }, + { 0x0014, 0x0148 }, + { 0x0014, 0x0149 }, + { 0x0014, 0x014a }, + { 0x0014, 0x014b }, + { 0x0014, 0x014c }, + { 0x0014, 0x014d }, + { 0x0014, 0x014e }, + { 0x0014, 0x014f }, + { 0x0014, 0x0150 }, + { 0x0014, 0x0151 }, + { 0x0014, 0x0152 }, + { 0x0014, 0x0153 }, + { 0x0014, 0x0154 }, + { 0x0014, 0x0155 }, + { 0x0014, 0x0156 }, + { 0x0014, 0x0157 }, + { 0x0014, 0x0158 }, + { 0x0014, 0x0159 }, + { 0x0014, 0x015a }, + { 0x0014, 0x015b }, + { 0x0014, 0x015c }, + { 0x0014, 0x015d }, + { 0x0014, 0x015e }, + { 0x0014, 0x015f }, + { 0x0014, 0x0160 }, + { 0x0014, 0x0161 }, + { 0x0014, 0x0162 }, + { 0x0014, 0x0163 }, + { 0x0014, 0x0164 }, + { 0x0014, 0x0165 }, + { 0x0014, 0x0166 }, + { 0x0014, 0x0167 }, + { 0x0014, 0x0168 }, + { 0x0014, 0x0169 }, + { 0x0014, 0x016a }, + { 0x0014, 0x016b }, + { 0x0014, 0x016c }, + { 0x0014, 0x016d }, + { 0x0014, 0x016e }, + { 0x0014, 0x016f }, + { 0x0014, 0x0170 }, + { 0x0014, 0x0171 }, + { 0x0014, 0x0172 }, + { 0x0014, 0x0173 }, + { 0x0014, 0x0174 }, + { 0x0014, 0x0175 }, + { 0x0014, 0x0176 }, + { 0x0014, 0x0177 }, + { 0x0014, 0x0178 }, + { 0x0014, 0x0179 }, + { 0x0014, 0x017a }, + { 0x0014, 0x017b }, + { 0x0014, 0x017c }, + { 0x0014, 0x017d }, + { 0x0014, 0x017e }, + { 0x0014, 0x017f }, + { 0x0014, 0x0180 }, + { 0x0014, 0x0181 }, + { 0x0014, 0x0182 }, + { 0x0014, 0x0183 }, + { 0x0014, 0x0184 }, + { 0x0014, 0x0185 }, + { 0x0014, 0x0186 }, + { 0x0014, 0x0187 }, + { 0x0014, 0x0188 }, + { 0x0014, 0x0189 }, + { 0x0014, 0x018a }, + { 0x0014, 0x018b }, + { 0x0014, 0x018c }, + { 0x0014, 0x018d }, + { 0x0014, 0x018e }, + { 0x0014, 0x018f }, + { 0x0014, 0x0190 }, + { 0x0014, 0x0191 }, + { 0x0014, 0x0192 }, + { 0x0014, 0x0193 }, + { 0x0014, 0x0194 }, + { 0x0014, 0x0195 }, + { 0x0014, 0x0196 }, + { 0x0014, 0x0197 }, + { 0x0013, 0x00db }, +}; -const uint16_t c_aauiLCLDHuffEnc16[729][2] = - { - { 0x0006, 0x000d }, - { 0x0005, 0x0010 }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0008, 0x000a }, - { 0x0009, 0x000b }, - { 0x000b, 0x000d }, - { 0x000c, 0x000e }, - { 0x000e, 0x0016 }, - { 0x0010, 0x002d }, - { 0x0011, 0x0051 }, - { 0x0012, 0x008c }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0014, 0x0006 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0014, 0x0009 }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0005, 0x0011 }, - { 0x0004, 0x000f }, - { 0x0005, 0x0012 }, - { 0x0005, 0x0013 }, - { 0x0005, 0x0014 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0007, 0x000c }, - { 0x0008, 0x000b }, - { 0x000a, 0x000c }, - { 0x000b, 0x000e }, - { 0x000d, 0x0010 }, - { 0x000e, 0x0017 }, - { 0x000f, 0x001c }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0014, 0x000c }, - { 0x0014, 0x000d }, - { 0x0014, 0x000e }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0014, 0x0013 }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0006, 0x0013 }, - { 0x0005, 0x0015 }, - { 0x0005, 0x0016 }, - { 0x0005, 0x0017 }, - { 0x0005, 0x0018 }, - { 0x0006, 0x0014 }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0009, 0x000c }, - { 0x000a, 0x000d }, - { 0x000c, 0x000f }, - { 0x000d, 0x0011 }, - { 0x000f, 0x001d }, - { 0x0011, 0x0052 }, - { 0x0012, 0x008d }, - { 0x0012, 0x008e }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, - { 0x0014, 0x001a }, - { 0x0014, 0x001b }, - { 0x0014, 0x001c }, - { 0x0014, 0x001d }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0014, 0x0020 }, - { 0x0014, 0x0021 }, - { 0x0006, 0x0015 }, - { 0x0005, 0x0019 }, - { 0x0005, 0x001a }, - { 0x0005, 0x001b }, - { 0x0006, 0x0016 }, - { 0x0006, 0x0017 }, - { 0x0007, 0x000f }, - { 0x0008, 0x000c }, - { 0x0009, 0x000d }, - { 0x000b, 0x000f }, - { 0x000c, 0x0010 }, - { 0x000d, 0x0012 }, - { 0x000f, 0x001e }, - { 0x0012, 0x008f }, - { 0x0014, 0x0022 }, - { 0x0014, 0x0023 }, - { 0x0014, 0x0024 }, - { 0x0014, 0x0025 }, - { 0x0014, 0x0026 }, - { 0x0014, 0x0027 }, - { 0x0014, 0x0028 }, - { 0x0014, 0x0029 }, - { 0x0014, 0x002a }, - { 0x0014, 0x002b }, - { 0x0014, 0x002c }, - { 0x0014, 0x002d }, - { 0x0014, 0x002e }, - { 0x0006, 0x0018 }, - { 0x0005, 0x001c }, - { 0x0005, 0x001d }, - { 0x0006, 0x0019 }, - { 0x0006, 0x001a }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0008, 0x000d }, - { 0x000a, 0x000e }, - { 0x000b, 0x0010 }, - { 0x000c, 0x0011 }, - { 0x000e, 0x0018 }, - { 0x0010, 0x002e }, - { 0x0012, 0x0090 }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0014, 0x002f }, - { 0x0014, 0x0030 }, - { 0x0014, 0x0031 }, - { 0x0014, 0x0032 }, - { 0x0014, 0x0033 }, - { 0x0014, 0x0034 }, - { 0x0014, 0x0035 }, - { 0x0014, 0x0036 }, - { 0x0014, 0x0037 }, - { 0x0014, 0x0038 }, - { 0x0014, 0x0039 }, - { 0x0007, 0x0012 }, - { 0x0006, 0x001b }, - { 0x0006, 0x001c }, - { 0x0006, 0x001d }, - { 0x0007, 0x0013 }, - { 0x0007, 0x0014 }, - { 0x0008, 0x000e }, - { 0x0009, 0x000e }, - { 0x000b, 0x0011 }, - { 0x000c, 0x0012 }, - { 0x000d, 0x0013 }, - { 0x000e, 0x0019 }, - { 0x0010, 0x002f }, - { 0x0012, 0x0091 }, - { 0x0014, 0x003a }, - { 0x0014, 0x003b }, - { 0x0014, 0x003c }, - { 0x0014, 0x003d }, - { 0x0014, 0x003e }, - { 0x0014, 0x003f }, - { 0x0014, 0x0040 }, - { 0x0014, 0x0041 }, - { 0x0014, 0x0042 }, - { 0x0014, 0x0043 }, - { 0x0014, 0x0044 }, - { 0x0014, 0x0045 }, - { 0x0014, 0x0046 }, - { 0x0007, 0x0015 }, - { 0x0006, 0x001e }, - { 0x0006, 0x001f }, - { 0x0007, 0x0016 }, - { 0x0007, 0x0017 }, - { 0x0008, 0x000f }, - { 0x0009, 0x000f }, - { 0x000a, 0x000f }, - { 0x000b, 0x0012 }, - { 0x000d, 0x0014 }, - { 0x000e, 0x001a }, - { 0x000f, 0x001f }, - { 0x0013, 0x010f }, - { 0x0011, 0x0053 }, - { 0x0014, 0x0047 }, - { 0x0014, 0x0048 }, - { 0x0014, 0x0049 }, - { 0x0014, 0x004a }, - { 0x0014, 0x004b }, - { 0x0014, 0x004c }, - { 0x0014, 0x004d }, - { 0x0014, 0x004e }, - { 0x0014, 0x004f }, - { 0x0014, 0x0050 }, - { 0x0014, 0x0051 }, - { 0x0014, 0x0052 }, - { 0x0014, 0x0053 }, - { 0x0008, 0x0010 }, - { 0x0007, 0x0018 }, - { 0x0007, 0x0019 }, - { 0x0008, 0x0011 }, - { 0x0008, 0x0012 }, - { 0x0009, 0x0010 }, - { 0x000a, 0x0010 }, - { 0x000b, 0x0013 }, - { 0x000c, 0x0013 }, - { 0x000e, 0x001b }, - { 0x000f, 0x0020 }, - { 0x0010, 0x0030 }, - { 0x0012, 0x0092 }, - { 0x0014, 0x0054 }, - { 0x0014, 0x0055 }, - { 0x0014, 0x0056 }, - { 0x0014, 0x0057 }, - { 0x0014, 0x0058 }, - { 0x0014, 0x0059 }, - { 0x0014, 0x005a }, - { 0x0014, 0x005b }, - { 0x0014, 0x005c }, - { 0x0014, 0x005d }, - { 0x0014, 0x005e }, - { 0x0014, 0x005f }, - { 0x0014, 0x0060 }, - { 0x0014, 0x0061 }, - { 0x0009, 0x0011 }, - { 0x0008, 0x0013 }, - { 0x0009, 0x0012 }, - { 0x0009, 0x0013 }, - { 0x000a, 0x0011 }, - { 0x000a, 0x0012 }, - { 0x000b, 0x0014 }, - { 0x000c, 0x0014 }, - { 0x000d, 0x0015 }, - { 0x000e, 0x001c }, - { 0x000f, 0x0021 }, - { 0x0013, 0x0110 }, - { 0x0012, 0x0093 }, - { 0x0012, 0x0094 }, - { 0x0014, 0x0062 }, - { 0x0014, 0x0063 }, - { 0x0014, 0x0064 }, - { 0x0014, 0x0065 }, - { 0x0014, 0x0066 }, - { 0x0014, 0x0067 }, - { 0x0014, 0x0068 }, - { 0x0014, 0x0069 }, - { 0x0014, 0x006a }, - { 0x0014, 0x006b }, - { 0x0014, 0x006c }, - { 0x0014, 0x006d }, - { 0x0014, 0x006e }, - { 0x000b, 0x0015 }, - { 0x000a, 0x0013 }, - { 0x000a, 0x0014 }, - { 0x000a, 0x0015 }, - { 0x000b, 0x0016 }, - { 0x000c, 0x0015 }, - { 0x000d, 0x0016 }, - { 0x000d, 0x0017 }, - { 0x000f, 0x0022 }, - { 0x0010, 0x0031 }, - { 0x0012, 0x0095 }, - { 0x0012, 0x0096 }, - { 0x0014, 0x006f }, - { 0x0013, 0x0111 }, - { 0x0014, 0x0070 }, - { 0x0014, 0x0071 }, - { 0x0014, 0x0072 }, - { 0x0014, 0x0073 }, - { 0x0014, 0x0074 }, - { 0x0014, 0x0075 }, - { 0x0014, 0x0076 }, - { 0x0014, 0x0077 }, - { 0x0014, 0x0078 }, - { 0x0014, 0x0079 }, - { 0x0014, 0x007a }, - { 0x0014, 0x007b }, - { 0x0014, 0x007c }, - { 0x000c, 0x0016 }, - { 0x000b, 0x0017 }, - { 0x000c, 0x0017 }, - { 0x000c, 0x0018 }, - { 0x000c, 0x0019 }, - { 0x000d, 0x0018 }, - { 0x000e, 0x001d }, - { 0x000f, 0x0023 }, - { 0x000f, 0x0024 }, - { 0x0011, 0x0054 }, - { 0x0012, 0x0097 }, - { 0x0014, 0x007d }, - { 0x0014, 0x007e }, - { 0x0014, 0x007f }, - { 0x0014, 0x0080 }, - { 0x0014, 0x0081 }, - { 0x0014, 0x0082 }, - { 0x0014, 0x0083 }, - { 0x0014, 0x0084 }, - { 0x0014, 0x0085 }, - { 0x0014, 0x0086 }, - { 0x0014, 0x0087 }, - { 0x0014, 0x0088 }, - { 0x0014, 0x0089 }, - { 0x0014, 0x008a }, - { 0x0014, 0x008b }, - { 0x0014, 0x008c }, - { 0x000e, 0x001e }, - { 0x000d, 0x0019 }, - { 0x000d, 0x001a }, - { 0x000d, 0x001b }, - { 0x000e, 0x001f }, - { 0x000f, 0x0025 }, - { 0x000f, 0x0026 }, - { 0x0010, 0x0032 }, - { 0x0010, 0x0033 }, - { 0x0012, 0x0098 }, - { 0x0013, 0x0112 }, - { 0x0014, 0x008d }, - { 0x0014, 0x008e }, - { 0x0014, 0x008f }, - { 0x0014, 0x0090 }, - { 0x0014, 0x0091 }, - { 0x0014, 0x0092 }, - { 0x0014, 0x0093 }, - { 0x0014, 0x0094 }, - { 0x0014, 0x0095 }, - { 0x0014, 0x0096 }, - { 0x0014, 0x0097 }, - { 0x0014, 0x0098 }, - { 0x0014, 0x0099 }, - { 0x0014, 0x009a }, - { 0x0014, 0x009b }, - { 0x0014, 0x009c }, - { 0x000f, 0x0027 }, - { 0x000f, 0x0028 }, - { 0x000f, 0x0029 }, - { 0x000f, 0x002a }, - { 0x0010, 0x0034 }, - { 0x000f, 0x002b }, - { 0x0011, 0x0055 }, - { 0x0012, 0x0099 }, - { 0x0012, 0x009a }, - { 0x0012, 0x009b }, - { 0x0014, 0x009d }, - { 0x0013, 0x0113 }, - { 0x0014, 0x009e }, - { 0x0014, 0x009f }, - { 0x0014, 0x00a0 }, - { 0x0014, 0x00a1 }, - { 0x0014, 0x00a2 }, - { 0x0014, 0x00a3 }, - { 0x0014, 0x00a4 }, - { 0x0014, 0x00a5 }, - { 0x0014, 0x00a6 }, - { 0x0014, 0x00a7 }, - { 0x0014, 0x00a8 }, - { 0x0014, 0x00a9 }, - { 0x0014, 0x00aa }, - { 0x0014, 0x00ab }, - { 0x0014, 0x00ac }, - { 0x0011, 0x0056 }, - { 0x0010, 0x0035 }, - { 0x0010, 0x0036 }, - { 0x0010, 0x0037 }, - { 0x0011, 0x0057 }, - { 0x0012, 0x009c }, - { 0x0012, 0x009d }, - { 0x0012, 0x009e }, - { 0x0014, 0x00ad }, - { 0x0014, 0x00ae }, - { 0x0014, 0x00af }, - { 0x0014, 0x00b0 }, - { 0x0014, 0x00b1 }, - { 0x0014, 0x00b2 }, - { 0x0014, 0x00b3 }, - { 0x0014, 0x00b4 }, - { 0x0014, 0x00b5 }, - { 0x0014, 0x00b6 }, - { 0x0014, 0x00b7 }, - { 0x0014, 0x00b8 }, - { 0x0014, 0x00b9 }, - { 0x0014, 0x00ba }, - { 0x0014, 0x00bb }, - { 0x0014, 0x00bc }, - { 0x0014, 0x00bd }, - { 0x0014, 0x00be }, - { 0x0014, 0x00bf }, - { 0x0012, 0x009f }, - { 0x0011, 0x0058 }, - { 0x0012, 0x00a0 }, - { 0x0014, 0x00c0 }, - { 0x0011, 0x0059 }, - { 0x0013, 0x0114 }, - { 0x0012, 0x00a1 }, - { 0x0014, 0x00c1 }, - { 0x0013, 0x0115 }, - { 0x0014, 0x00c2 }, - { 0x0014, 0x00c3 }, - { 0x0014, 0x00c4 }, - { 0x0014, 0x00c5 }, - { 0x0014, 0x00c6 }, - { 0x0014, 0x00c7 }, - { 0x0014, 0x00c8 }, - { 0x0014, 0x00c9 }, - { 0x0014, 0x00ca }, - { 0x0014, 0x00cb }, - { 0x0014, 0x00cc }, - { 0x0014, 0x00cd }, - { 0x0014, 0x00ce }, - { 0x0014, 0x00cf }, - { 0x0014, 0x00d0 }, - { 0x0014, 0x00d1 }, - { 0x0014, 0x00d2 }, - { 0x0014, 0x00d3 }, - { 0x0014, 0x00d4 }, - { 0x0014, 0x00d5 }, - { 0x0014, 0x00d6 }, - { 0x0014, 0x00d7 }, - { 0x0014, 0x00d8 }, - { 0x0014, 0x00d9 }, - { 0x0014, 0x00da }, - { 0x0014, 0x00db }, - { 0x0014, 0x00dc }, - { 0x0014, 0x00dd }, - { 0x0014, 0x00de }, - { 0x0014, 0x00df }, - { 0x0014, 0x00e0 }, - { 0x0014, 0x00e1 }, - { 0x0014, 0x00e2 }, - { 0x0014, 0x00e3 }, - { 0x0014, 0x00e4 }, - { 0x0014, 0x00e5 }, - { 0x0014, 0x00e6 }, - { 0x0014, 0x00e7 }, - { 0x0014, 0x00e8 }, - { 0x0014, 0x00e9 }, - { 0x0014, 0x00ea }, - { 0x0014, 0x00eb }, - { 0x0014, 0x00ec }, - { 0x0014, 0x00ed }, - { 0x0014, 0x00ee }, - { 0x0014, 0x00ef }, - { 0x0014, 0x00f0 }, - { 0x0014, 0x00f1 }, - { 0x0014, 0x00f2 }, - { 0x0014, 0x00f3 }, - { 0x0014, 0x00f4 }, - { 0x0014, 0x00f5 }, - { 0x0014, 0x00f6 }, - { 0x0014, 0x00f7 }, - { 0x0014, 0x00f8 }, - { 0x0014, 0x00f9 }, - { 0x0014, 0x00fa }, - { 0x0014, 0x00fb }, - { 0x0014, 0x00fc }, - { 0x0014, 0x00fd }, - { 0x0014, 0x00fe }, - { 0x0014, 0x00ff }, - { 0x0014, 0x0100 }, - { 0x0014, 0x0101 }, - { 0x0014, 0x0102 }, - { 0x0014, 0x0103 }, - { 0x0014, 0x0104 }, - { 0x0014, 0x0105 }, - { 0x0014, 0x0106 }, - { 0x0014, 0x0107 }, - { 0x0014, 0x0108 }, - { 0x0014, 0x0109 }, - { 0x0014, 0x010a }, - { 0x0014, 0x010b }, - { 0x0014, 0x010c }, - { 0x0014, 0x010d }, - { 0x0014, 0x010e }, - { 0x0014, 0x010f }, - { 0x0014, 0x0110 }, - { 0x0014, 0x0111 }, - { 0x0014, 0x0112 }, - { 0x0014, 0x0113 }, - { 0x0014, 0x0114 }, - { 0x0014, 0x0115 }, - { 0x0014, 0x0116 }, - { 0x0014, 0x0117 }, - { 0x0014, 0x0118 }, - { 0x0014, 0x0119 }, - { 0x0014, 0x011a }, - { 0x0014, 0x011b }, - { 0x0014, 0x011c }, - { 0x0014, 0x011d }, - { 0x0014, 0x011e }, - { 0x0014, 0x011f }, - { 0x0014, 0x0120 }, - { 0x0014, 0x0121 }, - { 0x0014, 0x0122 }, - { 0x0014, 0x0123 }, - { 0x0014, 0x0124 }, - { 0x0014, 0x0125 }, - { 0x0013, 0x0116 }, - { 0x0014, 0x0126 }, - { 0x0014, 0x0127 }, - { 0x0014, 0x0128 }, - { 0x0014, 0x0129 }, - { 0x0014, 0x012a }, - { 0x0014, 0x012b }, - { 0x0014, 0x012c }, - { 0x0014, 0x012d }, - { 0x0014, 0x012e }, - { 0x0014, 0x012f }, - { 0x0014, 0x0130 }, - { 0x0014, 0x0131 }, - { 0x0014, 0x0132 }, - { 0x0014, 0x0133 }, - { 0x0014, 0x0134 }, - { 0x0014, 0x0135 }, - { 0x0014, 0x0136 }, - { 0x0014, 0x0137 }, - { 0x0014, 0x0138 }, - { 0x0014, 0x0139 }, - { 0x0014, 0x013a }, - { 0x0014, 0x013b }, - { 0x0014, 0x013c }, - { 0x0014, 0x013d }, - { 0x0014, 0x013e }, - { 0x0014, 0x013f }, - { 0x0014, 0x0140 }, - { 0x0014, 0x0141 }, - { 0x0014, 0x0142 }, - { 0x0014, 0x0143 }, - { 0x0014, 0x0144 }, - { 0x0014, 0x0145 }, - { 0x0014, 0x0146 }, - { 0x0014, 0x0147 }, - { 0x0014, 0x0148 }, - { 0x0014, 0x0149 }, - { 0x0014, 0x014a }, - { 0x0014, 0x014b }, - { 0x0014, 0x014c }, - { 0x0014, 0x014d }, - { 0x0014, 0x014e }, - { 0x0014, 0x014f }, - { 0x0014, 0x0150 }, - { 0x0014, 0x0151 }, - { 0x0014, 0x0152 }, - { 0x0014, 0x0153 }, - { 0x0014, 0x0154 }, - { 0x0014, 0x0155 }, - { 0x0014, 0x0156 }, - { 0x0014, 0x0157 }, - { 0x0014, 0x0158 }, - { 0x0014, 0x0159 }, - { 0x0014, 0x015a }, - { 0x0014, 0x015b }, - { 0x0014, 0x015c }, - { 0x0014, 0x015d }, - { 0x0014, 0x015e }, - { 0x0014, 0x015f }, - { 0x0014, 0x0160 }, - { 0x0014, 0x0161 }, - { 0x0014, 0x0162 }, - { 0x0014, 0x0163 }, - { 0x0014, 0x0164 }, - { 0x0014, 0x0165 }, - { 0x0014, 0x0166 }, - { 0x0014, 0x0167 }, - { 0x0014, 0x0168 }, - { 0x0014, 0x0169 }, - { 0x0014, 0x016a }, - { 0x0014, 0x016b }, - { 0x0014, 0x016c }, - { 0x0014, 0x016d }, - { 0x0014, 0x016e }, - { 0x0014, 0x016f }, - { 0x0014, 0x0170 }, - { 0x0014, 0x0171 }, - { 0x0014, 0x0172 }, - { 0x0014, 0x0173 }, - { 0x0014, 0x0174 }, - { 0x0014, 0x0175 }, - { 0x0014, 0x0176 }, - { 0x0014, 0x0177 }, - { 0x0014, 0x0178 }, - { 0x0014, 0x0179 }, - { 0x0014, 0x017a }, - { 0x0014, 0x017b }, - { 0x0014, 0x017c }, - { 0x0014, 0x017d }, - { 0x0014, 0x017e }, - { 0x0014, 0x017f }, - { 0x0014, 0x0180 }, - { 0x0014, 0x0181 }, - { 0x0014, 0x0182 }, - { 0x0014, 0x0183 }, - { 0x0014, 0x0184 }, - { 0x0014, 0x0185 }, - { 0x0014, 0x0186 }, - { 0x0014, 0x0187 }, - { 0x0014, 0x0188 }, - { 0x0014, 0x0189 }, - { 0x0014, 0x018a }, - { 0x0014, 0x018b }, - { 0x0014, 0x018c }, - { 0x0014, 0x018d }, - { 0x0014, 0x018e }, - { 0x0014, 0x018f }, - { 0x0014, 0x0190 }, - { 0x0014, 0x0191 }, - { 0x0014, 0x0192 }, - { 0x0014, 0x0193 }, - { 0x0014, 0x0194 }, - { 0x0014, 0x0195 }, - { 0x0014, 0x0196 }, - { 0x0014, 0x0197 }, - { 0x0014, 0x0198 }, - { 0x0014, 0x0199 }, - { 0x0014, 0x019a }, - { 0x0014, 0x019b }, - { 0x0014, 0x019c }, - { 0x0014, 0x019d }, - { 0x0014, 0x019e }, - { 0x0014, 0x019f }, - { 0x0014, 0x01a0 }, - { 0x0014, 0x01a1 }, - { 0x0014, 0x01a2 }, - { 0x0014, 0x01a3 }, - { 0x0014, 0x01a4 }, - { 0x0014, 0x01a5 }, - { 0x0014, 0x01a6 }, - { 0x0014, 0x01a7 }, - { 0x0014, 0x01a8 }, - { 0x0014, 0x01a9 }, - { 0x0014, 0x01aa }, - { 0x0014, 0x01ab }, - { 0x0014, 0x01ac }, - { 0x0014, 0x01ad }, - { 0x0014, 0x01ae }, - { 0x0014, 0x01af }, - { 0x0014, 0x01b0 }, - { 0x0014, 0x01b1 }, - { 0x0014, 0x01b2 }, - { 0x0014, 0x01b3 }, - { 0x0014, 0x01b4 }, - { 0x0014, 0x01b5 }, - { 0x0014, 0x01b6 }, - { 0x0014, 0x01b7 }, - { 0x0014, 0x01b8 }, - { 0x0014, 0x01b9 }, - { 0x0014, 0x01ba }, - { 0x0014, 0x01bb }, - { 0x0014, 0x01bc }, - { 0x0014, 0x01bd }, - { 0x0014, 0x01be }, - { 0x0014, 0x01bf }, - { 0x0014, 0x01c0 }, - { 0x0014, 0x01c1 }, - { 0x0014, 0x01c2 }, - { 0x0014, 0x01c3 }, - { 0x0014, 0x01c4 }, - { 0x0014, 0x01c5 }, - { 0x0014, 0x01c6 }, - { 0x0014, 0x01c7 }, - { 0x0014, 0x01c8 }, - { 0x0014, 0x01c9 }, - { 0x0014, 0x01ca }, - { 0x0014, 0x01cb }, - { 0x0014, 0x01cc }, - { 0x0014, 0x01cd }, - { 0x0014, 0x01ce }, - { 0x0014, 0x01cf }, - { 0x0014, 0x01d0 }, - { 0x0014, 0x01d1 }, - { 0x0014, 0x01d2 }, - { 0x0014, 0x01d3 }, - { 0x0014, 0x01d4 }, - { 0x0014, 0x01d5 }, - { 0x0014, 0x01d6 }, - { 0x0014, 0x01d7 }, - { 0x0014, 0x01d8 }, - { 0x0014, 0x01d9 }, - { 0x0014, 0x01da }, - { 0x0014, 0x01db }, - { 0x0014, 0x01dc }, - { 0x0014, 0x01dd }, - { 0x0014, 0x01de }, - { 0x0014, 0x01df }, - { 0x0014, 0x01e0 }, - { 0x0014, 0x01e1 }, - { 0x0014, 0x01e2 }, - { 0x0014, 0x01e3 }, - { 0x0014, 0x01e4 }, - { 0x0014, 0x01e5 }, - { 0x0014, 0x01e6 }, - { 0x0014, 0x01e7 }, - { 0x0014, 0x01e8 }, - { 0x0014, 0x01e9 }, - { 0x0014, 0x01ea }, - { 0x0014, 0x01eb }, - { 0x0014, 0x01ec }, - { 0x0014, 0x01ed }, - { 0x0014, 0x01ee }, - { 0x0014, 0x01ef }, - { 0x0014, 0x01f0 }, - { 0x0014, 0x01f1 }, - { 0x0014, 0x01f2 }, - { 0x0014, 0x01f3 }, - { 0x0014, 0x01f4 }, - { 0x0014, 0x01f5 }, - { 0x0014, 0x01f6 }, - { 0x0014, 0x01f7 }, - { 0x0014, 0x01f8 }, - { 0x0014, 0x01f9 }, - { 0x0014, 0x01fa }, - { 0x0014, 0x01fb }, - { 0x0014, 0x01fc }, - { 0x0014, 0x01fd }, - { 0x0014, 0x01fe }, - { 0x0014, 0x01ff }, - { 0x0014, 0x0200 }, - { 0x0014, 0x0201 }, - { 0x0014, 0x0202 }, - { 0x0014, 0x0203 }, - { 0x0014, 0x0204 }, - { 0x0014, 0x0205 }, - { 0x0014, 0x0206 }, - { 0x0014, 0x0207 }, - { 0x0014, 0x0208 }, - { 0x0014, 0x0209 }, - { 0x0014, 0x020a }, - { 0x0014, 0x020b }, - { 0x0014, 0x020c }, - { 0x0014, 0x020d }, - { 0x0014, 0x020e }, - { 0x0014, 0x020f }, - { 0x0014, 0x0210 }, - { 0x0014, 0x0211 }, - { 0x0014, 0x0212 }, - { 0x0014, 0x0213 }, - { 0x0014, 0x0214 }, - { 0x0014, 0x0215 }, - { 0x0013, 0x0117 }, +const UWord16 c_aauiLCLDHuffEnc16[729][2] = { + { 0x0006, 0x000d }, + { 0x0005, 0x0010 }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0008, 0x000a }, + { 0x0009, 0x000b }, + { 0x000b, 0x000d }, + { 0x000c, 0x000e }, + { 0x000e, 0x0016 }, + { 0x0010, 0x002d }, + { 0x0011, 0x0051 }, + { 0x0012, 0x008c }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0014, 0x0006 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0014, 0x0009 }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0005, 0x0011 }, + { 0x0004, 0x000f }, + { 0x0005, 0x0012 }, + { 0x0005, 0x0013 }, + { 0x0005, 0x0014 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0007, 0x000c }, + { 0x0008, 0x000b }, + { 0x000a, 0x000c }, + { 0x000b, 0x000e }, + { 0x000d, 0x0010 }, + { 0x000e, 0x0017 }, + { 0x000f, 0x001c }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0014, 0x000c }, + { 0x0014, 0x000d }, + { 0x0014, 0x000e }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0014, 0x0013 }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0006, 0x0013 }, + { 0x0005, 0x0015 }, + { 0x0005, 0x0016 }, + { 0x0005, 0x0017 }, + { 0x0005, 0x0018 }, + { 0x0006, 0x0014 }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0009, 0x000c }, + { 0x000a, 0x000d }, + { 0x000c, 0x000f }, + { 0x000d, 0x0011 }, + { 0x000f, 0x001d }, + { 0x0011, 0x0052 }, + { 0x0012, 0x008d }, + { 0x0012, 0x008e }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, + { 0x0014, 0x001a }, + { 0x0014, 0x001b }, + { 0x0014, 0x001c }, + { 0x0014, 0x001d }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0014, 0x0020 }, + { 0x0014, 0x0021 }, + { 0x0006, 0x0015 }, + { 0x0005, 0x0019 }, + { 0x0005, 0x001a }, + { 0x0005, 0x001b }, + { 0x0006, 0x0016 }, + { 0x0006, 0x0017 }, + { 0x0007, 0x000f }, + { 0x0008, 0x000c }, + { 0x0009, 0x000d }, + { 0x000b, 0x000f }, + { 0x000c, 0x0010 }, + { 0x000d, 0x0012 }, + { 0x000f, 0x001e }, + { 0x0012, 0x008f }, + { 0x0014, 0x0022 }, + { 0x0014, 0x0023 }, + { 0x0014, 0x0024 }, + { 0x0014, 0x0025 }, + { 0x0014, 0x0026 }, + { 0x0014, 0x0027 }, + { 0x0014, 0x0028 }, + { 0x0014, 0x0029 }, + { 0x0014, 0x002a }, + { 0x0014, 0x002b }, + { 0x0014, 0x002c }, + { 0x0014, 0x002d }, + { 0x0014, 0x002e }, + { 0x0006, 0x0018 }, + { 0x0005, 0x001c }, + { 0x0005, 0x001d }, + { 0x0006, 0x0019 }, + { 0x0006, 0x001a }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0008, 0x000d }, + { 0x000a, 0x000e }, + { 0x000b, 0x0010 }, + { 0x000c, 0x0011 }, + { 0x000e, 0x0018 }, + { 0x0010, 0x002e }, + { 0x0012, 0x0090 }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0014, 0x002f }, + { 0x0014, 0x0030 }, + { 0x0014, 0x0031 }, + { 0x0014, 0x0032 }, + { 0x0014, 0x0033 }, + { 0x0014, 0x0034 }, + { 0x0014, 0x0035 }, + { 0x0014, 0x0036 }, + { 0x0014, 0x0037 }, + { 0x0014, 0x0038 }, + { 0x0014, 0x0039 }, + { 0x0007, 0x0012 }, + { 0x0006, 0x001b }, + { 0x0006, 0x001c }, + { 0x0006, 0x001d }, + { 0x0007, 0x0013 }, + { 0x0007, 0x0014 }, + { 0x0008, 0x000e }, + { 0x0009, 0x000e }, + { 0x000b, 0x0011 }, + { 0x000c, 0x0012 }, + { 0x000d, 0x0013 }, + { 0x000e, 0x0019 }, + { 0x0010, 0x002f }, + { 0x0012, 0x0091 }, + { 0x0014, 0x003a }, + { 0x0014, 0x003b }, + { 0x0014, 0x003c }, + { 0x0014, 0x003d }, + { 0x0014, 0x003e }, + { 0x0014, 0x003f }, + { 0x0014, 0x0040 }, + { 0x0014, 0x0041 }, + { 0x0014, 0x0042 }, + { 0x0014, 0x0043 }, + { 0x0014, 0x0044 }, + { 0x0014, 0x0045 }, + { 0x0014, 0x0046 }, + { 0x0007, 0x0015 }, + { 0x0006, 0x001e }, + { 0x0006, 0x001f }, + { 0x0007, 0x0016 }, + { 0x0007, 0x0017 }, + { 0x0008, 0x000f }, + { 0x0009, 0x000f }, + { 0x000a, 0x000f }, + { 0x000b, 0x0012 }, + { 0x000d, 0x0014 }, + { 0x000e, 0x001a }, + { 0x000f, 0x001f }, + { 0x0013, 0x010f }, + { 0x0011, 0x0053 }, + { 0x0014, 0x0047 }, + { 0x0014, 0x0048 }, + { 0x0014, 0x0049 }, + { 0x0014, 0x004a }, + { 0x0014, 0x004b }, + { 0x0014, 0x004c }, + { 0x0014, 0x004d }, + { 0x0014, 0x004e }, + { 0x0014, 0x004f }, + { 0x0014, 0x0050 }, + { 0x0014, 0x0051 }, + { 0x0014, 0x0052 }, + { 0x0014, 0x0053 }, + { 0x0008, 0x0010 }, + { 0x0007, 0x0018 }, + { 0x0007, 0x0019 }, + { 0x0008, 0x0011 }, + { 0x0008, 0x0012 }, + { 0x0009, 0x0010 }, + { 0x000a, 0x0010 }, + { 0x000b, 0x0013 }, + { 0x000c, 0x0013 }, + { 0x000e, 0x001b }, + { 0x000f, 0x0020 }, + { 0x0010, 0x0030 }, + { 0x0012, 0x0092 }, + { 0x0014, 0x0054 }, + { 0x0014, 0x0055 }, + { 0x0014, 0x0056 }, + { 0x0014, 0x0057 }, + { 0x0014, 0x0058 }, + { 0x0014, 0x0059 }, + { 0x0014, 0x005a }, + { 0x0014, 0x005b }, + { 0x0014, 0x005c }, + { 0x0014, 0x005d }, + { 0x0014, 0x005e }, + { 0x0014, 0x005f }, + { 0x0014, 0x0060 }, + { 0x0014, 0x0061 }, + { 0x0009, 0x0011 }, + { 0x0008, 0x0013 }, + { 0x0009, 0x0012 }, + { 0x0009, 0x0013 }, + { 0x000a, 0x0011 }, + { 0x000a, 0x0012 }, + { 0x000b, 0x0014 }, + { 0x000c, 0x0014 }, + { 0x000d, 0x0015 }, + { 0x000e, 0x001c }, + { 0x000f, 0x0021 }, + { 0x0013, 0x0110 }, + { 0x0012, 0x0093 }, + { 0x0012, 0x0094 }, + { 0x0014, 0x0062 }, + { 0x0014, 0x0063 }, + { 0x0014, 0x0064 }, + { 0x0014, 0x0065 }, + { 0x0014, 0x0066 }, + { 0x0014, 0x0067 }, + { 0x0014, 0x0068 }, + { 0x0014, 0x0069 }, + { 0x0014, 0x006a }, + { 0x0014, 0x006b }, + { 0x0014, 0x006c }, + { 0x0014, 0x006d }, + { 0x0014, 0x006e }, + { 0x000b, 0x0015 }, + { 0x000a, 0x0013 }, + { 0x000a, 0x0014 }, + { 0x000a, 0x0015 }, + { 0x000b, 0x0016 }, + { 0x000c, 0x0015 }, + { 0x000d, 0x0016 }, + { 0x000d, 0x0017 }, + { 0x000f, 0x0022 }, + { 0x0010, 0x0031 }, + { 0x0012, 0x0095 }, + { 0x0012, 0x0096 }, + { 0x0014, 0x006f }, + { 0x0013, 0x0111 }, + { 0x0014, 0x0070 }, + { 0x0014, 0x0071 }, + { 0x0014, 0x0072 }, + { 0x0014, 0x0073 }, + { 0x0014, 0x0074 }, + { 0x0014, 0x0075 }, + { 0x0014, 0x0076 }, + { 0x0014, 0x0077 }, + { 0x0014, 0x0078 }, + { 0x0014, 0x0079 }, + { 0x0014, 0x007a }, + { 0x0014, 0x007b }, + { 0x0014, 0x007c }, + { 0x000c, 0x0016 }, + { 0x000b, 0x0017 }, + { 0x000c, 0x0017 }, + { 0x000c, 0x0018 }, + { 0x000c, 0x0019 }, + { 0x000d, 0x0018 }, + { 0x000e, 0x001d }, + { 0x000f, 0x0023 }, + { 0x000f, 0x0024 }, + { 0x0011, 0x0054 }, + { 0x0012, 0x0097 }, + { 0x0014, 0x007d }, + { 0x0014, 0x007e }, + { 0x0014, 0x007f }, + { 0x0014, 0x0080 }, + { 0x0014, 0x0081 }, + { 0x0014, 0x0082 }, + { 0x0014, 0x0083 }, + { 0x0014, 0x0084 }, + { 0x0014, 0x0085 }, + { 0x0014, 0x0086 }, + { 0x0014, 0x0087 }, + { 0x0014, 0x0088 }, + { 0x0014, 0x0089 }, + { 0x0014, 0x008a }, + { 0x0014, 0x008b }, + { 0x0014, 0x008c }, + { 0x000e, 0x001e }, + { 0x000d, 0x0019 }, + { 0x000d, 0x001a }, + { 0x000d, 0x001b }, + { 0x000e, 0x001f }, + { 0x000f, 0x0025 }, + { 0x000f, 0x0026 }, + { 0x0010, 0x0032 }, + { 0x0010, 0x0033 }, + { 0x0012, 0x0098 }, + { 0x0013, 0x0112 }, + { 0x0014, 0x008d }, + { 0x0014, 0x008e }, + { 0x0014, 0x008f }, + { 0x0014, 0x0090 }, + { 0x0014, 0x0091 }, + { 0x0014, 0x0092 }, + { 0x0014, 0x0093 }, + { 0x0014, 0x0094 }, + { 0x0014, 0x0095 }, + { 0x0014, 0x0096 }, + { 0x0014, 0x0097 }, + { 0x0014, 0x0098 }, + { 0x0014, 0x0099 }, + { 0x0014, 0x009a }, + { 0x0014, 0x009b }, + { 0x0014, 0x009c }, + { 0x000f, 0x0027 }, + { 0x000f, 0x0028 }, + { 0x000f, 0x0029 }, + { 0x000f, 0x002a }, + { 0x0010, 0x0034 }, + { 0x000f, 0x002b }, + { 0x0011, 0x0055 }, + { 0x0012, 0x0099 }, + { 0x0012, 0x009a }, + { 0x0012, 0x009b }, + { 0x0014, 0x009d }, + { 0x0013, 0x0113 }, + { 0x0014, 0x009e }, + { 0x0014, 0x009f }, + { 0x0014, 0x00a0 }, + { 0x0014, 0x00a1 }, + { 0x0014, 0x00a2 }, + { 0x0014, 0x00a3 }, + { 0x0014, 0x00a4 }, + { 0x0014, 0x00a5 }, + { 0x0014, 0x00a6 }, + { 0x0014, 0x00a7 }, + { 0x0014, 0x00a8 }, + { 0x0014, 0x00a9 }, + { 0x0014, 0x00aa }, + { 0x0014, 0x00ab }, + { 0x0014, 0x00ac }, + { 0x0011, 0x0056 }, + { 0x0010, 0x0035 }, + { 0x0010, 0x0036 }, + { 0x0010, 0x0037 }, + { 0x0011, 0x0057 }, + { 0x0012, 0x009c }, + { 0x0012, 0x009d }, + { 0x0012, 0x009e }, + { 0x0014, 0x00ad }, + { 0x0014, 0x00ae }, + { 0x0014, 0x00af }, + { 0x0014, 0x00b0 }, + { 0x0014, 0x00b1 }, + { 0x0014, 0x00b2 }, + { 0x0014, 0x00b3 }, + { 0x0014, 0x00b4 }, + { 0x0014, 0x00b5 }, + { 0x0014, 0x00b6 }, + { 0x0014, 0x00b7 }, + { 0x0014, 0x00b8 }, + { 0x0014, 0x00b9 }, + { 0x0014, 0x00ba }, + { 0x0014, 0x00bb }, + { 0x0014, 0x00bc }, + { 0x0014, 0x00bd }, + { 0x0014, 0x00be }, + { 0x0014, 0x00bf }, + { 0x0012, 0x009f }, + { 0x0011, 0x0058 }, + { 0x0012, 0x00a0 }, + { 0x0014, 0x00c0 }, + { 0x0011, 0x0059 }, + { 0x0013, 0x0114 }, + { 0x0012, 0x00a1 }, + { 0x0014, 0x00c1 }, + { 0x0013, 0x0115 }, + { 0x0014, 0x00c2 }, + { 0x0014, 0x00c3 }, + { 0x0014, 0x00c4 }, + { 0x0014, 0x00c5 }, + { 0x0014, 0x00c6 }, + { 0x0014, 0x00c7 }, + { 0x0014, 0x00c8 }, + { 0x0014, 0x00c9 }, + { 0x0014, 0x00ca }, + { 0x0014, 0x00cb }, + { 0x0014, 0x00cc }, + { 0x0014, 0x00cd }, + { 0x0014, 0x00ce }, + { 0x0014, 0x00cf }, + { 0x0014, 0x00d0 }, + { 0x0014, 0x00d1 }, + { 0x0014, 0x00d2 }, + { 0x0014, 0x00d3 }, + { 0x0014, 0x00d4 }, + { 0x0014, 0x00d5 }, + { 0x0014, 0x00d6 }, + { 0x0014, 0x00d7 }, + { 0x0014, 0x00d8 }, + { 0x0014, 0x00d9 }, + { 0x0014, 0x00da }, + { 0x0014, 0x00db }, + { 0x0014, 0x00dc }, + { 0x0014, 0x00dd }, + { 0x0014, 0x00de }, + { 0x0014, 0x00df }, + { 0x0014, 0x00e0 }, + { 0x0014, 0x00e1 }, + { 0x0014, 0x00e2 }, + { 0x0014, 0x00e3 }, + { 0x0014, 0x00e4 }, + { 0x0014, 0x00e5 }, + { 0x0014, 0x00e6 }, + { 0x0014, 0x00e7 }, + { 0x0014, 0x00e8 }, + { 0x0014, 0x00e9 }, + { 0x0014, 0x00ea }, + { 0x0014, 0x00eb }, + { 0x0014, 0x00ec }, + { 0x0014, 0x00ed }, + { 0x0014, 0x00ee }, + { 0x0014, 0x00ef }, + { 0x0014, 0x00f0 }, + { 0x0014, 0x00f1 }, + { 0x0014, 0x00f2 }, + { 0x0014, 0x00f3 }, + { 0x0014, 0x00f4 }, + { 0x0014, 0x00f5 }, + { 0x0014, 0x00f6 }, + { 0x0014, 0x00f7 }, + { 0x0014, 0x00f8 }, + { 0x0014, 0x00f9 }, + { 0x0014, 0x00fa }, + { 0x0014, 0x00fb }, + { 0x0014, 0x00fc }, + { 0x0014, 0x00fd }, + { 0x0014, 0x00fe }, + { 0x0014, 0x00ff }, + { 0x0014, 0x0100 }, + { 0x0014, 0x0101 }, + { 0x0014, 0x0102 }, + { 0x0014, 0x0103 }, + { 0x0014, 0x0104 }, + { 0x0014, 0x0105 }, + { 0x0014, 0x0106 }, + { 0x0014, 0x0107 }, + { 0x0014, 0x0108 }, + { 0x0014, 0x0109 }, + { 0x0014, 0x010a }, + { 0x0014, 0x010b }, + { 0x0014, 0x010c }, + { 0x0014, 0x010d }, + { 0x0014, 0x010e }, + { 0x0014, 0x010f }, + { 0x0014, 0x0110 }, + { 0x0014, 0x0111 }, + { 0x0014, 0x0112 }, + { 0x0014, 0x0113 }, + { 0x0014, 0x0114 }, + { 0x0014, 0x0115 }, + { 0x0014, 0x0116 }, + { 0x0014, 0x0117 }, + { 0x0014, 0x0118 }, + { 0x0014, 0x0119 }, + { 0x0014, 0x011a }, + { 0x0014, 0x011b }, + { 0x0014, 0x011c }, + { 0x0014, 0x011d }, + { 0x0014, 0x011e }, + { 0x0014, 0x011f }, + { 0x0014, 0x0120 }, + { 0x0014, 0x0121 }, + { 0x0014, 0x0122 }, + { 0x0014, 0x0123 }, + { 0x0014, 0x0124 }, + { 0x0014, 0x0125 }, + { 0x0013, 0x0116 }, + { 0x0014, 0x0126 }, + { 0x0014, 0x0127 }, + { 0x0014, 0x0128 }, + { 0x0014, 0x0129 }, + { 0x0014, 0x012a }, + { 0x0014, 0x012b }, + { 0x0014, 0x012c }, + { 0x0014, 0x012d }, + { 0x0014, 0x012e }, + { 0x0014, 0x012f }, + { 0x0014, 0x0130 }, + { 0x0014, 0x0131 }, + { 0x0014, 0x0132 }, + { 0x0014, 0x0133 }, + { 0x0014, 0x0134 }, + { 0x0014, 0x0135 }, + { 0x0014, 0x0136 }, + { 0x0014, 0x0137 }, + { 0x0014, 0x0138 }, + { 0x0014, 0x0139 }, + { 0x0014, 0x013a }, + { 0x0014, 0x013b }, + { 0x0014, 0x013c }, + { 0x0014, 0x013d }, + { 0x0014, 0x013e }, + { 0x0014, 0x013f }, + { 0x0014, 0x0140 }, + { 0x0014, 0x0141 }, + { 0x0014, 0x0142 }, + { 0x0014, 0x0143 }, + { 0x0014, 0x0144 }, + { 0x0014, 0x0145 }, + { 0x0014, 0x0146 }, + { 0x0014, 0x0147 }, + { 0x0014, 0x0148 }, + { 0x0014, 0x0149 }, + { 0x0014, 0x014a }, + { 0x0014, 0x014b }, + { 0x0014, 0x014c }, + { 0x0014, 0x014d }, + { 0x0014, 0x014e }, + { 0x0014, 0x014f }, + { 0x0014, 0x0150 }, + { 0x0014, 0x0151 }, + { 0x0014, 0x0152 }, + { 0x0014, 0x0153 }, + { 0x0014, 0x0154 }, + { 0x0014, 0x0155 }, + { 0x0014, 0x0156 }, + { 0x0014, 0x0157 }, + { 0x0014, 0x0158 }, + { 0x0014, 0x0159 }, + { 0x0014, 0x015a }, + { 0x0014, 0x015b }, + { 0x0014, 0x015c }, + { 0x0014, 0x015d }, + { 0x0014, 0x015e }, + { 0x0014, 0x015f }, + { 0x0014, 0x0160 }, + { 0x0014, 0x0161 }, + { 0x0014, 0x0162 }, + { 0x0014, 0x0163 }, + { 0x0014, 0x0164 }, + { 0x0014, 0x0165 }, + { 0x0014, 0x0166 }, + { 0x0014, 0x0167 }, + { 0x0014, 0x0168 }, + { 0x0014, 0x0169 }, + { 0x0014, 0x016a }, + { 0x0014, 0x016b }, + { 0x0014, 0x016c }, + { 0x0014, 0x016d }, + { 0x0014, 0x016e }, + { 0x0014, 0x016f }, + { 0x0014, 0x0170 }, + { 0x0014, 0x0171 }, + { 0x0014, 0x0172 }, + { 0x0014, 0x0173 }, + { 0x0014, 0x0174 }, + { 0x0014, 0x0175 }, + { 0x0014, 0x0176 }, + { 0x0014, 0x0177 }, + { 0x0014, 0x0178 }, + { 0x0014, 0x0179 }, + { 0x0014, 0x017a }, + { 0x0014, 0x017b }, + { 0x0014, 0x017c }, + { 0x0014, 0x017d }, + { 0x0014, 0x017e }, + { 0x0014, 0x017f }, + { 0x0014, 0x0180 }, + { 0x0014, 0x0181 }, + { 0x0014, 0x0182 }, + { 0x0014, 0x0183 }, + { 0x0014, 0x0184 }, + { 0x0014, 0x0185 }, + { 0x0014, 0x0186 }, + { 0x0014, 0x0187 }, + { 0x0014, 0x0188 }, + { 0x0014, 0x0189 }, + { 0x0014, 0x018a }, + { 0x0014, 0x018b }, + { 0x0014, 0x018c }, + { 0x0014, 0x018d }, + { 0x0014, 0x018e }, + { 0x0014, 0x018f }, + { 0x0014, 0x0190 }, + { 0x0014, 0x0191 }, + { 0x0014, 0x0192 }, + { 0x0014, 0x0193 }, + { 0x0014, 0x0194 }, + { 0x0014, 0x0195 }, + { 0x0014, 0x0196 }, + { 0x0014, 0x0197 }, + { 0x0014, 0x0198 }, + { 0x0014, 0x0199 }, + { 0x0014, 0x019a }, + { 0x0014, 0x019b }, + { 0x0014, 0x019c }, + { 0x0014, 0x019d }, + { 0x0014, 0x019e }, + { 0x0014, 0x019f }, + { 0x0014, 0x01a0 }, + { 0x0014, 0x01a1 }, + { 0x0014, 0x01a2 }, + { 0x0014, 0x01a3 }, + { 0x0014, 0x01a4 }, + { 0x0014, 0x01a5 }, + { 0x0014, 0x01a6 }, + { 0x0014, 0x01a7 }, + { 0x0014, 0x01a8 }, + { 0x0014, 0x01a9 }, + { 0x0014, 0x01aa }, + { 0x0014, 0x01ab }, + { 0x0014, 0x01ac }, + { 0x0014, 0x01ad }, + { 0x0014, 0x01ae }, + { 0x0014, 0x01af }, + { 0x0014, 0x01b0 }, + { 0x0014, 0x01b1 }, + { 0x0014, 0x01b2 }, + { 0x0014, 0x01b3 }, + { 0x0014, 0x01b4 }, + { 0x0014, 0x01b5 }, + { 0x0014, 0x01b6 }, + { 0x0014, 0x01b7 }, + { 0x0014, 0x01b8 }, + { 0x0014, 0x01b9 }, + { 0x0014, 0x01ba }, + { 0x0014, 0x01bb }, + { 0x0014, 0x01bc }, + { 0x0014, 0x01bd }, + { 0x0014, 0x01be }, + { 0x0014, 0x01bf }, + { 0x0014, 0x01c0 }, + { 0x0014, 0x01c1 }, + { 0x0014, 0x01c2 }, + { 0x0014, 0x01c3 }, + { 0x0014, 0x01c4 }, + { 0x0014, 0x01c5 }, + { 0x0014, 0x01c6 }, + { 0x0014, 0x01c7 }, + { 0x0014, 0x01c8 }, + { 0x0014, 0x01c9 }, + { 0x0014, 0x01ca }, + { 0x0014, 0x01cb }, + { 0x0014, 0x01cc }, + { 0x0014, 0x01cd }, + { 0x0014, 0x01ce }, + { 0x0014, 0x01cf }, + { 0x0014, 0x01d0 }, + { 0x0014, 0x01d1 }, + { 0x0014, 0x01d2 }, + { 0x0014, 0x01d3 }, + { 0x0014, 0x01d4 }, + { 0x0014, 0x01d5 }, + { 0x0014, 0x01d6 }, + { 0x0014, 0x01d7 }, + { 0x0014, 0x01d8 }, + { 0x0014, 0x01d9 }, + { 0x0014, 0x01da }, + { 0x0014, 0x01db }, + { 0x0014, 0x01dc }, + { 0x0014, 0x01dd }, + { 0x0014, 0x01de }, + { 0x0014, 0x01df }, + { 0x0014, 0x01e0 }, + { 0x0014, 0x01e1 }, + { 0x0014, 0x01e2 }, + { 0x0014, 0x01e3 }, + { 0x0014, 0x01e4 }, + { 0x0014, 0x01e5 }, + { 0x0014, 0x01e6 }, + { 0x0014, 0x01e7 }, + { 0x0014, 0x01e8 }, + { 0x0014, 0x01e9 }, + { 0x0014, 0x01ea }, + { 0x0014, 0x01eb }, + { 0x0014, 0x01ec }, + { 0x0014, 0x01ed }, + { 0x0014, 0x01ee }, + { 0x0014, 0x01ef }, + { 0x0014, 0x01f0 }, + { 0x0014, 0x01f1 }, + { 0x0014, 0x01f2 }, + { 0x0014, 0x01f3 }, + { 0x0014, 0x01f4 }, + { 0x0014, 0x01f5 }, + { 0x0014, 0x01f6 }, + { 0x0014, 0x01f7 }, + { 0x0014, 0x01f8 }, + { 0x0014, 0x01f9 }, + { 0x0014, 0x01fa }, + { 0x0014, 0x01fb }, + { 0x0014, 0x01fc }, + { 0x0014, 0x01fd }, + { 0x0014, 0x01fe }, + { 0x0014, 0x01ff }, + { 0x0014, 0x0200 }, + { 0x0014, 0x0201 }, + { 0x0014, 0x0202 }, + { 0x0014, 0x0203 }, + { 0x0014, 0x0204 }, + { 0x0014, 0x0205 }, + { 0x0014, 0x0206 }, + { 0x0014, 0x0207 }, + { 0x0014, 0x0208 }, + { 0x0014, 0x0209 }, + { 0x0014, 0x020a }, + { 0x0014, 0x020b }, + { 0x0014, 0x020c }, + { 0x0014, 0x020d }, + { 0x0014, 0x020e }, + { 0x0014, 0x020f }, + { 0x0014, 0x0210 }, + { 0x0014, 0x0211 }, + { 0x0014, 0x0212 }, + { 0x0014, 0x0213 }, + { 0x0014, 0x0214 }, + { 0x0014, 0x0215 }, + { 0x0013, 0x0117 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc17[729][2] = - { - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0006, 0x0014 }, - { 0x0006, 0x0015 }, - { 0x0007, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0008, 0x000e }, - { 0x0008, 0x000f }, - { 0x0009, 0x000f }, - { 0x000a, 0x000f }, - { 0x000c, 0x0011 }, - { 0x000d, 0x0014 }, - { 0x000e, 0x0017 }, - { 0x0010, 0x002d }, - { 0x0011, 0x004c }, - { 0x0012, 0x008a }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0014, 0x0006 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0014, 0x0009 }, - { 0x0006, 0x0016 }, - { 0x0005, 0x0018 }, - { 0x0005, 0x0019 }, - { 0x0005, 0x001a }, - { 0x0006, 0x0017 }, - { 0x0006, 0x0018 }, - { 0x0006, 0x0019 }, - { 0x0007, 0x0012 }, - { 0x0007, 0x0013 }, - { 0x0008, 0x0010 }, - { 0x000a, 0x0010 }, - { 0x000b, 0x0011 }, - { 0x000c, 0x0012 }, - { 0x000e, 0x0018 }, - { 0x000f, 0x0020 }, - { 0x0011, 0x004d }, - { 0x0013, 0x00e4 }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0014, 0x000c }, - { 0x0014, 0x000d }, - { 0x0014, 0x000e }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0014, 0x0013 }, - { 0x0006, 0x001a }, - { 0x0005, 0x001b }, - { 0x0005, 0x001c }, - { 0x0005, 0x001d }, - { 0x0006, 0x001b }, - { 0x0006, 0x001c }, - { 0x0006, 0x001d }, - { 0x0007, 0x0014 }, - { 0x0008, 0x0011 }, - { 0x0009, 0x0010 }, - { 0x000a, 0x0011 }, - { 0x000b, 0x0012 }, - { 0x000c, 0x0013 }, - { 0x000e, 0x0019 }, - { 0x000f, 0x0021 }, - { 0x0010, 0x002e }, - { 0x0013, 0x00e5 }, - { 0x0013, 0x00e6 }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, - { 0x0014, 0x001a }, - { 0x0014, 0x001b }, - { 0x0014, 0x001c }, - { 0x0006, 0x001e }, - { 0x0005, 0x001e }, - { 0x0005, 0x001f }, - { 0x0006, 0x001f }, - { 0x0006, 0x0020 }, - { 0x0006, 0x0021 }, - { 0x0006, 0x0022 }, - { 0x0007, 0x0015 }, - { 0x0008, 0x0012 }, - { 0x0009, 0x0011 }, - { 0x000a, 0x0012 }, - { 0x000b, 0x0013 }, - { 0x000c, 0x0014 }, - { 0x000e, 0x001a }, - { 0x000f, 0x0022 }, - { 0x0010, 0x002f }, - { 0x0013, 0x00e7 }, - { 0x0013, 0x00e8 }, - { 0x0014, 0x001d }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0014, 0x0020 }, - { 0x0014, 0x0021 }, - { 0x0014, 0x0022 }, - { 0x0014, 0x0023 }, - { 0x0014, 0x0024 }, - { 0x0014, 0x0025 }, - { 0x0006, 0x0023 }, - { 0x0006, 0x0024 }, - { 0x0006, 0x0025 }, - { 0x0006, 0x0026 }, - { 0x0006, 0x0027 }, - { 0x0006, 0x0028 }, - { 0x0007, 0x0016 }, - { 0x0007, 0x0017 }, - { 0x0008, 0x0013 }, - { 0x0009, 0x0012 }, - { 0x000a, 0x0013 }, - { 0x000c, 0x0015 }, - { 0x000d, 0x0015 }, - { 0x000f, 0x0023 }, - { 0x0010, 0x0030 }, - { 0x0011, 0x004e }, - { 0x0014, 0x0026 }, - { 0x0014, 0x0027 }, - { 0x0014, 0x0028 }, - { 0x0014, 0x0029 }, - { 0x0014, 0x002a }, - { 0x0014, 0x002b }, - { 0x0014, 0x002c }, - { 0x0014, 0x002d }, - { 0x0014, 0x002e }, - { 0x0014, 0x002f }, - { 0x0014, 0x0030 }, - { 0x0007, 0x0018 }, - { 0x0006, 0x0029 }, - { 0x0006, 0x002a }, - { 0x0006, 0x002b }, - { 0x0006, 0x002c }, - { 0x0007, 0x0019 }, - { 0x0007, 0x001a }, - { 0x0008, 0x0014 }, - { 0x0009, 0x0013 }, - { 0x000a, 0x0014 }, - { 0x000b, 0x0014 }, - { 0x000c, 0x0016 }, - { 0x000d, 0x0016 }, - { 0x000f, 0x0024 }, - { 0x0010, 0x0031 }, - { 0x0011, 0x004f }, - { 0x0014, 0x0031 }, - { 0x0014, 0x0032 }, - { 0x0014, 0x0033 }, - { 0x0014, 0x0034 }, - { 0x0014, 0x0035 }, - { 0x0014, 0x0036 }, - { 0x0014, 0x0037 }, - { 0x0014, 0x0038 }, - { 0x0014, 0x0039 }, - { 0x0014, 0x003a }, - { 0x0014, 0x003b }, - { 0x0007, 0x001b }, - { 0x0006, 0x002d }, - { 0x0006, 0x002e }, - { 0x0006, 0x002f }, - { 0x0007, 0x001c }, - { 0x0007, 0x001d }, - { 0x0008, 0x0015 }, - { 0x0009, 0x0014 }, - { 0x000a, 0x0015 }, - { 0x000a, 0x0016 }, - { 0x000c, 0x0017 }, - { 0x000d, 0x0017 }, - { 0x000e, 0x001b }, - { 0x000f, 0x0025 }, - { 0x0011, 0x0050 }, - { 0x0011, 0x0051 }, - { 0x0014, 0x003c }, - { 0x0014, 0x003d }, - { 0x0014, 0x003e }, - { 0x0014, 0x003f }, - { 0x0014, 0x0040 }, - { 0x0014, 0x0041 }, - { 0x0014, 0x0042 }, - { 0x0014, 0x0043 }, - { 0x0014, 0x0044 }, - { 0x0014, 0x0045 }, - { 0x0014, 0x0046 }, - { 0x0008, 0x0016 }, - { 0x0007, 0x001e }, - { 0x0007, 0x001f }, - { 0x0007, 0x0020 }, - { 0x0007, 0x0021 }, - { 0x0008, 0x0017 }, - { 0x0008, 0x0018 }, - { 0x0009, 0x0015 }, - { 0x000a, 0x0017 }, - { 0x000b, 0x0015 }, - { 0x000c, 0x0018 }, - { 0x000e, 0x001c }, - { 0x000e, 0x001d }, - { 0x0010, 0x0032 }, - { 0x0012, 0x008b }, - { 0x0012, 0x008c }, - { 0x0014, 0x0047 }, - { 0x0014, 0x0048 }, - { 0x0014, 0x0049 }, - { 0x0014, 0x004a }, - { 0x0014, 0x004b }, - { 0x0014, 0x004c }, - { 0x0014, 0x004d }, - { 0x0014, 0x004e }, - { 0x0014, 0x004f }, - { 0x0014, 0x0050 }, - { 0x0014, 0x0051 }, - { 0x0008, 0x0019 }, - { 0x0007, 0x0022 }, - { 0x0007, 0x0023 }, - { 0x0008, 0x001a }, - { 0x0008, 0x001b }, - { 0x0009, 0x0016 }, - { 0x0009, 0x0017 }, - { 0x000a, 0x0018 }, - { 0x000b, 0x0016 }, - { 0x000c, 0x0019 }, - { 0x000d, 0x0018 }, - { 0x000e, 0x001e }, - { 0x0010, 0x0033 }, - { 0x0011, 0x0052 }, - { 0x0014, 0x0052 }, - { 0x0013, 0x00e9 }, - { 0x0014, 0x0053 }, - { 0x0014, 0x0054 }, - { 0x0014, 0x0055 }, - { 0x0014, 0x0056 }, - { 0x0014, 0x0057 }, - { 0x0014, 0x0058 }, - { 0x0014, 0x0059 }, - { 0x0014, 0x005a }, - { 0x0014, 0x005b }, - { 0x0014, 0x005c }, - { 0x0014, 0x005d }, - { 0x0009, 0x0018 }, - { 0x0008, 0x001c }, - { 0x0008, 0x001d }, - { 0x0009, 0x0019 }, - { 0x0009, 0x001a }, - { 0x000a, 0x0019 }, - { 0x000a, 0x001a }, - { 0x000b, 0x0017 }, - { 0x000c, 0x001a }, - { 0x000d, 0x0019 }, - { 0x000e, 0x001f }, - { 0x000f, 0x0026 }, - { 0x0010, 0x0034 }, - { 0x0012, 0x008d }, - { 0x0013, 0x00ea }, - { 0x0014, 0x005e }, - { 0x0014, 0x005f }, - { 0x0014, 0x0060 }, - { 0x0014, 0x0061 }, - { 0x0014, 0x0062 }, - { 0x0014, 0x0063 }, - { 0x0014, 0x0064 }, - { 0x0014, 0x0065 }, - { 0x0014, 0x0066 }, - { 0x0014, 0x0067 }, - { 0x0014, 0x0068 }, - { 0x0014, 0x0069 }, - { 0x000b, 0x0018 }, - { 0x0009, 0x001b }, - { 0x000a, 0x001b }, - { 0x000a, 0x001c }, - { 0x000a, 0x001d }, - { 0x000b, 0x0019 }, - { 0x000b, 0x001a }, - { 0x000c, 0x001b }, - { 0x000d, 0x001a }, - { 0x000e, 0x0020 }, - { 0x000f, 0x0027 }, - { 0x0012, 0x008e }, - { 0x0011, 0x0053 }, - { 0x0013, 0x00eb }, - { 0x0014, 0x006a }, - { 0x0014, 0x006b }, - { 0x0014, 0x006c }, - { 0x0014, 0x006d }, - { 0x0014, 0x006e }, - { 0x0014, 0x006f }, - { 0x0014, 0x0070 }, - { 0x0014, 0x0071 }, - { 0x0014, 0x0072 }, - { 0x0014, 0x0073 }, - { 0x0014, 0x0074 }, - { 0x0014, 0x0075 }, - { 0x0014, 0x0076 }, - { 0x000c, 0x001c }, - { 0x000b, 0x001b }, - { 0x000b, 0x001c }, - { 0x000b, 0x001d }, - { 0x000c, 0x001d }, - { 0x000c, 0x001e }, - { 0x000d, 0x001b }, - { 0x000d, 0x001c }, - { 0x000e, 0x0021 }, - { 0x0010, 0x0035 }, - { 0x0010, 0x0036 }, - { 0x0011, 0x0054 }, - { 0x0013, 0x00ec }, - { 0x0014, 0x0077 }, - { 0x0014, 0x0078 }, - { 0x0014, 0x0079 }, - { 0x0014, 0x007a }, - { 0x0014, 0x007b }, - { 0x0014, 0x007c }, - { 0x0014, 0x007d }, - { 0x0014, 0x007e }, - { 0x0014, 0x007f }, - { 0x0014, 0x0080 }, - { 0x0014, 0x0081 }, - { 0x0014, 0x0082 }, - { 0x0014, 0x0083 }, - { 0x0014, 0x0084 }, - { 0x000d, 0x001d }, - { 0x000c, 0x001f }, - { 0x000c, 0x0020 }, - { 0x000c, 0x0021 }, - { 0x000d, 0x001e }, - { 0x000d, 0x001f }, - { 0x000e, 0x0022 }, - { 0x000f, 0x0028 }, - { 0x0010, 0x0037 }, - { 0x0010, 0x0038 }, - { 0x0010, 0x0039 }, - { 0x0012, 0x008f }, - { 0x0013, 0x00ed }, - { 0x0014, 0x0085 }, - { 0x0014, 0x0086 }, - { 0x0014, 0x0087 }, - { 0x0014, 0x0088 }, - { 0x0014, 0x0089 }, - { 0x0014, 0x008a }, - { 0x0014, 0x008b }, - { 0x0014, 0x008c }, - { 0x0014, 0x008d }, - { 0x0014, 0x008e }, - { 0x0014, 0x008f }, - { 0x0014, 0x0090 }, - { 0x0014, 0x0091 }, - { 0x0014, 0x0092 }, - { 0x000e, 0x0023 }, - { 0x000d, 0x0020 }, - { 0x000d, 0x0021 }, - { 0x000e, 0x0024 }, - { 0x000e, 0x0025 }, - { 0x000e, 0x0026 }, - { 0x000f, 0x0029 }, - { 0x0010, 0x003a }, - { 0x0010, 0x003b }, - { 0x0012, 0x0090 }, - { 0x0014, 0x0093 }, - { 0x0014, 0x0094 }, - { 0x0014, 0x0095 }, - { 0x0014, 0x0096 }, - { 0x0014, 0x0097 }, - { 0x0014, 0x0098 }, - { 0x0014, 0x0099 }, - { 0x0014, 0x009a }, - { 0x0014, 0x009b }, - { 0x0014, 0x009c }, - { 0x0014, 0x009d }, - { 0x0014, 0x009e }, - { 0x0014, 0x009f }, - { 0x0014, 0x00a0 }, - { 0x0014, 0x00a1 }, - { 0x0014, 0x00a2 }, - { 0x0014, 0x00a3 }, - { 0x000f, 0x002a }, - { 0x000e, 0x0027 }, - { 0x000f, 0x002b }, - { 0x000f, 0x002c }, - { 0x000f, 0x002d }, - { 0x0010, 0x003c }, - { 0x0010, 0x003d }, - { 0x0011, 0x0055 }, - { 0x0011, 0x0056 }, - { 0x0014, 0x00a4 }, - { 0x0014, 0x00a5 }, - { 0x0014, 0x00a6 }, - { 0x0014, 0x00a7 }, - { 0x0014, 0x00a8 }, - { 0x0014, 0x00a9 }, - { 0x0014, 0x00aa }, - { 0x0014, 0x00ab }, - { 0x0014, 0x00ac }, - { 0x0014, 0x00ad }, - { 0x0014, 0x00ae }, - { 0x0014, 0x00af }, - { 0x0014, 0x00b0 }, - { 0x0014, 0x00b1 }, - { 0x0014, 0x00b2 }, - { 0x0014, 0x00b3 }, - { 0x0014, 0x00b4 }, - { 0x0014, 0x00b5 }, - { 0x0012, 0x0091 }, - { 0x0010, 0x003e }, - { 0x0010, 0x003f }, - { 0x0011, 0x0057 }, - { 0x0011, 0x0058 }, - { 0x0011, 0x0059 }, - { 0x0012, 0x0092 }, - { 0x0013, 0x00ee }, - { 0x0013, 0x00ef }, - { 0x0012, 0x0093 }, - { 0x0014, 0x00b6 }, - { 0x0014, 0x00b7 }, - { 0x0014, 0x00b8 }, - { 0x0014, 0x00b9 }, - { 0x0014, 0x00ba }, - { 0x0014, 0x00bb }, - { 0x0014, 0x00bc }, - { 0x0014, 0x00bd }, - { 0x0014, 0x00be }, - { 0x0014, 0x00bf }, - { 0x0014, 0x00c0 }, - { 0x0014, 0x00c1 }, - { 0x0014, 0x00c2 }, - { 0x0014, 0x00c3 }, - { 0x0014, 0x00c4 }, - { 0x0014, 0x00c5 }, - { 0x0014, 0x00c6 }, - { 0x0013, 0x00f0 }, - { 0x0012, 0x0094 }, - { 0x0012, 0x0095 }, - { 0x0012, 0x0096 }, - { 0x0014, 0x00c7 }, - { 0x0014, 0x00c8 }, - { 0x0014, 0x00c9 }, - { 0x0014, 0x00ca }, - { 0x0014, 0x00cb }, - { 0x0014, 0x00cc }, - { 0x0014, 0x00cd }, - { 0x0014, 0x00ce }, - { 0x0014, 0x00cf }, - { 0x0014, 0x00d0 }, - { 0x0014, 0x00d1 }, - { 0x0014, 0x00d2 }, - { 0x0014, 0x00d3 }, - { 0x0014, 0x00d4 }, - { 0x0014, 0x00d5 }, - { 0x0014, 0x00d6 }, - { 0x0014, 0x00d7 }, - { 0x0014, 0x00d8 }, - { 0x0014, 0x00d9 }, - { 0x0014, 0x00da }, - { 0x0014, 0x00db }, - { 0x0014, 0x00dc }, - { 0x0014, 0x00dd }, - { 0x0014, 0x00de }, - { 0x0012, 0x0097 }, - { 0x0014, 0x00df }, - { 0x0014, 0x00e0 }, - { 0x0014, 0x00e1 }, - { 0x0014, 0x00e2 }, - { 0x0014, 0x00e3 }, - { 0x0014, 0x00e4 }, - { 0x0014, 0x00e5 }, - { 0x0014, 0x00e6 }, - { 0x0014, 0x00e7 }, - { 0x0014, 0x00e8 }, - { 0x0014, 0x00e9 }, - { 0x0014, 0x00ea }, - { 0x0014, 0x00eb }, - { 0x0014, 0x00ec }, - { 0x0014, 0x00ed }, - { 0x0014, 0x00ee }, - { 0x0014, 0x00ef }, - { 0x0014, 0x00f0 }, - { 0x0014, 0x00f1 }, - { 0x0014, 0x00f2 }, - { 0x0014, 0x00f3 }, - { 0x0014, 0x00f4 }, - { 0x0014, 0x00f5 }, - { 0x0014, 0x00f6 }, - { 0x0014, 0x00f7 }, - { 0x0014, 0x00f8 }, - { 0x0014, 0x00f9 }, - { 0x0014, 0x00fa }, - { 0x0014, 0x00fb }, - { 0x0014, 0x00fc }, - { 0x0014, 0x00fd }, - { 0x0014, 0x00fe }, - { 0x0014, 0x00ff }, - { 0x0014, 0x0100 }, - { 0x0014, 0x0101 }, - { 0x0014, 0x0102 }, - { 0x0014, 0x0103 }, - { 0x0014, 0x0104 }, - { 0x0014, 0x0105 }, - { 0x0014, 0x0106 }, - { 0x0014, 0x0107 }, - { 0x0014, 0x0108 }, - { 0x0014, 0x0109 }, - { 0x0014, 0x010a }, - { 0x0014, 0x010b }, - { 0x0014, 0x010c }, - { 0x0014, 0x010d }, - { 0x0014, 0x010e }, - { 0x0014, 0x010f }, - { 0x0014, 0x0110 }, - { 0x0014, 0x0111 }, - { 0x0014, 0x0112 }, - { 0x0014, 0x0113 }, - { 0x0014, 0x0114 }, - { 0x0014, 0x0115 }, - { 0x0014, 0x0116 }, - { 0x0014, 0x0117 }, - { 0x0014, 0x0118 }, - { 0x0014, 0x0119 }, - { 0x0014, 0x011a }, - { 0x0014, 0x011b }, - { 0x0014, 0x011c }, - { 0x0014, 0x011d }, - { 0x0014, 0x011e }, - { 0x0014, 0x011f }, - { 0x0014, 0x0120 }, - { 0x0014, 0x0121 }, - { 0x0014, 0x0122 }, - { 0x0014, 0x0123 }, - { 0x0014, 0x0124 }, - { 0x0014, 0x0125 }, - { 0x0014, 0x0126 }, - { 0x0014, 0x0127 }, - { 0x0014, 0x0128 }, - { 0x0014, 0x0129 }, - { 0x0014, 0x012a }, - { 0x0014, 0x012b }, - { 0x0014, 0x012c }, - { 0x0014, 0x012d }, - { 0x0014, 0x012e }, - { 0x0014, 0x012f }, - { 0x0014, 0x0130 }, - { 0x0014, 0x0131 }, - { 0x0014, 0x0132 }, - { 0x0014, 0x0133 }, - { 0x0014, 0x0134 }, - { 0x0014, 0x0135 }, - { 0x0014, 0x0136 }, - { 0x0014, 0x0137 }, - { 0x0014, 0x0138 }, - { 0x0014, 0x0139 }, - { 0x0014, 0x013a }, - { 0x0014, 0x013b }, - { 0x0014, 0x013c }, - { 0x0014, 0x013d }, - { 0x0014, 0x013e }, - { 0x0014, 0x013f }, - { 0x0014, 0x0140 }, - { 0x0014, 0x0141 }, - { 0x0014, 0x0142 }, - { 0x0014, 0x0143 }, - { 0x0014, 0x0144 }, - { 0x0014, 0x0145 }, - { 0x0014, 0x0146 }, - { 0x0014, 0x0147 }, - { 0x0014, 0x0148 }, - { 0x0014, 0x0149 }, - { 0x0014, 0x014a }, - { 0x0014, 0x014b }, - { 0x0014, 0x014c }, - { 0x0014, 0x014d }, - { 0x0014, 0x014e }, - { 0x0014, 0x014f }, - { 0x0014, 0x0150 }, - { 0x0014, 0x0151 }, - { 0x0014, 0x0152 }, - { 0x0014, 0x0153 }, - { 0x0014, 0x0154 }, - { 0x0014, 0x0155 }, - { 0x0014, 0x0156 }, - { 0x0014, 0x0157 }, - { 0x0014, 0x0158 }, - { 0x0014, 0x0159 }, - { 0x0014, 0x015a }, - { 0x0014, 0x015b }, - { 0x0014, 0x015c }, - { 0x0014, 0x015d }, - { 0x0014, 0x015e }, - { 0x0014, 0x015f }, - { 0x0014, 0x0160 }, - { 0x0014, 0x0161 }, - { 0x0014, 0x0162 }, - { 0x0014, 0x0163 }, - { 0x0014, 0x0164 }, - { 0x0014, 0x0165 }, - { 0x0014, 0x0166 }, - { 0x0014, 0x0167 }, - { 0x0014, 0x0168 }, - { 0x0014, 0x0169 }, - { 0x0014, 0x016a }, - { 0x0014, 0x016b }, - { 0x0014, 0x016c }, - { 0x0014, 0x016d }, - { 0x0014, 0x016e }, - { 0x0014, 0x016f }, - { 0x0014, 0x0170 }, - { 0x0014, 0x0171 }, - { 0x0014, 0x0172 }, - { 0x0014, 0x0173 }, - { 0x0014, 0x0174 }, - { 0x0014, 0x0175 }, - { 0x0014, 0x0176 }, - { 0x0014, 0x0177 }, - { 0x0014, 0x0178 }, - { 0x0014, 0x0179 }, - { 0x0014, 0x017a }, - { 0x0014, 0x017b }, - { 0x0014, 0x017c }, - { 0x0014, 0x017d }, - { 0x0014, 0x017e }, - { 0x0014, 0x017f }, - { 0x0014, 0x0180 }, - { 0x0014, 0x0181 }, - { 0x0014, 0x0182 }, - { 0x0014, 0x0183 }, - { 0x0014, 0x0184 }, - { 0x0014, 0x0185 }, - { 0x0014, 0x0186 }, - { 0x0014, 0x0187 }, - { 0x0014, 0x0188 }, - { 0x0014, 0x0189 }, - { 0x0014, 0x018a }, - { 0x0014, 0x018b }, - { 0x0014, 0x018c }, - { 0x0014, 0x018d }, - { 0x0014, 0x018e }, - { 0x0014, 0x018f }, - { 0x0014, 0x0190 }, - { 0x0014, 0x0191 }, - { 0x0014, 0x0192 }, - { 0x0014, 0x0193 }, - { 0x0014, 0x0194 }, - { 0x0014, 0x0195 }, - { 0x0014, 0x0196 }, - { 0x0014, 0x0197 }, - { 0x0014, 0x0198 }, - { 0x0014, 0x0199 }, - { 0x0014, 0x019a }, - { 0x0014, 0x019b }, - { 0x0014, 0x019c }, - { 0x0014, 0x019d }, - { 0x0014, 0x019e }, - { 0x0014, 0x019f }, - { 0x0014, 0x01a0 }, - { 0x0014, 0x01a1 }, - { 0x0014, 0x01a2 }, - { 0x0014, 0x01a3 }, - { 0x0014, 0x01a4 }, - { 0x0014, 0x01a5 }, - { 0x0014, 0x01a6 }, - { 0x0014, 0x01a7 }, - { 0x0014, 0x01a8 }, - { 0x0014, 0x01a9 }, - { 0x0014, 0x01aa }, - { 0x0014, 0x01ab }, - { 0x0014, 0x01ac }, - { 0x0014, 0x01ad }, - { 0x0014, 0x01ae }, - { 0x0014, 0x01af }, - { 0x0014, 0x01b0 }, - { 0x0014, 0x01b1 }, - { 0x0014, 0x01b2 }, - { 0x0014, 0x01b3 }, - { 0x0014, 0x01b4 }, - { 0x0014, 0x01b5 }, - { 0x0014, 0x01b6 }, - { 0x0014, 0x01b7 }, - { 0x0014, 0x01b8 }, - { 0x0014, 0x01b9 }, - { 0x0014, 0x01ba }, - { 0x0014, 0x01bb }, - { 0x0014, 0x01bc }, - { 0x0014, 0x01bd }, - { 0x0014, 0x01be }, - { 0x0014, 0x01bf }, - { 0x0014, 0x01c0 }, - { 0x0014, 0x01c1 }, - { 0x0014, 0x01c2 }, - { 0x0014, 0x01c3 }, - { 0x0014, 0x01c4 }, - { 0x0014, 0x01c5 }, - { 0x0014, 0x01c6 }, - { 0x0014, 0x01c7 }, - { 0x0013, 0x00f1 }, - { 0x0013, 0x00f2 }, - { 0x0013, 0x00f3 }, - { 0x0013, 0x00f4 }, - { 0x0013, 0x00f5 }, - { 0x0013, 0x00f6 }, - { 0x0013, 0x00f7 }, - { 0x0013, 0x00f8 }, - { 0x0013, 0x00f9 }, - { 0x0013, 0x00fa }, - { 0x0013, 0x00fb }, - { 0x0013, 0x00fc }, - { 0x0013, 0x00fd }, - { 0x0013, 0x00fe }, - { 0x0013, 0x00ff }, - { 0x0013, 0x0100 }, - { 0x0013, 0x0101 }, - { 0x0013, 0x0102 }, - { 0x0013, 0x0103 }, - { 0x0013, 0x0104 }, - { 0x0013, 0x0105 }, - { 0x0013, 0x0106 }, - { 0x0013, 0x0107 }, - { 0x0013, 0x0108 }, - { 0x0013, 0x0109 }, - { 0x0013, 0x010a }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0013, 0x010f }, - { 0x0013, 0x0110 }, - { 0x0013, 0x0111 }, - { 0x0013, 0x0112 }, - { 0x0013, 0x0113 }, +const UWord16 c_aauiLCLDHuffEnc17[729][2] = { + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0006, 0x0014 }, + { 0x0006, 0x0015 }, + { 0x0007, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0008, 0x000e }, + { 0x0008, 0x000f }, + { 0x0009, 0x000f }, + { 0x000a, 0x000f }, + { 0x000c, 0x0011 }, + { 0x000d, 0x0014 }, + { 0x000e, 0x0017 }, + { 0x0010, 0x002d }, + { 0x0011, 0x004c }, + { 0x0012, 0x008a }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0014, 0x0006 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0014, 0x0009 }, + { 0x0006, 0x0016 }, + { 0x0005, 0x0018 }, + { 0x0005, 0x0019 }, + { 0x0005, 0x001a }, + { 0x0006, 0x0017 }, + { 0x0006, 0x0018 }, + { 0x0006, 0x0019 }, + { 0x0007, 0x0012 }, + { 0x0007, 0x0013 }, + { 0x0008, 0x0010 }, + { 0x000a, 0x0010 }, + { 0x000b, 0x0011 }, + { 0x000c, 0x0012 }, + { 0x000e, 0x0018 }, + { 0x000f, 0x0020 }, + { 0x0011, 0x004d }, + { 0x0013, 0x00e4 }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0014, 0x000c }, + { 0x0014, 0x000d }, + { 0x0014, 0x000e }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0014, 0x0013 }, + { 0x0006, 0x001a }, + { 0x0005, 0x001b }, + { 0x0005, 0x001c }, + { 0x0005, 0x001d }, + { 0x0006, 0x001b }, + { 0x0006, 0x001c }, + { 0x0006, 0x001d }, + { 0x0007, 0x0014 }, + { 0x0008, 0x0011 }, + { 0x0009, 0x0010 }, + { 0x000a, 0x0011 }, + { 0x000b, 0x0012 }, + { 0x000c, 0x0013 }, + { 0x000e, 0x0019 }, + { 0x000f, 0x0021 }, + { 0x0010, 0x002e }, + { 0x0013, 0x00e5 }, + { 0x0013, 0x00e6 }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, + { 0x0014, 0x001a }, + { 0x0014, 0x001b }, + { 0x0014, 0x001c }, + { 0x0006, 0x001e }, + { 0x0005, 0x001e }, + { 0x0005, 0x001f }, + { 0x0006, 0x001f }, + { 0x0006, 0x0020 }, + { 0x0006, 0x0021 }, + { 0x0006, 0x0022 }, + { 0x0007, 0x0015 }, + { 0x0008, 0x0012 }, + { 0x0009, 0x0011 }, + { 0x000a, 0x0012 }, + { 0x000b, 0x0013 }, + { 0x000c, 0x0014 }, + { 0x000e, 0x001a }, + { 0x000f, 0x0022 }, + { 0x0010, 0x002f }, + { 0x0013, 0x00e7 }, + { 0x0013, 0x00e8 }, + { 0x0014, 0x001d }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0014, 0x0020 }, + { 0x0014, 0x0021 }, + { 0x0014, 0x0022 }, + { 0x0014, 0x0023 }, + { 0x0014, 0x0024 }, + { 0x0014, 0x0025 }, + { 0x0006, 0x0023 }, + { 0x0006, 0x0024 }, + { 0x0006, 0x0025 }, + { 0x0006, 0x0026 }, + { 0x0006, 0x0027 }, + { 0x0006, 0x0028 }, + { 0x0007, 0x0016 }, + { 0x0007, 0x0017 }, + { 0x0008, 0x0013 }, + { 0x0009, 0x0012 }, + { 0x000a, 0x0013 }, + { 0x000c, 0x0015 }, + { 0x000d, 0x0015 }, + { 0x000f, 0x0023 }, + { 0x0010, 0x0030 }, + { 0x0011, 0x004e }, + { 0x0014, 0x0026 }, + { 0x0014, 0x0027 }, + { 0x0014, 0x0028 }, + { 0x0014, 0x0029 }, + { 0x0014, 0x002a }, + { 0x0014, 0x002b }, + { 0x0014, 0x002c }, + { 0x0014, 0x002d }, + { 0x0014, 0x002e }, + { 0x0014, 0x002f }, + { 0x0014, 0x0030 }, + { 0x0007, 0x0018 }, + { 0x0006, 0x0029 }, + { 0x0006, 0x002a }, + { 0x0006, 0x002b }, + { 0x0006, 0x002c }, + { 0x0007, 0x0019 }, + { 0x0007, 0x001a }, + { 0x0008, 0x0014 }, + { 0x0009, 0x0013 }, + { 0x000a, 0x0014 }, + { 0x000b, 0x0014 }, + { 0x000c, 0x0016 }, + { 0x000d, 0x0016 }, + { 0x000f, 0x0024 }, + { 0x0010, 0x0031 }, + { 0x0011, 0x004f }, + { 0x0014, 0x0031 }, + { 0x0014, 0x0032 }, + { 0x0014, 0x0033 }, + { 0x0014, 0x0034 }, + { 0x0014, 0x0035 }, + { 0x0014, 0x0036 }, + { 0x0014, 0x0037 }, + { 0x0014, 0x0038 }, + { 0x0014, 0x0039 }, + { 0x0014, 0x003a }, + { 0x0014, 0x003b }, + { 0x0007, 0x001b }, + { 0x0006, 0x002d }, + { 0x0006, 0x002e }, + { 0x0006, 0x002f }, + { 0x0007, 0x001c }, + { 0x0007, 0x001d }, + { 0x0008, 0x0015 }, + { 0x0009, 0x0014 }, + { 0x000a, 0x0015 }, + { 0x000a, 0x0016 }, + { 0x000c, 0x0017 }, + { 0x000d, 0x0017 }, + { 0x000e, 0x001b }, + { 0x000f, 0x0025 }, + { 0x0011, 0x0050 }, + { 0x0011, 0x0051 }, + { 0x0014, 0x003c }, + { 0x0014, 0x003d }, + { 0x0014, 0x003e }, + { 0x0014, 0x003f }, + { 0x0014, 0x0040 }, + { 0x0014, 0x0041 }, + { 0x0014, 0x0042 }, + { 0x0014, 0x0043 }, + { 0x0014, 0x0044 }, + { 0x0014, 0x0045 }, + { 0x0014, 0x0046 }, + { 0x0008, 0x0016 }, + { 0x0007, 0x001e }, + { 0x0007, 0x001f }, + { 0x0007, 0x0020 }, + { 0x0007, 0x0021 }, + { 0x0008, 0x0017 }, + { 0x0008, 0x0018 }, + { 0x0009, 0x0015 }, + { 0x000a, 0x0017 }, + { 0x000b, 0x0015 }, + { 0x000c, 0x0018 }, + { 0x000e, 0x001c }, + { 0x000e, 0x001d }, + { 0x0010, 0x0032 }, + { 0x0012, 0x008b }, + { 0x0012, 0x008c }, + { 0x0014, 0x0047 }, + { 0x0014, 0x0048 }, + { 0x0014, 0x0049 }, + { 0x0014, 0x004a }, + { 0x0014, 0x004b }, + { 0x0014, 0x004c }, + { 0x0014, 0x004d }, + { 0x0014, 0x004e }, + { 0x0014, 0x004f }, + { 0x0014, 0x0050 }, + { 0x0014, 0x0051 }, + { 0x0008, 0x0019 }, + { 0x0007, 0x0022 }, + { 0x0007, 0x0023 }, + { 0x0008, 0x001a }, + { 0x0008, 0x001b }, + { 0x0009, 0x0016 }, + { 0x0009, 0x0017 }, + { 0x000a, 0x0018 }, + { 0x000b, 0x0016 }, + { 0x000c, 0x0019 }, + { 0x000d, 0x0018 }, + { 0x000e, 0x001e }, + { 0x0010, 0x0033 }, + { 0x0011, 0x0052 }, + { 0x0014, 0x0052 }, + { 0x0013, 0x00e9 }, + { 0x0014, 0x0053 }, + { 0x0014, 0x0054 }, + { 0x0014, 0x0055 }, + { 0x0014, 0x0056 }, + { 0x0014, 0x0057 }, + { 0x0014, 0x0058 }, + { 0x0014, 0x0059 }, + { 0x0014, 0x005a }, + { 0x0014, 0x005b }, + { 0x0014, 0x005c }, + { 0x0014, 0x005d }, + { 0x0009, 0x0018 }, + { 0x0008, 0x001c }, + { 0x0008, 0x001d }, + { 0x0009, 0x0019 }, + { 0x0009, 0x001a }, + { 0x000a, 0x0019 }, + { 0x000a, 0x001a }, + { 0x000b, 0x0017 }, + { 0x000c, 0x001a }, + { 0x000d, 0x0019 }, + { 0x000e, 0x001f }, + { 0x000f, 0x0026 }, + { 0x0010, 0x0034 }, + { 0x0012, 0x008d }, + { 0x0013, 0x00ea }, + { 0x0014, 0x005e }, + { 0x0014, 0x005f }, + { 0x0014, 0x0060 }, + { 0x0014, 0x0061 }, + { 0x0014, 0x0062 }, + { 0x0014, 0x0063 }, + { 0x0014, 0x0064 }, + { 0x0014, 0x0065 }, + { 0x0014, 0x0066 }, + { 0x0014, 0x0067 }, + { 0x0014, 0x0068 }, + { 0x0014, 0x0069 }, + { 0x000b, 0x0018 }, + { 0x0009, 0x001b }, + { 0x000a, 0x001b }, + { 0x000a, 0x001c }, + { 0x000a, 0x001d }, + { 0x000b, 0x0019 }, + { 0x000b, 0x001a }, + { 0x000c, 0x001b }, + { 0x000d, 0x001a }, + { 0x000e, 0x0020 }, + { 0x000f, 0x0027 }, + { 0x0012, 0x008e }, + { 0x0011, 0x0053 }, + { 0x0013, 0x00eb }, + { 0x0014, 0x006a }, + { 0x0014, 0x006b }, + { 0x0014, 0x006c }, + { 0x0014, 0x006d }, + { 0x0014, 0x006e }, + { 0x0014, 0x006f }, + { 0x0014, 0x0070 }, + { 0x0014, 0x0071 }, + { 0x0014, 0x0072 }, + { 0x0014, 0x0073 }, + { 0x0014, 0x0074 }, + { 0x0014, 0x0075 }, + { 0x0014, 0x0076 }, + { 0x000c, 0x001c }, + { 0x000b, 0x001b }, + { 0x000b, 0x001c }, + { 0x000b, 0x001d }, + { 0x000c, 0x001d }, + { 0x000c, 0x001e }, + { 0x000d, 0x001b }, + { 0x000d, 0x001c }, + { 0x000e, 0x0021 }, + { 0x0010, 0x0035 }, + { 0x0010, 0x0036 }, + { 0x0011, 0x0054 }, + { 0x0013, 0x00ec }, + { 0x0014, 0x0077 }, + { 0x0014, 0x0078 }, + { 0x0014, 0x0079 }, + { 0x0014, 0x007a }, + { 0x0014, 0x007b }, + { 0x0014, 0x007c }, + { 0x0014, 0x007d }, + { 0x0014, 0x007e }, + { 0x0014, 0x007f }, + { 0x0014, 0x0080 }, + { 0x0014, 0x0081 }, + { 0x0014, 0x0082 }, + { 0x0014, 0x0083 }, + { 0x0014, 0x0084 }, + { 0x000d, 0x001d }, + { 0x000c, 0x001f }, + { 0x000c, 0x0020 }, + { 0x000c, 0x0021 }, + { 0x000d, 0x001e }, + { 0x000d, 0x001f }, + { 0x000e, 0x0022 }, + { 0x000f, 0x0028 }, + { 0x0010, 0x0037 }, + { 0x0010, 0x0038 }, + { 0x0010, 0x0039 }, + { 0x0012, 0x008f }, + { 0x0013, 0x00ed }, + { 0x0014, 0x0085 }, + { 0x0014, 0x0086 }, + { 0x0014, 0x0087 }, + { 0x0014, 0x0088 }, + { 0x0014, 0x0089 }, + { 0x0014, 0x008a }, + { 0x0014, 0x008b }, + { 0x0014, 0x008c }, + { 0x0014, 0x008d }, + { 0x0014, 0x008e }, + { 0x0014, 0x008f }, + { 0x0014, 0x0090 }, + { 0x0014, 0x0091 }, + { 0x0014, 0x0092 }, + { 0x000e, 0x0023 }, + { 0x000d, 0x0020 }, + { 0x000d, 0x0021 }, + { 0x000e, 0x0024 }, + { 0x000e, 0x0025 }, + { 0x000e, 0x0026 }, + { 0x000f, 0x0029 }, + { 0x0010, 0x003a }, + { 0x0010, 0x003b }, + { 0x0012, 0x0090 }, + { 0x0014, 0x0093 }, + { 0x0014, 0x0094 }, + { 0x0014, 0x0095 }, + { 0x0014, 0x0096 }, + { 0x0014, 0x0097 }, + { 0x0014, 0x0098 }, + { 0x0014, 0x0099 }, + { 0x0014, 0x009a }, + { 0x0014, 0x009b }, + { 0x0014, 0x009c }, + { 0x0014, 0x009d }, + { 0x0014, 0x009e }, + { 0x0014, 0x009f }, + { 0x0014, 0x00a0 }, + { 0x0014, 0x00a1 }, + { 0x0014, 0x00a2 }, + { 0x0014, 0x00a3 }, + { 0x000f, 0x002a }, + { 0x000e, 0x0027 }, + { 0x000f, 0x002b }, + { 0x000f, 0x002c }, + { 0x000f, 0x002d }, + { 0x0010, 0x003c }, + { 0x0010, 0x003d }, + { 0x0011, 0x0055 }, + { 0x0011, 0x0056 }, + { 0x0014, 0x00a4 }, + { 0x0014, 0x00a5 }, + { 0x0014, 0x00a6 }, + { 0x0014, 0x00a7 }, + { 0x0014, 0x00a8 }, + { 0x0014, 0x00a9 }, + { 0x0014, 0x00aa }, + { 0x0014, 0x00ab }, + { 0x0014, 0x00ac }, + { 0x0014, 0x00ad }, + { 0x0014, 0x00ae }, + { 0x0014, 0x00af }, + { 0x0014, 0x00b0 }, + { 0x0014, 0x00b1 }, + { 0x0014, 0x00b2 }, + { 0x0014, 0x00b3 }, + { 0x0014, 0x00b4 }, + { 0x0014, 0x00b5 }, + { 0x0012, 0x0091 }, + { 0x0010, 0x003e }, + { 0x0010, 0x003f }, + { 0x0011, 0x0057 }, + { 0x0011, 0x0058 }, + { 0x0011, 0x0059 }, + { 0x0012, 0x0092 }, + { 0x0013, 0x00ee }, + { 0x0013, 0x00ef }, + { 0x0012, 0x0093 }, + { 0x0014, 0x00b6 }, + { 0x0014, 0x00b7 }, + { 0x0014, 0x00b8 }, + { 0x0014, 0x00b9 }, + { 0x0014, 0x00ba }, + { 0x0014, 0x00bb }, + { 0x0014, 0x00bc }, + { 0x0014, 0x00bd }, + { 0x0014, 0x00be }, + { 0x0014, 0x00bf }, + { 0x0014, 0x00c0 }, + { 0x0014, 0x00c1 }, + { 0x0014, 0x00c2 }, + { 0x0014, 0x00c3 }, + { 0x0014, 0x00c4 }, + { 0x0014, 0x00c5 }, + { 0x0014, 0x00c6 }, + { 0x0013, 0x00f0 }, + { 0x0012, 0x0094 }, + { 0x0012, 0x0095 }, + { 0x0012, 0x0096 }, + { 0x0014, 0x00c7 }, + { 0x0014, 0x00c8 }, + { 0x0014, 0x00c9 }, + { 0x0014, 0x00ca }, + { 0x0014, 0x00cb }, + { 0x0014, 0x00cc }, + { 0x0014, 0x00cd }, + { 0x0014, 0x00ce }, + { 0x0014, 0x00cf }, + { 0x0014, 0x00d0 }, + { 0x0014, 0x00d1 }, + { 0x0014, 0x00d2 }, + { 0x0014, 0x00d3 }, + { 0x0014, 0x00d4 }, + { 0x0014, 0x00d5 }, + { 0x0014, 0x00d6 }, + { 0x0014, 0x00d7 }, + { 0x0014, 0x00d8 }, + { 0x0014, 0x00d9 }, + { 0x0014, 0x00da }, + { 0x0014, 0x00db }, + { 0x0014, 0x00dc }, + { 0x0014, 0x00dd }, + { 0x0014, 0x00de }, + { 0x0012, 0x0097 }, + { 0x0014, 0x00df }, + { 0x0014, 0x00e0 }, + { 0x0014, 0x00e1 }, + { 0x0014, 0x00e2 }, + { 0x0014, 0x00e3 }, + { 0x0014, 0x00e4 }, + { 0x0014, 0x00e5 }, + { 0x0014, 0x00e6 }, + { 0x0014, 0x00e7 }, + { 0x0014, 0x00e8 }, + { 0x0014, 0x00e9 }, + { 0x0014, 0x00ea }, + { 0x0014, 0x00eb }, + { 0x0014, 0x00ec }, + { 0x0014, 0x00ed }, + { 0x0014, 0x00ee }, + { 0x0014, 0x00ef }, + { 0x0014, 0x00f0 }, + { 0x0014, 0x00f1 }, + { 0x0014, 0x00f2 }, + { 0x0014, 0x00f3 }, + { 0x0014, 0x00f4 }, + { 0x0014, 0x00f5 }, + { 0x0014, 0x00f6 }, + { 0x0014, 0x00f7 }, + { 0x0014, 0x00f8 }, + { 0x0014, 0x00f9 }, + { 0x0014, 0x00fa }, + { 0x0014, 0x00fb }, + { 0x0014, 0x00fc }, + { 0x0014, 0x00fd }, + { 0x0014, 0x00fe }, + { 0x0014, 0x00ff }, + { 0x0014, 0x0100 }, + { 0x0014, 0x0101 }, + { 0x0014, 0x0102 }, + { 0x0014, 0x0103 }, + { 0x0014, 0x0104 }, + { 0x0014, 0x0105 }, + { 0x0014, 0x0106 }, + { 0x0014, 0x0107 }, + { 0x0014, 0x0108 }, + { 0x0014, 0x0109 }, + { 0x0014, 0x010a }, + { 0x0014, 0x010b }, + { 0x0014, 0x010c }, + { 0x0014, 0x010d }, + { 0x0014, 0x010e }, + { 0x0014, 0x010f }, + { 0x0014, 0x0110 }, + { 0x0014, 0x0111 }, + { 0x0014, 0x0112 }, + { 0x0014, 0x0113 }, + { 0x0014, 0x0114 }, + { 0x0014, 0x0115 }, + { 0x0014, 0x0116 }, + { 0x0014, 0x0117 }, + { 0x0014, 0x0118 }, + { 0x0014, 0x0119 }, + { 0x0014, 0x011a }, + { 0x0014, 0x011b }, + { 0x0014, 0x011c }, + { 0x0014, 0x011d }, + { 0x0014, 0x011e }, + { 0x0014, 0x011f }, + { 0x0014, 0x0120 }, + { 0x0014, 0x0121 }, + { 0x0014, 0x0122 }, + { 0x0014, 0x0123 }, + { 0x0014, 0x0124 }, + { 0x0014, 0x0125 }, + { 0x0014, 0x0126 }, + { 0x0014, 0x0127 }, + { 0x0014, 0x0128 }, + { 0x0014, 0x0129 }, + { 0x0014, 0x012a }, + { 0x0014, 0x012b }, + { 0x0014, 0x012c }, + { 0x0014, 0x012d }, + { 0x0014, 0x012e }, + { 0x0014, 0x012f }, + { 0x0014, 0x0130 }, + { 0x0014, 0x0131 }, + { 0x0014, 0x0132 }, + { 0x0014, 0x0133 }, + { 0x0014, 0x0134 }, + { 0x0014, 0x0135 }, + { 0x0014, 0x0136 }, + { 0x0014, 0x0137 }, + { 0x0014, 0x0138 }, + { 0x0014, 0x0139 }, + { 0x0014, 0x013a }, + { 0x0014, 0x013b }, + { 0x0014, 0x013c }, + { 0x0014, 0x013d }, + { 0x0014, 0x013e }, + { 0x0014, 0x013f }, + { 0x0014, 0x0140 }, + { 0x0014, 0x0141 }, + { 0x0014, 0x0142 }, + { 0x0014, 0x0143 }, + { 0x0014, 0x0144 }, + { 0x0014, 0x0145 }, + { 0x0014, 0x0146 }, + { 0x0014, 0x0147 }, + { 0x0014, 0x0148 }, + { 0x0014, 0x0149 }, + { 0x0014, 0x014a }, + { 0x0014, 0x014b }, + { 0x0014, 0x014c }, + { 0x0014, 0x014d }, + { 0x0014, 0x014e }, + { 0x0014, 0x014f }, + { 0x0014, 0x0150 }, + { 0x0014, 0x0151 }, + { 0x0014, 0x0152 }, + { 0x0014, 0x0153 }, + { 0x0014, 0x0154 }, + { 0x0014, 0x0155 }, + { 0x0014, 0x0156 }, + { 0x0014, 0x0157 }, + { 0x0014, 0x0158 }, + { 0x0014, 0x0159 }, + { 0x0014, 0x015a }, + { 0x0014, 0x015b }, + { 0x0014, 0x015c }, + { 0x0014, 0x015d }, + { 0x0014, 0x015e }, + { 0x0014, 0x015f }, + { 0x0014, 0x0160 }, + { 0x0014, 0x0161 }, + { 0x0014, 0x0162 }, + { 0x0014, 0x0163 }, + { 0x0014, 0x0164 }, + { 0x0014, 0x0165 }, + { 0x0014, 0x0166 }, + { 0x0014, 0x0167 }, + { 0x0014, 0x0168 }, + { 0x0014, 0x0169 }, + { 0x0014, 0x016a }, + { 0x0014, 0x016b }, + { 0x0014, 0x016c }, + { 0x0014, 0x016d }, + { 0x0014, 0x016e }, + { 0x0014, 0x016f }, + { 0x0014, 0x0170 }, + { 0x0014, 0x0171 }, + { 0x0014, 0x0172 }, + { 0x0014, 0x0173 }, + { 0x0014, 0x0174 }, + { 0x0014, 0x0175 }, + { 0x0014, 0x0176 }, + { 0x0014, 0x0177 }, + { 0x0014, 0x0178 }, + { 0x0014, 0x0179 }, + { 0x0014, 0x017a }, + { 0x0014, 0x017b }, + { 0x0014, 0x017c }, + { 0x0014, 0x017d }, + { 0x0014, 0x017e }, + { 0x0014, 0x017f }, + { 0x0014, 0x0180 }, + { 0x0014, 0x0181 }, + { 0x0014, 0x0182 }, + { 0x0014, 0x0183 }, + { 0x0014, 0x0184 }, + { 0x0014, 0x0185 }, + { 0x0014, 0x0186 }, + { 0x0014, 0x0187 }, + { 0x0014, 0x0188 }, + { 0x0014, 0x0189 }, + { 0x0014, 0x018a }, + { 0x0014, 0x018b }, + { 0x0014, 0x018c }, + { 0x0014, 0x018d }, + { 0x0014, 0x018e }, + { 0x0014, 0x018f }, + { 0x0014, 0x0190 }, + { 0x0014, 0x0191 }, + { 0x0014, 0x0192 }, + { 0x0014, 0x0193 }, + { 0x0014, 0x0194 }, + { 0x0014, 0x0195 }, + { 0x0014, 0x0196 }, + { 0x0014, 0x0197 }, + { 0x0014, 0x0198 }, + { 0x0014, 0x0199 }, + { 0x0014, 0x019a }, + { 0x0014, 0x019b }, + { 0x0014, 0x019c }, + { 0x0014, 0x019d }, + { 0x0014, 0x019e }, + { 0x0014, 0x019f }, + { 0x0014, 0x01a0 }, + { 0x0014, 0x01a1 }, + { 0x0014, 0x01a2 }, + { 0x0014, 0x01a3 }, + { 0x0014, 0x01a4 }, + { 0x0014, 0x01a5 }, + { 0x0014, 0x01a6 }, + { 0x0014, 0x01a7 }, + { 0x0014, 0x01a8 }, + { 0x0014, 0x01a9 }, + { 0x0014, 0x01aa }, + { 0x0014, 0x01ab }, + { 0x0014, 0x01ac }, + { 0x0014, 0x01ad }, + { 0x0014, 0x01ae }, + { 0x0014, 0x01af }, + { 0x0014, 0x01b0 }, + { 0x0014, 0x01b1 }, + { 0x0014, 0x01b2 }, + { 0x0014, 0x01b3 }, + { 0x0014, 0x01b4 }, + { 0x0014, 0x01b5 }, + { 0x0014, 0x01b6 }, + { 0x0014, 0x01b7 }, + { 0x0014, 0x01b8 }, + { 0x0014, 0x01b9 }, + { 0x0014, 0x01ba }, + { 0x0014, 0x01bb }, + { 0x0014, 0x01bc }, + { 0x0014, 0x01bd }, + { 0x0014, 0x01be }, + { 0x0014, 0x01bf }, + { 0x0014, 0x01c0 }, + { 0x0014, 0x01c1 }, + { 0x0014, 0x01c2 }, + { 0x0014, 0x01c3 }, + { 0x0014, 0x01c4 }, + { 0x0014, 0x01c5 }, + { 0x0014, 0x01c6 }, + { 0x0014, 0x01c7 }, + { 0x0013, 0x00f1 }, + { 0x0013, 0x00f2 }, + { 0x0013, 0x00f3 }, + { 0x0013, 0x00f4 }, + { 0x0013, 0x00f5 }, + { 0x0013, 0x00f6 }, + { 0x0013, 0x00f7 }, + { 0x0013, 0x00f8 }, + { 0x0013, 0x00f9 }, + { 0x0013, 0x00fa }, + { 0x0013, 0x00fb }, + { 0x0013, 0x00fc }, + { 0x0013, 0x00fd }, + { 0x0013, 0x00fe }, + { 0x0013, 0x00ff }, + { 0x0013, 0x0100 }, + { 0x0013, 0x0101 }, + { 0x0013, 0x0102 }, + { 0x0013, 0x0103 }, + { 0x0013, 0x0104 }, + { 0x0013, 0x0105 }, + { 0x0013, 0x0106 }, + { 0x0013, 0x0107 }, + { 0x0013, 0x0108 }, + { 0x0013, 0x0109 }, + { 0x0013, 0x010a }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0013, 0x010f }, + { 0x0013, 0x0110 }, + { 0x0013, 0x0111 }, + { 0x0013, 0x0112 }, + { 0x0013, 0x0113 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc18[28][2] = - { - { 0x0004, 0x0001 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0002 }, - { 0x0004, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x000f, 0x0001 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, +const UWord16 c_aauiLCLDHuffEnc18[28][2] = { + { 0x0004, 0x0001 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0002 }, + { 0x0004, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x000f, 0x0001 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc19[29][2] = - { - { 0x0004, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0003 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0005, 0x0001 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0006, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x000f, 0x0001 }, - { 0x0010, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0012, 0x0003 }, +const UWord16 c_aauiLCLDHuffEnc19[29][2] = { + { 0x0004, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0003 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0005, 0x0001 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0006, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x000f, 0x0001 }, + { 0x0010, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0012, 0x0003 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc20[32][2] = - { - { 0x0004, 0x0002 }, - { 0x0003, 0x0005 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0003 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0006, 0x0001 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0007, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x000f, 0x0001 }, - { 0x0010, 0x0001 }, - { 0x0011, 0x0001 }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - }; +const UWord16 c_aauiLCLDHuffEnc20[32][2] = { + { 0x0004, 0x0002 }, + { 0x0003, 0x0005 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0003 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0006, 0x0001 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0007, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x000f, 0x0001 }, + { 0x0010, 0x0001 }, + { 0x0011, 0x0001 }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, +}; -const uint16_t c_aauiLCLDHuffEnc21[37][2] = - { - { 0x0005, 0x0002 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0003 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0005, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0007, 0x0002 }, - { 0x0007, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0009, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x000f, 0x0001 }, - { 0x0010, 0x0001 }, - { 0x0011, 0x0001 }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, +const UWord16 c_aauiLCLDHuffEnc21[37][2] = { + { 0x0005, 0x0002 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0003 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0005, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0007, 0x0002 }, + { 0x0007, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0009, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x000f, 0x0001 }, + { 0x0010, 0x0001 }, + { 0x0011, 0x0001 }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, - }; - -const uint16_t c_aauiLCLDHuffEnc22[39][2] = - { - { 0x0005, 0x0002 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0004, 0x000c }, - { 0x0004, 0x000d }, - { 0x0004, 0x000e }, - { 0x0004, 0x000f }, - { 0x0005, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0007, 0x0002 }, - { 0x0007, 0x0003 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000a, 0x0001 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000c, 0x0001 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000e, 0x0001 }, - { 0x000e, 0x0002 }, - { 0x000f, 0x0001 }, - { 0x000e, 0x0003 }, - { 0x0011, 0x0000 }, - { 0x0010, 0x0001 }, - { 0x0011, 0x0001 }, - - }; - -const uint16_t c_aauiLCLDHuffEnc23[46][2] = - { - { 0x0005, 0x0003 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0004, 0x000c }, - { 0x0004, 0x000d }, - { 0x0004, 0x000e }, - { 0x0004, 0x000f }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0006, 0x0003 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0002 }, - { 0x0007, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000d, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x000e, 0x0001 }, - { 0x000e, 0x0002 }, - { 0x000e, 0x0003 }, - { 0x000f, 0x0001 }, - { 0x0010, 0x0001 }, - { 0x0012, 0x0000 }, - { 0x0012, 0x0001 }, - { 0x0011, 0x0001 }, - - }; - -const uint16_t c_aauiLCLDHuffEnc24[55][2] = - { - { 0x0005, 0x0004 }, - { 0x0004, 0x0009 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0004, 0x000c }, - { 0x0004, 0x000d }, - { 0x0004, 0x000e }, - { 0x0004, 0x000f }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0005, 0x0010 }, - { 0x0005, 0x0011 }, - { 0x0006, 0x0003 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0007, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0003 }, - { 0x000d, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000e, 0x0002 }, - { 0x000e, 0x0003 }, - { 0x000f, 0x0001 }, - { 0x000f, 0x0002 }, - { 0x000f, 0x0003 }, - { 0x0010, 0x0001 }, - { 0x0011, 0x0001 }, - { 0x0013, 0x0000 }, - { 0x0012, 0x0001 }, - { 0x0013, 0x0001 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc22[39][2] = { + { 0x0005, 0x0002 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0004, 0x000c }, + { 0x0004, 0x000d }, + { 0x0004, 0x000e }, + { 0x0004, 0x000f }, + { 0x0005, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0007, 0x0002 }, + { 0x0007, 0x0003 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000a, 0x0001 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000c, 0x0001 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000e, 0x0001 }, + { 0x000e, 0x0002 }, + { 0x000f, 0x0001 }, + { 0x000e, 0x0003 }, + { 0x0011, 0x0000 }, + { 0x0010, 0x0001 }, + { 0x0011, 0x0001 }, -const uint16_t c_aauiLCLDHuffEnc25[65][2] = - { - { 0x0005, 0x0005 }, - { 0x0004, 0x000c }, - { 0x0004, 0x000d }, - { 0x0004, 0x000e }, - { 0x0005, 0x0006 }, - { 0x0004, 0x000f }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0005, 0x0010 }, - { 0x0005, 0x0011 }, - { 0x0005, 0x0012 }, - { 0x0005, 0x0013 }, - { 0x0005, 0x0014 }, - { 0x0005, 0x0015 }, - { 0x0005, 0x0016 }, - { 0x0005, 0x0017 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0007, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0009, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000a, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000b, 0x0003 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000d, 0x0003 }, - { 0x000e, 0x0003 }, - { 0x000e, 0x0004 }, - { 0x000f, 0x0003 }, - { 0x000e, 0x0005 }, - { 0x000f, 0x0004 }, - { 0x0010, 0x0001 }, - { 0x000f, 0x0005 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0010, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x0011, 0x0001 }, - { 0x0012, 0x0000 }, - { 0x0012, 0x0001 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc23[46][2] = { + { 0x0005, 0x0003 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0004, 0x000c }, + { 0x0004, 0x000d }, + { 0x0004, 0x000e }, + { 0x0004, 0x000f }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0006, 0x0003 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0002 }, + { 0x0007, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000d, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x000e, 0x0001 }, + { 0x000e, 0x0002 }, + { 0x000e, 0x0003 }, + { 0x000f, 0x0001 }, + { 0x0010, 0x0001 }, + { 0x0012, 0x0000 }, + { 0x0012, 0x0001 }, + { 0x0011, 0x0001 }, -const uint16_t c_aauiLCLDHuffEnc26[77][2] = - { - { 0x0006, 0x0004 }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0005, 0x0010 }, - { 0x0005, 0x0011 }, - { 0x0005, 0x0012 }, - { 0x0005, 0x0013 }, - { 0x0005, 0x0014 }, - { 0x0005, 0x0015 }, - { 0x0005, 0x0016 }, - { 0x0005, 0x0017 }, - { 0x0005, 0x0018 }, - { 0x0005, 0x0019 }, - { 0x0005, 0x001a }, - { 0x0005, 0x001b }, - { 0x0005, 0x001c }, - { 0x0005, 0x001d }, - { 0x0005, 0x001e }, - { 0x0005, 0x001f }, - { 0x0006, 0x0005 }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0009, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x000a, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000c, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x000e, 0x0002 }, - { 0x000d, 0x0005 }, - { 0x000e, 0x0003 }, - { 0x000e, 0x0004 }, - { 0x000f, 0x0003 }, - { 0x000e, 0x0005 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0010, 0x0004 }, - { 0x0011, 0x0002 }, - { 0x0012, 0x0001 }, - { 0x0010, 0x0005 }, - { 0x0012, 0x0002 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0003 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc24[55][2] = { + { 0x0005, 0x0004 }, + { 0x0004, 0x0009 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0004, 0x000c }, + { 0x0004, 0x000d }, + { 0x0004, 0x000e }, + { 0x0004, 0x000f }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0005, 0x0010 }, + { 0x0005, 0x0011 }, + { 0x0006, 0x0003 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0007, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0003 }, + { 0x000d, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000e, 0x0002 }, + { 0x000e, 0x0003 }, + { 0x000f, 0x0001 }, + { 0x000f, 0x0002 }, + { 0x000f, 0x0003 }, + { 0x0010, 0x0001 }, + { 0x0011, 0x0001 }, + { 0x0013, 0x0000 }, + { 0x0012, 0x0001 }, + { 0x0013, 0x0001 }, +}; -const uint16_t c_aauiLCLDHuffEnc27[91][2] = - { - { 0x0006, 0x0006 }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0005, 0x0010 }, - { 0x0005, 0x0011 }, - { 0x0005, 0x0012 }, - { 0x0005, 0x0013 }, - { 0x0005, 0x0014 }, - { 0x0005, 0x0015 }, - { 0x0005, 0x0016 }, - { 0x0005, 0x0017 }, - { 0x0005, 0x0018 }, - { 0x0005, 0x0019 }, - { 0x0005, 0x001a }, - { 0x0005, 0x001b }, - { 0x0005, 0x001c }, - { 0x0005, 0x001d }, - { 0x0005, 0x001e }, - { 0x0005, 0x001f }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0006, 0x0014 }, - { 0x0006, 0x0015 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0007, 0x0008 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0003 }, - { 0x000e, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x000e, 0x0006 }, - { 0x000e, 0x0007 }, - { 0x000f, 0x0003 }, - { 0x000f, 0x0004 }, - { 0x0010, 0x0003 }, - { 0x000f, 0x0005 }, - { 0x0012, 0x0000 }, - { 0x0010, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x0012, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0011, 0x0004 }, - { 0x0011, 0x0005 }, - { 0x0012, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, +const UWord16 c_aauiLCLDHuffEnc25[65][2] = { + { 0x0005, 0x0005 }, + { 0x0004, 0x000c }, + { 0x0004, 0x000d }, + { 0x0004, 0x000e }, + { 0x0005, 0x0006 }, + { 0x0004, 0x000f }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0005, 0x0010 }, + { 0x0005, 0x0011 }, + { 0x0005, 0x0012 }, + { 0x0005, 0x0013 }, + { 0x0005, 0x0014 }, + { 0x0005, 0x0015 }, + { 0x0005, 0x0016 }, + { 0x0005, 0x0017 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0007, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0009, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000a, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000b, 0x0003 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000d, 0x0003 }, + { 0x000e, 0x0003 }, + { 0x000e, 0x0004 }, + { 0x000f, 0x0003 }, + { 0x000e, 0x0005 }, + { 0x000f, 0x0004 }, + { 0x0010, 0x0001 }, + { 0x000f, 0x0005 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0010, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x0011, 0x0001 }, + { 0x0012, 0x0000 }, + { 0x0012, 0x0001 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc28[109][2] = - { - { 0x0006, 0x0008 }, - { 0x0005, 0x0010 }, - { 0x0005, 0x0011 }, - { 0x0005, 0x0012 }, - { 0x0005, 0x0013 }, - { 0x0005, 0x0014 }, - { 0x0005, 0x0015 }, - { 0x0005, 0x0016 }, - { 0x0005, 0x0017 }, - { 0x0005, 0x0018 }, - { 0x0005, 0x0019 }, - { 0x0005, 0x001a }, - { 0x0005, 0x001b }, - { 0x0005, 0x001c }, - { 0x0005, 0x001d }, - { 0x0005, 0x001e }, - { 0x0006, 0x0009 }, - { 0x0005, 0x001f }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0006, 0x0014 }, - { 0x0006, 0x0015 }, - { 0x0006, 0x0016 }, - { 0x0006, 0x0017 }, - { 0x0006, 0x0018 }, - { 0x0006, 0x0019 }, - { 0x0006, 0x001a }, - { 0x0006, 0x001b }, - { 0x0006, 0x001c }, - { 0x0006, 0x001d }, - { 0x0006, 0x001e }, - { 0x0006, 0x001f }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0007, 0x0008 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000c, 0x0008 }, - { 0x000c, 0x0009 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x000e, 0x0006 }, - { 0x000e, 0x0007 }, - { 0x0010, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x0010, 0x0005 }, - { 0x000f, 0x0006 }, - { 0x000f, 0x0007 }, - { 0x0010, 0x0006 }, - { 0x0011, 0x0006 }, - { 0x0010, 0x0007 }, - { 0x0013, 0x0000 }, - { 0x0010, 0x0008 }, - { 0x0010, 0x0009 }, - { 0x0013, 0x0001 }, - { 0x0011, 0x0007 }, - { 0x0012, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, +const UWord16 c_aauiLCLDHuffEnc26[77][2] = { + { 0x0006, 0x0004 }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0005, 0x0010 }, + { 0x0005, 0x0011 }, + { 0x0005, 0x0012 }, + { 0x0005, 0x0013 }, + { 0x0005, 0x0014 }, + { 0x0005, 0x0015 }, + { 0x0005, 0x0016 }, + { 0x0005, 0x0017 }, + { 0x0005, 0x0018 }, + { 0x0005, 0x0019 }, + { 0x0005, 0x001a }, + { 0x0005, 0x001b }, + { 0x0005, 0x001c }, + { 0x0005, 0x001d }, + { 0x0005, 0x001e }, + { 0x0005, 0x001f }, + { 0x0006, 0x0005 }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0009, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x000a, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000c, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x000e, 0x0002 }, + { 0x000d, 0x0005 }, + { 0x000e, 0x0003 }, + { 0x000e, 0x0004 }, + { 0x000f, 0x0003 }, + { 0x000e, 0x0005 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0010, 0x0004 }, + { 0x0011, 0x0002 }, + { 0x0012, 0x0001 }, + { 0x0010, 0x0005 }, + { 0x0012, 0x0002 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0003 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc29[129][2] = - { - { 0x0006, 0x0009 }, - { 0x0005, 0x0019 }, - { 0x0006, 0x000a }, - { 0x0005, 0x001a }, - { 0x0005, 0x001b }, - { 0x0005, 0x001c }, - { 0x0006, 0x000b }, - { 0x0005, 0x001d }, - { 0x0005, 0x001e }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0005, 0x001f }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0006, 0x0014 }, - { 0x0006, 0x0015 }, - { 0x0006, 0x0016 }, - { 0x0006, 0x0017 }, - { 0x0006, 0x0018 }, - { 0x0006, 0x0019 }, - { 0x0006, 0x001a }, - { 0x0006, 0x001b }, - { 0x0006, 0x001c }, - { 0x0006, 0x001d }, - { 0x0006, 0x001e }, - { 0x0006, 0x001f }, - { 0x0006, 0x0020 }, - { 0x0006, 0x0021 }, - { 0x0006, 0x0022 }, - { 0x0006, 0x0023 }, - { 0x0006, 0x0024 }, - { 0x0006, 0x0025 }, - { 0x0006, 0x0026 }, - { 0x0006, 0x0027 }, - { 0x0006, 0x0028 }, - { 0x0006, 0x0029 }, - { 0x0006, 0x002a }, - { 0x0006, 0x002b }, - { 0x0006, 0x002c }, - { 0x0006, 0x002d }, - { 0x0006, 0x002e }, - { 0x0006, 0x002f }, - { 0x0006, 0x0030 }, - { 0x0006, 0x0031 }, - { 0x0007, 0x0007 }, - { 0x0007, 0x0008 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000a, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000c, 0x0008 }, - { 0x000c, 0x0009 }, - { 0x000c, 0x000a }, - { 0x000c, 0x000b }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000d, 0x000a }, - { 0x000d, 0x000b }, - { 0x000e, 0x0006 }, - { 0x000e, 0x0007 }, - { 0x000e, 0x0008 }, - { 0x000e, 0x0009 }, - { 0x000f, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x000f, 0x0006 }, - { 0x000f, 0x0007 }, - { 0x0011, 0x0007 }, - { 0x000f, 0x0008 }, - { 0x0012, 0x0000 }, - { 0x000f, 0x0009 }, - { 0x0010, 0x0005 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, - { 0x0012, 0x0001 }, - { 0x0010, 0x0006 }, - { 0x0010, 0x0007 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0012, 0x0008 }, - { 0x0011, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, - { 0x0012, 0x000c }, - { 0x0012, 0x000d }, - { 0x0011, 0x0009 }, - }; +const UWord16 c_aauiLCLDHuffEnc27[91][2] = { + { 0x0006, 0x0006 }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0005, 0x0010 }, + { 0x0005, 0x0011 }, + { 0x0005, 0x0012 }, + { 0x0005, 0x0013 }, + { 0x0005, 0x0014 }, + { 0x0005, 0x0015 }, + { 0x0005, 0x0016 }, + { 0x0005, 0x0017 }, + { 0x0005, 0x0018 }, + { 0x0005, 0x0019 }, + { 0x0005, 0x001a }, + { 0x0005, 0x001b }, + { 0x0005, 0x001c }, + { 0x0005, 0x001d }, + { 0x0005, 0x001e }, + { 0x0005, 0x001f }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0006, 0x0014 }, + { 0x0006, 0x0015 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0007, 0x0008 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0003 }, + { 0x000e, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x000e, 0x0006 }, + { 0x000e, 0x0007 }, + { 0x000f, 0x0003 }, + { 0x000f, 0x0004 }, + { 0x0010, 0x0003 }, + { 0x000f, 0x0005 }, + { 0x0012, 0x0000 }, + { 0x0010, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x0012, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0011, 0x0004 }, + { 0x0011, 0x0005 }, + { 0x0012, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, -const uint16_t c_aauiLCLDHuffEnc30[153][2] = - { - { 0x0007, 0x0009 }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0006, 0x0014 }, - { 0x0006, 0x0015 }, - { 0x0006, 0x0016 }, - { 0x0006, 0x0017 }, - { 0x0006, 0x0018 }, - { 0x0006, 0x0019 }, - { 0x0006, 0x001a }, - { 0x0006, 0x001b }, - { 0x0006, 0x001c }, - { 0x0006, 0x001d }, - { 0x0006, 0x001e }, - { 0x0006, 0x001f }, - { 0x0006, 0x0020 }, - { 0x0006, 0x0021 }, - { 0x0006, 0x0022 }, - { 0x0006, 0x0023 }, - { 0x0006, 0x0024 }, - { 0x0006, 0x0025 }, - { 0x0006, 0x0026 }, - { 0x0006, 0x0027 }, - { 0x0006, 0x0028 }, - { 0x0006, 0x0029 }, - { 0x0006, 0x002a }, - { 0x0006, 0x002b }, - { 0x0006, 0x002c }, - { 0x0006, 0x002d }, - { 0x0006, 0x002e }, - { 0x0006, 0x002f }, - { 0x0006, 0x0030 }, - { 0x0006, 0x0031 }, - { 0x0006, 0x0032 }, - { 0x0006, 0x0033 }, - { 0x0006, 0x0034 }, - { 0x0006, 0x0035 }, - { 0x0006, 0x0036 }, - { 0x0006, 0x0037 }, - { 0x0006, 0x0038 }, - { 0x0006, 0x0039 }, - { 0x0006, 0x003a }, - { 0x0006, 0x003b }, - { 0x0006, 0x003c }, - { 0x0006, 0x003d }, - { 0x0006, 0x003e }, - { 0x0006, 0x003f }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0007, 0x0012 }, - { 0x0007, 0x0013 }, - { 0x0007, 0x0014 }, - { 0x0007, 0x0015 }, - { 0x0007, 0x0016 }, - { 0x0007, 0x0017 }, - { 0x0007, 0x0018 }, - { 0x0007, 0x0019 }, - { 0x0007, 0x001a }, - { 0x0007, 0x001b }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0008, 0x000e }, - { 0x0008, 0x000f }, - { 0x0008, 0x0010 }, - { 0x0008, 0x0011 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x0009, 0x000c }, - { 0x0009, 0x000d }, - { 0x0009, 0x000e }, - { 0x000a, 0x0008 }, - { 0x0009, 0x000f }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000b, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000b, 0x000a }, - { 0x000b, 0x000b }, - { 0x000b, 0x000c }, - { 0x000b, 0x000d }, - { 0x000c, 0x0008 }, - { 0x000b, 0x000e }, - { 0x000b, 0x000f }, - { 0x000c, 0x0009 }, - { 0x000c, 0x000a }, - { 0x000d, 0x0008 }, - { 0x000c, 0x000b }, - { 0x000c, 0x000c }, - { 0x000d, 0x0009 }, - { 0x000c, 0x000d }, - { 0x000d, 0x000a }, - { 0x000d, 0x000b }, - { 0x000d, 0x000c }, - { 0x000d, 0x000d }, - { 0x000e, 0x0008 }, - { 0x000d, 0x000e }, - { 0x000d, 0x000f }, - { 0x000e, 0x0009 }, - { 0x000e, 0x000a }, - { 0x000e, 0x000b }, - { 0x000e, 0x000c }, - { 0x000f, 0x0006 }, - { 0x000f, 0x0007 }, - { 0x000f, 0x0008 }, - { 0x0010, 0x0006 }, - { 0x000e, 0x000d }, - { 0x000e, 0x000e }, - { 0x000e, 0x000f }, - { 0x0010, 0x0007 }, - { 0x000f, 0x0009 }, - { 0x0010, 0x0008 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, - { 0x000f, 0x000c }, - { 0x000f, 0x000d }, - { 0x0010, 0x0009 }, - { 0x0011, 0x0000 }, - { 0x0011, 0x0001 }, - { 0x0011, 0x0002 }, - { 0x000f, 0x000e }, - { 0x0010, 0x000a }, - { 0x0011, 0x0003 }, - { 0x0011, 0x0004 }, - { 0x0011, 0x0005 }, - { 0x000f, 0x000f }, - { 0x0011, 0x0006 }, - { 0x0011, 0x0007 }, - { 0x0011, 0x0008 }, - { 0x0011, 0x0009 }, - { 0x0011, 0x000a }, - { 0x0011, 0x000b }, - { 0x0010, 0x000b }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc28[109][2] = { + { 0x0006, 0x0008 }, + { 0x0005, 0x0010 }, + { 0x0005, 0x0011 }, + { 0x0005, 0x0012 }, + { 0x0005, 0x0013 }, + { 0x0005, 0x0014 }, + { 0x0005, 0x0015 }, + { 0x0005, 0x0016 }, + { 0x0005, 0x0017 }, + { 0x0005, 0x0018 }, + { 0x0005, 0x0019 }, + { 0x0005, 0x001a }, + { 0x0005, 0x001b }, + { 0x0005, 0x001c }, + { 0x0005, 0x001d }, + { 0x0005, 0x001e }, + { 0x0006, 0x0009 }, + { 0x0005, 0x001f }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0006, 0x0014 }, + { 0x0006, 0x0015 }, + { 0x0006, 0x0016 }, + { 0x0006, 0x0017 }, + { 0x0006, 0x0018 }, + { 0x0006, 0x0019 }, + { 0x0006, 0x001a }, + { 0x0006, 0x001b }, + { 0x0006, 0x001c }, + { 0x0006, 0x001d }, + { 0x0006, 0x001e }, + { 0x0006, 0x001f }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0007, 0x0008 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000c, 0x0008 }, + { 0x000c, 0x0009 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x000e, 0x0006 }, + { 0x000e, 0x0007 }, + { 0x0010, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x0010, 0x0005 }, + { 0x000f, 0x0006 }, + { 0x000f, 0x0007 }, + { 0x0010, 0x0006 }, + { 0x0011, 0x0006 }, + { 0x0010, 0x0007 }, + { 0x0013, 0x0000 }, + { 0x0010, 0x0008 }, + { 0x0010, 0x0009 }, + { 0x0013, 0x0001 }, + { 0x0011, 0x0007 }, + { 0x0012, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, -const uint16_t c_aauiLCLDHuffEnc31[181][2] = - { - { 0x0007, 0x000b }, - { 0x0006, 0x0015 }, - { 0x0006, 0x0016 }, - { 0x0006, 0x0017 }, - { 0x0006, 0x0018 }, - { 0x0006, 0x0019 }, - { 0x0006, 0x001a }, - { 0x0006, 0x001b }, - { 0x0006, 0x001c }, - { 0x0006, 0x001d }, - { 0x0006, 0x001e }, - { 0x0006, 0x001f }, - { 0x0006, 0x0020 }, - { 0x0006, 0x0021 }, - { 0x0006, 0x0022 }, - { 0x0006, 0x0023 }, - { 0x0006, 0x0024 }, - { 0x0006, 0x0025 }, - { 0x0006, 0x0026 }, - { 0x0006, 0x0027 }, - { 0x0006, 0x0028 }, - { 0x0006, 0x0029 }, - { 0x0006, 0x002a }, - { 0x0006, 0x002b }, - { 0x0006, 0x002c }, - { 0x0006, 0x002d }, - { 0x0006, 0x002e }, - { 0x0006, 0x002f }, - { 0x0006, 0x0030 }, - { 0x0006, 0x0031 }, - { 0x0006, 0x0032 }, - { 0x0006, 0x0033 }, - { 0x0006, 0x0034 }, - { 0x0006, 0x0035 }, - { 0x0006, 0x0036 }, - { 0x0006, 0x0037 }, - { 0x0006, 0x0038 }, - { 0x0006, 0x0039 }, - { 0x0006, 0x003a }, - { 0x0006, 0x003b }, - { 0x0006, 0x003c }, - { 0x0006, 0x003d }, - { 0x0006, 0x003e }, - { 0x0007, 0x000c }, - { 0x0006, 0x003f }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0007, 0x0012 }, - { 0x0007, 0x0013 }, - { 0x0007, 0x0014 }, - { 0x0007, 0x0015 }, - { 0x0007, 0x0016 }, - { 0x0007, 0x0017 }, - { 0x0007, 0x0018 }, - { 0x0007, 0x0019 }, - { 0x0007, 0x001a }, - { 0x0007, 0x001b }, - { 0x0007, 0x001c }, - { 0x0007, 0x001d }, - { 0x0007, 0x001e }, - { 0x0007, 0x001f }, - { 0x0007, 0x0020 }, - { 0x0007, 0x0021 }, - { 0x0007, 0x0022 }, - { 0x0007, 0x0023 }, - { 0x0007, 0x0024 }, - { 0x0007, 0x0025 }, - { 0x0007, 0x0026 }, - { 0x0007, 0x0027 }, - { 0x0007, 0x0028 }, - { 0x0007, 0x0029 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0008, 0x000e }, - { 0x0008, 0x000f }, - { 0x0008, 0x0010 }, - { 0x0008, 0x0011 }, - { 0x0008, 0x0012 }, - { 0x0008, 0x0013 }, - { 0x0008, 0x0014 }, - { 0x0008, 0x0015 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x0009, 0x000c }, - { 0x0009, 0x000d }, - { 0x0009, 0x000e }, - { 0x0009, 0x000f }, - { 0x0009, 0x0010 }, - { 0x0009, 0x0011 }, - { 0x000a, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000a, 0x000e }, - { 0x000a, 0x000f }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000b, 0x000a }, - { 0x000b, 0x000b }, - { 0x000b, 0x000c }, - { 0x000b, 0x000d }, - { 0x000b, 0x000e }, - { 0x000c, 0x0008 }, - { 0x000c, 0x0009 }, - { 0x000b, 0x000f }, - { 0x000c, 0x000a }, - { 0x000c, 0x000b }, - { 0x000c, 0x000c }, - { 0x000c, 0x000d }, - { 0x000d, 0x0008 }, - { 0x000c, 0x000e }, - { 0x000d, 0x0009 }, - { 0x000d, 0x000a }, - { 0x000c, 0x000f }, - { 0x000d, 0x000b }, - { 0x000d, 0x000c }, - { 0x000d, 0x000d }, - { 0x000d, 0x000e }, - { 0x000d, 0x000f }, - { 0x000e, 0x0008 }, - { 0x000e, 0x0009 }, - { 0x000e, 0x000a }, - { 0x000e, 0x000b }, - { 0x000e, 0x000c }, - { 0x000e, 0x000d }, - { 0x000e, 0x000e }, - { 0x000e, 0x000f }, - { 0x000f, 0x0009 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, - { 0x000f, 0x000c }, - { 0x0010, 0x0009 }, - { 0x000f, 0x000d }, - { 0x000f, 0x000e }, - { 0x0010, 0x000a }, - { 0x0010, 0x000b }, - { 0x0010, 0x000c }, - { 0x0010, 0x000d }, - { 0x0011, 0x000a }, - { 0x0010, 0x000e }, - { 0x000f, 0x000f }, - { 0x0010, 0x000f }, - { 0x0012, 0x0000 }, - { 0x0012, 0x0001 }, - { 0x0011, 0x000b }, - { 0x0011, 0x000c }, - { 0x0010, 0x0010 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0011, 0x000d }, - { 0x0011, 0x000e }, - { 0x0011, 0x000f }, - { 0x0011, 0x0010 }, - { 0x0011, 0x0011 }, - { 0x0010, 0x0011 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, - { 0x0012, 0x000c }, - { 0x0012, 0x000d }, - { 0x0012, 0x000e }, - { 0x0012, 0x000f }, - { 0x0012, 0x0010 }, - { 0x0012, 0x0011 }, - { 0x0012, 0x0012 }, - { 0x0012, 0x0013 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc29[129][2] = { + { 0x0006, 0x0009 }, + { 0x0005, 0x0019 }, + { 0x0006, 0x000a }, + { 0x0005, 0x001a }, + { 0x0005, 0x001b }, + { 0x0005, 0x001c }, + { 0x0006, 0x000b }, + { 0x0005, 0x001d }, + { 0x0005, 0x001e }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0005, 0x001f }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0006, 0x0014 }, + { 0x0006, 0x0015 }, + { 0x0006, 0x0016 }, + { 0x0006, 0x0017 }, + { 0x0006, 0x0018 }, + { 0x0006, 0x0019 }, + { 0x0006, 0x001a }, + { 0x0006, 0x001b }, + { 0x0006, 0x001c }, + { 0x0006, 0x001d }, + { 0x0006, 0x001e }, + { 0x0006, 0x001f }, + { 0x0006, 0x0020 }, + { 0x0006, 0x0021 }, + { 0x0006, 0x0022 }, + { 0x0006, 0x0023 }, + { 0x0006, 0x0024 }, + { 0x0006, 0x0025 }, + { 0x0006, 0x0026 }, + { 0x0006, 0x0027 }, + { 0x0006, 0x0028 }, + { 0x0006, 0x0029 }, + { 0x0006, 0x002a }, + { 0x0006, 0x002b }, + { 0x0006, 0x002c }, + { 0x0006, 0x002d }, + { 0x0006, 0x002e }, + { 0x0006, 0x002f }, + { 0x0006, 0x0030 }, + { 0x0006, 0x0031 }, + { 0x0007, 0x0007 }, + { 0x0007, 0x0008 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000a, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000c, 0x0008 }, + { 0x000c, 0x0009 }, + { 0x000c, 0x000a }, + { 0x000c, 0x000b }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000d, 0x000a }, + { 0x000d, 0x000b }, + { 0x000e, 0x0006 }, + { 0x000e, 0x0007 }, + { 0x000e, 0x0008 }, + { 0x000e, 0x0009 }, + { 0x000f, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x000f, 0x0006 }, + { 0x000f, 0x0007 }, + { 0x0011, 0x0007 }, + { 0x000f, 0x0008 }, + { 0x0012, 0x0000 }, + { 0x000f, 0x0009 }, + { 0x0010, 0x0005 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, + { 0x0012, 0x0001 }, + { 0x0010, 0x0006 }, + { 0x0010, 0x0007 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0012, 0x0008 }, + { 0x0011, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, + { 0x0012, 0x000c }, + { 0x0012, 0x000d }, + { 0x0011, 0x0009 }, -const uint16_t c_aauiLCLDHuffEnc33[16][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0008, 0x0000 }, - { 0x0008, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc34[16][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0008, 0x0000 }, - { 0x0008, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - }; +const UWord16 c_aauiLCLDHuffEnc30[153][2] = { + { 0x0007, 0x0009 }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0006, 0x0014 }, + { 0x0006, 0x0015 }, + { 0x0006, 0x0016 }, + { 0x0006, 0x0017 }, + { 0x0006, 0x0018 }, + { 0x0006, 0x0019 }, + { 0x0006, 0x001a }, + { 0x0006, 0x001b }, + { 0x0006, 0x001c }, + { 0x0006, 0x001d }, + { 0x0006, 0x001e }, + { 0x0006, 0x001f }, + { 0x0006, 0x0020 }, + { 0x0006, 0x0021 }, + { 0x0006, 0x0022 }, + { 0x0006, 0x0023 }, + { 0x0006, 0x0024 }, + { 0x0006, 0x0025 }, + { 0x0006, 0x0026 }, + { 0x0006, 0x0027 }, + { 0x0006, 0x0028 }, + { 0x0006, 0x0029 }, + { 0x0006, 0x002a }, + { 0x0006, 0x002b }, + { 0x0006, 0x002c }, + { 0x0006, 0x002d }, + { 0x0006, 0x002e }, + { 0x0006, 0x002f }, + { 0x0006, 0x0030 }, + { 0x0006, 0x0031 }, + { 0x0006, 0x0032 }, + { 0x0006, 0x0033 }, + { 0x0006, 0x0034 }, + { 0x0006, 0x0035 }, + { 0x0006, 0x0036 }, + { 0x0006, 0x0037 }, + { 0x0006, 0x0038 }, + { 0x0006, 0x0039 }, + { 0x0006, 0x003a }, + { 0x0006, 0x003b }, + { 0x0006, 0x003c }, + { 0x0006, 0x003d }, + { 0x0006, 0x003e }, + { 0x0006, 0x003f }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0007, 0x0012 }, + { 0x0007, 0x0013 }, + { 0x0007, 0x0014 }, + { 0x0007, 0x0015 }, + { 0x0007, 0x0016 }, + { 0x0007, 0x0017 }, + { 0x0007, 0x0018 }, + { 0x0007, 0x0019 }, + { 0x0007, 0x001a }, + { 0x0007, 0x001b }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0008, 0x000e }, + { 0x0008, 0x000f }, + { 0x0008, 0x0010 }, + { 0x0008, 0x0011 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x0009, 0x000c }, + { 0x0009, 0x000d }, + { 0x0009, 0x000e }, + { 0x000a, 0x0008 }, + { 0x0009, 0x000f }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000b, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000b, 0x000a }, + { 0x000b, 0x000b }, + { 0x000b, 0x000c }, + { 0x000b, 0x000d }, + { 0x000c, 0x0008 }, + { 0x000b, 0x000e }, + { 0x000b, 0x000f }, + { 0x000c, 0x0009 }, + { 0x000c, 0x000a }, + { 0x000d, 0x0008 }, + { 0x000c, 0x000b }, + { 0x000c, 0x000c }, + { 0x000d, 0x0009 }, + { 0x000c, 0x000d }, + { 0x000d, 0x000a }, + { 0x000d, 0x000b }, + { 0x000d, 0x000c }, + { 0x000d, 0x000d }, + { 0x000e, 0x0008 }, + { 0x000d, 0x000e }, + { 0x000d, 0x000f }, + { 0x000e, 0x0009 }, + { 0x000e, 0x000a }, + { 0x000e, 0x000b }, + { 0x000e, 0x000c }, + { 0x000f, 0x0006 }, + { 0x000f, 0x0007 }, + { 0x000f, 0x0008 }, + { 0x0010, 0x0006 }, + { 0x000e, 0x000d }, + { 0x000e, 0x000e }, + { 0x000e, 0x000f }, + { 0x0010, 0x0007 }, + { 0x000f, 0x0009 }, + { 0x0010, 0x0008 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, + { 0x000f, 0x000c }, + { 0x000f, 0x000d }, + { 0x0010, 0x0009 }, + { 0x0011, 0x0000 }, + { 0x0011, 0x0001 }, + { 0x0011, 0x0002 }, + { 0x000f, 0x000e }, + { 0x0010, 0x000a }, + { 0x0011, 0x0003 }, + { 0x0011, 0x0004 }, + { 0x0011, 0x0005 }, + { 0x000f, 0x000f }, + { 0x0011, 0x0006 }, + { 0x0011, 0x0007 }, + { 0x0011, 0x0008 }, + { 0x0011, 0x0009 }, + { 0x0011, 0x000a }, + { 0x0011, 0x000b }, + { 0x0010, 0x000b }, -const uint16_t c_aauiLCLDHuffEnc35[25][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0007, 0x0006 }, - { 0x0009, 0x0000 }, - { 0x0009, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x0007, 0x0007 }, - { 0x0009, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x0009, 0x000c }, - { 0x0009, 0x000d }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc31[181][2] = { + { 0x0007, 0x000b }, + { 0x0006, 0x0015 }, + { 0x0006, 0x0016 }, + { 0x0006, 0x0017 }, + { 0x0006, 0x0018 }, + { 0x0006, 0x0019 }, + { 0x0006, 0x001a }, + { 0x0006, 0x001b }, + { 0x0006, 0x001c }, + { 0x0006, 0x001d }, + { 0x0006, 0x001e }, + { 0x0006, 0x001f }, + { 0x0006, 0x0020 }, + { 0x0006, 0x0021 }, + { 0x0006, 0x0022 }, + { 0x0006, 0x0023 }, + { 0x0006, 0x0024 }, + { 0x0006, 0x0025 }, + { 0x0006, 0x0026 }, + { 0x0006, 0x0027 }, + { 0x0006, 0x0028 }, + { 0x0006, 0x0029 }, + { 0x0006, 0x002a }, + { 0x0006, 0x002b }, + { 0x0006, 0x002c }, + { 0x0006, 0x002d }, + { 0x0006, 0x002e }, + { 0x0006, 0x002f }, + { 0x0006, 0x0030 }, + { 0x0006, 0x0031 }, + { 0x0006, 0x0032 }, + { 0x0006, 0x0033 }, + { 0x0006, 0x0034 }, + { 0x0006, 0x0035 }, + { 0x0006, 0x0036 }, + { 0x0006, 0x0037 }, + { 0x0006, 0x0038 }, + { 0x0006, 0x0039 }, + { 0x0006, 0x003a }, + { 0x0006, 0x003b }, + { 0x0006, 0x003c }, + { 0x0006, 0x003d }, + { 0x0006, 0x003e }, + { 0x0007, 0x000c }, + { 0x0006, 0x003f }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0007, 0x0012 }, + { 0x0007, 0x0013 }, + { 0x0007, 0x0014 }, + { 0x0007, 0x0015 }, + { 0x0007, 0x0016 }, + { 0x0007, 0x0017 }, + { 0x0007, 0x0018 }, + { 0x0007, 0x0019 }, + { 0x0007, 0x001a }, + { 0x0007, 0x001b }, + { 0x0007, 0x001c }, + { 0x0007, 0x001d }, + { 0x0007, 0x001e }, + { 0x0007, 0x001f }, + { 0x0007, 0x0020 }, + { 0x0007, 0x0021 }, + { 0x0007, 0x0022 }, + { 0x0007, 0x0023 }, + { 0x0007, 0x0024 }, + { 0x0007, 0x0025 }, + { 0x0007, 0x0026 }, + { 0x0007, 0x0027 }, + { 0x0007, 0x0028 }, + { 0x0007, 0x0029 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0008, 0x000e }, + { 0x0008, 0x000f }, + { 0x0008, 0x0010 }, + { 0x0008, 0x0011 }, + { 0x0008, 0x0012 }, + { 0x0008, 0x0013 }, + { 0x0008, 0x0014 }, + { 0x0008, 0x0015 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x0009, 0x000c }, + { 0x0009, 0x000d }, + { 0x0009, 0x000e }, + { 0x0009, 0x000f }, + { 0x0009, 0x0010 }, + { 0x0009, 0x0011 }, + { 0x000a, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000a, 0x000e }, + { 0x000a, 0x000f }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000b, 0x000a }, + { 0x000b, 0x000b }, + { 0x000b, 0x000c }, + { 0x000b, 0x000d }, + { 0x000b, 0x000e }, + { 0x000c, 0x0008 }, + { 0x000c, 0x0009 }, + { 0x000b, 0x000f }, + { 0x000c, 0x000a }, + { 0x000c, 0x000b }, + { 0x000c, 0x000c }, + { 0x000c, 0x000d }, + { 0x000d, 0x0008 }, + { 0x000c, 0x000e }, + { 0x000d, 0x0009 }, + { 0x000d, 0x000a }, + { 0x000c, 0x000f }, + { 0x000d, 0x000b }, + { 0x000d, 0x000c }, + { 0x000d, 0x000d }, + { 0x000d, 0x000e }, + { 0x000d, 0x000f }, + { 0x000e, 0x0008 }, + { 0x000e, 0x0009 }, + { 0x000e, 0x000a }, + { 0x000e, 0x000b }, + { 0x000e, 0x000c }, + { 0x000e, 0x000d }, + { 0x000e, 0x000e }, + { 0x000e, 0x000f }, + { 0x000f, 0x0009 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, + { 0x000f, 0x000c }, + { 0x0010, 0x0009 }, + { 0x000f, 0x000d }, + { 0x000f, 0x000e }, + { 0x0010, 0x000a }, + { 0x0010, 0x000b }, + { 0x0010, 0x000c }, + { 0x0010, 0x000d }, + { 0x0011, 0x000a }, + { 0x0010, 0x000e }, + { 0x000f, 0x000f }, + { 0x0010, 0x000f }, + { 0x0012, 0x0000 }, + { 0x0012, 0x0001 }, + { 0x0011, 0x000b }, + { 0x0011, 0x000c }, + { 0x0010, 0x0010 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0011, 0x000d }, + { 0x0011, 0x000e }, + { 0x0011, 0x000f }, + { 0x0011, 0x0010 }, + { 0x0011, 0x0011 }, + { 0x0010, 0x0011 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, + { 0x0012, 0x000c }, + { 0x0012, 0x000d }, + { 0x0012, 0x000e }, + { 0x0012, 0x000f }, + { 0x0012, 0x0010 }, + { 0x0012, 0x0011 }, + { 0x0012, 0x0012 }, + { 0x0012, 0x0013 }, -const uint16_t c_aauiLCLDHuffEnc36[36][2] = - { - { 0x0001, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0006, 0x0002 }, - { 0x000b, 0x0000 }, - { 0x000b, 0x0001 }, - { 0x000b, 0x0002 }, - { 0x0003, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0008, 0x0005 }, - { 0x000b, 0x0003 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x0006, 0x0003 }, - { 0x0007, 0x0003 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000b, 0x000a }, - { 0x000b, 0x000b }, - { 0x000b, 0x000c }, - { 0x000b, 0x000d }, - { 0x000b, 0x000e }, - { 0x000b, 0x000f }, - { 0x000a, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000a, 0x000e }, - { 0x000a, 0x000f }, - { 0x000a, 0x0010 }, - { 0x000a, 0x0011 }, - { 0x000a, 0x0012 }, - { 0x000a, 0x0013 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc33[16][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0008, 0x0000 }, + { 0x0008, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, +}; -const uint16_t c_aauiLCLDHuffEnc37[36][2] = - { - { 0x0001, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000c, 0x0000 }, - { 0x000c, 0x0001 }, - { 0x000c, 0x0002 }, - { 0x0003, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0006, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x0006, 0x0003 }, - { 0x0007, 0x0001 }, - { 0x000a, 0x0007 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000c, 0x0008 }, - { 0x000c, 0x0009 }, - { 0x000c, 0x000a }, - { 0x000c, 0x000b }, - { 0x000c, 0x000c }, - { 0x000c, 0x000d }, - { 0x000c, 0x000e }, - { 0x000c, 0x000f }, - { 0x000c, 0x0010 }, - { 0x000c, 0x0011 }, - { 0x000c, 0x0012 }, - { 0x000c, 0x0013 }, - { 0x000c, 0x0014 }, - { 0x000c, 0x0015 }, - { 0x000c, 0x0016 }, - { 0x000c, 0x0017 }, - { 0x000c, 0x0018 }, - { 0x000c, 0x0019 }, - { 0x000b, 0x000d }, +const UWord16 c_aauiLCLDHuffEnc34[16][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0008, 0x0000 }, + { 0x0008, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc35[25][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0007, 0x0006 }, + { 0x0009, 0x0000 }, + { 0x0009, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x0007, 0x0007 }, + { 0x0009, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x0009, 0x000c }, + { 0x0009, 0x000d }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, -const uint16_t c_aauiLCLDHuffEnc38[49][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000c, 0x0012 }, - { 0x000d, 0x0000 }, - { 0x000d, 0x0001 }, - { 0x000d, 0x0002 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000b, 0x000a }, - { 0x000d, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0009, 0x0003 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000c, 0x0013 }, - { 0x000b, 0x000b }, - { 0x000d, 0x000a }, - { 0x000d, 0x000b }, - { 0x000d, 0x000c }, - { 0x000d, 0x000d }, - { 0x000d, 0x000e }, - { 0x000d, 0x000f }, - { 0x000d, 0x0010 }, - { 0x000d, 0x0011 }, - { 0x000d, 0x0012 }, - { 0x000d, 0x0013 }, - { 0x000d, 0x0014 }, - { 0x000d, 0x0015 }, - { 0x000d, 0x0016 }, - { 0x000d, 0x0017 }, - { 0x000d, 0x0018 }, - { 0x000d, 0x0019 }, - { 0x000d, 0x001a }, - { 0x000d, 0x001b }, - { 0x000d, 0x001c }, - { 0x000d, 0x001d }, - { 0x000d, 0x001e }, - { 0x000d, 0x001f }, - { 0x000d, 0x0020 }, - { 0x000d, 0x0021 }, - { 0x000d, 0x0022 }, - { 0x000d, 0x0023 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc36[36][2] = { + { 0x0001, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0006, 0x0002 }, + { 0x000b, 0x0000 }, + { 0x000b, 0x0001 }, + { 0x000b, 0x0002 }, + { 0x0003, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0008, 0x0005 }, + { 0x000b, 0x0003 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x0006, 0x0003 }, + { 0x0007, 0x0003 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000b, 0x000a }, + { 0x000b, 0x000b }, + { 0x000b, 0x000c }, + { 0x000b, 0x000d }, + { 0x000b, 0x000e }, + { 0x000b, 0x000f }, + { 0x000a, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000a, 0x000e }, + { 0x000a, 0x000f }, + { 0x000a, 0x0010 }, + { 0x000a, 0x0011 }, + { 0x000a, 0x0012 }, + { 0x000a, 0x0013 }, -const uint16_t c_aauiLCLDHuffEnc39[64][2] = - { - { 0x0001, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000a, 0x0002 }, - { 0x000f, 0x0000 }, - { 0x000f, 0x0001 }, - { 0x000f, 0x0002 }, - { 0x000f, 0x0003 }, - { 0x0003, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000a, 0x0003 }, - { 0x000f, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x000f, 0x0006 }, - { 0x000f, 0x0007 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0009, 0x0003 }, - { 0x000d, 0x000e }, - { 0x000f, 0x0008 }, - { 0x000f, 0x0009 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000d, 0x000f }, - { 0x000f, 0x000c }, - { 0x000f, 0x000d }, - { 0x000f, 0x000e }, - { 0x000f, 0x000f }, - { 0x000f, 0x0010 }, - { 0x000f, 0x0011 }, - { 0x000f, 0x0012 }, - { 0x000f, 0x0013 }, - { 0x000f, 0x0014 }, - { 0x000f, 0x0015 }, - { 0x000f, 0x0016 }, - { 0x000f, 0x0017 }, - { 0x000f, 0x0018 }, - { 0x000f, 0x0019 }, - { 0x000f, 0x001a }, - { 0x000f, 0x001b }, - { 0x000f, 0x001c }, - { 0x000f, 0x001d }, - { 0x000f, 0x001e }, - { 0x000f, 0x001f }, - { 0x000f, 0x0020 }, - { 0x000f, 0x0021 }, - { 0x000f, 0x0022 }, - { 0x000f, 0x0023 }, - { 0x000f, 0x0024 }, - { 0x000f, 0x0025 }, - { 0x000f, 0x0026 }, - { 0x000f, 0x0027 }, - { 0x000f, 0x0028 }, - { 0x000f, 0x0029 }, - { 0x000e, 0x0015 }, - { 0x000e, 0x0016 }, - { 0x000e, 0x0017 }, - { 0x000e, 0x0018 }, - { 0x000e, 0x0019 }, - { 0x000e, 0x001a }, - { 0x000e, 0x001b }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc40[81][2] = - { - { 0x0001, 0x0001 }, - { 0x0002, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000b, 0x0002 }, - { 0x000f, 0x0011 }, - { 0x0011, 0x0000 }, - { 0x0011, 0x0001 }, - { 0x0011, 0x0002 }, - { 0x0011, 0x0003 }, - { 0x0003, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000a, 0x0002 }, - { 0x000e, 0x0009 }, - { 0x0011, 0x0004 }, - { 0x0011, 0x0005 }, - { 0x0011, 0x0006 }, - { 0x0011, 0x0007 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x000d, 0x0005 }, - { 0x0011, 0x0008 }, - { 0x0011, 0x0009 }, - { 0x0011, 0x000a }, - { 0x0011, 0x000b }, - { 0x0011, 0x000c }, - { 0x000b, 0x0003 }, - { 0x000a, 0x0003 }, - { 0x000c, 0x0003 }, - { 0x0011, 0x000d }, - { 0x0011, 0x000e }, - { 0x0011, 0x000f }, - { 0x0011, 0x0010 }, - { 0x0011, 0x0011 }, - { 0x0011, 0x0012 }, - { 0x0011, 0x0013 }, - { 0x0011, 0x0014 }, - { 0x0011, 0x0015 }, - { 0x0011, 0x0016 }, - { 0x0011, 0x0017 }, - { 0x0011, 0x0018 }, - { 0x0011, 0x0019 }, - { 0x0011, 0x001a }, - { 0x0011, 0x001b }, - { 0x0011, 0x001c }, - { 0x0011, 0x001d }, - { 0x0011, 0x001e }, - { 0x0011, 0x001f }, - { 0x0011, 0x0020 }, - { 0x0011, 0x0021 }, - { 0x0011, 0x0022 }, - { 0x0011, 0x0023 }, - { 0x0011, 0x0024 }, - { 0x0011, 0x0025 }, - { 0x0011, 0x0026 }, - { 0x0011, 0x0027 }, - { 0x0011, 0x0028 }, - { 0x0011, 0x0029 }, - { 0x0011, 0x002a }, - { 0x0011, 0x002b }, - { 0x0011, 0x002c }, - { 0x0011, 0x002d }, - { 0x0011, 0x002e }, - { 0x0011, 0x002f }, - { 0x0011, 0x0030 }, - { 0x0011, 0x0031 }, - { 0x0011, 0x0032 }, - { 0x0011, 0x0033 }, - { 0x0011, 0x0034 }, - { 0x0011, 0x0035 }, - { 0x0011, 0x0036 }, - { 0x0011, 0x0037 }, - { 0x0011, 0x0038 }, - { 0x0011, 0x0039 }, - { 0x0011, 0x003a }, - { 0x0011, 0x003b }, - { 0x0010, 0x001e }, - { 0x0010, 0x001f }, - { 0x0010, 0x0020 }, - { 0x0010, 0x0021 }, +const UWord16 c_aauiLCLDHuffEnc37[36][2] = { + { 0x0001, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000c, 0x0000 }, + { 0x000c, 0x0001 }, + { 0x000c, 0x0002 }, + { 0x0003, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0006, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x0006, 0x0003 }, + { 0x0007, 0x0001 }, + { 0x000a, 0x0007 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000c, 0x0008 }, + { 0x000c, 0x0009 }, + { 0x000c, 0x000a }, + { 0x000c, 0x000b }, + { 0x000c, 0x000c }, + { 0x000c, 0x000d }, + { 0x000c, 0x000e }, + { 0x000c, 0x000f }, + { 0x000c, 0x0010 }, + { 0x000c, 0x0011 }, + { 0x000c, 0x0012 }, + { 0x000c, 0x0013 }, + { 0x000c, 0x0014 }, + { 0x000c, 0x0015 }, + { 0x000c, 0x0016 }, + { 0x000c, 0x0017 }, + { 0x000c, 0x0018 }, + { 0x000c, 0x0019 }, + { 0x000b, 0x000d }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc41[100][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x0011, 0x0014 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0002, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x0010, 0x000b }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x000d, 0x0002 }, - { 0x0011, 0x0015 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000d, 0x0003 }, - { 0x0010, 0x000c }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0010, 0x000d }, - { 0x000f, 0x0007 }, - { 0x0012, 0x0027 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, +const UWord16 c_aauiLCLDHuffEnc38[49][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000c, 0x0012 }, + { 0x000d, 0x0000 }, + { 0x000d, 0x0001 }, + { 0x000d, 0x0002 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000b, 0x000a }, + { 0x000d, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0009, 0x0003 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000c, 0x0013 }, + { 0x000b, 0x000b }, + { 0x000d, 0x000a }, + { 0x000d, 0x000b }, + { 0x000d, 0x000c }, + { 0x000d, 0x000d }, + { 0x000d, 0x000e }, + { 0x000d, 0x000f }, + { 0x000d, 0x0010 }, + { 0x000d, 0x0011 }, + { 0x000d, 0x0012 }, + { 0x000d, 0x0013 }, + { 0x000d, 0x0014 }, + { 0x000d, 0x0015 }, + { 0x000d, 0x0016 }, + { 0x000d, 0x0017 }, + { 0x000d, 0x0018 }, + { 0x000d, 0x0019 }, + { 0x000d, 0x001a }, + { 0x000d, 0x001b }, + { 0x000d, 0x001c }, + { 0x000d, 0x001d }, + { 0x000d, 0x001e }, + { 0x000d, 0x001f }, + { 0x000d, 0x0020 }, + { 0x000d, 0x0021 }, + { 0x000d, 0x0022 }, + { 0x000d, 0x0023 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc42[169][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000e, 0x0006 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0009, 0x0002 }, - { 0x000d, 0x0004 }, - { 0x0010, 0x0013 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0008, 0x0002 }, - { 0x000b, 0x0002 }, - { 0x000f, 0x000b }, - { 0x0011, 0x0025 }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0009, 0x0003 }, - { 0x0008, 0x0003 }, - { 0x000b, 0x0003 }, - { 0x000d, 0x0005 }, - { 0x0010, 0x0014 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0007 }, - { 0x0010, 0x0015 }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0012, 0x0045 }, - { 0x0013, 0x0027 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x0013, 0x0054 }, - { 0x0013, 0x0055 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0013, 0x0062 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x0013, 0x0066 }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0012, 0x0046 }, - { 0x0012, 0x0047 }, - { 0x0012, 0x0048 }, - { 0x0012, 0x0049 }, +const UWord16 c_aauiLCLDHuffEnc39[64][2] = { + { 0x0001, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000a, 0x0002 }, + { 0x000f, 0x0000 }, + { 0x000f, 0x0001 }, + { 0x000f, 0x0002 }, + { 0x000f, 0x0003 }, + { 0x0003, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000a, 0x0003 }, + { 0x000f, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x000f, 0x0006 }, + { 0x000f, 0x0007 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0009, 0x0003 }, + { 0x000d, 0x000e }, + { 0x000f, 0x0008 }, + { 0x000f, 0x0009 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000d, 0x000f }, + { 0x000f, 0x000c }, + { 0x000f, 0x000d }, + { 0x000f, 0x000e }, + { 0x000f, 0x000f }, + { 0x000f, 0x0010 }, + { 0x000f, 0x0011 }, + { 0x000f, 0x0012 }, + { 0x000f, 0x0013 }, + { 0x000f, 0x0014 }, + { 0x000f, 0x0015 }, + { 0x000f, 0x0016 }, + { 0x000f, 0x0017 }, + { 0x000f, 0x0018 }, + { 0x000f, 0x0019 }, + { 0x000f, 0x001a }, + { 0x000f, 0x001b }, + { 0x000f, 0x001c }, + { 0x000f, 0x001d }, + { 0x000f, 0x001e }, + { 0x000f, 0x001f }, + { 0x000f, 0x0020 }, + { 0x000f, 0x0021 }, + { 0x000f, 0x0022 }, + { 0x000f, 0x0023 }, + { 0x000f, 0x0024 }, + { 0x000f, 0x0025 }, + { 0x000f, 0x0026 }, + { 0x000f, 0x0027 }, + { 0x000f, 0x0028 }, + { 0x000f, 0x0029 }, + { 0x000e, 0x0015 }, + { 0x000e, 0x0016 }, + { 0x000e, 0x0017 }, + { 0x000e, 0x0018 }, + { 0x000e, 0x0019 }, + { 0x000e, 0x001a }, + { 0x000e, 0x001b }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc40[81][2] = { + { 0x0001, 0x0001 }, + { 0x0002, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000b, 0x0002 }, + { 0x000f, 0x0011 }, + { 0x0011, 0x0000 }, + { 0x0011, 0x0001 }, + { 0x0011, 0x0002 }, + { 0x0011, 0x0003 }, + { 0x0003, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000a, 0x0002 }, + { 0x000e, 0x0009 }, + { 0x0011, 0x0004 }, + { 0x0011, 0x0005 }, + { 0x0011, 0x0006 }, + { 0x0011, 0x0007 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x000d, 0x0005 }, + { 0x0011, 0x0008 }, + { 0x0011, 0x0009 }, + { 0x0011, 0x000a }, + { 0x0011, 0x000b }, + { 0x0011, 0x000c }, + { 0x000b, 0x0003 }, + { 0x000a, 0x0003 }, + { 0x000c, 0x0003 }, + { 0x0011, 0x000d }, + { 0x0011, 0x000e }, + { 0x0011, 0x000f }, + { 0x0011, 0x0010 }, + { 0x0011, 0x0011 }, + { 0x0011, 0x0012 }, + { 0x0011, 0x0013 }, + { 0x0011, 0x0014 }, + { 0x0011, 0x0015 }, + { 0x0011, 0x0016 }, + { 0x0011, 0x0017 }, + { 0x0011, 0x0018 }, + { 0x0011, 0x0019 }, + { 0x0011, 0x001a }, + { 0x0011, 0x001b }, + { 0x0011, 0x001c }, + { 0x0011, 0x001d }, + { 0x0011, 0x001e }, + { 0x0011, 0x001f }, + { 0x0011, 0x0020 }, + { 0x0011, 0x0021 }, + { 0x0011, 0x0022 }, + { 0x0011, 0x0023 }, + { 0x0011, 0x0024 }, + { 0x0011, 0x0025 }, + { 0x0011, 0x0026 }, + { 0x0011, 0x0027 }, + { 0x0011, 0x0028 }, + { 0x0011, 0x0029 }, + { 0x0011, 0x002a }, + { 0x0011, 0x002b }, + { 0x0011, 0x002c }, + { 0x0011, 0x002d }, + { 0x0011, 0x002e }, + { 0x0011, 0x002f }, + { 0x0011, 0x0030 }, + { 0x0011, 0x0031 }, + { 0x0011, 0x0032 }, + { 0x0011, 0x0033 }, + { 0x0011, 0x0034 }, + { 0x0011, 0x0035 }, + { 0x0011, 0x0036 }, + { 0x0011, 0x0037 }, + { 0x0011, 0x0038 }, + { 0x0011, 0x0039 }, + { 0x0011, 0x003a }, + { 0x0011, 0x003b }, + { 0x0010, 0x001e }, + { 0x0010, 0x001f }, + { 0x0010, 0x0020 }, + { 0x0010, 0x0021 }, -const uint16_t c_aauiLCLDHuffEnc43[196][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0009, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x0010, 0x0017 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0009, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x0010, 0x0018 }, - { 0x0012, 0x0050 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0008, 0x0003 }, - { 0x000a, 0x0002 }, - { 0x000d, 0x0004 }, - { 0x0011, 0x002a }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000a, 0x0003 }, - { 0x000c, 0x0005 }, - { 0x000f, 0x000d }, - { 0x0012, 0x0051 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0005 }, - { 0x000f, 0x000e }, - { 0x0011, 0x002b }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0011, 0x002c }, - { 0x000f, 0x000f }, - { 0x0010, 0x0019 }, - { 0x0012, 0x0052 }, - { 0x0012, 0x0053 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0011, 0x002d }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x0013, 0x0054 }, - { 0x0013, 0x0055 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0013, 0x0062 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x0013, 0x0066 }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x0013, 0x008b }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0013, 0x008e }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0013, 0x0091 }, - { 0x0013, 0x0092 }, - { 0x0013, 0x0093 }, - { 0x0013, 0x0094 }, - { 0x0013, 0x0095 }, - { 0x0013, 0x0096 }, - { 0x0013, 0x0097 }, - { 0x0013, 0x0098 }, - { 0x0013, 0x0099 }, - { 0x0013, 0x009a }, - { 0x0013, 0x009b }, - { 0x0013, 0x009c }, - { 0x0013, 0x009d }, - { 0x0013, 0x009e }, - { 0x0013, 0x009f }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc41[100][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x0011, 0x0014 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0002, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x0010, 0x000b }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x000d, 0x0002 }, + { 0x0011, 0x0015 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000d, 0x0003 }, + { 0x0010, 0x000c }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0010, 0x000d }, + { 0x000f, 0x0007 }, + { 0x0012, 0x0027 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, -const uint16_t c_aauiLCLDHuffEnc44[289][2] = - { - { 0x0001, 0x0001 }, - { 0x0003, 0x0001 }, - { 0x0006, 0x0002 }, - { 0x0008, 0x0002 }, - { 0x000b, 0x0002 }, - { 0x000f, 0x000a }, - { 0x0011, 0x0022 }, - { 0x0014, 0x0000 }, - { 0x0014, 0x0001 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0014, 0x0006 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0014, 0x0009 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x000b, 0x0003 }, - { 0x000e, 0x0007 }, - { 0x0012, 0x003f }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0014, 0x000c }, - { 0x0014, 0x000d }, - { 0x0014, 0x000e }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0014, 0x0013 }, - { 0x0006, 0x0003 }, - { 0x0005, 0x0003 }, - { 0x0007, 0x0003 }, - { 0x0009, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000f, 0x000b }, - { 0x0012, 0x0040 }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, - { 0x0014, 0x001a }, - { 0x0014, 0x001b }, - { 0x0014, 0x001c }, - { 0x0014, 0x001d }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0009, 0x0003 }, - { 0x000b, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x0010, 0x0013 }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0014, 0x0020 }, - { 0x0014, 0x0021 }, - { 0x0014, 0x0022 }, - { 0x0014, 0x0023 }, - { 0x0014, 0x0024 }, - { 0x0014, 0x0025 }, - { 0x0014, 0x0026 }, - { 0x0014, 0x0027 }, - { 0x0014, 0x0028 }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000e, 0x0008 }, - { 0x0011, 0x0023 }, - { 0x0012, 0x0041 }, - { 0x0014, 0x0029 }, - { 0x0014, 0x002a }, - { 0x0013, 0x007b }, - { 0x0014, 0x002b }, - { 0x0014, 0x002c }, - { 0x0014, 0x002d }, - { 0x0014, 0x002e }, - { 0x0014, 0x002f }, - { 0x0014, 0x0030 }, - { 0x0014, 0x0031 }, - { 0x0014, 0x0032 }, - { 0x000f, 0x000c }, - { 0x000e, 0x0009 }, - { 0x000f, 0x000d }, - { 0x0011, 0x0024 }, - { 0x0012, 0x0042 }, - { 0x0014, 0x0033 }, - { 0x0014, 0x0034 }, - { 0x0014, 0x0035 }, - { 0x0014, 0x0036 }, - { 0x0014, 0x0037 }, - { 0x0014, 0x0038 }, - { 0x0014, 0x0039 }, - { 0x0014, 0x003a }, - { 0x0014, 0x003b }, - { 0x0014, 0x003c }, - { 0x0014, 0x003d }, - { 0x0014, 0x003e }, - { 0x0013, 0x007c }, - { 0x0011, 0x0025 }, - { 0x0012, 0x0043 }, - { 0x0014, 0x003f }, - { 0x0014, 0x0040 }, - { 0x0014, 0x0041 }, - { 0x0014, 0x0042 }, - { 0x0014, 0x0043 }, - { 0x0014, 0x0044 }, - { 0x0014, 0x0045 }, - { 0x0014, 0x0046 }, - { 0x0014, 0x0047 }, - { 0x0014, 0x0048 }, - { 0x0014, 0x0049 }, - { 0x0014, 0x004a }, - { 0x0014, 0x004b }, - { 0x0014, 0x004c }, - { 0x0014, 0x004d }, - { 0x0014, 0x004e }, - { 0x0014, 0x004f }, - { 0x0014, 0x0050 }, - { 0x0014, 0x0051 }, - { 0x0014, 0x0052 }, - { 0x0014, 0x0053 }, - { 0x0014, 0x0054 }, - { 0x0014, 0x0055 }, - { 0x0014, 0x0056 }, - { 0x0014, 0x0057 }, - { 0x0014, 0x0058 }, - { 0x0014, 0x0059 }, - { 0x0014, 0x005a }, - { 0x0014, 0x005b }, - { 0x0014, 0x005c }, - { 0x0014, 0x005d }, - { 0x0014, 0x005e }, - { 0x0014, 0x005f }, - { 0x0014, 0x0060 }, - { 0x0014, 0x0061 }, - { 0x0014, 0x0062 }, - { 0x0014, 0x0063 }, - { 0x0014, 0x0064 }, - { 0x0014, 0x0065 }, - { 0x0014, 0x0066 }, - { 0x0014, 0x0067 }, - { 0x0014, 0x0068 }, - { 0x0014, 0x0069 }, - { 0x0014, 0x006a }, - { 0x0014, 0x006b }, - { 0x0014, 0x006c }, - { 0x0014, 0x006d }, - { 0x0014, 0x006e }, - { 0x0014, 0x006f }, - { 0x0014, 0x0070 }, - { 0x0014, 0x0071 }, - { 0x0014, 0x0072 }, - { 0x0014, 0x0073 }, - { 0x0014, 0x0074 }, - { 0x0014, 0x0075 }, - { 0x0014, 0x0076 }, - { 0x0014, 0x0077 }, - { 0x0014, 0x0078 }, - { 0x0014, 0x0079 }, - { 0x0014, 0x007a }, - { 0x0014, 0x007b }, - { 0x0014, 0x007c }, - { 0x0014, 0x007d }, - { 0x0014, 0x007e }, - { 0x0014, 0x007f }, - { 0x0014, 0x0080 }, - { 0x0014, 0x0081 }, - { 0x0014, 0x0082 }, - { 0x0014, 0x0083 }, - { 0x0014, 0x0084 }, - { 0x0014, 0x0085 }, - { 0x0014, 0x0086 }, - { 0x0014, 0x0087 }, - { 0x0014, 0x0088 }, - { 0x0014, 0x0089 }, - { 0x0014, 0x008a }, - { 0x0014, 0x008b }, - { 0x0014, 0x008c }, - { 0x0014, 0x008d }, - { 0x0014, 0x008e }, - { 0x0014, 0x008f }, - { 0x0014, 0x0090 }, - { 0x0014, 0x0091 }, - { 0x0014, 0x0092 }, - { 0x0014, 0x0093 }, - { 0x0014, 0x0094 }, - { 0x0014, 0x0095 }, - { 0x0014, 0x0096 }, - { 0x0014, 0x0097 }, - { 0x0014, 0x0098 }, - { 0x0014, 0x0099 }, - { 0x0014, 0x009a }, - { 0x0014, 0x009b }, - { 0x0014, 0x009c }, - { 0x0014, 0x009d }, - { 0x0014, 0x009e }, - { 0x0014, 0x009f }, - { 0x0014, 0x00a0 }, - { 0x0014, 0x00a1 }, - { 0x0014, 0x00a2 }, - { 0x0014, 0x00a3 }, - { 0x0014, 0x00a4 }, - { 0x0014, 0x00a5 }, - { 0x0014, 0x00a6 }, - { 0x0014, 0x00a7 }, - { 0x0014, 0x00a8 }, - { 0x0014, 0x00a9 }, - { 0x0014, 0x00aa }, - { 0x0014, 0x00ab }, - { 0x0014, 0x00ac }, - { 0x0014, 0x00ad }, - { 0x0014, 0x00ae }, - { 0x0014, 0x00af }, - { 0x0014, 0x00b0 }, - { 0x0014, 0x00b1 }, - { 0x0014, 0x00b2 }, - { 0x0014, 0x00b3 }, - { 0x0014, 0x00b4 }, - { 0x0014, 0x00b5 }, - { 0x0014, 0x00b6 }, - { 0x0014, 0x00b7 }, - { 0x0014, 0x00b8 }, - { 0x0014, 0x00b9 }, - { 0x0014, 0x00ba }, - { 0x0014, 0x00bb }, - { 0x0014, 0x00bc }, - { 0x0014, 0x00bd }, - { 0x0014, 0x00be }, - { 0x0014, 0x00bf }, - { 0x0014, 0x00c0 }, - { 0x0014, 0x00c1 }, - { 0x0014, 0x00c2 }, - { 0x0014, 0x00c3 }, - { 0x0014, 0x00c4 }, - { 0x0014, 0x00c5 }, - { 0x0014, 0x00c6 }, - { 0x0014, 0x00c7 }, - { 0x0014, 0x00c8 }, - { 0x0014, 0x00c9 }, - { 0x0014, 0x00ca }, - { 0x0014, 0x00cb }, - { 0x0014, 0x00cc }, - { 0x0014, 0x00cd }, - { 0x0014, 0x00ce }, - { 0x0014, 0x00cf }, - { 0x0014, 0x00d0 }, - { 0x0014, 0x00d1 }, - { 0x0014, 0x00d2 }, - { 0x0014, 0x00d3 }, - { 0x0014, 0x00d4 }, - { 0x0014, 0x00d5 }, - { 0x0014, 0x00d6 }, - { 0x0014, 0x00d7 }, - { 0x0014, 0x00d8 }, - { 0x0014, 0x00d9 }, - { 0x0014, 0x00da }, - { 0x0014, 0x00db }, - { 0x0014, 0x00dc }, - { 0x0014, 0x00dd }, - { 0x0014, 0x00de }, - { 0x0014, 0x00df }, - { 0x0014, 0x00e0 }, - { 0x0014, 0x00e1 }, - { 0x0014, 0x00e2 }, - { 0x0014, 0x00e3 }, - { 0x0014, 0x00e4 }, - { 0x0014, 0x00e5 }, - { 0x0014, 0x00e6 }, - { 0x0014, 0x00e7 }, - { 0x0014, 0x00e8 }, - { 0x0014, 0x00e9 }, - { 0x0014, 0x00ea }, - { 0x0014, 0x00eb }, - { 0x0014, 0x00ec }, - { 0x0014, 0x00ed }, - { 0x0014, 0x00ee }, - { 0x0014, 0x00ef }, - { 0x0014, 0x00f0 }, - { 0x0014, 0x00f1 }, - { 0x0014, 0x00f2 }, - { 0x0014, 0x00f3 }, - { 0x0014, 0x00f4 }, - { 0x0014, 0x00f5 }, - { 0x0013, 0x007d }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc42[169][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000e, 0x0006 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0009, 0x0002 }, + { 0x000d, 0x0004 }, + { 0x0010, 0x0013 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0008, 0x0002 }, + { 0x000b, 0x0002 }, + { 0x000f, 0x000b }, + { 0x0011, 0x0025 }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0009, 0x0003 }, + { 0x0008, 0x0003 }, + { 0x000b, 0x0003 }, + { 0x000d, 0x0005 }, + { 0x0010, 0x0014 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0007 }, + { 0x0010, 0x0015 }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0012, 0x0045 }, + { 0x0013, 0x0027 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x0013, 0x0054 }, + { 0x0013, 0x0055 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0013, 0x0062 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x0013, 0x0066 }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0012, 0x0046 }, + { 0x0012, 0x0047 }, + { 0x0012, 0x0048 }, + { 0x0012, 0x0049 }, +}; -const uint16_t c_aauiLCLDHuffEnc45[324][2] = - { - { 0x0002, 0x0002 }, - { 0x0003, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0007, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000c, 0x0005 }, - { 0x0010, 0x0025 }, - { 0x0012, 0x0088 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0006, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x000b, 0x0004 }, - { 0x000f, 0x0014 }, - { 0x0011, 0x0048 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0005, 0x0005 }, - { 0x0004, 0x0003 }, - { 0x0006, 0x0004 }, - { 0x0007, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000d, 0x0007 }, - { 0x000f, 0x0015 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0007, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0005 }, - { 0x0009, 0x0005 }, - { 0x000b, 0x0005 }, - { 0x000d, 0x0008 }, - { 0x0010, 0x0026 }, - { 0x0012, 0x0089 }, - { 0x0012, 0x008a }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x000a, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000d, 0x0009 }, - { 0x000f, 0x0016 }, - { 0x0011, 0x0049 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x000c, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0007 }, - { 0x000e, 0x000d }, - { 0x0010, 0x0027 }, - { 0x0012, 0x008b }, - { 0x0012, 0x008c }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x000f, 0x0017 }, - { 0x000f, 0x0018 }, - { 0x000f, 0x0019 }, - { 0x0012, 0x008d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0012, 0x008e }, - { 0x0012, 0x008f }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x0013, 0x0054 }, - { 0x0013, 0x0055 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0013, 0x0062 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x0013, 0x0066 }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x0013, 0x008b }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0013, 0x008e }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0013, 0x0091 }, - { 0x0013, 0x0092 }, - { 0x0013, 0x0093 }, - { 0x0013, 0x0094 }, - { 0x0013, 0x0095 }, - { 0x0013, 0x0096 }, - { 0x0013, 0x0097 }, - { 0x0013, 0x0098 }, - { 0x0013, 0x0099 }, - { 0x0013, 0x009a }, - { 0x0013, 0x009b }, - { 0x0013, 0x009c }, - { 0x0013, 0x009d }, - { 0x0013, 0x009e }, - { 0x0013, 0x009f }, - { 0x0013, 0x00a0 }, - { 0x0013, 0x00a1 }, - { 0x0013, 0x00a2 }, - { 0x0013, 0x00a3 }, - { 0x0013, 0x00a4 }, - { 0x0013, 0x00a5 }, - { 0x0013, 0x00a6 }, - { 0x0013, 0x00a7 }, - { 0x0013, 0x00a8 }, - { 0x0013, 0x00a9 }, - { 0x0013, 0x00aa }, - { 0x0013, 0x00ab }, - { 0x0013, 0x00ac }, - { 0x0013, 0x00ad }, - { 0x0013, 0x00ae }, - { 0x0013, 0x00af }, - { 0x0013, 0x00b0 }, - { 0x0013, 0x00b1 }, - { 0x0013, 0x00b2 }, - { 0x0013, 0x00b3 }, - { 0x0013, 0x00b4 }, - { 0x0013, 0x00b5 }, - { 0x0013, 0x00b6 }, - { 0x0013, 0x00b7 }, - { 0x0013, 0x00b8 }, - { 0x0013, 0x00b9 }, - { 0x0013, 0x00ba }, - { 0x0013, 0x00bb }, - { 0x0013, 0x00bc }, - { 0x0013, 0x00bd }, - { 0x0013, 0x00be }, - { 0x0013, 0x00bf }, - { 0x0013, 0x00c0 }, - { 0x0013, 0x00c1 }, - { 0x0013, 0x00c2 }, - { 0x0013, 0x00c3 }, - { 0x0013, 0x00c4 }, - { 0x0013, 0x00c5 }, - { 0x0013, 0x00c6 }, - { 0x0013, 0x00c7 }, - { 0x0013, 0x00c8 }, - { 0x0013, 0x00c9 }, - { 0x0013, 0x00ca }, - { 0x0013, 0x00cb }, - { 0x0013, 0x00cc }, - { 0x0013, 0x00cd }, - { 0x0013, 0x00ce }, - { 0x0013, 0x00cf }, - { 0x0013, 0x00d0 }, - { 0x0013, 0x00d1 }, - { 0x0013, 0x00d2 }, - { 0x0013, 0x00d3 }, - { 0x0013, 0x00d4 }, - { 0x0013, 0x00d5 }, - { 0x0013, 0x00d6 }, - { 0x0013, 0x00d7 }, - { 0x0013, 0x00d8 }, - { 0x0013, 0x00d9 }, - { 0x0013, 0x00da }, - { 0x0013, 0x00db }, - { 0x0013, 0x00dc }, - { 0x0013, 0x00dd }, - { 0x0013, 0x00de }, - { 0x0013, 0x00df }, - { 0x0013, 0x00e0 }, - { 0x0013, 0x00e1 }, - { 0x0013, 0x00e2 }, - { 0x0013, 0x00e3 }, - { 0x0013, 0x00e4 }, - { 0x0013, 0x00e5 }, - { 0x0013, 0x00e6 }, - { 0x0013, 0x00e7 }, - { 0x0013, 0x00e8 }, - { 0x0013, 0x00e9 }, - { 0x0013, 0x00ea }, - { 0x0013, 0x00eb }, - { 0x0013, 0x00ec }, - { 0x0013, 0x00ed }, - { 0x0013, 0x00ee }, - { 0x0013, 0x00ef }, - { 0x0013, 0x00f0 }, - { 0x0013, 0x00f1 }, - { 0x0013, 0x00f2 }, - { 0x0013, 0x00f3 }, - { 0x0013, 0x00f4 }, - { 0x0013, 0x00f5 }, - { 0x0013, 0x00f6 }, - { 0x0013, 0x00f7 }, - { 0x0013, 0x00f8 }, - { 0x0013, 0x00f9 }, - { 0x0013, 0x00fa }, - { 0x0013, 0x00fb }, - { 0x0013, 0x00fc }, - { 0x0013, 0x00fd }, - { 0x0013, 0x00fe }, - { 0x0013, 0x00ff }, - { 0x0013, 0x0100 }, - { 0x0013, 0x0101 }, - { 0x0013, 0x0102 }, - { 0x0013, 0x0103 }, - { 0x0013, 0x0104 }, - { 0x0013, 0x0105 }, - { 0x0013, 0x0106 }, - { 0x0013, 0x0107 }, - { 0x0013, 0x0108 }, - { 0x0013, 0x0109 }, - { 0x0013, 0x010a }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0013, 0x010f }, +const UWord16 c_aauiLCLDHuffEnc43[196][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0009, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x0010, 0x0017 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0009, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x0010, 0x0018 }, + { 0x0012, 0x0050 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0008, 0x0003 }, + { 0x000a, 0x0002 }, + { 0x000d, 0x0004 }, + { 0x0011, 0x002a }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000a, 0x0003 }, + { 0x000c, 0x0005 }, + { 0x000f, 0x000d }, + { 0x0012, 0x0051 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0005 }, + { 0x000f, 0x000e }, + { 0x0011, 0x002b }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0011, 0x002c }, + { 0x000f, 0x000f }, + { 0x0010, 0x0019 }, + { 0x0012, 0x0052 }, + { 0x0012, 0x0053 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0011, 0x002d }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x0013, 0x0054 }, + { 0x0013, 0x0055 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0013, 0x0062 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x0013, 0x0066 }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x0013, 0x008b }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0013, 0x008e }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0013, 0x0091 }, + { 0x0013, 0x0092 }, + { 0x0013, 0x0093 }, + { 0x0013, 0x0094 }, + { 0x0013, 0x0095 }, + { 0x0013, 0x0096 }, + { 0x0013, 0x0097 }, + { 0x0013, 0x0098 }, + { 0x0013, 0x0099 }, + { 0x0013, 0x009a }, + { 0x0013, 0x009b }, + { 0x0013, 0x009c }, + { 0x0013, 0x009d }, + { 0x0013, 0x009e }, + { 0x0013, 0x009f }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc46[400][2] = - { - { 0x0002, 0x0002 }, - { 0x0003, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000d, 0x000a }, - { 0x000f, 0x0018 }, - { 0x0012, 0x00a6 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0006, 0x0004 }, - { 0x0008, 0x0004 }, - { 0x000a, 0x0006 }, - { 0x000c, 0x0008 }, - { 0x000e, 0x0011 }, - { 0x0012, 0x00a7 }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0007, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000d, 0x000b }, - { 0x000f, 0x0019 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0007, 0x0006 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0005 }, - { 0x000a, 0x0007 }, - { 0x000c, 0x0009 }, - { 0x000e, 0x0012 }, - { 0x000f, 0x001a }, - { 0x0012, 0x00a8 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0009, 0x0007 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x000a, 0x0008 }, - { 0x000b, 0x0008 }, - { 0x000d, 0x000c }, - { 0x000e, 0x0013 }, - { 0x0010, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x000b, 0x0009 }, - { 0x000a, 0x0009 }, - { 0x000b, 0x000a }, - { 0x000b, 0x000b }, - { 0x000d, 0x000d }, - { 0x000f, 0x001b }, - { 0x0010, 0x002d }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x000d, 0x000e }, - { 0x000c, 0x000a }, - { 0x000c, 0x000b }, - { 0x000d, 0x000f }, - { 0x000f, 0x001c }, - { 0x000f, 0x001d }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x000f, 0x001e }, - { 0x000f, 0x001f }, - { 0x000f, 0x0020 }, - { 0x000f, 0x0021 }, - { 0x0010, 0x002e }, - { 0x0012, 0x00a9 }, - { 0x0013, 0x0054 }, - { 0x0013, 0x0055 }, - { 0x0012, 0x00aa }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0010, 0x002f }, - { 0x0013, 0x0062 }, - { 0x0011, 0x0057 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x0013, 0x0066 }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x0013, 0x008b }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0013, 0x008e }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0013, 0x0091 }, - { 0x0013, 0x0092 }, - { 0x0013, 0x0093 }, - { 0x0013, 0x0094 }, - { 0x0013, 0x0095 }, - { 0x0013, 0x0096 }, - { 0x0013, 0x0097 }, - { 0x0013, 0x0098 }, - { 0x0013, 0x0099 }, - { 0x0013, 0x009a }, - { 0x0013, 0x009b }, - { 0x0013, 0x009c }, - { 0x0013, 0x009d }, - { 0x0013, 0x009e }, - { 0x0013, 0x009f }, - { 0x0013, 0x00a0 }, - { 0x0013, 0x00a1 }, - { 0x0013, 0x00a2 }, - { 0x0013, 0x00a3 }, - { 0x0013, 0x00a4 }, - { 0x0013, 0x00a5 }, - { 0x0013, 0x00a6 }, - { 0x0013, 0x00a7 }, - { 0x0013, 0x00a8 }, - { 0x0013, 0x00a9 }, - { 0x0013, 0x00aa }, - { 0x0013, 0x00ab }, - { 0x0013, 0x00ac }, - { 0x0013, 0x00ad }, - { 0x0013, 0x00ae }, - { 0x0013, 0x00af }, - { 0x0013, 0x00b0 }, - { 0x0013, 0x00b1 }, - { 0x0013, 0x00b2 }, - { 0x0013, 0x00b3 }, - { 0x0013, 0x00b4 }, - { 0x0013, 0x00b5 }, - { 0x0013, 0x00b6 }, - { 0x0013, 0x00b7 }, - { 0x0013, 0x00b8 }, - { 0x0013, 0x00b9 }, - { 0x0013, 0x00ba }, - { 0x0013, 0x00bb }, - { 0x0013, 0x00bc }, - { 0x0013, 0x00bd }, - { 0x0013, 0x00be }, - { 0x0013, 0x00bf }, - { 0x0013, 0x00c0 }, - { 0x0013, 0x00c1 }, - { 0x0013, 0x00c2 }, - { 0x0013, 0x00c3 }, - { 0x0013, 0x00c4 }, - { 0x0013, 0x00c5 }, - { 0x0013, 0x00c6 }, - { 0x0013, 0x00c7 }, - { 0x0013, 0x00c8 }, - { 0x0013, 0x00c9 }, - { 0x0013, 0x00ca }, - { 0x0013, 0x00cb }, - { 0x0013, 0x00cc }, - { 0x0013, 0x00cd }, - { 0x0013, 0x00ce }, - { 0x0013, 0x00cf }, - { 0x0013, 0x00d0 }, - { 0x0013, 0x00d1 }, - { 0x0013, 0x00d2 }, - { 0x0013, 0x00d3 }, - { 0x0013, 0x00d4 }, - { 0x0013, 0x00d5 }, - { 0x0013, 0x00d6 }, - { 0x0013, 0x00d7 }, - { 0x0013, 0x00d8 }, - { 0x0013, 0x00d9 }, - { 0x0013, 0x00da }, - { 0x0013, 0x00db }, - { 0x0013, 0x00dc }, - { 0x0013, 0x00dd }, - { 0x0013, 0x00de }, - { 0x0013, 0x00df }, - { 0x0013, 0x00e0 }, - { 0x0013, 0x00e1 }, - { 0x0013, 0x00e2 }, - { 0x0013, 0x00e3 }, - { 0x0013, 0x00e4 }, - { 0x0013, 0x00e5 }, - { 0x0013, 0x00e6 }, - { 0x0013, 0x00e7 }, - { 0x0013, 0x00e8 }, - { 0x0013, 0x00e9 }, - { 0x0013, 0x00ea }, - { 0x0013, 0x00eb }, - { 0x0013, 0x00ec }, - { 0x0013, 0x00ed }, - { 0x0013, 0x00ee }, - { 0x0013, 0x00ef }, - { 0x0013, 0x00f0 }, - { 0x0013, 0x00f1 }, - { 0x0013, 0x00f2 }, - { 0x0013, 0x00f3 }, - { 0x0013, 0x00f4 }, - { 0x0013, 0x00f5 }, - { 0x0013, 0x00f6 }, - { 0x0013, 0x00f7 }, - { 0x0013, 0x00f8 }, - { 0x0013, 0x00f9 }, - { 0x0013, 0x00fa }, - { 0x0013, 0x00fb }, - { 0x0013, 0x00fc }, - { 0x0013, 0x00fd }, - { 0x0013, 0x00fe }, - { 0x0013, 0x00ff }, - { 0x0013, 0x0100 }, - { 0x0013, 0x0101 }, - { 0x0013, 0x0102 }, - { 0x0013, 0x0103 }, - { 0x0013, 0x0104 }, - { 0x0013, 0x0105 }, - { 0x0013, 0x0106 }, - { 0x0013, 0x0107 }, - { 0x0013, 0x0108 }, - { 0x0013, 0x0109 }, - { 0x0013, 0x010a }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0013, 0x010f }, - { 0x0013, 0x0110 }, - { 0x0013, 0x0111 }, - { 0x0013, 0x0112 }, - { 0x0013, 0x0113 }, - { 0x0013, 0x0114 }, - { 0x0013, 0x0115 }, - { 0x0013, 0x0116 }, - { 0x0013, 0x0117 }, - { 0x0013, 0x0118 }, - { 0x0013, 0x0119 }, - { 0x0013, 0x011a }, - { 0x0013, 0x011b }, - { 0x0013, 0x011c }, - { 0x0013, 0x011d }, - { 0x0013, 0x011e }, - { 0x0013, 0x011f }, - { 0x0013, 0x0120 }, - { 0x0013, 0x0121 }, - { 0x0013, 0x0122 }, - { 0x0013, 0x0123 }, - { 0x0013, 0x0124 }, - { 0x0013, 0x0125 }, - { 0x0013, 0x0126 }, - { 0x0013, 0x0127 }, - { 0x0013, 0x0128 }, - { 0x0013, 0x0129 }, - { 0x0013, 0x012a }, - { 0x0013, 0x012b }, - { 0x0013, 0x012c }, - { 0x0013, 0x012d }, - { 0x0013, 0x012e }, - { 0x0013, 0x012f }, - { 0x0013, 0x0130 }, - { 0x0013, 0x0131 }, - { 0x0013, 0x0132 }, - { 0x0013, 0x0133 }, - { 0x0013, 0x0134 }, - { 0x0013, 0x0135 }, - { 0x0013, 0x0136 }, - { 0x0013, 0x0137 }, - { 0x0013, 0x0138 }, - { 0x0013, 0x0139 }, - { 0x0013, 0x013a }, - { 0x0013, 0x013b }, - { 0x0013, 0x013c }, - { 0x0013, 0x013d }, - { 0x0013, 0x013e }, - { 0x0013, 0x013f }, - { 0x0013, 0x0140 }, - { 0x0013, 0x0141 }, - { 0x0013, 0x0142 }, - { 0x0013, 0x0143 }, - { 0x0013, 0x0144 }, - { 0x0013, 0x0145 }, - { 0x0013, 0x0146 }, - { 0x0013, 0x0147 }, - { 0x0013, 0x0148 }, - { 0x0013, 0x0149 }, - { 0x0013, 0x014a }, - { 0x0013, 0x014b }, - { 0x0012, 0x00ab }, - { 0x0012, 0x00ac }, - { 0x0012, 0x00ad }, - }; +const UWord16 c_aauiLCLDHuffEnc44[289][2] = { + { 0x0001, 0x0001 }, + { 0x0003, 0x0001 }, + { 0x0006, 0x0002 }, + { 0x0008, 0x0002 }, + { 0x000b, 0x0002 }, + { 0x000f, 0x000a }, + { 0x0011, 0x0022 }, + { 0x0014, 0x0000 }, + { 0x0014, 0x0001 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0014, 0x0006 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0014, 0x0009 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x000b, 0x0003 }, + { 0x000e, 0x0007 }, + { 0x0012, 0x003f }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0014, 0x000c }, + { 0x0014, 0x000d }, + { 0x0014, 0x000e }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0014, 0x0013 }, + { 0x0006, 0x0003 }, + { 0x0005, 0x0003 }, + { 0x0007, 0x0003 }, + { 0x0009, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000f, 0x000b }, + { 0x0012, 0x0040 }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, + { 0x0014, 0x001a }, + { 0x0014, 0x001b }, + { 0x0014, 0x001c }, + { 0x0014, 0x001d }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0009, 0x0003 }, + { 0x000b, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x0010, 0x0013 }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0014, 0x0020 }, + { 0x0014, 0x0021 }, + { 0x0014, 0x0022 }, + { 0x0014, 0x0023 }, + { 0x0014, 0x0024 }, + { 0x0014, 0x0025 }, + { 0x0014, 0x0026 }, + { 0x0014, 0x0027 }, + { 0x0014, 0x0028 }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000e, 0x0008 }, + { 0x0011, 0x0023 }, + { 0x0012, 0x0041 }, + { 0x0014, 0x0029 }, + { 0x0014, 0x002a }, + { 0x0013, 0x007b }, + { 0x0014, 0x002b }, + { 0x0014, 0x002c }, + { 0x0014, 0x002d }, + { 0x0014, 0x002e }, + { 0x0014, 0x002f }, + { 0x0014, 0x0030 }, + { 0x0014, 0x0031 }, + { 0x0014, 0x0032 }, + { 0x000f, 0x000c }, + { 0x000e, 0x0009 }, + { 0x000f, 0x000d }, + { 0x0011, 0x0024 }, + { 0x0012, 0x0042 }, + { 0x0014, 0x0033 }, + { 0x0014, 0x0034 }, + { 0x0014, 0x0035 }, + { 0x0014, 0x0036 }, + { 0x0014, 0x0037 }, + { 0x0014, 0x0038 }, + { 0x0014, 0x0039 }, + { 0x0014, 0x003a }, + { 0x0014, 0x003b }, + { 0x0014, 0x003c }, + { 0x0014, 0x003d }, + { 0x0014, 0x003e }, + { 0x0013, 0x007c }, + { 0x0011, 0x0025 }, + { 0x0012, 0x0043 }, + { 0x0014, 0x003f }, + { 0x0014, 0x0040 }, + { 0x0014, 0x0041 }, + { 0x0014, 0x0042 }, + { 0x0014, 0x0043 }, + { 0x0014, 0x0044 }, + { 0x0014, 0x0045 }, + { 0x0014, 0x0046 }, + { 0x0014, 0x0047 }, + { 0x0014, 0x0048 }, + { 0x0014, 0x0049 }, + { 0x0014, 0x004a }, + { 0x0014, 0x004b }, + { 0x0014, 0x004c }, + { 0x0014, 0x004d }, + { 0x0014, 0x004e }, + { 0x0014, 0x004f }, + { 0x0014, 0x0050 }, + { 0x0014, 0x0051 }, + { 0x0014, 0x0052 }, + { 0x0014, 0x0053 }, + { 0x0014, 0x0054 }, + { 0x0014, 0x0055 }, + { 0x0014, 0x0056 }, + { 0x0014, 0x0057 }, + { 0x0014, 0x0058 }, + { 0x0014, 0x0059 }, + { 0x0014, 0x005a }, + { 0x0014, 0x005b }, + { 0x0014, 0x005c }, + { 0x0014, 0x005d }, + { 0x0014, 0x005e }, + { 0x0014, 0x005f }, + { 0x0014, 0x0060 }, + { 0x0014, 0x0061 }, + { 0x0014, 0x0062 }, + { 0x0014, 0x0063 }, + { 0x0014, 0x0064 }, + { 0x0014, 0x0065 }, + { 0x0014, 0x0066 }, + { 0x0014, 0x0067 }, + { 0x0014, 0x0068 }, + { 0x0014, 0x0069 }, + { 0x0014, 0x006a }, + { 0x0014, 0x006b }, + { 0x0014, 0x006c }, + { 0x0014, 0x006d }, + { 0x0014, 0x006e }, + { 0x0014, 0x006f }, + { 0x0014, 0x0070 }, + { 0x0014, 0x0071 }, + { 0x0014, 0x0072 }, + { 0x0014, 0x0073 }, + { 0x0014, 0x0074 }, + { 0x0014, 0x0075 }, + { 0x0014, 0x0076 }, + { 0x0014, 0x0077 }, + { 0x0014, 0x0078 }, + { 0x0014, 0x0079 }, + { 0x0014, 0x007a }, + { 0x0014, 0x007b }, + { 0x0014, 0x007c }, + { 0x0014, 0x007d }, + { 0x0014, 0x007e }, + { 0x0014, 0x007f }, + { 0x0014, 0x0080 }, + { 0x0014, 0x0081 }, + { 0x0014, 0x0082 }, + { 0x0014, 0x0083 }, + { 0x0014, 0x0084 }, + { 0x0014, 0x0085 }, + { 0x0014, 0x0086 }, + { 0x0014, 0x0087 }, + { 0x0014, 0x0088 }, + { 0x0014, 0x0089 }, + { 0x0014, 0x008a }, + { 0x0014, 0x008b }, + { 0x0014, 0x008c }, + { 0x0014, 0x008d }, + { 0x0014, 0x008e }, + { 0x0014, 0x008f }, + { 0x0014, 0x0090 }, + { 0x0014, 0x0091 }, + { 0x0014, 0x0092 }, + { 0x0014, 0x0093 }, + { 0x0014, 0x0094 }, + { 0x0014, 0x0095 }, + { 0x0014, 0x0096 }, + { 0x0014, 0x0097 }, + { 0x0014, 0x0098 }, + { 0x0014, 0x0099 }, + { 0x0014, 0x009a }, + { 0x0014, 0x009b }, + { 0x0014, 0x009c }, + { 0x0014, 0x009d }, + { 0x0014, 0x009e }, + { 0x0014, 0x009f }, + { 0x0014, 0x00a0 }, + { 0x0014, 0x00a1 }, + { 0x0014, 0x00a2 }, + { 0x0014, 0x00a3 }, + { 0x0014, 0x00a4 }, + { 0x0014, 0x00a5 }, + { 0x0014, 0x00a6 }, + { 0x0014, 0x00a7 }, + { 0x0014, 0x00a8 }, + { 0x0014, 0x00a9 }, + { 0x0014, 0x00aa }, + { 0x0014, 0x00ab }, + { 0x0014, 0x00ac }, + { 0x0014, 0x00ad }, + { 0x0014, 0x00ae }, + { 0x0014, 0x00af }, + { 0x0014, 0x00b0 }, + { 0x0014, 0x00b1 }, + { 0x0014, 0x00b2 }, + { 0x0014, 0x00b3 }, + { 0x0014, 0x00b4 }, + { 0x0014, 0x00b5 }, + { 0x0014, 0x00b6 }, + { 0x0014, 0x00b7 }, + { 0x0014, 0x00b8 }, + { 0x0014, 0x00b9 }, + { 0x0014, 0x00ba }, + { 0x0014, 0x00bb }, + { 0x0014, 0x00bc }, + { 0x0014, 0x00bd }, + { 0x0014, 0x00be }, + { 0x0014, 0x00bf }, + { 0x0014, 0x00c0 }, + { 0x0014, 0x00c1 }, + { 0x0014, 0x00c2 }, + { 0x0014, 0x00c3 }, + { 0x0014, 0x00c4 }, + { 0x0014, 0x00c5 }, + { 0x0014, 0x00c6 }, + { 0x0014, 0x00c7 }, + { 0x0014, 0x00c8 }, + { 0x0014, 0x00c9 }, + { 0x0014, 0x00ca }, + { 0x0014, 0x00cb }, + { 0x0014, 0x00cc }, + { 0x0014, 0x00cd }, + { 0x0014, 0x00ce }, + { 0x0014, 0x00cf }, + { 0x0014, 0x00d0 }, + { 0x0014, 0x00d1 }, + { 0x0014, 0x00d2 }, + { 0x0014, 0x00d3 }, + { 0x0014, 0x00d4 }, + { 0x0014, 0x00d5 }, + { 0x0014, 0x00d6 }, + { 0x0014, 0x00d7 }, + { 0x0014, 0x00d8 }, + { 0x0014, 0x00d9 }, + { 0x0014, 0x00da }, + { 0x0014, 0x00db }, + { 0x0014, 0x00dc }, + { 0x0014, 0x00dd }, + { 0x0014, 0x00de }, + { 0x0014, 0x00df }, + { 0x0014, 0x00e0 }, + { 0x0014, 0x00e1 }, + { 0x0014, 0x00e2 }, + { 0x0014, 0x00e3 }, + { 0x0014, 0x00e4 }, + { 0x0014, 0x00e5 }, + { 0x0014, 0x00e6 }, + { 0x0014, 0x00e7 }, + { 0x0014, 0x00e8 }, + { 0x0014, 0x00e9 }, + { 0x0014, 0x00ea }, + { 0x0014, 0x00eb }, + { 0x0014, 0x00ec }, + { 0x0014, 0x00ed }, + { 0x0014, 0x00ee }, + { 0x0014, 0x00ef }, + { 0x0014, 0x00f0 }, + { 0x0014, 0x00f1 }, + { 0x0014, 0x00f2 }, + { 0x0014, 0x00f3 }, + { 0x0014, 0x00f4 }, + { 0x0014, 0x00f5 }, + { 0x0013, 0x007d }, -const uint16_t c_aauiLCLDHuffEnc47[576][2] = - { - { 0x0002, 0x0003 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0005 }, - { 0x0006, 0x0004 }, - { 0x0008, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000c, 0x000b }, - { 0x000d, 0x000d }, - { 0x0010, 0x0041 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0004, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000d, 0x000e }, - { 0x000f, 0x0025 }, - { 0x000f, 0x0026 }, - { 0x0012, 0x00f6 }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0005, 0x0006 }, - { 0x0004, 0x0005 }, - { 0x0005, 0x0007 }, - { 0x0006, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0009, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000d, 0x000f }, - { 0x000f, 0x0027 }, - { 0x0012, 0x00f7 }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0007, 0x0006 }, - { 0x0009, 0x0008 }, - { 0x000a, 0x0008 }, - { 0x000c, 0x000c }, - { 0x000e, 0x0017 }, - { 0x0010, 0x0042 }, - { 0x0012, 0x00f8 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0008, 0x0008 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0009 }, - { 0x0009, 0x0009 }, - { 0x000a, 0x0009 }, - { 0x000b, 0x0009 }, - { 0x000d, 0x0010 }, - { 0x000f, 0x0028 }, - { 0x000f, 0x0029 }, - { 0x0011, 0x007f }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x000a, 0x000a }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x000a, 0x000b }, - { 0x000b, 0x000a }, - { 0x000d, 0x0011 }, - { 0x000f, 0x002a }, - { 0x0010, 0x0043 }, - { 0x0012, 0x00f9 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x0013, 0x0054 }, - { 0x000b, 0x000b }, - { 0x000b, 0x000c }, - { 0x000b, 0x000d }, - { 0x000c, 0x000d }, - { 0x000d, 0x0012 }, - { 0x000e, 0x0018 }, - { 0x0010, 0x0044 }, - { 0x0013, 0x0055 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0013, 0x0062 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x000e, 0x0019 }, - { 0x000d, 0x0013 }, - { 0x000d, 0x0014 }, - { 0x000d, 0x0015 }, - { 0x000f, 0x002b }, - { 0x0010, 0x0045 }, - { 0x0013, 0x0066 }, - { 0x0012, 0x00fa }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0010, 0x0046 }, - { 0x000f, 0x002c }, - { 0x000f, 0x002d }, - { 0x0010, 0x0047 }, - { 0x0011, 0x0080 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x0010, 0x0048 }, - { 0x0010, 0x0049 }, - { 0x0011, 0x0081 }, - { 0x0013, 0x008b }, - { 0x0012, 0x00fb }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0013, 0x008e }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0013, 0x0091 }, - { 0x0013, 0x0092 }, - { 0x0013, 0x0093 }, - { 0x0013, 0x0094 }, - { 0x0013, 0x0095 }, - { 0x0013, 0x0096 }, - { 0x0013, 0x0097 }, - { 0x0013, 0x0098 }, - { 0x0013, 0x0099 }, - { 0x0013, 0x009a }, - { 0x0013, 0x009b }, - { 0x0013, 0x009c }, - { 0x0013, 0x009d }, - { 0x0013, 0x009e }, - { 0x0013, 0x009f }, - { 0x0013, 0x00a0 }, - { 0x0012, 0x00fc }, - { 0x0013, 0x00a1 }, - { 0x0013, 0x00a2 }, - { 0x0013, 0x00a3 }, - { 0x0013, 0x00a4 }, - { 0x0013, 0x00a5 }, - { 0x0013, 0x00a6 }, - { 0x0013, 0x00a7 }, - { 0x0013, 0x00a8 }, - { 0x0013, 0x00a9 }, - { 0x0013, 0x00aa }, - { 0x0013, 0x00ab }, - { 0x0013, 0x00ac }, - { 0x0013, 0x00ad }, - { 0x0013, 0x00ae }, - { 0x0013, 0x00af }, - { 0x0013, 0x00b0 }, - { 0x0013, 0x00b1 }, - { 0x0013, 0x00b2 }, - { 0x0013, 0x00b3 }, - { 0x0013, 0x00b4 }, - { 0x0013, 0x00b5 }, - { 0x0013, 0x00b6 }, - { 0x0013, 0x00b7 }, - { 0x0013, 0x00b8 }, - { 0x0013, 0x00b9 }, - { 0x0013, 0x00ba }, - { 0x0013, 0x00bb }, - { 0x0013, 0x00bc }, - { 0x0013, 0x00bd }, - { 0x0013, 0x00be }, - { 0x0013, 0x00bf }, - { 0x0013, 0x00c0 }, - { 0x0013, 0x00c1 }, - { 0x0013, 0x00c2 }, - { 0x0013, 0x00c3 }, - { 0x0013, 0x00c4 }, - { 0x0013, 0x00c5 }, - { 0x0013, 0x00c6 }, - { 0x0013, 0x00c7 }, - { 0x0013, 0x00c8 }, - { 0x0013, 0x00c9 }, - { 0x0013, 0x00ca }, - { 0x0013, 0x00cb }, - { 0x0013, 0x00cc }, - { 0x0013, 0x00cd }, - { 0x0013, 0x00ce }, - { 0x0013, 0x00cf }, - { 0x0013, 0x00d0 }, - { 0x0013, 0x00d1 }, - { 0x0013, 0x00d2 }, - { 0x0013, 0x00d3 }, - { 0x0013, 0x00d4 }, - { 0x0013, 0x00d5 }, - { 0x0013, 0x00d6 }, - { 0x0013, 0x00d7 }, - { 0x0013, 0x00d8 }, - { 0x0013, 0x00d9 }, - { 0x0013, 0x00da }, - { 0x0013, 0x00db }, - { 0x0013, 0x00dc }, - { 0x0013, 0x00dd }, - { 0x0013, 0x00de }, - { 0x0013, 0x00df }, - { 0x0013, 0x00e0 }, - { 0x0013, 0x00e1 }, - { 0x0013, 0x00e2 }, - { 0x0013, 0x00e3 }, - { 0x0013, 0x00e4 }, - { 0x0013, 0x00e5 }, - { 0x0013, 0x00e6 }, - { 0x0013, 0x00e7 }, - { 0x0013, 0x00e8 }, - { 0x0013, 0x00e9 }, - { 0x0013, 0x00ea }, - { 0x0013, 0x00eb }, - { 0x0013, 0x00ec }, - { 0x0013, 0x00ed }, - { 0x0013, 0x00ee }, - { 0x0013, 0x00ef }, - { 0x0013, 0x00f0 }, - { 0x0013, 0x00f1 }, - { 0x0013, 0x00f2 }, - { 0x0013, 0x00f3 }, - { 0x0013, 0x00f4 }, - { 0x0013, 0x00f5 }, - { 0x0013, 0x00f6 }, - { 0x0013, 0x00f7 }, - { 0x0013, 0x00f8 }, - { 0x0013, 0x00f9 }, - { 0x0013, 0x00fa }, - { 0x0013, 0x00fb }, - { 0x0013, 0x00fc }, - { 0x0013, 0x00fd }, - { 0x0013, 0x00fe }, - { 0x0013, 0x00ff }, - { 0x0013, 0x0100 }, - { 0x0013, 0x0101 }, - { 0x0013, 0x0102 }, - { 0x0013, 0x0103 }, - { 0x0013, 0x0104 }, - { 0x0013, 0x0105 }, - { 0x0013, 0x0106 }, - { 0x0013, 0x0107 }, - { 0x0013, 0x0108 }, - { 0x0013, 0x0109 }, - { 0x0013, 0x010a }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0013, 0x010f }, - { 0x0013, 0x0110 }, - { 0x0013, 0x0111 }, - { 0x0013, 0x0112 }, - { 0x0013, 0x0113 }, - { 0x0013, 0x0114 }, - { 0x0013, 0x0115 }, - { 0x0013, 0x0116 }, - { 0x0013, 0x0117 }, - { 0x0013, 0x0118 }, - { 0x0013, 0x0119 }, - { 0x0013, 0x011a }, - { 0x0013, 0x011b }, - { 0x0013, 0x011c }, - { 0x0013, 0x011d }, - { 0x0013, 0x011e }, - { 0x0013, 0x011f }, - { 0x0013, 0x0120 }, - { 0x0013, 0x0121 }, - { 0x0013, 0x0122 }, - { 0x0013, 0x0123 }, - { 0x0013, 0x0124 }, - { 0x0013, 0x0125 }, - { 0x0013, 0x0126 }, - { 0x0013, 0x0127 }, - { 0x0013, 0x0128 }, - { 0x0013, 0x0129 }, - { 0x0013, 0x012a }, - { 0x0013, 0x012b }, - { 0x0013, 0x012c }, - { 0x0013, 0x012d }, - { 0x0013, 0x012e }, - { 0x0013, 0x012f }, - { 0x0013, 0x0130 }, - { 0x0013, 0x0131 }, - { 0x0013, 0x0132 }, - { 0x0013, 0x0133 }, - { 0x0013, 0x0134 }, - { 0x0013, 0x0135 }, - { 0x0013, 0x0136 }, - { 0x0013, 0x0137 }, - { 0x0013, 0x0138 }, - { 0x0013, 0x0139 }, - { 0x0013, 0x013a }, - { 0x0013, 0x013b }, - { 0x0013, 0x013c }, - { 0x0013, 0x013d }, - { 0x0013, 0x013e }, - { 0x0013, 0x013f }, - { 0x0013, 0x0140 }, - { 0x0013, 0x0141 }, - { 0x0013, 0x0142 }, - { 0x0013, 0x0143 }, - { 0x0013, 0x0144 }, - { 0x0013, 0x0145 }, - { 0x0013, 0x0146 }, - { 0x0013, 0x0147 }, - { 0x0013, 0x0148 }, - { 0x0013, 0x0149 }, - { 0x0013, 0x014a }, - { 0x0013, 0x014b }, - { 0x0013, 0x014c }, - { 0x0013, 0x014d }, - { 0x0013, 0x014e }, - { 0x0013, 0x014f }, - { 0x0013, 0x0150 }, - { 0x0013, 0x0151 }, - { 0x0013, 0x0152 }, - { 0x0013, 0x0153 }, - { 0x0013, 0x0154 }, - { 0x0013, 0x0155 }, - { 0x0013, 0x0156 }, - { 0x0013, 0x0157 }, - { 0x0013, 0x0158 }, - { 0x0013, 0x0159 }, - { 0x0013, 0x015a }, - { 0x0013, 0x015b }, - { 0x0013, 0x015c }, - { 0x0013, 0x015d }, - { 0x0013, 0x015e }, - { 0x0013, 0x015f }, - { 0x0013, 0x0160 }, - { 0x0013, 0x0161 }, - { 0x0013, 0x0162 }, - { 0x0013, 0x0163 }, - { 0x0013, 0x0164 }, - { 0x0013, 0x0165 }, - { 0x0013, 0x0166 }, - { 0x0013, 0x0167 }, - { 0x0013, 0x0168 }, - { 0x0013, 0x0169 }, - { 0x0013, 0x016a }, - { 0x0013, 0x016b }, - { 0x0013, 0x016c }, - { 0x0013, 0x016d }, - { 0x0013, 0x016e }, - { 0x0013, 0x016f }, - { 0x0013, 0x0170 }, - { 0x0013, 0x0171 }, - { 0x0013, 0x0172 }, - { 0x0013, 0x0173 }, - { 0x0013, 0x0174 }, - { 0x0013, 0x0175 }, - { 0x0013, 0x0176 }, - { 0x0013, 0x0177 }, - { 0x0013, 0x0178 }, - { 0x0013, 0x0179 }, - { 0x0013, 0x017a }, - { 0x0013, 0x017b }, - { 0x0013, 0x017c }, - { 0x0013, 0x017d }, - { 0x0013, 0x017e }, - { 0x0013, 0x017f }, - { 0x0013, 0x0180 }, - { 0x0013, 0x0181 }, - { 0x0013, 0x0182 }, - { 0x0013, 0x0183 }, - { 0x0013, 0x0184 }, - { 0x0013, 0x0185 }, - { 0x0013, 0x0186 }, - { 0x0013, 0x0187 }, - { 0x0013, 0x0188 }, - { 0x0013, 0x0189 }, - { 0x0013, 0x018a }, - { 0x0013, 0x018b }, - { 0x0013, 0x018c }, - { 0x0013, 0x018d }, - { 0x0013, 0x018e }, - { 0x0013, 0x018f }, - { 0x0013, 0x0190 }, - { 0x0013, 0x0191 }, - { 0x0013, 0x0192 }, - { 0x0013, 0x0193 }, - { 0x0013, 0x0194 }, - { 0x0013, 0x0195 }, - { 0x0013, 0x0196 }, - { 0x0013, 0x0197 }, - { 0x0013, 0x0198 }, - { 0x0013, 0x0199 }, - { 0x0013, 0x019a }, - { 0x0013, 0x019b }, - { 0x0013, 0x019c }, - { 0x0013, 0x019d }, - { 0x0013, 0x019e }, - { 0x0013, 0x019f }, - { 0x0013, 0x01a0 }, - { 0x0013, 0x01a1 }, - { 0x0013, 0x01a2 }, - { 0x0013, 0x01a3 }, - { 0x0013, 0x01a4 }, - { 0x0013, 0x01a5 }, - { 0x0013, 0x01a6 }, - { 0x0013, 0x01a7 }, - { 0x0013, 0x01a8 }, - { 0x0013, 0x01a9 }, - { 0x0013, 0x01aa }, - { 0x0013, 0x01ab }, - { 0x0013, 0x01ac }, - { 0x0013, 0x01ad }, - { 0x0013, 0x01ae }, - { 0x0013, 0x01af }, - { 0x0013, 0x01b0 }, - { 0x0013, 0x01b1 }, - { 0x0013, 0x01b2 }, - { 0x0013, 0x01b3 }, - { 0x0013, 0x01b4 }, - { 0x0013, 0x01b5 }, - { 0x0013, 0x01b6 }, - { 0x0013, 0x01b7 }, - { 0x0013, 0x01b8 }, - { 0x0013, 0x01b9 }, - { 0x0013, 0x01ba }, - { 0x0013, 0x01bb }, - { 0x0013, 0x01bc }, - { 0x0013, 0x01bd }, - { 0x0013, 0x01be }, - { 0x0013, 0x01bf }, - { 0x0013, 0x01c0 }, - { 0x0013, 0x01c1 }, - { 0x0013, 0x01c2 }, - { 0x0013, 0x01c3 }, - { 0x0013, 0x01c4 }, - { 0x0013, 0x01c5 }, - { 0x0013, 0x01c6 }, - { 0x0013, 0x01c7 }, - { 0x0013, 0x01c8 }, - { 0x0013, 0x01c9 }, - { 0x0013, 0x01ca }, - { 0x0013, 0x01cb }, - { 0x0013, 0x01cc }, - { 0x0013, 0x01cd }, - { 0x0013, 0x01ce }, - { 0x0013, 0x01cf }, - { 0x0013, 0x01d0 }, - { 0x0013, 0x01d1 }, - { 0x0013, 0x01d2 }, - { 0x0013, 0x01d3 }, - { 0x0013, 0x01d4 }, - { 0x0013, 0x01d5 }, - { 0x0013, 0x01d6 }, - { 0x0013, 0x01d7 }, - { 0x0013, 0x01d8 }, - { 0x0013, 0x01d9 }, - { 0x0013, 0x01da }, - { 0x0013, 0x01db }, - { 0x0013, 0x01dc }, - { 0x0013, 0x01dd }, - { 0x0013, 0x01de }, - { 0x0013, 0x01df }, - { 0x0013, 0x01e0 }, - { 0x0013, 0x01e1 }, - { 0x0013, 0x01e2 }, - { 0x0013, 0x01e3 }, - { 0x0013, 0x01e4 }, - { 0x0013, 0x01e5 }, - { 0x0013, 0x01e6 }, - { 0x0013, 0x01e7 }, - { 0x0013, 0x01e8 }, - { 0x0013, 0x01e9 }, - { 0x0013, 0x01ea }, - { 0x0013, 0x01eb }, - { 0x0012, 0x00fd }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc48[729][2] = - { - { 0x0002, 0x0003 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0006 }, - { 0x0006, 0x0006 }, - { 0x0008, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x000b, 0x000b }, - { 0x000c, 0x000d }, - { 0x000f, 0x0030 }, - { 0x0010, 0x0055 }, - { 0x0012, 0x0136 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0013, 0x000f }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0005, 0x0007 }, - { 0x0006, 0x0007 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0007 }, - { 0x000a, 0x0008 }, - { 0x000c, 0x000e }, - { 0x000d, 0x0012 }, - { 0x000f, 0x0031 }, - { 0x0011, 0x00a0 }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0005, 0x0008 }, - { 0x0004, 0x0005 }, - { 0x0005, 0x0009 }, - { 0x0006, 0x0008 }, - { 0x0007, 0x0008 }, - { 0x0008, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000c, 0x000f }, - { 0x000d, 0x0013 }, - { 0x000f, 0x0032 }, - { 0x0011, 0x00a1 }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0007, 0x0009 }, - { 0x0008, 0x0009 }, - { 0x0009, 0x0008 }, - { 0x000b, 0x000c }, - { 0x000d, 0x0014 }, - { 0x000e, 0x001d }, - { 0x000f, 0x0033 }, - { 0x0012, 0x0137 }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0008, 0x000a }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0008, 0x000b }, - { 0x0009, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000c, 0x0010 }, - { 0x000d, 0x0015 }, - { 0x000f, 0x0034 }, - { 0x0010, 0x0056 }, - { 0x0012, 0x0138 }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0009, 0x000a }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0009, 0x000b }, - { 0x000a, 0x000b }, - { 0x000c, 0x0011 }, - { 0x000d, 0x0016 }, - { 0x000e, 0x001e }, - { 0x0010, 0x0057 }, - { 0x0011, 0x00a2 }, - { 0x0011, 0x00a3 }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x0013, 0x0054 }, - { 0x0013, 0x0055 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x000b, 0x000d }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000b, 0x000e }, - { 0x000c, 0x0012 }, - { 0x000d, 0x0017 }, - { 0x000e, 0x001f }, - { 0x0010, 0x0058 }, - { 0x0012, 0x0139 }, - { 0x0011, 0x00a4 }, - { 0x0012, 0x013a }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0013, 0x0062 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x0013, 0x0066 }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x000c, 0x0013 }, - { 0x000b, 0x000f }, - { 0x000c, 0x0014 }, - { 0x000c, 0x0015 }, - { 0x000d, 0x0018 }, - { 0x000e, 0x0020 }, - { 0x000f, 0x0035 }, - { 0x0012, 0x013b }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x000e, 0x0021 }, - { 0x000d, 0x0019 }, - { 0x000e, 0x0022 }, - { 0x000e, 0x0023 }, - { 0x000f, 0x0036 }, - { 0x0010, 0x0059 }, - { 0x0011, 0x00a5 }, - { 0x0013, 0x0083 }, - { 0x0011, 0x00a6 }, - { 0x0012, 0x013c }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x0013, 0x008b }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0013, 0x008e }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0013, 0x0091 }, - { 0x0013, 0x0092 }, - { 0x0013, 0x0093 }, - { 0x0013, 0x0094 }, - { 0x0010, 0x005a }, - { 0x000f, 0x0037 }, - { 0x000f, 0x0038 }, - { 0x000f, 0x0039 }, - { 0x0010, 0x005b }, - { 0x0010, 0x005c }, - { 0x0013, 0x0095 }, - { 0x0011, 0x00a7 }, - { 0x0013, 0x0096 }, - { 0x0013, 0x0097 }, - { 0x0013, 0x0098 }, - { 0x0013, 0x0099 }, - { 0x0013, 0x009a }, - { 0x0013, 0x009b }, - { 0x0013, 0x009c }, - { 0x0013, 0x009d }, - { 0x0013, 0x009e }, - { 0x0013, 0x009f }, - { 0x0013, 0x00a0 }, - { 0x0013, 0x00a1 }, - { 0x0013, 0x00a2 }, - { 0x0013, 0x00a3 }, - { 0x0013, 0x00a4 }, - { 0x0013, 0x00a5 }, - { 0x0013, 0x00a6 }, - { 0x0013, 0x00a7 }, - { 0x0013, 0x00a8 }, - { 0x0010, 0x005d }, - { 0x0010, 0x005e }, - { 0x0013, 0x00a9 }, - { 0x0010, 0x005f }, - { 0x0013, 0x00aa }, - { 0x0012, 0x013d }, - { 0x0013, 0x00ab }, - { 0x0013, 0x00ac }, - { 0x0013, 0x00ad }, - { 0x0013, 0x00ae }, - { 0x0013, 0x00af }, - { 0x0013, 0x00b0 }, - { 0x0013, 0x00b1 }, - { 0x0013, 0x00b2 }, - { 0x0013, 0x00b3 }, - { 0x0013, 0x00b4 }, - { 0x0013, 0x00b5 }, - { 0x0013, 0x00b6 }, - { 0x0013, 0x00b7 }, - { 0x0013, 0x00b8 }, - { 0x0013, 0x00b9 }, - { 0x0013, 0x00ba }, - { 0x0013, 0x00bb }, - { 0x0013, 0x00bc }, - { 0x0013, 0x00bd }, - { 0x0013, 0x00be }, - { 0x0013, 0x00bf }, - { 0x0013, 0x00c0 }, - { 0x0011, 0x00a8 }, - { 0x0013, 0x00c1 }, - { 0x0011, 0x00a9 }, - { 0x0013, 0x00c2 }, - { 0x0013, 0x00c3 }, - { 0x0013, 0x00c4 }, - { 0x0013, 0x00c5 }, - { 0x0013, 0x00c6 }, - { 0x0013, 0x00c7 }, - { 0x0013, 0x00c8 }, - { 0x0013, 0x00c9 }, - { 0x0013, 0x00ca }, - { 0x0013, 0x00cb }, - { 0x0013, 0x00cc }, - { 0x0013, 0x00cd }, - { 0x0013, 0x00ce }, - { 0x0013, 0x00cf }, - { 0x0013, 0x00d0 }, - { 0x0013, 0x00d1 }, - { 0x0013, 0x00d2 }, - { 0x0013, 0x00d3 }, - { 0x0013, 0x00d4 }, - { 0x0013, 0x00d5 }, - { 0x0013, 0x00d6 }, - { 0x0013, 0x00d7 }, - { 0x0013, 0x00d8 }, - { 0x0013, 0x00d9 }, - { 0x0013, 0x00da }, - { 0x0012, 0x013e }, - { 0x0013, 0x00db }, - { 0x0013, 0x00dc }, - { 0x0013, 0x00dd }, - { 0x0013, 0x00de }, - { 0x0013, 0x00df }, - { 0x0013, 0x00e0 }, - { 0x0013, 0x00e1 }, - { 0x0013, 0x00e2 }, - { 0x0013, 0x00e3 }, - { 0x0013, 0x00e4 }, - { 0x0013, 0x00e5 }, - { 0x0013, 0x00e6 }, - { 0x0013, 0x00e7 }, - { 0x0013, 0x00e8 }, - { 0x0013, 0x00e9 }, - { 0x0013, 0x00ea }, - { 0x0013, 0x00eb }, - { 0x0013, 0x00ec }, - { 0x0013, 0x00ed }, - { 0x0013, 0x00ee }, - { 0x0013, 0x00ef }, - { 0x0013, 0x00f0 }, - { 0x0013, 0x00f1 }, - { 0x0013, 0x00f2 }, - { 0x0013, 0x00f3 }, - { 0x0013, 0x00f4 }, - { 0x0013, 0x00f5 }, - { 0x0013, 0x00f6 }, - { 0x0013, 0x00f7 }, - { 0x0013, 0x00f8 }, - { 0x0013, 0x00f9 }, - { 0x0013, 0x00fa }, - { 0x0013, 0x00fb }, - { 0x0013, 0x00fc }, - { 0x0013, 0x00fd }, - { 0x0013, 0x00fe }, - { 0x0013, 0x00ff }, - { 0x0013, 0x0100 }, - { 0x0013, 0x0101 }, - { 0x0013, 0x0102 }, - { 0x0013, 0x0103 }, - { 0x0013, 0x0104 }, - { 0x0013, 0x0105 }, - { 0x0013, 0x0106 }, - { 0x0013, 0x0107 }, - { 0x0013, 0x0108 }, - { 0x0013, 0x0109 }, - { 0x0013, 0x010a }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0013, 0x010f }, - { 0x0013, 0x0110 }, - { 0x0013, 0x0111 }, - { 0x0013, 0x0112 }, - { 0x0013, 0x0113 }, - { 0x0013, 0x0114 }, - { 0x0013, 0x0115 }, - { 0x0013, 0x0116 }, - { 0x0013, 0x0117 }, - { 0x0013, 0x0118 }, - { 0x0013, 0x0119 }, - { 0x0013, 0x011a }, - { 0x0013, 0x011b }, - { 0x0013, 0x011c }, - { 0x0013, 0x011d }, - { 0x0013, 0x011e }, - { 0x0013, 0x011f }, - { 0x0013, 0x0120 }, - { 0x0013, 0x0121 }, - { 0x0013, 0x0122 }, - { 0x0013, 0x0123 }, - { 0x0013, 0x0124 }, - { 0x0013, 0x0125 }, - { 0x0013, 0x0126 }, - { 0x0013, 0x0127 }, - { 0x0013, 0x0128 }, - { 0x0013, 0x0129 }, - { 0x0013, 0x012a }, - { 0x0013, 0x012b }, - { 0x0013, 0x012c }, - { 0x0013, 0x012d }, - { 0x0013, 0x012e }, - { 0x0013, 0x012f }, - { 0x0013, 0x0130 }, - { 0x0013, 0x0131 }, - { 0x0013, 0x0132 }, - { 0x0013, 0x0133 }, - { 0x0013, 0x0134 }, - { 0x0013, 0x0135 }, - { 0x0013, 0x0136 }, - { 0x0013, 0x0137 }, - { 0x0013, 0x0138 }, - { 0x0013, 0x0139 }, - { 0x0013, 0x013a }, - { 0x0013, 0x013b }, - { 0x0013, 0x013c }, - { 0x0013, 0x013d }, - { 0x0013, 0x013e }, - { 0x0013, 0x013f }, - { 0x0013, 0x0140 }, - { 0x0013, 0x0141 }, - { 0x0013, 0x0142 }, - { 0x0013, 0x0143 }, - { 0x0013, 0x0144 }, - { 0x0013, 0x0145 }, - { 0x0013, 0x0146 }, - { 0x0013, 0x0147 }, - { 0x0013, 0x0148 }, - { 0x0013, 0x0149 }, - { 0x0013, 0x014a }, - { 0x0013, 0x014b }, - { 0x0013, 0x014c }, - { 0x0013, 0x014d }, - { 0x0013, 0x014e }, - { 0x0013, 0x014f }, - { 0x0013, 0x0150 }, - { 0x0013, 0x0151 }, - { 0x0013, 0x0152 }, - { 0x0013, 0x0153 }, - { 0x0013, 0x0154 }, - { 0x0013, 0x0155 }, - { 0x0013, 0x0156 }, - { 0x0013, 0x0157 }, - { 0x0013, 0x0158 }, - { 0x0013, 0x0159 }, - { 0x0013, 0x015a }, - { 0x0013, 0x015b }, - { 0x0013, 0x015c }, - { 0x0013, 0x015d }, - { 0x0013, 0x015e }, - { 0x0013, 0x015f }, - { 0x0013, 0x0160 }, - { 0x0013, 0x0161 }, - { 0x0013, 0x0162 }, - { 0x0013, 0x0163 }, - { 0x0013, 0x0164 }, - { 0x0013, 0x0165 }, - { 0x0013, 0x0166 }, - { 0x0013, 0x0167 }, - { 0x0013, 0x0168 }, - { 0x0013, 0x0169 }, - { 0x0013, 0x016a }, - { 0x0013, 0x016b }, - { 0x0013, 0x016c }, - { 0x0013, 0x016d }, - { 0x0013, 0x016e }, - { 0x0013, 0x016f }, - { 0x0013, 0x0170 }, - { 0x0013, 0x0171 }, - { 0x0013, 0x0172 }, - { 0x0013, 0x0173 }, - { 0x0013, 0x0174 }, - { 0x0013, 0x0175 }, - { 0x0013, 0x0176 }, - { 0x0013, 0x0177 }, - { 0x0013, 0x0178 }, - { 0x0013, 0x0179 }, - { 0x0013, 0x017a }, - { 0x0013, 0x017b }, - { 0x0013, 0x017c }, - { 0x0013, 0x017d }, - { 0x0013, 0x017e }, - { 0x0013, 0x017f }, - { 0x0013, 0x0180 }, - { 0x0013, 0x0181 }, - { 0x0013, 0x0182 }, - { 0x0013, 0x0183 }, - { 0x0013, 0x0184 }, - { 0x0013, 0x0185 }, - { 0x0013, 0x0186 }, - { 0x0013, 0x0187 }, - { 0x0013, 0x0188 }, - { 0x0013, 0x0189 }, - { 0x0013, 0x018a }, - { 0x0013, 0x018b }, - { 0x0013, 0x018c }, - { 0x0013, 0x018d }, - { 0x0013, 0x018e }, - { 0x0013, 0x018f }, - { 0x0013, 0x0190 }, - { 0x0013, 0x0191 }, - { 0x0013, 0x0192 }, - { 0x0013, 0x0193 }, - { 0x0013, 0x0194 }, - { 0x0013, 0x0195 }, - { 0x0013, 0x0196 }, - { 0x0013, 0x0197 }, - { 0x0013, 0x0198 }, - { 0x0013, 0x0199 }, - { 0x0013, 0x019a }, - { 0x0013, 0x019b }, - { 0x0013, 0x019c }, - { 0x0013, 0x019d }, - { 0x0013, 0x019e }, - { 0x0013, 0x019f }, - { 0x0013, 0x01a0 }, - { 0x0013, 0x01a1 }, - { 0x0013, 0x01a2 }, - { 0x0013, 0x01a3 }, - { 0x0013, 0x01a4 }, - { 0x0013, 0x01a5 }, - { 0x0013, 0x01a6 }, - { 0x0013, 0x01a7 }, - { 0x0013, 0x01a8 }, - { 0x0013, 0x01a9 }, - { 0x0013, 0x01aa }, - { 0x0013, 0x01ab }, - { 0x0013, 0x01ac }, - { 0x0013, 0x01ad }, - { 0x0013, 0x01ae }, - { 0x0013, 0x01af }, - { 0x0013, 0x01b0 }, - { 0x0013, 0x01b1 }, - { 0x0013, 0x01b2 }, - { 0x0013, 0x01b3 }, - { 0x0013, 0x01b4 }, - { 0x0013, 0x01b5 }, - { 0x0013, 0x01b6 }, - { 0x0013, 0x01b7 }, - { 0x0013, 0x01b8 }, - { 0x0013, 0x01b9 }, - { 0x0013, 0x01ba }, - { 0x0013, 0x01bb }, - { 0x0013, 0x01bc }, - { 0x0013, 0x01bd }, - { 0x0013, 0x01be }, - { 0x0013, 0x01bf }, - { 0x0013, 0x01c0 }, - { 0x0013, 0x01c1 }, - { 0x0013, 0x01c2 }, - { 0x0013, 0x01c3 }, - { 0x0013, 0x01c4 }, - { 0x0013, 0x01c5 }, - { 0x0013, 0x01c6 }, - { 0x0013, 0x01c7 }, - { 0x0013, 0x01c8 }, - { 0x0013, 0x01c9 }, - { 0x0013, 0x01ca }, - { 0x0013, 0x01cb }, - { 0x0013, 0x01cc }, - { 0x0013, 0x01cd }, - { 0x0013, 0x01ce }, - { 0x0013, 0x01cf }, - { 0x0013, 0x01d0 }, - { 0x0013, 0x01d1 }, - { 0x0013, 0x01d2 }, - { 0x0013, 0x01d3 }, - { 0x0013, 0x01d4 }, - { 0x0013, 0x01d5 }, - { 0x0013, 0x01d6 }, - { 0x0013, 0x01d7 }, - { 0x0013, 0x01d8 }, - { 0x0013, 0x01d9 }, - { 0x0013, 0x01da }, - { 0x0013, 0x01db }, - { 0x0013, 0x01dc }, - { 0x0013, 0x01dd }, - { 0x0013, 0x01de }, - { 0x0013, 0x01df }, - { 0x0013, 0x01e0 }, - { 0x0013, 0x01e1 }, - { 0x0013, 0x01e2 }, - { 0x0013, 0x01e3 }, - { 0x0013, 0x01e4 }, - { 0x0013, 0x01e5 }, - { 0x0013, 0x01e6 }, - { 0x0013, 0x01e7 }, - { 0x0013, 0x01e8 }, - { 0x0013, 0x01e9 }, - { 0x0013, 0x01ea }, - { 0x0013, 0x01eb }, - { 0x0013, 0x01ec }, - { 0x0013, 0x01ed }, - { 0x0013, 0x01ee }, - { 0x0013, 0x01ef }, - { 0x0013, 0x01f0 }, - { 0x0013, 0x01f1 }, - { 0x0013, 0x01f2 }, - { 0x0013, 0x01f3 }, - { 0x0013, 0x01f4 }, - { 0x0013, 0x01f5 }, - { 0x0013, 0x01f6 }, - { 0x0013, 0x01f7 }, - { 0x0013, 0x01f8 }, - { 0x0013, 0x01f9 }, - { 0x0013, 0x01fa }, - { 0x0013, 0x01fb }, - { 0x0013, 0x01fc }, - { 0x0013, 0x01fd }, - { 0x0013, 0x01fe }, - { 0x0013, 0x01ff }, - { 0x0013, 0x0200 }, - { 0x0013, 0x0201 }, - { 0x0013, 0x0202 }, - { 0x0013, 0x0203 }, - { 0x0013, 0x0204 }, - { 0x0013, 0x0205 }, - { 0x0013, 0x0206 }, - { 0x0013, 0x0207 }, - { 0x0013, 0x0208 }, - { 0x0013, 0x0209 }, - { 0x0013, 0x020a }, - { 0x0013, 0x020b }, - { 0x0013, 0x020c }, - { 0x0013, 0x020d }, - { 0x0013, 0x020e }, - { 0x0013, 0x020f }, - { 0x0013, 0x0210 }, - { 0x0013, 0x0211 }, - { 0x0013, 0x0212 }, - { 0x0013, 0x0213 }, - { 0x0013, 0x0214 }, - { 0x0013, 0x0215 }, - { 0x0013, 0x0216 }, - { 0x0013, 0x0217 }, - { 0x0013, 0x0218 }, - { 0x0013, 0x0219 }, - { 0x0013, 0x021a }, - { 0x0013, 0x021b }, - { 0x0013, 0x021c }, - { 0x0013, 0x021d }, - { 0x0013, 0x021e }, - { 0x0013, 0x021f }, - { 0x0013, 0x0220 }, - { 0x0013, 0x0221 }, - { 0x0013, 0x0222 }, - { 0x0013, 0x0223 }, - { 0x0013, 0x0224 }, - { 0x0013, 0x0225 }, - { 0x0013, 0x0226 }, - { 0x0013, 0x0227 }, - { 0x0013, 0x0228 }, - { 0x0013, 0x0229 }, - { 0x0013, 0x022a }, - { 0x0013, 0x022b }, - { 0x0013, 0x022c }, - { 0x0013, 0x022d }, - { 0x0013, 0x022e }, - { 0x0013, 0x022f }, - { 0x0013, 0x0230 }, - { 0x0013, 0x0231 }, - { 0x0013, 0x0232 }, - { 0x0013, 0x0233 }, - { 0x0013, 0x0234 }, - { 0x0013, 0x0235 }, - { 0x0013, 0x0236 }, - { 0x0013, 0x0237 }, - { 0x0013, 0x0238 }, - { 0x0013, 0x0239 }, - { 0x0013, 0x023a }, - { 0x0013, 0x023b }, - { 0x0013, 0x023c }, - { 0x0013, 0x023d }, - { 0x0013, 0x023e }, - { 0x0013, 0x023f }, - { 0x0013, 0x0240 }, - { 0x0013, 0x0241 }, - { 0x0013, 0x0242 }, - { 0x0013, 0x0243 }, - { 0x0013, 0x0244 }, - { 0x0013, 0x0245 }, - { 0x0013, 0x0246 }, - { 0x0013, 0x0247 }, - { 0x0013, 0x0248 }, - { 0x0013, 0x0249 }, - { 0x0013, 0x024a }, - { 0x0013, 0x024b }, - { 0x0013, 0x024c }, - { 0x0013, 0x024d }, - { 0x0013, 0x024e }, - { 0x0013, 0x024f }, - { 0x0013, 0x0250 }, - { 0x0013, 0x0251 }, - { 0x0013, 0x0252 }, - { 0x0013, 0x0253 }, - { 0x0013, 0x0254 }, - { 0x0013, 0x0255 }, - { 0x0013, 0x0256 }, - { 0x0013, 0x0257 }, - { 0x0013, 0x0258 }, - { 0x0013, 0x0259 }, - { 0x0013, 0x025a }, - { 0x0013, 0x025b }, - { 0x0013, 0x025c }, - { 0x0013, 0x025d }, - { 0x0013, 0x025e }, - { 0x0013, 0x025f }, - { 0x0013, 0x0260 }, - { 0x0013, 0x0261 }, - { 0x0013, 0x0262 }, - { 0x0013, 0x0263 }, - { 0x0013, 0x0264 }, - { 0x0013, 0x0265 }, - { 0x0013, 0x0266 }, - { 0x0013, 0x0267 }, - { 0x0013, 0x0268 }, - { 0x0013, 0x0269 }, - { 0x0013, 0x026a }, - { 0x0013, 0x026b }, - { 0x0012, 0x013f }, - }; +const UWord16 c_aauiLCLDHuffEnc45[324][2] = { + { 0x0002, 0x0002 }, + { 0x0003, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0007, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000c, 0x0005 }, + { 0x0010, 0x0025 }, + { 0x0012, 0x0088 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0006, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x000b, 0x0004 }, + { 0x000f, 0x0014 }, + { 0x0011, 0x0048 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0005, 0x0005 }, + { 0x0004, 0x0003 }, + { 0x0006, 0x0004 }, + { 0x0007, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000d, 0x0007 }, + { 0x000f, 0x0015 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0007, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0005 }, + { 0x0009, 0x0005 }, + { 0x000b, 0x0005 }, + { 0x000d, 0x0008 }, + { 0x0010, 0x0026 }, + { 0x0012, 0x0089 }, + { 0x0012, 0x008a }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x000a, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000d, 0x0009 }, + { 0x000f, 0x0016 }, + { 0x0011, 0x0049 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x000c, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0007 }, + { 0x000e, 0x000d }, + { 0x0010, 0x0027 }, + { 0x0012, 0x008b }, + { 0x0012, 0x008c }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x000f, 0x0017 }, + { 0x000f, 0x0018 }, + { 0x000f, 0x0019 }, + { 0x0012, 0x008d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0012, 0x008e }, + { 0x0012, 0x008f }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x0013, 0x0054 }, + { 0x0013, 0x0055 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0013, 0x0062 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x0013, 0x0066 }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x0013, 0x008b }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0013, 0x008e }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0013, 0x0091 }, + { 0x0013, 0x0092 }, + { 0x0013, 0x0093 }, + { 0x0013, 0x0094 }, + { 0x0013, 0x0095 }, + { 0x0013, 0x0096 }, + { 0x0013, 0x0097 }, + { 0x0013, 0x0098 }, + { 0x0013, 0x0099 }, + { 0x0013, 0x009a }, + { 0x0013, 0x009b }, + { 0x0013, 0x009c }, + { 0x0013, 0x009d }, + { 0x0013, 0x009e }, + { 0x0013, 0x009f }, + { 0x0013, 0x00a0 }, + { 0x0013, 0x00a1 }, + { 0x0013, 0x00a2 }, + { 0x0013, 0x00a3 }, + { 0x0013, 0x00a4 }, + { 0x0013, 0x00a5 }, + { 0x0013, 0x00a6 }, + { 0x0013, 0x00a7 }, + { 0x0013, 0x00a8 }, + { 0x0013, 0x00a9 }, + { 0x0013, 0x00aa }, + { 0x0013, 0x00ab }, + { 0x0013, 0x00ac }, + { 0x0013, 0x00ad }, + { 0x0013, 0x00ae }, + { 0x0013, 0x00af }, + { 0x0013, 0x00b0 }, + { 0x0013, 0x00b1 }, + { 0x0013, 0x00b2 }, + { 0x0013, 0x00b3 }, + { 0x0013, 0x00b4 }, + { 0x0013, 0x00b5 }, + { 0x0013, 0x00b6 }, + { 0x0013, 0x00b7 }, + { 0x0013, 0x00b8 }, + { 0x0013, 0x00b9 }, + { 0x0013, 0x00ba }, + { 0x0013, 0x00bb }, + { 0x0013, 0x00bc }, + { 0x0013, 0x00bd }, + { 0x0013, 0x00be }, + { 0x0013, 0x00bf }, + { 0x0013, 0x00c0 }, + { 0x0013, 0x00c1 }, + { 0x0013, 0x00c2 }, + { 0x0013, 0x00c3 }, + { 0x0013, 0x00c4 }, + { 0x0013, 0x00c5 }, + { 0x0013, 0x00c6 }, + { 0x0013, 0x00c7 }, + { 0x0013, 0x00c8 }, + { 0x0013, 0x00c9 }, + { 0x0013, 0x00ca }, + { 0x0013, 0x00cb }, + { 0x0013, 0x00cc }, + { 0x0013, 0x00cd }, + { 0x0013, 0x00ce }, + { 0x0013, 0x00cf }, + { 0x0013, 0x00d0 }, + { 0x0013, 0x00d1 }, + { 0x0013, 0x00d2 }, + { 0x0013, 0x00d3 }, + { 0x0013, 0x00d4 }, + { 0x0013, 0x00d5 }, + { 0x0013, 0x00d6 }, + { 0x0013, 0x00d7 }, + { 0x0013, 0x00d8 }, + { 0x0013, 0x00d9 }, + { 0x0013, 0x00da }, + { 0x0013, 0x00db }, + { 0x0013, 0x00dc }, + { 0x0013, 0x00dd }, + { 0x0013, 0x00de }, + { 0x0013, 0x00df }, + { 0x0013, 0x00e0 }, + { 0x0013, 0x00e1 }, + { 0x0013, 0x00e2 }, + { 0x0013, 0x00e3 }, + { 0x0013, 0x00e4 }, + { 0x0013, 0x00e5 }, + { 0x0013, 0x00e6 }, + { 0x0013, 0x00e7 }, + { 0x0013, 0x00e8 }, + { 0x0013, 0x00e9 }, + { 0x0013, 0x00ea }, + { 0x0013, 0x00eb }, + { 0x0013, 0x00ec }, + { 0x0013, 0x00ed }, + { 0x0013, 0x00ee }, + { 0x0013, 0x00ef }, + { 0x0013, 0x00f0 }, + { 0x0013, 0x00f1 }, + { 0x0013, 0x00f2 }, + { 0x0013, 0x00f3 }, + { 0x0013, 0x00f4 }, + { 0x0013, 0x00f5 }, + { 0x0013, 0x00f6 }, + { 0x0013, 0x00f7 }, + { 0x0013, 0x00f8 }, + { 0x0013, 0x00f9 }, + { 0x0013, 0x00fa }, + { 0x0013, 0x00fb }, + { 0x0013, 0x00fc }, + { 0x0013, 0x00fd }, + { 0x0013, 0x00fe }, + { 0x0013, 0x00ff }, + { 0x0013, 0x0100 }, + { 0x0013, 0x0101 }, + { 0x0013, 0x0102 }, + { 0x0013, 0x0103 }, + { 0x0013, 0x0104 }, + { 0x0013, 0x0105 }, + { 0x0013, 0x0106 }, + { 0x0013, 0x0107 }, + { 0x0013, 0x0108 }, + { 0x0013, 0x0109 }, + { 0x0013, 0x010a }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0013, 0x010f }, -const uint16_t c_aauiLCLDHuffEnc49[729][2] = - { - { 0x0002, 0x0003 }, - { 0x0003, 0x0003 }, - { 0x0005, 0x0007 }, - { 0x0007, 0x000a }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0009, 0x0009 }, - { 0x000b, 0x000d }, - { 0x000d, 0x0014 }, - { 0x000d, 0x0015 }, - { 0x0010, 0x0052 }, - { 0x0011, 0x0098 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0005, 0x0008 }, - { 0x0006, 0x000a }, - { 0x0007, 0x000b }, - { 0x0008, 0x000b }, - { 0x0008, 0x000c }, - { 0x000a, 0x000a }, - { 0x000b, 0x000e }, - { 0x000d, 0x0016 }, - { 0x000f, 0x0031 }, - { 0x0010, 0x0053 }, - { 0x0012, 0x012a }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0006, 0x000b }, - { 0x0007, 0x000c }, - { 0x0008, 0x000d }, - { 0x0009, 0x000a }, - { 0x000a, 0x000b }, - { 0x000c, 0x000f }, - { 0x000d, 0x0017 }, - { 0x000f, 0x0032 }, - { 0x0010, 0x0054 }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, - { 0x0013, 0x0028 }, - { 0x0013, 0x0029 }, - { 0x0013, 0x002a }, - { 0x0013, 0x002b }, - { 0x0007, 0x000d }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0008, 0x000e }, - { 0x0009, 0x000b }, - { 0x000b, 0x000f }, - { 0x000c, 0x0010 }, - { 0x000e, 0x001d }, - { 0x000f, 0x0033 }, - { 0x0011, 0x0099 }, - { 0x0013, 0x002c }, - { 0x0013, 0x002d }, - { 0x0013, 0x002e }, - { 0x0013, 0x002f }, - { 0x0013, 0x0030 }, - { 0x0013, 0x0031 }, - { 0x0013, 0x0032 }, - { 0x0013, 0x0033 }, - { 0x0013, 0x0034 }, - { 0x0013, 0x0035 }, - { 0x0013, 0x0036 }, - { 0x0013, 0x0037 }, - { 0x0013, 0x0038 }, - { 0x0013, 0x0039 }, - { 0x0013, 0x003a }, - { 0x0008, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0007, 0x0012 }, - { 0x0008, 0x0010 }, - { 0x0009, 0x000c }, - { 0x000a, 0x000c }, - { 0x000c, 0x0011 }, - { 0x000d, 0x0018 }, - { 0x000e, 0x001e }, - { 0x0011, 0x009a }, - { 0x0011, 0x009b }, - { 0x0013, 0x003b }, - { 0x0013, 0x003c }, - { 0x0013, 0x003d }, - { 0x0013, 0x003e }, - { 0x0013, 0x003f }, - { 0x0013, 0x0040 }, - { 0x0013, 0x0041 }, - { 0x0013, 0x0042 }, - { 0x0013, 0x0043 }, - { 0x0013, 0x0044 }, - { 0x0013, 0x0045 }, - { 0x0013, 0x0046 }, - { 0x0013, 0x0047 }, - { 0x0013, 0x0048 }, - { 0x0013, 0x0049 }, - { 0x0008, 0x0011 }, - { 0x0007, 0x0013 }, - { 0x0008, 0x0012 }, - { 0x0008, 0x0013 }, - { 0x0009, 0x000d }, - { 0x000a, 0x000d }, - { 0x000b, 0x0010 }, - { 0x000c, 0x0012 }, - { 0x000e, 0x001f }, - { 0x000e, 0x0020 }, - { 0x0010, 0x0055 }, - { 0x0011, 0x009c }, - { 0x0013, 0x004a }, - { 0x0013, 0x004b }, - { 0x0013, 0x004c }, - { 0x0013, 0x004d }, - { 0x0013, 0x004e }, - { 0x0013, 0x004f }, - { 0x0013, 0x0050 }, - { 0x0013, 0x0051 }, - { 0x0013, 0x0052 }, - { 0x0013, 0x0053 }, - { 0x0013, 0x0054 }, - { 0x0013, 0x0055 }, - { 0x0013, 0x0056 }, - { 0x0013, 0x0057 }, - { 0x0013, 0x0058 }, - { 0x0009, 0x000e }, - { 0x0009, 0x000f }, - { 0x0009, 0x0010 }, - { 0x0009, 0x0011 }, - { 0x000a, 0x000e }, - { 0x000b, 0x0011 }, - { 0x000c, 0x0013 }, - { 0x000d, 0x0019 }, - { 0x000e, 0x0021 }, - { 0x0010, 0x0056 }, - { 0x0010, 0x0057 }, - { 0x0013, 0x0059 }, - { 0x0013, 0x005a }, - { 0x0013, 0x005b }, - { 0x0013, 0x005c }, - { 0x0013, 0x005d }, - { 0x0013, 0x005e }, - { 0x0013, 0x005f }, - { 0x0013, 0x0060 }, - { 0x0013, 0x0061 }, - { 0x0013, 0x0062 }, - { 0x0013, 0x0063 }, - { 0x0013, 0x0064 }, - { 0x0013, 0x0065 }, - { 0x0013, 0x0066 }, - { 0x0013, 0x0067 }, - { 0x0013, 0x0068 }, - { 0x000b, 0x0012 }, - { 0x000a, 0x000f }, - { 0x000a, 0x0010 }, - { 0x000a, 0x0011 }, - { 0x000c, 0x0014 }, - { 0x000c, 0x0015 }, - { 0x000d, 0x001a }, - { 0x000e, 0x0022 }, - { 0x0010, 0x0058 }, - { 0x0010, 0x0059 }, - { 0x0013, 0x0069 }, - { 0x0013, 0x006a }, - { 0x0013, 0x006b }, - { 0x0013, 0x006c }, - { 0x0013, 0x006d }, - { 0x0013, 0x006e }, - { 0x0013, 0x006f }, - { 0x0013, 0x0070 }, - { 0x0013, 0x0071 }, - { 0x0013, 0x0072 }, - { 0x0013, 0x0073 }, - { 0x0013, 0x0074 }, - { 0x0013, 0x0075 }, - { 0x0013, 0x0076 }, - { 0x0013, 0x0077 }, - { 0x0013, 0x0078 }, - { 0x0013, 0x0079 }, - { 0x000c, 0x0016 }, - { 0x000b, 0x0013 }, - { 0x000c, 0x0017 }, - { 0x000c, 0x0018 }, - { 0x000c, 0x0019 }, - { 0x000e, 0x0023 }, - { 0x000e, 0x0024 }, - { 0x000f, 0x0034 }, - { 0x0010, 0x005a }, - { 0x0011, 0x009d }, - { 0x0013, 0x007a }, - { 0x0013, 0x007b }, - { 0x0013, 0x007c }, - { 0x0013, 0x007d }, - { 0x0013, 0x007e }, - { 0x0013, 0x007f }, - { 0x0013, 0x0080 }, - { 0x0013, 0x0081 }, - { 0x0013, 0x0082 }, - { 0x0013, 0x0083 }, - { 0x0013, 0x0084 }, - { 0x0013, 0x0085 }, - { 0x0013, 0x0086 }, - { 0x0013, 0x0087 }, - { 0x0013, 0x0088 }, - { 0x0013, 0x0089 }, - { 0x0013, 0x008a }, - { 0x000e, 0x0025 }, - { 0x000d, 0x001b }, - { 0x000d, 0x001c }, - { 0x000d, 0x001d }, - { 0x000e, 0x0026 }, - { 0x000f, 0x0035 }, - { 0x0010, 0x005b }, - { 0x0011, 0x009e }, - { 0x0011, 0x009f }, - { 0x0012, 0x012b }, - { 0x0013, 0x008b }, - { 0x0013, 0x008c }, - { 0x0013, 0x008d }, - { 0x0013, 0x008e }, - { 0x0013, 0x008f }, - { 0x0013, 0x0090 }, - { 0x0013, 0x0091 }, - { 0x0013, 0x0092 }, - { 0x0013, 0x0093 }, - { 0x0013, 0x0094 }, - { 0x0013, 0x0095 }, - { 0x0013, 0x0096 }, - { 0x0013, 0x0097 }, - { 0x0013, 0x0098 }, - { 0x0013, 0x0099 }, - { 0x0013, 0x009a }, - { 0x0013, 0x009b }, - { 0x0010, 0x005c }, - { 0x000f, 0x0036 }, - { 0x000e, 0x0027 }, - { 0x000f, 0x0037 }, - { 0x000f, 0x0038 }, - { 0x0010, 0x005d }, - { 0x0011, 0x00a0 }, - { 0x0013, 0x009c }, - { 0x0012, 0x012c }, - { 0x0013, 0x009d }, - { 0x0013, 0x009e }, - { 0x0013, 0x009f }, - { 0x0013, 0x00a0 }, - { 0x0013, 0x00a1 }, - { 0x0013, 0x00a2 }, - { 0x0013, 0x00a3 }, - { 0x0013, 0x00a4 }, - { 0x0013, 0x00a5 }, - { 0x0013, 0x00a6 }, - { 0x0013, 0x00a7 }, - { 0x0013, 0x00a8 }, - { 0x0013, 0x00a9 }, - { 0x0013, 0x00aa }, - { 0x0013, 0x00ab }, - { 0x0013, 0x00ac }, - { 0x0013, 0x00ad }, - { 0x0013, 0x00ae }, - { 0x0010, 0x005e }, - { 0x000f, 0x0039 }, - { 0x0010, 0x005f }, - { 0x0010, 0x0060 }, - { 0x0011, 0x00a1 }, - { 0x0010, 0x0061 }, - { 0x0013, 0x00af }, - { 0x0013, 0x00b0 }, - { 0x0012, 0x012d }, - { 0x0013, 0x00b1 }, - { 0x0013, 0x00b2 }, - { 0x0013, 0x00b3 }, - { 0x0013, 0x00b4 }, - { 0x0013, 0x00b5 }, - { 0x0013, 0x00b6 }, - { 0x0013, 0x00b7 }, - { 0x0013, 0x00b8 }, - { 0x0013, 0x00b9 }, - { 0x0013, 0x00ba }, - { 0x0013, 0x00bb }, - { 0x0013, 0x00bc }, - { 0x0013, 0x00bd }, - { 0x0013, 0x00be }, - { 0x0013, 0x00bf }, - { 0x0013, 0x00c0 }, - { 0x0013, 0x00c1 }, - { 0x0013, 0x00c2 }, - { 0x0012, 0x012e }, - { 0x0011, 0x00a2 }, - { 0x0011, 0x00a3 }, - { 0x0013, 0x00c3 }, - { 0x0013, 0x00c4 }, - { 0x0013, 0x00c5 }, - { 0x0013, 0x00c6 }, - { 0x0013, 0x00c7 }, - { 0x0013, 0x00c8 }, - { 0x0013, 0x00c9 }, - { 0x0013, 0x00ca }, - { 0x0013, 0x00cb }, - { 0x0013, 0x00cc }, - { 0x0013, 0x00cd }, - { 0x0013, 0x00ce }, - { 0x0013, 0x00cf }, - { 0x0013, 0x00d0 }, - { 0x0013, 0x00d1 }, - { 0x0013, 0x00d2 }, - { 0x0013, 0x00d3 }, - { 0x0013, 0x00d4 }, - { 0x0013, 0x00d5 }, - { 0x0013, 0x00d6 }, - { 0x0013, 0x00d7 }, - { 0x0013, 0x00d8 }, - { 0x0013, 0x00d9 }, - { 0x0013, 0x00da }, - { 0x0013, 0x00db }, - { 0x0013, 0x00dc }, - { 0x0013, 0x00dd }, - { 0x0013, 0x00de }, - { 0x0013, 0x00df }, - { 0x0012, 0x012f }, - { 0x0013, 0x00e0 }, - { 0x0013, 0x00e1 }, - { 0x0013, 0x00e2 }, - { 0x0013, 0x00e3 }, - { 0x0013, 0x00e4 }, - { 0x0013, 0x00e5 }, - { 0x0013, 0x00e6 }, - { 0x0013, 0x00e7 }, - { 0x0013, 0x00e8 }, - { 0x0013, 0x00e9 }, - { 0x0013, 0x00ea }, - { 0x0013, 0x00eb }, - { 0x0013, 0x00ec }, - { 0x0013, 0x00ed }, - { 0x0013, 0x00ee }, - { 0x0013, 0x00ef }, - { 0x0013, 0x00f0 }, - { 0x0013, 0x00f1 }, - { 0x0013, 0x00f2 }, - { 0x0013, 0x00f3 }, - { 0x0013, 0x00f4 }, - { 0x0013, 0x00f5 }, - { 0x0013, 0x00f6 }, - { 0x0013, 0x00f7 }, - { 0x0013, 0x00f8 }, - { 0x0013, 0x00f9 }, - { 0x0013, 0x00fa }, - { 0x0013, 0x00fb }, - { 0x0013, 0x00fc }, - { 0x0013, 0x00fd }, - { 0x0013, 0x00fe }, - { 0x0013, 0x00ff }, - { 0x0013, 0x0100 }, - { 0x0013, 0x0101 }, - { 0x0013, 0x0102 }, - { 0x0013, 0x0103 }, - { 0x0013, 0x0104 }, - { 0x0013, 0x0105 }, - { 0x0013, 0x0106 }, - { 0x0013, 0x0107 }, - { 0x0013, 0x0108 }, - { 0x0013, 0x0109 }, - { 0x0013, 0x010a }, - { 0x0013, 0x010b }, - { 0x0013, 0x010c }, - { 0x0013, 0x010d }, - { 0x0013, 0x010e }, - { 0x0013, 0x010f }, - { 0x0013, 0x0110 }, - { 0x0013, 0x0111 }, - { 0x0013, 0x0112 }, - { 0x0013, 0x0113 }, - { 0x0013, 0x0114 }, - { 0x0013, 0x0115 }, - { 0x0013, 0x0116 }, - { 0x0013, 0x0117 }, - { 0x0013, 0x0118 }, - { 0x0013, 0x0119 }, - { 0x0013, 0x011a }, - { 0x0013, 0x011b }, - { 0x0013, 0x011c }, - { 0x0013, 0x011d }, - { 0x0013, 0x011e }, - { 0x0013, 0x011f }, - { 0x0013, 0x0120 }, - { 0x0013, 0x0121 }, - { 0x0013, 0x0122 }, - { 0x0013, 0x0123 }, - { 0x0013, 0x0124 }, - { 0x0013, 0x0125 }, - { 0x0013, 0x0126 }, - { 0x0013, 0x0127 }, - { 0x0013, 0x0128 }, - { 0x0013, 0x0129 }, - { 0x0013, 0x012a }, - { 0x0013, 0x012b }, - { 0x0013, 0x012c }, - { 0x0013, 0x012d }, - { 0x0013, 0x012e }, - { 0x0013, 0x012f }, - { 0x0013, 0x0130 }, - { 0x0013, 0x0131 }, - { 0x0013, 0x0132 }, - { 0x0013, 0x0133 }, - { 0x0013, 0x0134 }, - { 0x0013, 0x0135 }, - { 0x0013, 0x0136 }, - { 0x0013, 0x0137 }, - { 0x0013, 0x0138 }, - { 0x0013, 0x0139 }, - { 0x0013, 0x013a }, - { 0x0013, 0x013b }, - { 0x0013, 0x013c }, - { 0x0013, 0x013d }, - { 0x0013, 0x013e }, - { 0x0013, 0x013f }, - { 0x0013, 0x0140 }, - { 0x0013, 0x0141 }, - { 0x0013, 0x0142 }, - { 0x0013, 0x0143 }, - { 0x0013, 0x0144 }, - { 0x0013, 0x0145 }, - { 0x0013, 0x0146 }, - { 0x0013, 0x0147 }, - { 0x0013, 0x0148 }, - { 0x0013, 0x0149 }, - { 0x0013, 0x014a }, - { 0x0013, 0x014b }, - { 0x0013, 0x014c }, - { 0x0013, 0x014d }, - { 0x0013, 0x014e }, - { 0x0013, 0x014f }, - { 0x0013, 0x0150 }, - { 0x0013, 0x0151 }, - { 0x0013, 0x0152 }, - { 0x0013, 0x0153 }, - { 0x0013, 0x0154 }, - { 0x0013, 0x0155 }, - { 0x0013, 0x0156 }, - { 0x0013, 0x0157 }, - { 0x0013, 0x0158 }, - { 0x0013, 0x0159 }, - { 0x0013, 0x015a }, - { 0x0013, 0x015b }, - { 0x0013, 0x015c }, - { 0x0013, 0x015d }, - { 0x0013, 0x015e }, - { 0x0013, 0x015f }, - { 0x0013, 0x0160 }, - { 0x0013, 0x0161 }, - { 0x0013, 0x0162 }, - { 0x0013, 0x0163 }, - { 0x0013, 0x0164 }, - { 0x0013, 0x0165 }, - { 0x0013, 0x0166 }, - { 0x0013, 0x0167 }, - { 0x0013, 0x0168 }, - { 0x0013, 0x0169 }, - { 0x0013, 0x016a }, - { 0x0013, 0x016b }, - { 0x0013, 0x016c }, - { 0x0013, 0x016d }, - { 0x0013, 0x016e }, - { 0x0013, 0x016f }, - { 0x0013, 0x0170 }, - { 0x0013, 0x0171 }, - { 0x0013, 0x0172 }, - { 0x0013, 0x0173 }, - { 0x0013, 0x0174 }, - { 0x0013, 0x0175 }, - { 0x0013, 0x0176 }, - { 0x0013, 0x0177 }, - { 0x0013, 0x0178 }, - { 0x0013, 0x0179 }, - { 0x0013, 0x017a }, - { 0x0013, 0x017b }, - { 0x0013, 0x017c }, - { 0x0013, 0x017d }, - { 0x0013, 0x017e }, - { 0x0013, 0x017f }, - { 0x0013, 0x0180 }, - { 0x0013, 0x0181 }, - { 0x0013, 0x0182 }, - { 0x0013, 0x0183 }, - { 0x0013, 0x0184 }, - { 0x0013, 0x0185 }, - { 0x0013, 0x0186 }, - { 0x0013, 0x0187 }, - { 0x0013, 0x0188 }, - { 0x0013, 0x0189 }, - { 0x0013, 0x018a }, - { 0x0013, 0x018b }, - { 0x0013, 0x018c }, - { 0x0013, 0x018d }, - { 0x0013, 0x018e }, - { 0x0013, 0x018f }, - { 0x0013, 0x0190 }, - { 0x0013, 0x0191 }, - { 0x0013, 0x0192 }, - { 0x0013, 0x0193 }, - { 0x0013, 0x0194 }, - { 0x0013, 0x0195 }, - { 0x0013, 0x0196 }, - { 0x0013, 0x0197 }, - { 0x0013, 0x0198 }, - { 0x0013, 0x0199 }, - { 0x0013, 0x019a }, - { 0x0013, 0x019b }, - { 0x0013, 0x019c }, - { 0x0013, 0x019d }, - { 0x0013, 0x019e }, - { 0x0013, 0x019f }, - { 0x0013, 0x01a0 }, - { 0x0013, 0x01a1 }, - { 0x0013, 0x01a2 }, - { 0x0013, 0x01a3 }, - { 0x0013, 0x01a4 }, - { 0x0013, 0x01a5 }, - { 0x0013, 0x01a6 }, - { 0x0013, 0x01a7 }, - { 0x0013, 0x01a8 }, - { 0x0013, 0x01a9 }, - { 0x0013, 0x01aa }, - { 0x0013, 0x01ab }, - { 0x0013, 0x01ac }, - { 0x0013, 0x01ad }, - { 0x0013, 0x01ae }, - { 0x0013, 0x01af }, - { 0x0013, 0x01b0 }, - { 0x0013, 0x01b1 }, - { 0x0013, 0x01b2 }, - { 0x0013, 0x01b3 }, - { 0x0013, 0x01b4 }, - { 0x0013, 0x01b5 }, - { 0x0013, 0x01b6 }, - { 0x0013, 0x01b7 }, - { 0x0013, 0x01b8 }, - { 0x0013, 0x01b9 }, - { 0x0013, 0x01ba }, - { 0x0013, 0x01bb }, - { 0x0013, 0x01bc }, - { 0x0013, 0x01bd }, - { 0x0013, 0x01be }, - { 0x0013, 0x01bf }, - { 0x0013, 0x01c0 }, - { 0x0013, 0x01c1 }, - { 0x0013, 0x01c2 }, - { 0x0013, 0x01c3 }, - { 0x0013, 0x01c4 }, - { 0x0013, 0x01c5 }, - { 0x0013, 0x01c6 }, - { 0x0013, 0x01c7 }, - { 0x0013, 0x01c8 }, - { 0x0013, 0x01c9 }, - { 0x0013, 0x01ca }, - { 0x0013, 0x01cb }, - { 0x0013, 0x01cc }, - { 0x0013, 0x01cd }, - { 0x0013, 0x01ce }, - { 0x0013, 0x01cf }, - { 0x0013, 0x01d0 }, - { 0x0013, 0x01d1 }, - { 0x0013, 0x01d2 }, - { 0x0013, 0x01d3 }, - { 0x0013, 0x01d4 }, - { 0x0013, 0x01d5 }, - { 0x0013, 0x01d6 }, - { 0x0013, 0x01d7 }, - { 0x0013, 0x01d8 }, - { 0x0013, 0x01d9 }, - { 0x0013, 0x01da }, - { 0x0013, 0x01db }, - { 0x0013, 0x01dc }, - { 0x0013, 0x01dd }, - { 0x0013, 0x01de }, - { 0x0013, 0x01df }, - { 0x0013, 0x01e0 }, - { 0x0013, 0x01e1 }, - { 0x0013, 0x01e2 }, - { 0x0013, 0x01e3 }, - { 0x0013, 0x01e4 }, - { 0x0013, 0x01e5 }, - { 0x0013, 0x01e6 }, - { 0x0013, 0x01e7 }, - { 0x0013, 0x01e8 }, - { 0x0013, 0x01e9 }, - { 0x0013, 0x01ea }, - { 0x0013, 0x01eb }, - { 0x0013, 0x01ec }, - { 0x0013, 0x01ed }, - { 0x0013, 0x01ee }, - { 0x0013, 0x01ef }, - { 0x0013, 0x01f0 }, - { 0x0013, 0x01f1 }, - { 0x0013, 0x01f2 }, - { 0x0013, 0x01f3 }, - { 0x0013, 0x01f4 }, - { 0x0013, 0x01f5 }, - { 0x0013, 0x01f6 }, - { 0x0013, 0x01f7 }, - { 0x0013, 0x01f8 }, - { 0x0013, 0x01f9 }, - { 0x0013, 0x01fa }, - { 0x0013, 0x01fb }, - { 0x0013, 0x01fc }, - { 0x0013, 0x01fd }, - { 0x0013, 0x01fe }, - { 0x0013, 0x01ff }, - { 0x0013, 0x0200 }, - { 0x0013, 0x0201 }, - { 0x0013, 0x0202 }, - { 0x0013, 0x0203 }, - { 0x0013, 0x0204 }, - { 0x0013, 0x0205 }, - { 0x0013, 0x0206 }, - { 0x0013, 0x0207 }, - { 0x0013, 0x0208 }, - { 0x0013, 0x0209 }, - { 0x0013, 0x020a }, - { 0x0013, 0x020b }, - { 0x0013, 0x020c }, - { 0x0013, 0x020d }, - { 0x0013, 0x020e }, - { 0x0013, 0x020f }, - { 0x0013, 0x0210 }, - { 0x0013, 0x0211 }, - { 0x0013, 0x0212 }, - { 0x0013, 0x0213 }, - { 0x0013, 0x0214 }, - { 0x0013, 0x0215 }, - { 0x0013, 0x0216 }, - { 0x0013, 0x0217 }, - { 0x0013, 0x0218 }, - { 0x0013, 0x0219 }, - { 0x0013, 0x021a }, - { 0x0013, 0x021b }, - { 0x0013, 0x021c }, - { 0x0013, 0x021d }, - { 0x0013, 0x021e }, - { 0x0013, 0x021f }, - { 0x0013, 0x0220 }, - { 0x0013, 0x0221 }, - { 0x0013, 0x0222 }, - { 0x0013, 0x0223 }, - { 0x0013, 0x0224 }, - { 0x0013, 0x0225 }, - { 0x0013, 0x0226 }, - { 0x0013, 0x0227 }, - { 0x0013, 0x0228 }, - { 0x0013, 0x0229 }, - { 0x0013, 0x022a }, - { 0x0013, 0x022b }, - { 0x0013, 0x022c }, - { 0x0013, 0x022d }, - { 0x0013, 0x022e }, - { 0x0013, 0x022f }, - { 0x0013, 0x0230 }, - { 0x0013, 0x0231 }, - { 0x0013, 0x0232 }, - { 0x0013, 0x0233 }, - { 0x0013, 0x0234 }, - { 0x0013, 0x0235 }, - { 0x0013, 0x0236 }, - { 0x0013, 0x0237 }, - { 0x0013, 0x0238 }, - { 0x0013, 0x0239 }, - { 0x0013, 0x023a }, - { 0x0013, 0x023b }, - { 0x0013, 0x023c }, - { 0x0013, 0x023d }, - { 0x0013, 0x023e }, - { 0x0013, 0x023f }, - { 0x0013, 0x0240 }, - { 0x0013, 0x0241 }, - { 0x0013, 0x0242 }, - { 0x0013, 0x0243 }, - { 0x0013, 0x0244 }, - { 0x0013, 0x0245 }, - { 0x0013, 0x0246 }, - { 0x0013, 0x0247 }, - { 0x0013, 0x0248 }, - { 0x0013, 0x0249 }, - { 0x0013, 0x024a }, - { 0x0013, 0x024b }, - { 0x0013, 0x024c }, - { 0x0013, 0x024d }, - { 0x0013, 0x024e }, - { 0x0013, 0x024f }, - { 0x0013, 0x0250 }, - { 0x0013, 0x0251 }, - { 0x0013, 0x0252 }, - { 0x0013, 0x0253 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc46[400][2] = { + { 0x0002, 0x0002 }, + { 0x0003, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000d, 0x000a }, + { 0x000f, 0x0018 }, + { 0x0012, 0x00a6 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0006, 0x0004 }, + { 0x0008, 0x0004 }, + { 0x000a, 0x0006 }, + { 0x000c, 0x0008 }, + { 0x000e, 0x0011 }, + { 0x0012, 0x00a7 }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0007, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000d, 0x000b }, + { 0x000f, 0x0019 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0007, 0x0006 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0005 }, + { 0x000a, 0x0007 }, + { 0x000c, 0x0009 }, + { 0x000e, 0x0012 }, + { 0x000f, 0x001a }, + { 0x0012, 0x00a8 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0009, 0x0007 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x000a, 0x0008 }, + { 0x000b, 0x0008 }, + { 0x000d, 0x000c }, + { 0x000e, 0x0013 }, + { 0x0010, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x000b, 0x0009 }, + { 0x000a, 0x0009 }, + { 0x000b, 0x000a }, + { 0x000b, 0x000b }, + { 0x000d, 0x000d }, + { 0x000f, 0x001b }, + { 0x0010, 0x002d }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x000d, 0x000e }, + { 0x000c, 0x000a }, + { 0x000c, 0x000b }, + { 0x000d, 0x000f }, + { 0x000f, 0x001c }, + { 0x000f, 0x001d }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x000f, 0x001e }, + { 0x000f, 0x001f }, + { 0x000f, 0x0020 }, + { 0x000f, 0x0021 }, + { 0x0010, 0x002e }, + { 0x0012, 0x00a9 }, + { 0x0013, 0x0054 }, + { 0x0013, 0x0055 }, + { 0x0012, 0x00aa }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0010, 0x002f }, + { 0x0013, 0x0062 }, + { 0x0011, 0x0057 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x0013, 0x0066 }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x0013, 0x008b }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0013, 0x008e }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0013, 0x0091 }, + { 0x0013, 0x0092 }, + { 0x0013, 0x0093 }, + { 0x0013, 0x0094 }, + { 0x0013, 0x0095 }, + { 0x0013, 0x0096 }, + { 0x0013, 0x0097 }, + { 0x0013, 0x0098 }, + { 0x0013, 0x0099 }, + { 0x0013, 0x009a }, + { 0x0013, 0x009b }, + { 0x0013, 0x009c }, + { 0x0013, 0x009d }, + { 0x0013, 0x009e }, + { 0x0013, 0x009f }, + { 0x0013, 0x00a0 }, + { 0x0013, 0x00a1 }, + { 0x0013, 0x00a2 }, + { 0x0013, 0x00a3 }, + { 0x0013, 0x00a4 }, + { 0x0013, 0x00a5 }, + { 0x0013, 0x00a6 }, + { 0x0013, 0x00a7 }, + { 0x0013, 0x00a8 }, + { 0x0013, 0x00a9 }, + { 0x0013, 0x00aa }, + { 0x0013, 0x00ab }, + { 0x0013, 0x00ac }, + { 0x0013, 0x00ad }, + { 0x0013, 0x00ae }, + { 0x0013, 0x00af }, + { 0x0013, 0x00b0 }, + { 0x0013, 0x00b1 }, + { 0x0013, 0x00b2 }, + { 0x0013, 0x00b3 }, + { 0x0013, 0x00b4 }, + { 0x0013, 0x00b5 }, + { 0x0013, 0x00b6 }, + { 0x0013, 0x00b7 }, + { 0x0013, 0x00b8 }, + { 0x0013, 0x00b9 }, + { 0x0013, 0x00ba }, + { 0x0013, 0x00bb }, + { 0x0013, 0x00bc }, + { 0x0013, 0x00bd }, + { 0x0013, 0x00be }, + { 0x0013, 0x00bf }, + { 0x0013, 0x00c0 }, + { 0x0013, 0x00c1 }, + { 0x0013, 0x00c2 }, + { 0x0013, 0x00c3 }, + { 0x0013, 0x00c4 }, + { 0x0013, 0x00c5 }, + { 0x0013, 0x00c6 }, + { 0x0013, 0x00c7 }, + { 0x0013, 0x00c8 }, + { 0x0013, 0x00c9 }, + { 0x0013, 0x00ca }, + { 0x0013, 0x00cb }, + { 0x0013, 0x00cc }, + { 0x0013, 0x00cd }, + { 0x0013, 0x00ce }, + { 0x0013, 0x00cf }, + { 0x0013, 0x00d0 }, + { 0x0013, 0x00d1 }, + { 0x0013, 0x00d2 }, + { 0x0013, 0x00d3 }, + { 0x0013, 0x00d4 }, + { 0x0013, 0x00d5 }, + { 0x0013, 0x00d6 }, + { 0x0013, 0x00d7 }, + { 0x0013, 0x00d8 }, + { 0x0013, 0x00d9 }, + { 0x0013, 0x00da }, + { 0x0013, 0x00db }, + { 0x0013, 0x00dc }, + { 0x0013, 0x00dd }, + { 0x0013, 0x00de }, + { 0x0013, 0x00df }, + { 0x0013, 0x00e0 }, + { 0x0013, 0x00e1 }, + { 0x0013, 0x00e2 }, + { 0x0013, 0x00e3 }, + { 0x0013, 0x00e4 }, + { 0x0013, 0x00e5 }, + { 0x0013, 0x00e6 }, + { 0x0013, 0x00e7 }, + { 0x0013, 0x00e8 }, + { 0x0013, 0x00e9 }, + { 0x0013, 0x00ea }, + { 0x0013, 0x00eb }, + { 0x0013, 0x00ec }, + { 0x0013, 0x00ed }, + { 0x0013, 0x00ee }, + { 0x0013, 0x00ef }, + { 0x0013, 0x00f0 }, + { 0x0013, 0x00f1 }, + { 0x0013, 0x00f2 }, + { 0x0013, 0x00f3 }, + { 0x0013, 0x00f4 }, + { 0x0013, 0x00f5 }, + { 0x0013, 0x00f6 }, + { 0x0013, 0x00f7 }, + { 0x0013, 0x00f8 }, + { 0x0013, 0x00f9 }, + { 0x0013, 0x00fa }, + { 0x0013, 0x00fb }, + { 0x0013, 0x00fc }, + { 0x0013, 0x00fd }, + { 0x0013, 0x00fe }, + { 0x0013, 0x00ff }, + { 0x0013, 0x0100 }, + { 0x0013, 0x0101 }, + { 0x0013, 0x0102 }, + { 0x0013, 0x0103 }, + { 0x0013, 0x0104 }, + { 0x0013, 0x0105 }, + { 0x0013, 0x0106 }, + { 0x0013, 0x0107 }, + { 0x0013, 0x0108 }, + { 0x0013, 0x0109 }, + { 0x0013, 0x010a }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0013, 0x010f }, + { 0x0013, 0x0110 }, + { 0x0013, 0x0111 }, + { 0x0013, 0x0112 }, + { 0x0013, 0x0113 }, + { 0x0013, 0x0114 }, + { 0x0013, 0x0115 }, + { 0x0013, 0x0116 }, + { 0x0013, 0x0117 }, + { 0x0013, 0x0118 }, + { 0x0013, 0x0119 }, + { 0x0013, 0x011a }, + { 0x0013, 0x011b }, + { 0x0013, 0x011c }, + { 0x0013, 0x011d }, + { 0x0013, 0x011e }, + { 0x0013, 0x011f }, + { 0x0013, 0x0120 }, + { 0x0013, 0x0121 }, + { 0x0013, 0x0122 }, + { 0x0013, 0x0123 }, + { 0x0013, 0x0124 }, + { 0x0013, 0x0125 }, + { 0x0013, 0x0126 }, + { 0x0013, 0x0127 }, + { 0x0013, 0x0128 }, + { 0x0013, 0x0129 }, + { 0x0013, 0x012a }, + { 0x0013, 0x012b }, + { 0x0013, 0x012c }, + { 0x0013, 0x012d }, + { 0x0013, 0x012e }, + { 0x0013, 0x012f }, + { 0x0013, 0x0130 }, + { 0x0013, 0x0131 }, + { 0x0013, 0x0132 }, + { 0x0013, 0x0133 }, + { 0x0013, 0x0134 }, + { 0x0013, 0x0135 }, + { 0x0013, 0x0136 }, + { 0x0013, 0x0137 }, + { 0x0013, 0x0138 }, + { 0x0013, 0x0139 }, + { 0x0013, 0x013a }, + { 0x0013, 0x013b }, + { 0x0013, 0x013c }, + { 0x0013, 0x013d }, + { 0x0013, 0x013e }, + { 0x0013, 0x013f }, + { 0x0013, 0x0140 }, + { 0x0013, 0x0141 }, + { 0x0013, 0x0142 }, + { 0x0013, 0x0143 }, + { 0x0013, 0x0144 }, + { 0x0013, 0x0145 }, + { 0x0013, 0x0146 }, + { 0x0013, 0x0147 }, + { 0x0013, 0x0148 }, + { 0x0013, 0x0149 }, + { 0x0013, 0x014a }, + { 0x0013, 0x014b }, + { 0x0012, 0x00ab }, + { 0x0012, 0x00ac }, + { 0x0012, 0x00ad }, +}; -const uint16_t c_aauiLCLDHuffEnc50[28][2] = - { - { 0x0002, 0x0001 }, - { 0x0002, 0x0002 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0001 }, - { 0x0004, 0x0001 }, - { 0x0005, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x000f, 0x0001 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0005 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, +const UWord16 c_aauiLCLDHuffEnc47[576][2] = { + { 0x0002, 0x0003 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0005 }, + { 0x0006, 0x0004 }, + { 0x0008, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000c, 0x000b }, + { 0x000d, 0x000d }, + { 0x0010, 0x0041 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0004, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000d, 0x000e }, + { 0x000f, 0x0025 }, + { 0x000f, 0x0026 }, + { 0x0012, 0x00f6 }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0005, 0x0006 }, + { 0x0004, 0x0005 }, + { 0x0005, 0x0007 }, + { 0x0006, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0009, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000d, 0x000f }, + { 0x000f, 0x0027 }, + { 0x0012, 0x00f7 }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0007, 0x0006 }, + { 0x0009, 0x0008 }, + { 0x000a, 0x0008 }, + { 0x000c, 0x000c }, + { 0x000e, 0x0017 }, + { 0x0010, 0x0042 }, + { 0x0012, 0x00f8 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0008, 0x0008 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0009 }, + { 0x0009, 0x0009 }, + { 0x000a, 0x0009 }, + { 0x000b, 0x0009 }, + { 0x000d, 0x0010 }, + { 0x000f, 0x0028 }, + { 0x000f, 0x0029 }, + { 0x0011, 0x007f }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x000a, 0x000a }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x000a, 0x000b }, + { 0x000b, 0x000a }, + { 0x000d, 0x0011 }, + { 0x000f, 0x002a }, + { 0x0010, 0x0043 }, + { 0x0012, 0x00f9 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x0013, 0x0054 }, + { 0x000b, 0x000b }, + { 0x000b, 0x000c }, + { 0x000b, 0x000d }, + { 0x000c, 0x000d }, + { 0x000d, 0x0012 }, + { 0x000e, 0x0018 }, + { 0x0010, 0x0044 }, + { 0x0013, 0x0055 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0013, 0x0062 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x000e, 0x0019 }, + { 0x000d, 0x0013 }, + { 0x000d, 0x0014 }, + { 0x000d, 0x0015 }, + { 0x000f, 0x002b }, + { 0x0010, 0x0045 }, + { 0x0013, 0x0066 }, + { 0x0012, 0x00fa }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0010, 0x0046 }, + { 0x000f, 0x002c }, + { 0x000f, 0x002d }, + { 0x0010, 0x0047 }, + { 0x0011, 0x0080 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x0010, 0x0048 }, + { 0x0010, 0x0049 }, + { 0x0011, 0x0081 }, + { 0x0013, 0x008b }, + { 0x0012, 0x00fb }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0013, 0x008e }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0013, 0x0091 }, + { 0x0013, 0x0092 }, + { 0x0013, 0x0093 }, + { 0x0013, 0x0094 }, + { 0x0013, 0x0095 }, + { 0x0013, 0x0096 }, + { 0x0013, 0x0097 }, + { 0x0013, 0x0098 }, + { 0x0013, 0x0099 }, + { 0x0013, 0x009a }, + { 0x0013, 0x009b }, + { 0x0013, 0x009c }, + { 0x0013, 0x009d }, + { 0x0013, 0x009e }, + { 0x0013, 0x009f }, + { 0x0013, 0x00a0 }, + { 0x0012, 0x00fc }, + { 0x0013, 0x00a1 }, + { 0x0013, 0x00a2 }, + { 0x0013, 0x00a3 }, + { 0x0013, 0x00a4 }, + { 0x0013, 0x00a5 }, + { 0x0013, 0x00a6 }, + { 0x0013, 0x00a7 }, + { 0x0013, 0x00a8 }, + { 0x0013, 0x00a9 }, + { 0x0013, 0x00aa }, + { 0x0013, 0x00ab }, + { 0x0013, 0x00ac }, + { 0x0013, 0x00ad }, + { 0x0013, 0x00ae }, + { 0x0013, 0x00af }, + { 0x0013, 0x00b0 }, + { 0x0013, 0x00b1 }, + { 0x0013, 0x00b2 }, + { 0x0013, 0x00b3 }, + { 0x0013, 0x00b4 }, + { 0x0013, 0x00b5 }, + { 0x0013, 0x00b6 }, + { 0x0013, 0x00b7 }, + { 0x0013, 0x00b8 }, + { 0x0013, 0x00b9 }, + { 0x0013, 0x00ba }, + { 0x0013, 0x00bb }, + { 0x0013, 0x00bc }, + { 0x0013, 0x00bd }, + { 0x0013, 0x00be }, + { 0x0013, 0x00bf }, + { 0x0013, 0x00c0 }, + { 0x0013, 0x00c1 }, + { 0x0013, 0x00c2 }, + { 0x0013, 0x00c3 }, + { 0x0013, 0x00c4 }, + { 0x0013, 0x00c5 }, + { 0x0013, 0x00c6 }, + { 0x0013, 0x00c7 }, + { 0x0013, 0x00c8 }, + { 0x0013, 0x00c9 }, + { 0x0013, 0x00ca }, + { 0x0013, 0x00cb }, + { 0x0013, 0x00cc }, + { 0x0013, 0x00cd }, + { 0x0013, 0x00ce }, + { 0x0013, 0x00cf }, + { 0x0013, 0x00d0 }, + { 0x0013, 0x00d1 }, + { 0x0013, 0x00d2 }, + { 0x0013, 0x00d3 }, + { 0x0013, 0x00d4 }, + { 0x0013, 0x00d5 }, + { 0x0013, 0x00d6 }, + { 0x0013, 0x00d7 }, + { 0x0013, 0x00d8 }, + { 0x0013, 0x00d9 }, + { 0x0013, 0x00da }, + { 0x0013, 0x00db }, + { 0x0013, 0x00dc }, + { 0x0013, 0x00dd }, + { 0x0013, 0x00de }, + { 0x0013, 0x00df }, + { 0x0013, 0x00e0 }, + { 0x0013, 0x00e1 }, + { 0x0013, 0x00e2 }, + { 0x0013, 0x00e3 }, + { 0x0013, 0x00e4 }, + { 0x0013, 0x00e5 }, + { 0x0013, 0x00e6 }, + { 0x0013, 0x00e7 }, + { 0x0013, 0x00e8 }, + { 0x0013, 0x00e9 }, + { 0x0013, 0x00ea }, + { 0x0013, 0x00eb }, + { 0x0013, 0x00ec }, + { 0x0013, 0x00ed }, + { 0x0013, 0x00ee }, + { 0x0013, 0x00ef }, + { 0x0013, 0x00f0 }, + { 0x0013, 0x00f1 }, + { 0x0013, 0x00f2 }, + { 0x0013, 0x00f3 }, + { 0x0013, 0x00f4 }, + { 0x0013, 0x00f5 }, + { 0x0013, 0x00f6 }, + { 0x0013, 0x00f7 }, + { 0x0013, 0x00f8 }, + { 0x0013, 0x00f9 }, + { 0x0013, 0x00fa }, + { 0x0013, 0x00fb }, + { 0x0013, 0x00fc }, + { 0x0013, 0x00fd }, + { 0x0013, 0x00fe }, + { 0x0013, 0x00ff }, + { 0x0013, 0x0100 }, + { 0x0013, 0x0101 }, + { 0x0013, 0x0102 }, + { 0x0013, 0x0103 }, + { 0x0013, 0x0104 }, + { 0x0013, 0x0105 }, + { 0x0013, 0x0106 }, + { 0x0013, 0x0107 }, + { 0x0013, 0x0108 }, + { 0x0013, 0x0109 }, + { 0x0013, 0x010a }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0013, 0x010f }, + { 0x0013, 0x0110 }, + { 0x0013, 0x0111 }, + { 0x0013, 0x0112 }, + { 0x0013, 0x0113 }, + { 0x0013, 0x0114 }, + { 0x0013, 0x0115 }, + { 0x0013, 0x0116 }, + { 0x0013, 0x0117 }, + { 0x0013, 0x0118 }, + { 0x0013, 0x0119 }, + { 0x0013, 0x011a }, + { 0x0013, 0x011b }, + { 0x0013, 0x011c }, + { 0x0013, 0x011d }, + { 0x0013, 0x011e }, + { 0x0013, 0x011f }, + { 0x0013, 0x0120 }, + { 0x0013, 0x0121 }, + { 0x0013, 0x0122 }, + { 0x0013, 0x0123 }, + { 0x0013, 0x0124 }, + { 0x0013, 0x0125 }, + { 0x0013, 0x0126 }, + { 0x0013, 0x0127 }, + { 0x0013, 0x0128 }, + { 0x0013, 0x0129 }, + { 0x0013, 0x012a }, + { 0x0013, 0x012b }, + { 0x0013, 0x012c }, + { 0x0013, 0x012d }, + { 0x0013, 0x012e }, + { 0x0013, 0x012f }, + { 0x0013, 0x0130 }, + { 0x0013, 0x0131 }, + { 0x0013, 0x0132 }, + { 0x0013, 0x0133 }, + { 0x0013, 0x0134 }, + { 0x0013, 0x0135 }, + { 0x0013, 0x0136 }, + { 0x0013, 0x0137 }, + { 0x0013, 0x0138 }, + { 0x0013, 0x0139 }, + { 0x0013, 0x013a }, + { 0x0013, 0x013b }, + { 0x0013, 0x013c }, + { 0x0013, 0x013d }, + { 0x0013, 0x013e }, + { 0x0013, 0x013f }, + { 0x0013, 0x0140 }, + { 0x0013, 0x0141 }, + { 0x0013, 0x0142 }, + { 0x0013, 0x0143 }, + { 0x0013, 0x0144 }, + { 0x0013, 0x0145 }, + { 0x0013, 0x0146 }, + { 0x0013, 0x0147 }, + { 0x0013, 0x0148 }, + { 0x0013, 0x0149 }, + { 0x0013, 0x014a }, + { 0x0013, 0x014b }, + { 0x0013, 0x014c }, + { 0x0013, 0x014d }, + { 0x0013, 0x014e }, + { 0x0013, 0x014f }, + { 0x0013, 0x0150 }, + { 0x0013, 0x0151 }, + { 0x0013, 0x0152 }, + { 0x0013, 0x0153 }, + { 0x0013, 0x0154 }, + { 0x0013, 0x0155 }, + { 0x0013, 0x0156 }, + { 0x0013, 0x0157 }, + { 0x0013, 0x0158 }, + { 0x0013, 0x0159 }, + { 0x0013, 0x015a }, + { 0x0013, 0x015b }, + { 0x0013, 0x015c }, + { 0x0013, 0x015d }, + { 0x0013, 0x015e }, + { 0x0013, 0x015f }, + { 0x0013, 0x0160 }, + { 0x0013, 0x0161 }, + { 0x0013, 0x0162 }, + { 0x0013, 0x0163 }, + { 0x0013, 0x0164 }, + { 0x0013, 0x0165 }, + { 0x0013, 0x0166 }, + { 0x0013, 0x0167 }, + { 0x0013, 0x0168 }, + { 0x0013, 0x0169 }, + { 0x0013, 0x016a }, + { 0x0013, 0x016b }, + { 0x0013, 0x016c }, + { 0x0013, 0x016d }, + { 0x0013, 0x016e }, + { 0x0013, 0x016f }, + { 0x0013, 0x0170 }, + { 0x0013, 0x0171 }, + { 0x0013, 0x0172 }, + { 0x0013, 0x0173 }, + { 0x0013, 0x0174 }, + { 0x0013, 0x0175 }, + { 0x0013, 0x0176 }, + { 0x0013, 0x0177 }, + { 0x0013, 0x0178 }, + { 0x0013, 0x0179 }, + { 0x0013, 0x017a }, + { 0x0013, 0x017b }, + { 0x0013, 0x017c }, + { 0x0013, 0x017d }, + { 0x0013, 0x017e }, + { 0x0013, 0x017f }, + { 0x0013, 0x0180 }, + { 0x0013, 0x0181 }, + { 0x0013, 0x0182 }, + { 0x0013, 0x0183 }, + { 0x0013, 0x0184 }, + { 0x0013, 0x0185 }, + { 0x0013, 0x0186 }, + { 0x0013, 0x0187 }, + { 0x0013, 0x0188 }, + { 0x0013, 0x0189 }, + { 0x0013, 0x018a }, + { 0x0013, 0x018b }, + { 0x0013, 0x018c }, + { 0x0013, 0x018d }, + { 0x0013, 0x018e }, + { 0x0013, 0x018f }, + { 0x0013, 0x0190 }, + { 0x0013, 0x0191 }, + { 0x0013, 0x0192 }, + { 0x0013, 0x0193 }, + { 0x0013, 0x0194 }, + { 0x0013, 0x0195 }, + { 0x0013, 0x0196 }, + { 0x0013, 0x0197 }, + { 0x0013, 0x0198 }, + { 0x0013, 0x0199 }, + { 0x0013, 0x019a }, + { 0x0013, 0x019b }, + { 0x0013, 0x019c }, + { 0x0013, 0x019d }, + { 0x0013, 0x019e }, + { 0x0013, 0x019f }, + { 0x0013, 0x01a0 }, + { 0x0013, 0x01a1 }, + { 0x0013, 0x01a2 }, + { 0x0013, 0x01a3 }, + { 0x0013, 0x01a4 }, + { 0x0013, 0x01a5 }, + { 0x0013, 0x01a6 }, + { 0x0013, 0x01a7 }, + { 0x0013, 0x01a8 }, + { 0x0013, 0x01a9 }, + { 0x0013, 0x01aa }, + { 0x0013, 0x01ab }, + { 0x0013, 0x01ac }, + { 0x0013, 0x01ad }, + { 0x0013, 0x01ae }, + { 0x0013, 0x01af }, + { 0x0013, 0x01b0 }, + { 0x0013, 0x01b1 }, + { 0x0013, 0x01b2 }, + { 0x0013, 0x01b3 }, + { 0x0013, 0x01b4 }, + { 0x0013, 0x01b5 }, + { 0x0013, 0x01b6 }, + { 0x0013, 0x01b7 }, + { 0x0013, 0x01b8 }, + { 0x0013, 0x01b9 }, + { 0x0013, 0x01ba }, + { 0x0013, 0x01bb }, + { 0x0013, 0x01bc }, + { 0x0013, 0x01bd }, + { 0x0013, 0x01be }, + { 0x0013, 0x01bf }, + { 0x0013, 0x01c0 }, + { 0x0013, 0x01c1 }, + { 0x0013, 0x01c2 }, + { 0x0013, 0x01c3 }, + { 0x0013, 0x01c4 }, + { 0x0013, 0x01c5 }, + { 0x0013, 0x01c6 }, + { 0x0013, 0x01c7 }, + { 0x0013, 0x01c8 }, + { 0x0013, 0x01c9 }, + { 0x0013, 0x01ca }, + { 0x0013, 0x01cb }, + { 0x0013, 0x01cc }, + { 0x0013, 0x01cd }, + { 0x0013, 0x01ce }, + { 0x0013, 0x01cf }, + { 0x0013, 0x01d0 }, + { 0x0013, 0x01d1 }, + { 0x0013, 0x01d2 }, + { 0x0013, 0x01d3 }, + { 0x0013, 0x01d4 }, + { 0x0013, 0x01d5 }, + { 0x0013, 0x01d6 }, + { 0x0013, 0x01d7 }, + { 0x0013, 0x01d8 }, + { 0x0013, 0x01d9 }, + { 0x0013, 0x01da }, + { 0x0013, 0x01db }, + { 0x0013, 0x01dc }, + { 0x0013, 0x01dd }, + { 0x0013, 0x01de }, + { 0x0013, 0x01df }, + { 0x0013, 0x01e0 }, + { 0x0013, 0x01e1 }, + { 0x0013, 0x01e2 }, + { 0x0013, 0x01e3 }, + { 0x0013, 0x01e4 }, + { 0x0013, 0x01e5 }, + { 0x0013, 0x01e6 }, + { 0x0013, 0x01e7 }, + { 0x0013, 0x01e8 }, + { 0x0013, 0x01e9 }, + { 0x0013, 0x01ea }, + { 0x0013, 0x01eb }, + { 0x0012, 0x00fd }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc48[729][2] = { + { 0x0002, 0x0003 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0006 }, + { 0x0006, 0x0006 }, + { 0x0008, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x000b, 0x000b }, + { 0x000c, 0x000d }, + { 0x000f, 0x0030 }, + { 0x0010, 0x0055 }, + { 0x0012, 0x0136 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0013, 0x000f }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0005, 0x0007 }, + { 0x0006, 0x0007 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0007 }, + { 0x000a, 0x0008 }, + { 0x000c, 0x000e }, + { 0x000d, 0x0012 }, + { 0x000f, 0x0031 }, + { 0x0011, 0x00a0 }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0005, 0x0008 }, + { 0x0004, 0x0005 }, + { 0x0005, 0x0009 }, + { 0x0006, 0x0008 }, + { 0x0007, 0x0008 }, + { 0x0008, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000c, 0x000f }, + { 0x000d, 0x0013 }, + { 0x000f, 0x0032 }, + { 0x0011, 0x00a1 }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0007, 0x0009 }, + { 0x0008, 0x0009 }, + { 0x0009, 0x0008 }, + { 0x000b, 0x000c }, + { 0x000d, 0x0014 }, + { 0x000e, 0x001d }, + { 0x000f, 0x0033 }, + { 0x0012, 0x0137 }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0008, 0x000a }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0008, 0x000b }, + { 0x0009, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000c, 0x0010 }, + { 0x000d, 0x0015 }, + { 0x000f, 0x0034 }, + { 0x0010, 0x0056 }, + { 0x0012, 0x0138 }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0009, 0x000a }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0009, 0x000b }, + { 0x000a, 0x000b }, + { 0x000c, 0x0011 }, + { 0x000d, 0x0016 }, + { 0x000e, 0x001e }, + { 0x0010, 0x0057 }, + { 0x0011, 0x00a2 }, + { 0x0011, 0x00a3 }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x0013, 0x0054 }, + { 0x0013, 0x0055 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x000b, 0x000d }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000b, 0x000e }, + { 0x000c, 0x0012 }, + { 0x000d, 0x0017 }, + { 0x000e, 0x001f }, + { 0x0010, 0x0058 }, + { 0x0012, 0x0139 }, + { 0x0011, 0x00a4 }, + { 0x0012, 0x013a }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0013, 0x0062 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x0013, 0x0066 }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x000c, 0x0013 }, + { 0x000b, 0x000f }, + { 0x000c, 0x0014 }, + { 0x000c, 0x0015 }, + { 0x000d, 0x0018 }, + { 0x000e, 0x0020 }, + { 0x000f, 0x0035 }, + { 0x0012, 0x013b }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x000e, 0x0021 }, + { 0x000d, 0x0019 }, + { 0x000e, 0x0022 }, + { 0x000e, 0x0023 }, + { 0x000f, 0x0036 }, + { 0x0010, 0x0059 }, + { 0x0011, 0x00a5 }, + { 0x0013, 0x0083 }, + { 0x0011, 0x00a6 }, + { 0x0012, 0x013c }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x0013, 0x008b }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0013, 0x008e }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0013, 0x0091 }, + { 0x0013, 0x0092 }, + { 0x0013, 0x0093 }, + { 0x0013, 0x0094 }, + { 0x0010, 0x005a }, + { 0x000f, 0x0037 }, + { 0x000f, 0x0038 }, + { 0x000f, 0x0039 }, + { 0x0010, 0x005b }, + { 0x0010, 0x005c }, + { 0x0013, 0x0095 }, + { 0x0011, 0x00a7 }, + { 0x0013, 0x0096 }, + { 0x0013, 0x0097 }, + { 0x0013, 0x0098 }, + { 0x0013, 0x0099 }, + { 0x0013, 0x009a }, + { 0x0013, 0x009b }, + { 0x0013, 0x009c }, + { 0x0013, 0x009d }, + { 0x0013, 0x009e }, + { 0x0013, 0x009f }, + { 0x0013, 0x00a0 }, + { 0x0013, 0x00a1 }, + { 0x0013, 0x00a2 }, + { 0x0013, 0x00a3 }, + { 0x0013, 0x00a4 }, + { 0x0013, 0x00a5 }, + { 0x0013, 0x00a6 }, + { 0x0013, 0x00a7 }, + { 0x0013, 0x00a8 }, + { 0x0010, 0x005d }, + { 0x0010, 0x005e }, + { 0x0013, 0x00a9 }, + { 0x0010, 0x005f }, + { 0x0013, 0x00aa }, + { 0x0012, 0x013d }, + { 0x0013, 0x00ab }, + { 0x0013, 0x00ac }, + { 0x0013, 0x00ad }, + { 0x0013, 0x00ae }, + { 0x0013, 0x00af }, + { 0x0013, 0x00b0 }, + { 0x0013, 0x00b1 }, + { 0x0013, 0x00b2 }, + { 0x0013, 0x00b3 }, + { 0x0013, 0x00b4 }, + { 0x0013, 0x00b5 }, + { 0x0013, 0x00b6 }, + { 0x0013, 0x00b7 }, + { 0x0013, 0x00b8 }, + { 0x0013, 0x00b9 }, + { 0x0013, 0x00ba }, + { 0x0013, 0x00bb }, + { 0x0013, 0x00bc }, + { 0x0013, 0x00bd }, + { 0x0013, 0x00be }, + { 0x0013, 0x00bf }, + { 0x0013, 0x00c0 }, + { 0x0011, 0x00a8 }, + { 0x0013, 0x00c1 }, + { 0x0011, 0x00a9 }, + { 0x0013, 0x00c2 }, + { 0x0013, 0x00c3 }, + { 0x0013, 0x00c4 }, + { 0x0013, 0x00c5 }, + { 0x0013, 0x00c6 }, + { 0x0013, 0x00c7 }, + { 0x0013, 0x00c8 }, + { 0x0013, 0x00c9 }, + { 0x0013, 0x00ca }, + { 0x0013, 0x00cb }, + { 0x0013, 0x00cc }, + { 0x0013, 0x00cd }, + { 0x0013, 0x00ce }, + { 0x0013, 0x00cf }, + { 0x0013, 0x00d0 }, + { 0x0013, 0x00d1 }, + { 0x0013, 0x00d2 }, + { 0x0013, 0x00d3 }, + { 0x0013, 0x00d4 }, + { 0x0013, 0x00d5 }, + { 0x0013, 0x00d6 }, + { 0x0013, 0x00d7 }, + { 0x0013, 0x00d8 }, + { 0x0013, 0x00d9 }, + { 0x0013, 0x00da }, + { 0x0012, 0x013e }, + { 0x0013, 0x00db }, + { 0x0013, 0x00dc }, + { 0x0013, 0x00dd }, + { 0x0013, 0x00de }, + { 0x0013, 0x00df }, + { 0x0013, 0x00e0 }, + { 0x0013, 0x00e1 }, + { 0x0013, 0x00e2 }, + { 0x0013, 0x00e3 }, + { 0x0013, 0x00e4 }, + { 0x0013, 0x00e5 }, + { 0x0013, 0x00e6 }, + { 0x0013, 0x00e7 }, + { 0x0013, 0x00e8 }, + { 0x0013, 0x00e9 }, + { 0x0013, 0x00ea }, + { 0x0013, 0x00eb }, + { 0x0013, 0x00ec }, + { 0x0013, 0x00ed }, + { 0x0013, 0x00ee }, + { 0x0013, 0x00ef }, + { 0x0013, 0x00f0 }, + { 0x0013, 0x00f1 }, + { 0x0013, 0x00f2 }, + { 0x0013, 0x00f3 }, + { 0x0013, 0x00f4 }, + { 0x0013, 0x00f5 }, + { 0x0013, 0x00f6 }, + { 0x0013, 0x00f7 }, + { 0x0013, 0x00f8 }, + { 0x0013, 0x00f9 }, + { 0x0013, 0x00fa }, + { 0x0013, 0x00fb }, + { 0x0013, 0x00fc }, + { 0x0013, 0x00fd }, + { 0x0013, 0x00fe }, + { 0x0013, 0x00ff }, + { 0x0013, 0x0100 }, + { 0x0013, 0x0101 }, + { 0x0013, 0x0102 }, + { 0x0013, 0x0103 }, + { 0x0013, 0x0104 }, + { 0x0013, 0x0105 }, + { 0x0013, 0x0106 }, + { 0x0013, 0x0107 }, + { 0x0013, 0x0108 }, + { 0x0013, 0x0109 }, + { 0x0013, 0x010a }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0013, 0x010f }, + { 0x0013, 0x0110 }, + { 0x0013, 0x0111 }, + { 0x0013, 0x0112 }, + { 0x0013, 0x0113 }, + { 0x0013, 0x0114 }, + { 0x0013, 0x0115 }, + { 0x0013, 0x0116 }, + { 0x0013, 0x0117 }, + { 0x0013, 0x0118 }, + { 0x0013, 0x0119 }, + { 0x0013, 0x011a }, + { 0x0013, 0x011b }, + { 0x0013, 0x011c }, + { 0x0013, 0x011d }, + { 0x0013, 0x011e }, + { 0x0013, 0x011f }, + { 0x0013, 0x0120 }, + { 0x0013, 0x0121 }, + { 0x0013, 0x0122 }, + { 0x0013, 0x0123 }, + { 0x0013, 0x0124 }, + { 0x0013, 0x0125 }, + { 0x0013, 0x0126 }, + { 0x0013, 0x0127 }, + { 0x0013, 0x0128 }, + { 0x0013, 0x0129 }, + { 0x0013, 0x012a }, + { 0x0013, 0x012b }, + { 0x0013, 0x012c }, + { 0x0013, 0x012d }, + { 0x0013, 0x012e }, + { 0x0013, 0x012f }, + { 0x0013, 0x0130 }, + { 0x0013, 0x0131 }, + { 0x0013, 0x0132 }, + { 0x0013, 0x0133 }, + { 0x0013, 0x0134 }, + { 0x0013, 0x0135 }, + { 0x0013, 0x0136 }, + { 0x0013, 0x0137 }, + { 0x0013, 0x0138 }, + { 0x0013, 0x0139 }, + { 0x0013, 0x013a }, + { 0x0013, 0x013b }, + { 0x0013, 0x013c }, + { 0x0013, 0x013d }, + { 0x0013, 0x013e }, + { 0x0013, 0x013f }, + { 0x0013, 0x0140 }, + { 0x0013, 0x0141 }, + { 0x0013, 0x0142 }, + { 0x0013, 0x0143 }, + { 0x0013, 0x0144 }, + { 0x0013, 0x0145 }, + { 0x0013, 0x0146 }, + { 0x0013, 0x0147 }, + { 0x0013, 0x0148 }, + { 0x0013, 0x0149 }, + { 0x0013, 0x014a }, + { 0x0013, 0x014b }, + { 0x0013, 0x014c }, + { 0x0013, 0x014d }, + { 0x0013, 0x014e }, + { 0x0013, 0x014f }, + { 0x0013, 0x0150 }, + { 0x0013, 0x0151 }, + { 0x0013, 0x0152 }, + { 0x0013, 0x0153 }, + { 0x0013, 0x0154 }, + { 0x0013, 0x0155 }, + { 0x0013, 0x0156 }, + { 0x0013, 0x0157 }, + { 0x0013, 0x0158 }, + { 0x0013, 0x0159 }, + { 0x0013, 0x015a }, + { 0x0013, 0x015b }, + { 0x0013, 0x015c }, + { 0x0013, 0x015d }, + { 0x0013, 0x015e }, + { 0x0013, 0x015f }, + { 0x0013, 0x0160 }, + { 0x0013, 0x0161 }, + { 0x0013, 0x0162 }, + { 0x0013, 0x0163 }, + { 0x0013, 0x0164 }, + { 0x0013, 0x0165 }, + { 0x0013, 0x0166 }, + { 0x0013, 0x0167 }, + { 0x0013, 0x0168 }, + { 0x0013, 0x0169 }, + { 0x0013, 0x016a }, + { 0x0013, 0x016b }, + { 0x0013, 0x016c }, + { 0x0013, 0x016d }, + { 0x0013, 0x016e }, + { 0x0013, 0x016f }, + { 0x0013, 0x0170 }, + { 0x0013, 0x0171 }, + { 0x0013, 0x0172 }, + { 0x0013, 0x0173 }, + { 0x0013, 0x0174 }, + { 0x0013, 0x0175 }, + { 0x0013, 0x0176 }, + { 0x0013, 0x0177 }, + { 0x0013, 0x0178 }, + { 0x0013, 0x0179 }, + { 0x0013, 0x017a }, + { 0x0013, 0x017b }, + { 0x0013, 0x017c }, + { 0x0013, 0x017d }, + { 0x0013, 0x017e }, + { 0x0013, 0x017f }, + { 0x0013, 0x0180 }, + { 0x0013, 0x0181 }, + { 0x0013, 0x0182 }, + { 0x0013, 0x0183 }, + { 0x0013, 0x0184 }, + { 0x0013, 0x0185 }, + { 0x0013, 0x0186 }, + { 0x0013, 0x0187 }, + { 0x0013, 0x0188 }, + { 0x0013, 0x0189 }, + { 0x0013, 0x018a }, + { 0x0013, 0x018b }, + { 0x0013, 0x018c }, + { 0x0013, 0x018d }, + { 0x0013, 0x018e }, + { 0x0013, 0x018f }, + { 0x0013, 0x0190 }, + { 0x0013, 0x0191 }, + { 0x0013, 0x0192 }, + { 0x0013, 0x0193 }, + { 0x0013, 0x0194 }, + { 0x0013, 0x0195 }, + { 0x0013, 0x0196 }, + { 0x0013, 0x0197 }, + { 0x0013, 0x0198 }, + { 0x0013, 0x0199 }, + { 0x0013, 0x019a }, + { 0x0013, 0x019b }, + { 0x0013, 0x019c }, + { 0x0013, 0x019d }, + { 0x0013, 0x019e }, + { 0x0013, 0x019f }, + { 0x0013, 0x01a0 }, + { 0x0013, 0x01a1 }, + { 0x0013, 0x01a2 }, + { 0x0013, 0x01a3 }, + { 0x0013, 0x01a4 }, + { 0x0013, 0x01a5 }, + { 0x0013, 0x01a6 }, + { 0x0013, 0x01a7 }, + { 0x0013, 0x01a8 }, + { 0x0013, 0x01a9 }, + { 0x0013, 0x01aa }, + { 0x0013, 0x01ab }, + { 0x0013, 0x01ac }, + { 0x0013, 0x01ad }, + { 0x0013, 0x01ae }, + { 0x0013, 0x01af }, + { 0x0013, 0x01b0 }, + { 0x0013, 0x01b1 }, + { 0x0013, 0x01b2 }, + { 0x0013, 0x01b3 }, + { 0x0013, 0x01b4 }, + { 0x0013, 0x01b5 }, + { 0x0013, 0x01b6 }, + { 0x0013, 0x01b7 }, + { 0x0013, 0x01b8 }, + { 0x0013, 0x01b9 }, + { 0x0013, 0x01ba }, + { 0x0013, 0x01bb }, + { 0x0013, 0x01bc }, + { 0x0013, 0x01bd }, + { 0x0013, 0x01be }, + { 0x0013, 0x01bf }, + { 0x0013, 0x01c0 }, + { 0x0013, 0x01c1 }, + { 0x0013, 0x01c2 }, + { 0x0013, 0x01c3 }, + { 0x0013, 0x01c4 }, + { 0x0013, 0x01c5 }, + { 0x0013, 0x01c6 }, + { 0x0013, 0x01c7 }, + { 0x0013, 0x01c8 }, + { 0x0013, 0x01c9 }, + { 0x0013, 0x01ca }, + { 0x0013, 0x01cb }, + { 0x0013, 0x01cc }, + { 0x0013, 0x01cd }, + { 0x0013, 0x01ce }, + { 0x0013, 0x01cf }, + { 0x0013, 0x01d0 }, + { 0x0013, 0x01d1 }, + { 0x0013, 0x01d2 }, + { 0x0013, 0x01d3 }, + { 0x0013, 0x01d4 }, + { 0x0013, 0x01d5 }, + { 0x0013, 0x01d6 }, + { 0x0013, 0x01d7 }, + { 0x0013, 0x01d8 }, + { 0x0013, 0x01d9 }, + { 0x0013, 0x01da }, + { 0x0013, 0x01db }, + { 0x0013, 0x01dc }, + { 0x0013, 0x01dd }, + { 0x0013, 0x01de }, + { 0x0013, 0x01df }, + { 0x0013, 0x01e0 }, + { 0x0013, 0x01e1 }, + { 0x0013, 0x01e2 }, + { 0x0013, 0x01e3 }, + { 0x0013, 0x01e4 }, + { 0x0013, 0x01e5 }, + { 0x0013, 0x01e6 }, + { 0x0013, 0x01e7 }, + { 0x0013, 0x01e8 }, + { 0x0013, 0x01e9 }, + { 0x0013, 0x01ea }, + { 0x0013, 0x01eb }, + { 0x0013, 0x01ec }, + { 0x0013, 0x01ed }, + { 0x0013, 0x01ee }, + { 0x0013, 0x01ef }, + { 0x0013, 0x01f0 }, + { 0x0013, 0x01f1 }, + { 0x0013, 0x01f2 }, + { 0x0013, 0x01f3 }, + { 0x0013, 0x01f4 }, + { 0x0013, 0x01f5 }, + { 0x0013, 0x01f6 }, + { 0x0013, 0x01f7 }, + { 0x0013, 0x01f8 }, + { 0x0013, 0x01f9 }, + { 0x0013, 0x01fa }, + { 0x0013, 0x01fb }, + { 0x0013, 0x01fc }, + { 0x0013, 0x01fd }, + { 0x0013, 0x01fe }, + { 0x0013, 0x01ff }, + { 0x0013, 0x0200 }, + { 0x0013, 0x0201 }, + { 0x0013, 0x0202 }, + { 0x0013, 0x0203 }, + { 0x0013, 0x0204 }, + { 0x0013, 0x0205 }, + { 0x0013, 0x0206 }, + { 0x0013, 0x0207 }, + { 0x0013, 0x0208 }, + { 0x0013, 0x0209 }, + { 0x0013, 0x020a }, + { 0x0013, 0x020b }, + { 0x0013, 0x020c }, + { 0x0013, 0x020d }, + { 0x0013, 0x020e }, + { 0x0013, 0x020f }, + { 0x0013, 0x0210 }, + { 0x0013, 0x0211 }, + { 0x0013, 0x0212 }, + { 0x0013, 0x0213 }, + { 0x0013, 0x0214 }, + { 0x0013, 0x0215 }, + { 0x0013, 0x0216 }, + { 0x0013, 0x0217 }, + { 0x0013, 0x0218 }, + { 0x0013, 0x0219 }, + { 0x0013, 0x021a }, + { 0x0013, 0x021b }, + { 0x0013, 0x021c }, + { 0x0013, 0x021d }, + { 0x0013, 0x021e }, + { 0x0013, 0x021f }, + { 0x0013, 0x0220 }, + { 0x0013, 0x0221 }, + { 0x0013, 0x0222 }, + { 0x0013, 0x0223 }, + { 0x0013, 0x0224 }, + { 0x0013, 0x0225 }, + { 0x0013, 0x0226 }, + { 0x0013, 0x0227 }, + { 0x0013, 0x0228 }, + { 0x0013, 0x0229 }, + { 0x0013, 0x022a }, + { 0x0013, 0x022b }, + { 0x0013, 0x022c }, + { 0x0013, 0x022d }, + { 0x0013, 0x022e }, + { 0x0013, 0x022f }, + { 0x0013, 0x0230 }, + { 0x0013, 0x0231 }, + { 0x0013, 0x0232 }, + { 0x0013, 0x0233 }, + { 0x0013, 0x0234 }, + { 0x0013, 0x0235 }, + { 0x0013, 0x0236 }, + { 0x0013, 0x0237 }, + { 0x0013, 0x0238 }, + { 0x0013, 0x0239 }, + { 0x0013, 0x023a }, + { 0x0013, 0x023b }, + { 0x0013, 0x023c }, + { 0x0013, 0x023d }, + { 0x0013, 0x023e }, + { 0x0013, 0x023f }, + { 0x0013, 0x0240 }, + { 0x0013, 0x0241 }, + { 0x0013, 0x0242 }, + { 0x0013, 0x0243 }, + { 0x0013, 0x0244 }, + { 0x0013, 0x0245 }, + { 0x0013, 0x0246 }, + { 0x0013, 0x0247 }, + { 0x0013, 0x0248 }, + { 0x0013, 0x0249 }, + { 0x0013, 0x024a }, + { 0x0013, 0x024b }, + { 0x0013, 0x024c }, + { 0x0013, 0x024d }, + { 0x0013, 0x024e }, + { 0x0013, 0x024f }, + { 0x0013, 0x0250 }, + { 0x0013, 0x0251 }, + { 0x0013, 0x0252 }, + { 0x0013, 0x0253 }, + { 0x0013, 0x0254 }, + { 0x0013, 0x0255 }, + { 0x0013, 0x0256 }, + { 0x0013, 0x0257 }, + { 0x0013, 0x0258 }, + { 0x0013, 0x0259 }, + { 0x0013, 0x025a }, + { 0x0013, 0x025b }, + { 0x0013, 0x025c }, + { 0x0013, 0x025d }, + { 0x0013, 0x025e }, + { 0x0013, 0x025f }, + { 0x0013, 0x0260 }, + { 0x0013, 0x0261 }, + { 0x0013, 0x0262 }, + { 0x0013, 0x0263 }, + { 0x0013, 0x0264 }, + { 0x0013, 0x0265 }, + { 0x0013, 0x0266 }, + { 0x0013, 0x0267 }, + { 0x0013, 0x0268 }, + { 0x0013, 0x0269 }, + { 0x0013, 0x026a }, + { 0x0013, 0x026b }, + { 0x0012, 0x013f }, -const uint16_t c_aauiLCLDHuffEnc51[29][2] = - { - { 0x0002, 0x0002 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0004, 0x0001 }, - { 0x0004, 0x0002 }, - { 0x0004, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0006, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x000d, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, +}; - }; +const UWord16 c_aauiLCLDHuffEnc49[729][2] = { + { 0x0002, 0x0003 }, + { 0x0003, 0x0003 }, + { 0x0005, 0x0007 }, + { 0x0007, 0x000a }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0009, 0x0009 }, + { 0x000b, 0x000d }, + { 0x000d, 0x0014 }, + { 0x000d, 0x0015 }, + { 0x0010, 0x0052 }, + { 0x0011, 0x0098 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0005, 0x0008 }, + { 0x0006, 0x000a }, + { 0x0007, 0x000b }, + { 0x0008, 0x000b }, + { 0x0008, 0x000c }, + { 0x000a, 0x000a }, + { 0x000b, 0x000e }, + { 0x000d, 0x0016 }, + { 0x000f, 0x0031 }, + { 0x0010, 0x0053 }, + { 0x0012, 0x012a }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0006, 0x000b }, + { 0x0007, 0x000c }, + { 0x0008, 0x000d }, + { 0x0009, 0x000a }, + { 0x000a, 0x000b }, + { 0x000c, 0x000f }, + { 0x000d, 0x0017 }, + { 0x000f, 0x0032 }, + { 0x0010, 0x0054 }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, + { 0x0013, 0x0028 }, + { 0x0013, 0x0029 }, + { 0x0013, 0x002a }, + { 0x0013, 0x002b }, + { 0x0007, 0x000d }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0008, 0x000e }, + { 0x0009, 0x000b }, + { 0x000b, 0x000f }, + { 0x000c, 0x0010 }, + { 0x000e, 0x001d }, + { 0x000f, 0x0033 }, + { 0x0011, 0x0099 }, + { 0x0013, 0x002c }, + { 0x0013, 0x002d }, + { 0x0013, 0x002e }, + { 0x0013, 0x002f }, + { 0x0013, 0x0030 }, + { 0x0013, 0x0031 }, + { 0x0013, 0x0032 }, + { 0x0013, 0x0033 }, + { 0x0013, 0x0034 }, + { 0x0013, 0x0035 }, + { 0x0013, 0x0036 }, + { 0x0013, 0x0037 }, + { 0x0013, 0x0038 }, + { 0x0013, 0x0039 }, + { 0x0013, 0x003a }, + { 0x0008, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0007, 0x0012 }, + { 0x0008, 0x0010 }, + { 0x0009, 0x000c }, + { 0x000a, 0x000c }, + { 0x000c, 0x0011 }, + { 0x000d, 0x0018 }, + { 0x000e, 0x001e }, + { 0x0011, 0x009a }, + { 0x0011, 0x009b }, + { 0x0013, 0x003b }, + { 0x0013, 0x003c }, + { 0x0013, 0x003d }, + { 0x0013, 0x003e }, + { 0x0013, 0x003f }, + { 0x0013, 0x0040 }, + { 0x0013, 0x0041 }, + { 0x0013, 0x0042 }, + { 0x0013, 0x0043 }, + { 0x0013, 0x0044 }, + { 0x0013, 0x0045 }, + { 0x0013, 0x0046 }, + { 0x0013, 0x0047 }, + { 0x0013, 0x0048 }, + { 0x0013, 0x0049 }, + { 0x0008, 0x0011 }, + { 0x0007, 0x0013 }, + { 0x0008, 0x0012 }, + { 0x0008, 0x0013 }, + { 0x0009, 0x000d }, + { 0x000a, 0x000d }, + { 0x000b, 0x0010 }, + { 0x000c, 0x0012 }, + { 0x000e, 0x001f }, + { 0x000e, 0x0020 }, + { 0x0010, 0x0055 }, + { 0x0011, 0x009c }, + { 0x0013, 0x004a }, + { 0x0013, 0x004b }, + { 0x0013, 0x004c }, + { 0x0013, 0x004d }, + { 0x0013, 0x004e }, + { 0x0013, 0x004f }, + { 0x0013, 0x0050 }, + { 0x0013, 0x0051 }, + { 0x0013, 0x0052 }, + { 0x0013, 0x0053 }, + { 0x0013, 0x0054 }, + { 0x0013, 0x0055 }, + { 0x0013, 0x0056 }, + { 0x0013, 0x0057 }, + { 0x0013, 0x0058 }, + { 0x0009, 0x000e }, + { 0x0009, 0x000f }, + { 0x0009, 0x0010 }, + { 0x0009, 0x0011 }, + { 0x000a, 0x000e }, + { 0x000b, 0x0011 }, + { 0x000c, 0x0013 }, + { 0x000d, 0x0019 }, + { 0x000e, 0x0021 }, + { 0x0010, 0x0056 }, + { 0x0010, 0x0057 }, + { 0x0013, 0x0059 }, + { 0x0013, 0x005a }, + { 0x0013, 0x005b }, + { 0x0013, 0x005c }, + { 0x0013, 0x005d }, + { 0x0013, 0x005e }, + { 0x0013, 0x005f }, + { 0x0013, 0x0060 }, + { 0x0013, 0x0061 }, + { 0x0013, 0x0062 }, + { 0x0013, 0x0063 }, + { 0x0013, 0x0064 }, + { 0x0013, 0x0065 }, + { 0x0013, 0x0066 }, + { 0x0013, 0x0067 }, + { 0x0013, 0x0068 }, + { 0x000b, 0x0012 }, + { 0x000a, 0x000f }, + { 0x000a, 0x0010 }, + { 0x000a, 0x0011 }, + { 0x000c, 0x0014 }, + { 0x000c, 0x0015 }, + { 0x000d, 0x001a }, + { 0x000e, 0x0022 }, + { 0x0010, 0x0058 }, + { 0x0010, 0x0059 }, + { 0x0013, 0x0069 }, + { 0x0013, 0x006a }, + { 0x0013, 0x006b }, + { 0x0013, 0x006c }, + { 0x0013, 0x006d }, + { 0x0013, 0x006e }, + { 0x0013, 0x006f }, + { 0x0013, 0x0070 }, + { 0x0013, 0x0071 }, + { 0x0013, 0x0072 }, + { 0x0013, 0x0073 }, + { 0x0013, 0x0074 }, + { 0x0013, 0x0075 }, + { 0x0013, 0x0076 }, + { 0x0013, 0x0077 }, + { 0x0013, 0x0078 }, + { 0x0013, 0x0079 }, + { 0x000c, 0x0016 }, + { 0x000b, 0x0013 }, + { 0x000c, 0x0017 }, + { 0x000c, 0x0018 }, + { 0x000c, 0x0019 }, + { 0x000e, 0x0023 }, + { 0x000e, 0x0024 }, + { 0x000f, 0x0034 }, + { 0x0010, 0x005a }, + { 0x0011, 0x009d }, + { 0x0013, 0x007a }, + { 0x0013, 0x007b }, + { 0x0013, 0x007c }, + { 0x0013, 0x007d }, + { 0x0013, 0x007e }, + { 0x0013, 0x007f }, + { 0x0013, 0x0080 }, + { 0x0013, 0x0081 }, + { 0x0013, 0x0082 }, + { 0x0013, 0x0083 }, + { 0x0013, 0x0084 }, + { 0x0013, 0x0085 }, + { 0x0013, 0x0086 }, + { 0x0013, 0x0087 }, + { 0x0013, 0x0088 }, + { 0x0013, 0x0089 }, + { 0x0013, 0x008a }, + { 0x000e, 0x0025 }, + { 0x000d, 0x001b }, + { 0x000d, 0x001c }, + { 0x000d, 0x001d }, + { 0x000e, 0x0026 }, + { 0x000f, 0x0035 }, + { 0x0010, 0x005b }, + { 0x0011, 0x009e }, + { 0x0011, 0x009f }, + { 0x0012, 0x012b }, + { 0x0013, 0x008b }, + { 0x0013, 0x008c }, + { 0x0013, 0x008d }, + { 0x0013, 0x008e }, + { 0x0013, 0x008f }, + { 0x0013, 0x0090 }, + { 0x0013, 0x0091 }, + { 0x0013, 0x0092 }, + { 0x0013, 0x0093 }, + { 0x0013, 0x0094 }, + { 0x0013, 0x0095 }, + { 0x0013, 0x0096 }, + { 0x0013, 0x0097 }, + { 0x0013, 0x0098 }, + { 0x0013, 0x0099 }, + { 0x0013, 0x009a }, + { 0x0013, 0x009b }, + { 0x0010, 0x005c }, + { 0x000f, 0x0036 }, + { 0x000e, 0x0027 }, + { 0x000f, 0x0037 }, + { 0x000f, 0x0038 }, + { 0x0010, 0x005d }, + { 0x0011, 0x00a0 }, + { 0x0013, 0x009c }, + { 0x0012, 0x012c }, + { 0x0013, 0x009d }, + { 0x0013, 0x009e }, + { 0x0013, 0x009f }, + { 0x0013, 0x00a0 }, + { 0x0013, 0x00a1 }, + { 0x0013, 0x00a2 }, + { 0x0013, 0x00a3 }, + { 0x0013, 0x00a4 }, + { 0x0013, 0x00a5 }, + { 0x0013, 0x00a6 }, + { 0x0013, 0x00a7 }, + { 0x0013, 0x00a8 }, + { 0x0013, 0x00a9 }, + { 0x0013, 0x00aa }, + { 0x0013, 0x00ab }, + { 0x0013, 0x00ac }, + { 0x0013, 0x00ad }, + { 0x0013, 0x00ae }, + { 0x0010, 0x005e }, + { 0x000f, 0x0039 }, + { 0x0010, 0x005f }, + { 0x0010, 0x0060 }, + { 0x0011, 0x00a1 }, + { 0x0010, 0x0061 }, + { 0x0013, 0x00af }, + { 0x0013, 0x00b0 }, + { 0x0012, 0x012d }, + { 0x0013, 0x00b1 }, + { 0x0013, 0x00b2 }, + { 0x0013, 0x00b3 }, + { 0x0013, 0x00b4 }, + { 0x0013, 0x00b5 }, + { 0x0013, 0x00b6 }, + { 0x0013, 0x00b7 }, + { 0x0013, 0x00b8 }, + { 0x0013, 0x00b9 }, + { 0x0013, 0x00ba }, + { 0x0013, 0x00bb }, + { 0x0013, 0x00bc }, + { 0x0013, 0x00bd }, + { 0x0013, 0x00be }, + { 0x0013, 0x00bf }, + { 0x0013, 0x00c0 }, + { 0x0013, 0x00c1 }, + { 0x0013, 0x00c2 }, + { 0x0012, 0x012e }, + { 0x0011, 0x00a2 }, + { 0x0011, 0x00a3 }, + { 0x0013, 0x00c3 }, + { 0x0013, 0x00c4 }, + { 0x0013, 0x00c5 }, + { 0x0013, 0x00c6 }, + { 0x0013, 0x00c7 }, + { 0x0013, 0x00c8 }, + { 0x0013, 0x00c9 }, + { 0x0013, 0x00ca }, + { 0x0013, 0x00cb }, + { 0x0013, 0x00cc }, + { 0x0013, 0x00cd }, + { 0x0013, 0x00ce }, + { 0x0013, 0x00cf }, + { 0x0013, 0x00d0 }, + { 0x0013, 0x00d1 }, + { 0x0013, 0x00d2 }, + { 0x0013, 0x00d3 }, + { 0x0013, 0x00d4 }, + { 0x0013, 0x00d5 }, + { 0x0013, 0x00d6 }, + { 0x0013, 0x00d7 }, + { 0x0013, 0x00d8 }, + { 0x0013, 0x00d9 }, + { 0x0013, 0x00da }, + { 0x0013, 0x00db }, + { 0x0013, 0x00dc }, + { 0x0013, 0x00dd }, + { 0x0013, 0x00de }, + { 0x0013, 0x00df }, + { 0x0012, 0x012f }, + { 0x0013, 0x00e0 }, + { 0x0013, 0x00e1 }, + { 0x0013, 0x00e2 }, + { 0x0013, 0x00e3 }, + { 0x0013, 0x00e4 }, + { 0x0013, 0x00e5 }, + { 0x0013, 0x00e6 }, + { 0x0013, 0x00e7 }, + { 0x0013, 0x00e8 }, + { 0x0013, 0x00e9 }, + { 0x0013, 0x00ea }, + { 0x0013, 0x00eb }, + { 0x0013, 0x00ec }, + { 0x0013, 0x00ed }, + { 0x0013, 0x00ee }, + { 0x0013, 0x00ef }, + { 0x0013, 0x00f0 }, + { 0x0013, 0x00f1 }, + { 0x0013, 0x00f2 }, + { 0x0013, 0x00f3 }, + { 0x0013, 0x00f4 }, + { 0x0013, 0x00f5 }, + { 0x0013, 0x00f6 }, + { 0x0013, 0x00f7 }, + { 0x0013, 0x00f8 }, + { 0x0013, 0x00f9 }, + { 0x0013, 0x00fa }, + { 0x0013, 0x00fb }, + { 0x0013, 0x00fc }, + { 0x0013, 0x00fd }, + { 0x0013, 0x00fe }, + { 0x0013, 0x00ff }, + { 0x0013, 0x0100 }, + { 0x0013, 0x0101 }, + { 0x0013, 0x0102 }, + { 0x0013, 0x0103 }, + { 0x0013, 0x0104 }, + { 0x0013, 0x0105 }, + { 0x0013, 0x0106 }, + { 0x0013, 0x0107 }, + { 0x0013, 0x0108 }, + { 0x0013, 0x0109 }, + { 0x0013, 0x010a }, + { 0x0013, 0x010b }, + { 0x0013, 0x010c }, + { 0x0013, 0x010d }, + { 0x0013, 0x010e }, + { 0x0013, 0x010f }, + { 0x0013, 0x0110 }, + { 0x0013, 0x0111 }, + { 0x0013, 0x0112 }, + { 0x0013, 0x0113 }, + { 0x0013, 0x0114 }, + { 0x0013, 0x0115 }, + { 0x0013, 0x0116 }, + { 0x0013, 0x0117 }, + { 0x0013, 0x0118 }, + { 0x0013, 0x0119 }, + { 0x0013, 0x011a }, + { 0x0013, 0x011b }, + { 0x0013, 0x011c }, + { 0x0013, 0x011d }, + { 0x0013, 0x011e }, + { 0x0013, 0x011f }, + { 0x0013, 0x0120 }, + { 0x0013, 0x0121 }, + { 0x0013, 0x0122 }, + { 0x0013, 0x0123 }, + { 0x0013, 0x0124 }, + { 0x0013, 0x0125 }, + { 0x0013, 0x0126 }, + { 0x0013, 0x0127 }, + { 0x0013, 0x0128 }, + { 0x0013, 0x0129 }, + { 0x0013, 0x012a }, + { 0x0013, 0x012b }, + { 0x0013, 0x012c }, + { 0x0013, 0x012d }, + { 0x0013, 0x012e }, + { 0x0013, 0x012f }, + { 0x0013, 0x0130 }, + { 0x0013, 0x0131 }, + { 0x0013, 0x0132 }, + { 0x0013, 0x0133 }, + { 0x0013, 0x0134 }, + { 0x0013, 0x0135 }, + { 0x0013, 0x0136 }, + { 0x0013, 0x0137 }, + { 0x0013, 0x0138 }, + { 0x0013, 0x0139 }, + { 0x0013, 0x013a }, + { 0x0013, 0x013b }, + { 0x0013, 0x013c }, + { 0x0013, 0x013d }, + { 0x0013, 0x013e }, + { 0x0013, 0x013f }, + { 0x0013, 0x0140 }, + { 0x0013, 0x0141 }, + { 0x0013, 0x0142 }, + { 0x0013, 0x0143 }, + { 0x0013, 0x0144 }, + { 0x0013, 0x0145 }, + { 0x0013, 0x0146 }, + { 0x0013, 0x0147 }, + { 0x0013, 0x0148 }, + { 0x0013, 0x0149 }, + { 0x0013, 0x014a }, + { 0x0013, 0x014b }, + { 0x0013, 0x014c }, + { 0x0013, 0x014d }, + { 0x0013, 0x014e }, + { 0x0013, 0x014f }, + { 0x0013, 0x0150 }, + { 0x0013, 0x0151 }, + { 0x0013, 0x0152 }, + { 0x0013, 0x0153 }, + { 0x0013, 0x0154 }, + { 0x0013, 0x0155 }, + { 0x0013, 0x0156 }, + { 0x0013, 0x0157 }, + { 0x0013, 0x0158 }, + { 0x0013, 0x0159 }, + { 0x0013, 0x015a }, + { 0x0013, 0x015b }, + { 0x0013, 0x015c }, + { 0x0013, 0x015d }, + { 0x0013, 0x015e }, + { 0x0013, 0x015f }, + { 0x0013, 0x0160 }, + { 0x0013, 0x0161 }, + { 0x0013, 0x0162 }, + { 0x0013, 0x0163 }, + { 0x0013, 0x0164 }, + { 0x0013, 0x0165 }, + { 0x0013, 0x0166 }, + { 0x0013, 0x0167 }, + { 0x0013, 0x0168 }, + { 0x0013, 0x0169 }, + { 0x0013, 0x016a }, + { 0x0013, 0x016b }, + { 0x0013, 0x016c }, + { 0x0013, 0x016d }, + { 0x0013, 0x016e }, + { 0x0013, 0x016f }, + { 0x0013, 0x0170 }, + { 0x0013, 0x0171 }, + { 0x0013, 0x0172 }, + { 0x0013, 0x0173 }, + { 0x0013, 0x0174 }, + { 0x0013, 0x0175 }, + { 0x0013, 0x0176 }, + { 0x0013, 0x0177 }, + { 0x0013, 0x0178 }, + { 0x0013, 0x0179 }, + { 0x0013, 0x017a }, + { 0x0013, 0x017b }, + { 0x0013, 0x017c }, + { 0x0013, 0x017d }, + { 0x0013, 0x017e }, + { 0x0013, 0x017f }, + { 0x0013, 0x0180 }, + { 0x0013, 0x0181 }, + { 0x0013, 0x0182 }, + { 0x0013, 0x0183 }, + { 0x0013, 0x0184 }, + { 0x0013, 0x0185 }, + { 0x0013, 0x0186 }, + { 0x0013, 0x0187 }, + { 0x0013, 0x0188 }, + { 0x0013, 0x0189 }, + { 0x0013, 0x018a }, + { 0x0013, 0x018b }, + { 0x0013, 0x018c }, + { 0x0013, 0x018d }, + { 0x0013, 0x018e }, + { 0x0013, 0x018f }, + { 0x0013, 0x0190 }, + { 0x0013, 0x0191 }, + { 0x0013, 0x0192 }, + { 0x0013, 0x0193 }, + { 0x0013, 0x0194 }, + { 0x0013, 0x0195 }, + { 0x0013, 0x0196 }, + { 0x0013, 0x0197 }, + { 0x0013, 0x0198 }, + { 0x0013, 0x0199 }, + { 0x0013, 0x019a }, + { 0x0013, 0x019b }, + { 0x0013, 0x019c }, + { 0x0013, 0x019d }, + { 0x0013, 0x019e }, + { 0x0013, 0x019f }, + { 0x0013, 0x01a0 }, + { 0x0013, 0x01a1 }, + { 0x0013, 0x01a2 }, + { 0x0013, 0x01a3 }, + { 0x0013, 0x01a4 }, + { 0x0013, 0x01a5 }, + { 0x0013, 0x01a6 }, + { 0x0013, 0x01a7 }, + { 0x0013, 0x01a8 }, + { 0x0013, 0x01a9 }, + { 0x0013, 0x01aa }, + { 0x0013, 0x01ab }, + { 0x0013, 0x01ac }, + { 0x0013, 0x01ad }, + { 0x0013, 0x01ae }, + { 0x0013, 0x01af }, + { 0x0013, 0x01b0 }, + { 0x0013, 0x01b1 }, + { 0x0013, 0x01b2 }, + { 0x0013, 0x01b3 }, + { 0x0013, 0x01b4 }, + { 0x0013, 0x01b5 }, + { 0x0013, 0x01b6 }, + { 0x0013, 0x01b7 }, + { 0x0013, 0x01b8 }, + { 0x0013, 0x01b9 }, + { 0x0013, 0x01ba }, + { 0x0013, 0x01bb }, + { 0x0013, 0x01bc }, + { 0x0013, 0x01bd }, + { 0x0013, 0x01be }, + { 0x0013, 0x01bf }, + { 0x0013, 0x01c0 }, + { 0x0013, 0x01c1 }, + { 0x0013, 0x01c2 }, + { 0x0013, 0x01c3 }, + { 0x0013, 0x01c4 }, + { 0x0013, 0x01c5 }, + { 0x0013, 0x01c6 }, + { 0x0013, 0x01c7 }, + { 0x0013, 0x01c8 }, + { 0x0013, 0x01c9 }, + { 0x0013, 0x01ca }, + { 0x0013, 0x01cb }, + { 0x0013, 0x01cc }, + { 0x0013, 0x01cd }, + { 0x0013, 0x01ce }, + { 0x0013, 0x01cf }, + { 0x0013, 0x01d0 }, + { 0x0013, 0x01d1 }, + { 0x0013, 0x01d2 }, + { 0x0013, 0x01d3 }, + { 0x0013, 0x01d4 }, + { 0x0013, 0x01d5 }, + { 0x0013, 0x01d6 }, + { 0x0013, 0x01d7 }, + { 0x0013, 0x01d8 }, + { 0x0013, 0x01d9 }, + { 0x0013, 0x01da }, + { 0x0013, 0x01db }, + { 0x0013, 0x01dc }, + { 0x0013, 0x01dd }, + { 0x0013, 0x01de }, + { 0x0013, 0x01df }, + { 0x0013, 0x01e0 }, + { 0x0013, 0x01e1 }, + { 0x0013, 0x01e2 }, + { 0x0013, 0x01e3 }, + { 0x0013, 0x01e4 }, + { 0x0013, 0x01e5 }, + { 0x0013, 0x01e6 }, + { 0x0013, 0x01e7 }, + { 0x0013, 0x01e8 }, + { 0x0013, 0x01e9 }, + { 0x0013, 0x01ea }, + { 0x0013, 0x01eb }, + { 0x0013, 0x01ec }, + { 0x0013, 0x01ed }, + { 0x0013, 0x01ee }, + { 0x0013, 0x01ef }, + { 0x0013, 0x01f0 }, + { 0x0013, 0x01f1 }, + { 0x0013, 0x01f2 }, + { 0x0013, 0x01f3 }, + { 0x0013, 0x01f4 }, + { 0x0013, 0x01f5 }, + { 0x0013, 0x01f6 }, + { 0x0013, 0x01f7 }, + { 0x0013, 0x01f8 }, + { 0x0013, 0x01f9 }, + { 0x0013, 0x01fa }, + { 0x0013, 0x01fb }, + { 0x0013, 0x01fc }, + { 0x0013, 0x01fd }, + { 0x0013, 0x01fe }, + { 0x0013, 0x01ff }, + { 0x0013, 0x0200 }, + { 0x0013, 0x0201 }, + { 0x0013, 0x0202 }, + { 0x0013, 0x0203 }, + { 0x0013, 0x0204 }, + { 0x0013, 0x0205 }, + { 0x0013, 0x0206 }, + { 0x0013, 0x0207 }, + { 0x0013, 0x0208 }, + { 0x0013, 0x0209 }, + { 0x0013, 0x020a }, + { 0x0013, 0x020b }, + { 0x0013, 0x020c }, + { 0x0013, 0x020d }, + { 0x0013, 0x020e }, + { 0x0013, 0x020f }, + { 0x0013, 0x0210 }, + { 0x0013, 0x0211 }, + { 0x0013, 0x0212 }, + { 0x0013, 0x0213 }, + { 0x0013, 0x0214 }, + { 0x0013, 0x0215 }, + { 0x0013, 0x0216 }, + { 0x0013, 0x0217 }, + { 0x0013, 0x0218 }, + { 0x0013, 0x0219 }, + { 0x0013, 0x021a }, + { 0x0013, 0x021b }, + { 0x0013, 0x021c }, + { 0x0013, 0x021d }, + { 0x0013, 0x021e }, + { 0x0013, 0x021f }, + { 0x0013, 0x0220 }, + { 0x0013, 0x0221 }, + { 0x0013, 0x0222 }, + { 0x0013, 0x0223 }, + { 0x0013, 0x0224 }, + { 0x0013, 0x0225 }, + { 0x0013, 0x0226 }, + { 0x0013, 0x0227 }, + { 0x0013, 0x0228 }, + { 0x0013, 0x0229 }, + { 0x0013, 0x022a }, + { 0x0013, 0x022b }, + { 0x0013, 0x022c }, + { 0x0013, 0x022d }, + { 0x0013, 0x022e }, + { 0x0013, 0x022f }, + { 0x0013, 0x0230 }, + { 0x0013, 0x0231 }, + { 0x0013, 0x0232 }, + { 0x0013, 0x0233 }, + { 0x0013, 0x0234 }, + { 0x0013, 0x0235 }, + { 0x0013, 0x0236 }, + { 0x0013, 0x0237 }, + { 0x0013, 0x0238 }, + { 0x0013, 0x0239 }, + { 0x0013, 0x023a }, + { 0x0013, 0x023b }, + { 0x0013, 0x023c }, + { 0x0013, 0x023d }, + { 0x0013, 0x023e }, + { 0x0013, 0x023f }, + { 0x0013, 0x0240 }, + { 0x0013, 0x0241 }, + { 0x0013, 0x0242 }, + { 0x0013, 0x0243 }, + { 0x0013, 0x0244 }, + { 0x0013, 0x0245 }, + { 0x0013, 0x0246 }, + { 0x0013, 0x0247 }, + { 0x0013, 0x0248 }, + { 0x0013, 0x0249 }, + { 0x0013, 0x024a }, + { 0x0013, 0x024b }, + { 0x0013, 0x024c }, + { 0x0013, 0x024d }, + { 0x0013, 0x024e }, + { 0x0013, 0x024f }, + { 0x0013, 0x0250 }, + { 0x0013, 0x0251 }, + { 0x0013, 0x0252 }, + { 0x0013, 0x0253 }, -const uint16_t c_aauiLCLDHuffEnc52[32][2] = - { - { 0x0002, 0x0002 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0004, 0x0002 }, - { 0x0004, 0x0003 }, - { 0x0005, 0x0001 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0006, 0x0001 }, - { 0x0007, 0x0001 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000a, 0x0001 }, - { 0x000b, 0x0001 }, - { 0x000c, 0x0001 }, - { 0x000e, 0x0001 }, - { 0x000e, 0x0002 }, - { 0x000e, 0x0003 }, - { 0x000f, 0x0001 }, - { 0x0011, 0x0002 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0003 }, - { 0x0014, 0x0000 }, - { 0x0013, 0x0003 }, - { 0x0014, 0x0001 }, - { 0x0014, 0x0002 }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc53[37][2] = - { - { 0x0002, 0x0002 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0004, 0x0002 }, - { 0x0004, 0x0003 }, - { 0x0005, 0x0002 }, - { 0x0005, 0x0003 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0007, 0x0001 }, - { 0x0007, 0x0002 }, - { 0x0007, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x0009, 0x0001 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000d, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x000e, 0x0002 }, - { 0x000e, 0x0003 }, - { 0x000f, 0x0002 }, - { 0x000f, 0x0003 }, - { 0x0011, 0x0004 }, - { 0x0010, 0x0003 }, - { 0x0011, 0x0005 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0012, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, +const UWord16 c_aauiLCLDHuffEnc50[28][2] = { + { 0x0002, 0x0001 }, + { 0x0002, 0x0002 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0001 }, + { 0x0004, 0x0001 }, + { 0x0005, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x000f, 0x0001 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0005 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc54[39][2] = - { - { 0x0002, 0x0002 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0002 }, - { 0x0003, 0x0003 }, - { 0x0004, 0x0003 }, - { 0x0005, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0006, 0x0002 }, - { 0x0006, 0x0003 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0002 }, - { 0x0007, 0x0003 }, - { 0x0008, 0x0001 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000d, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x000e, 0x0002 }, - { 0x000e, 0x0003 }, - { 0x000f, 0x0002 }, - { 0x000f, 0x0003 }, - { 0x0011, 0x0002 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, +const UWord16 c_aauiLCLDHuffEnc51[29][2] = { + { 0x0002, 0x0002 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0004, 0x0001 }, + { 0x0004, 0x0002 }, + { 0x0004, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0006, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x000d, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + +}; + +const UWord16 c_aauiLCLDHuffEnc52[32][2] = { + { 0x0002, 0x0002 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0004, 0x0002 }, + { 0x0004, 0x0003 }, + { 0x0005, 0x0001 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0006, 0x0001 }, + { 0x0007, 0x0001 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000a, 0x0001 }, + { 0x000b, 0x0001 }, + { 0x000c, 0x0001 }, + { 0x000e, 0x0001 }, + { 0x000e, 0x0002 }, + { 0x000e, 0x0003 }, + { 0x000f, 0x0001 }, + { 0x0011, 0x0002 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0003 }, + { 0x0014, 0x0000 }, + { 0x0013, 0x0003 }, + { 0x0014, 0x0001 }, + { 0x0014, 0x0002 }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, +}; + +const UWord16 c_aauiLCLDHuffEnc53[37][2] = { + { 0x0002, 0x0002 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0004, 0x0002 }, + { 0x0004, 0x0003 }, + { 0x0005, 0x0002 }, + { 0x0005, 0x0003 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0007, 0x0001 }, + { 0x0007, 0x0002 }, + { 0x0007, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x0009, 0x0001 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000d, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x000e, 0x0002 }, + { 0x000e, 0x0003 }, + { 0x000f, 0x0002 }, + { 0x000f, 0x0003 }, + { 0x0011, 0x0004 }, + { 0x0010, 0x0003 }, + { 0x0011, 0x0005 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0012, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + +}; + +const UWord16 c_aauiLCLDHuffEnc54[39][2] = { + { 0x0002, 0x0002 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0002 }, + { 0x0003, 0x0003 }, + { 0x0004, 0x0003 }, + { 0x0005, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0006, 0x0002 }, + { 0x0006, 0x0003 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0002 }, + { 0x0007, 0x0003 }, + { 0x0008, 0x0001 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000d, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x000e, 0x0002 }, + { 0x000e, 0x0003 }, + { 0x000f, 0x0002 }, + { 0x000f, 0x0003 }, + { 0x0011, 0x0002 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc55[46][2] = - { - { 0x0003, 0x0003 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0004, 0x0003 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0005, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0006, 0x0003 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0002 }, - { 0x0007, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000b, 0x0002 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0002 }, - { 0x000c, 0x0003 }, - { 0x000d, 0x0002 }, - { 0x000d, 0x0003 }, - { 0x000e, 0x0002 }, - { 0x000e, 0x0003 }, - { 0x000f, 0x0003 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0010, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, +const UWord16 c_aauiLCLDHuffEnc55[46][2] = { + { 0x0003, 0x0003 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0004, 0x0003 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0005, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0006, 0x0003 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0002 }, + { 0x0007, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000b, 0x0002 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0002 }, + { 0x000c, 0x0003 }, + { 0x000d, 0x0002 }, + { 0x000d, 0x0003 }, + { 0x000e, 0x0002 }, + { 0x000e, 0x0003 }, + { 0x000f, 0x0003 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0010, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc56[55][2] = - { - { 0x0003, 0x0003 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0004 }, - { 0x0003, 0x0005 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0005, 0x0003 }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0006, 0x0003 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0007, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0008, 0x0002 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0009, 0x0002 }, - { 0x0009, 0x0003 }, - { 0x000a, 0x0002 }, - { 0x000a, 0x0003 }, - { 0x000b, 0x0003 }, - { 0x000c, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000d, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000e, 0x0003 }, - { 0x000e, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x000f, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x0010, 0x0002 }, - { 0x0010, 0x0003 }, - { 0x0010, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x0010, 0x0006 }, - { 0x0010, 0x0007 }, - { 0x0013, 0x0000 }, - { 0x0011, 0x0003 }, - { 0x0012, 0x0005 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, +const UWord16 c_aauiLCLDHuffEnc56[55][2] = { + { 0x0003, 0x0003 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0004 }, + { 0x0003, 0x0005 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0005, 0x0003 }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0006, 0x0003 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0007, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0008, 0x0002 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0009, 0x0002 }, + { 0x0009, 0x0003 }, + { 0x000a, 0x0002 }, + { 0x000a, 0x0003 }, + { 0x000b, 0x0003 }, + { 0x000c, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000d, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000e, 0x0003 }, + { 0x000e, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x000f, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x0010, 0x0002 }, + { 0x0010, 0x0003 }, + { 0x0010, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x0010, 0x0006 }, + { 0x0010, 0x0007 }, + { 0x0013, 0x0000 }, + { 0x0011, 0x0003 }, + { 0x0012, 0x0005 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc57[65][2] = - { - { 0x0003, 0x0004 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0005 }, - { 0x0004, 0x0004 }, - { 0x0004, 0x0005 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0005, 0x0004 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0007, 0x0003 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0009, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000a, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000b, 0x0003 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000c, 0x0003 }, - { 0x000c, 0x0004 }, - { 0x000d, 0x0003 }, - { 0x000c, 0x0005 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000e, 0x0003 }, - { 0x000e, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x000f, 0x0003 }, - { 0x0010, 0x0003 }, - { 0x000f, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x0010, 0x0004 }, - { 0x0010, 0x0005 }, - { 0x0013, 0x0000 }, - { 0x0011, 0x0005 }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0012, 0x0007 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, +const UWord16 c_aauiLCLDHuffEnc57[65][2] = { + { 0x0003, 0x0004 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0005 }, + { 0x0004, 0x0004 }, + { 0x0004, 0x0005 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0005, 0x0004 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0007, 0x0003 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0009, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000a, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000b, 0x0003 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000c, 0x0003 }, + { 0x000c, 0x0004 }, + { 0x000d, 0x0003 }, + { 0x000c, 0x0005 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000e, 0x0003 }, + { 0x000e, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x000f, 0x0003 }, + { 0x0010, 0x0003 }, + { 0x000f, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x0010, 0x0004 }, + { 0x0010, 0x0005 }, + { 0x0013, 0x0000 }, + { 0x0011, 0x0005 }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0012, 0x0007 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc58[77][2] = - { - { 0x0004, 0x0005 }, - { 0x0003, 0x0005 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0005, 0x0005 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0006, 0x0004 }, - { 0x0006, 0x0005 }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0007, 0x0004 }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0009, 0x0003 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000a, 0x0003 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x000e, 0x0006 }, - { 0x000e, 0x0007 }, - { 0x000f, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x000f, 0x0006 }, - { 0x0010, 0x0004 }, - { 0x000f, 0x0007 }, - { 0x0010, 0x0005 }, - { 0x0010, 0x0006 }, - { 0x0010, 0x0007 }, - { 0x0013, 0x0000 }, - { 0x0013, 0x0001 }, - { 0x0012, 0x0006 }, - { 0x0011, 0x0007 }, - { 0x0013, 0x0002 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0012, 0x0007 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, - { 0x0012, 0x000c }, - { 0x0012, 0x000d }, +const UWord16 c_aauiLCLDHuffEnc58[77][2] = { + { 0x0004, 0x0005 }, + { 0x0003, 0x0005 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0005, 0x0005 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0006, 0x0004 }, + { 0x0006, 0x0005 }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0007, 0x0004 }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0009, 0x0003 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000a, 0x0003 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x000e, 0x0006 }, + { 0x000e, 0x0007 }, + { 0x000f, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x000f, 0x0006 }, + { 0x0010, 0x0004 }, + { 0x000f, 0x0007 }, + { 0x0010, 0x0005 }, + { 0x0010, 0x0006 }, + { 0x0010, 0x0007 }, + { 0x0013, 0x0000 }, + { 0x0013, 0x0001 }, + { 0x0012, 0x0006 }, + { 0x0011, 0x0007 }, + { 0x0013, 0x0002 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0012, 0x0007 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, + { 0x0012, 0x000c }, + { 0x0012, 0x000d }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc59[91][2] = - { - { 0x0003, 0x0005 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0006 }, - { 0x0004, 0x0007 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0005, 0x0006 }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0006, 0x0006 }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0007, 0x0005 }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0007, 0x0008 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0008, 0x0003 }, - { 0x0008, 0x0004 }, - { 0x0008, 0x0005 }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000d, 0x0003 }, - { 0x000d, 0x0004 }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000e, 0x0003 }, - { 0x000e, 0x0004 }, - { 0x000e, 0x0005 }, - { 0x000f, 0x0003 }, - { 0x000f, 0x0004 }, - { 0x000f, 0x0005 }, - { 0x0011, 0x0008 }, - { 0x0011, 0x0009 }, - { 0x0013, 0x0000 }, - { 0x0011, 0x000a }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0012, 0x000d }, - { 0x0012, 0x000e }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0011, 0x000b }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0012, 0x000f }, +const UWord16 c_aauiLCLDHuffEnc59[91][2] = { + { 0x0003, 0x0005 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0006 }, + { 0x0004, 0x0007 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0005, 0x0006 }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0006, 0x0006 }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0007, 0x0005 }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0007, 0x0008 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0008, 0x0003 }, + { 0x0008, 0x0004 }, + { 0x0008, 0x0005 }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000d, 0x0003 }, + { 0x000d, 0x0004 }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000e, 0x0003 }, + { 0x000e, 0x0004 }, + { 0x000e, 0x0005 }, + { 0x000f, 0x0003 }, + { 0x000f, 0x0004 }, + { 0x000f, 0x0005 }, + { 0x0011, 0x0008 }, + { 0x0011, 0x0009 }, + { 0x0013, 0x0000 }, + { 0x0011, 0x000a }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0012, 0x000d }, + { 0x0012, 0x000e }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0011, 0x000b }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0012, 0x000f }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc60[109][2] = - { - { 0x0004, 0x0007 }, - { 0x0002, 0x0003 }, - { 0x0003, 0x0005 }, - { 0x0004, 0x0008 }, - { 0x0004, 0x0009 }, - { 0x0005, 0x0007 }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0006, 0x0007 }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0007, 0x0006 }, - { 0x0007, 0x0007 }, - { 0x0007, 0x0008 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0009, 0x0004 }, - { 0x0009, 0x0005 }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000b, 0x0004 }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0004 }, - { 0x000c, 0x0005 }, - { 0x000c, 0x0006 }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000c, 0x0007 }, - { 0x000e, 0x0005 }, - { 0x000e, 0x0006 }, - { 0x000e, 0x0007 }, - { 0x000e, 0x0008 }, - { 0x000f, 0x0005 }, - { 0x000e, 0x0009 }, - { 0x000f, 0x0006 }, - { 0x0010, 0x0006 }, - { 0x000f, 0x0007 }, - { 0x000f, 0x0008 }, - { 0x000f, 0x0009 }, - { 0x0010, 0x0007 }, - { 0x0010, 0x0008 }, - { 0x0010, 0x0009 }, - { 0x0011, 0x000a }, - { 0x0013, 0x0000 }, - { 0x0011, 0x000b }, - { 0x0013, 0x0001 }, - { 0x0013, 0x0002 }, - { 0x0012, 0x0011 }, - { 0x0012, 0x0012 }, - { 0x0013, 0x0003 }, - { 0x0013, 0x0004 }, - { 0x0013, 0x0005 }, - { 0x0013, 0x0006 }, - { 0x0013, 0x0007 }, - { 0x0013, 0x0008 }, - { 0x0013, 0x0009 }, - { 0x0013, 0x000a }, - { 0x0013, 0x000b }, - { 0x0013, 0x000c }, - { 0x0013, 0x000d }, - { 0x0013, 0x000e }, - { 0x0013, 0x000f }, - { 0x0013, 0x0010 }, - { 0x0013, 0x0011 }, - { 0x0013, 0x0012 }, - { 0x0013, 0x0013 }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0012, 0x0013 }, +const UWord16 c_aauiLCLDHuffEnc60[109][2] = { + { 0x0004, 0x0007 }, + { 0x0002, 0x0003 }, + { 0x0003, 0x0005 }, + { 0x0004, 0x0008 }, + { 0x0004, 0x0009 }, + { 0x0005, 0x0007 }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0006, 0x0007 }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0007, 0x0006 }, + { 0x0007, 0x0007 }, + { 0x0007, 0x0008 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0009, 0x0004 }, + { 0x0009, 0x0005 }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000b, 0x0004 }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0004 }, + { 0x000c, 0x0005 }, + { 0x000c, 0x0006 }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000c, 0x0007 }, + { 0x000e, 0x0005 }, + { 0x000e, 0x0006 }, + { 0x000e, 0x0007 }, + { 0x000e, 0x0008 }, + { 0x000f, 0x0005 }, + { 0x000e, 0x0009 }, + { 0x000f, 0x0006 }, + { 0x0010, 0x0006 }, + { 0x000f, 0x0007 }, + { 0x000f, 0x0008 }, + { 0x000f, 0x0009 }, + { 0x0010, 0x0007 }, + { 0x0010, 0x0008 }, + { 0x0010, 0x0009 }, + { 0x0011, 0x000a }, + { 0x0013, 0x0000 }, + { 0x0011, 0x000b }, + { 0x0013, 0x0001 }, + { 0x0013, 0x0002 }, + { 0x0012, 0x0011 }, + { 0x0012, 0x0012 }, + { 0x0013, 0x0003 }, + { 0x0013, 0x0004 }, + { 0x0013, 0x0005 }, + { 0x0013, 0x0006 }, + { 0x0013, 0x0007 }, + { 0x0013, 0x0008 }, + { 0x0013, 0x0009 }, + { 0x0013, 0x000a }, + { 0x0013, 0x000b }, + { 0x0013, 0x000c }, + { 0x0013, 0x000d }, + { 0x0013, 0x000e }, + { 0x0013, 0x000f }, + { 0x0013, 0x0010 }, + { 0x0013, 0x0011 }, + { 0x0013, 0x0012 }, + { 0x0013, 0x0013 }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0012, 0x0013 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc61[129][2] = - { - { 0x0004, 0x0008 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x0009 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0005, 0x0008 }, - { 0x0005, 0x0009 }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0006, 0x0008 }, - { 0x0006, 0x0009 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0007, 0x0008 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0008, 0x0006 }, - { 0x0008, 0x0007 }, - { 0x0008, 0x0008 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0008, 0x000e }, - { 0x0008, 0x000f }, - { 0x0009, 0x0006 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000a, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000b, 0x0005 }, - { 0x000b, 0x0006 }, - { 0x000b, 0x0007 }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000c, 0x0006 }, - { 0x000c, 0x0007 }, - { 0x000c, 0x0008 }, - { 0x000c, 0x0009 }, - { 0x000d, 0x0005 }, - { 0x000d, 0x0006 }, - { 0x000d, 0x0007 }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000d, 0x000a }, - { 0x000e, 0x0008 }, - { 0x000d, 0x000b }, - { 0x000e, 0x0009 }, - { 0x000f, 0x0009 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, - { 0x000f, 0x000c }, - { 0x000f, 0x000d }, - { 0x000f, 0x000e }, - { 0x0010, 0x000c }, - { 0x0011, 0x0015 }, - { 0x0010, 0x000d }, - { 0x000f, 0x000f }, - { 0x0010, 0x000e }, - { 0x0010, 0x000f }, - { 0x0012, 0x0000 }, - { 0x0011, 0x0016 }, - { 0x0010, 0x0010 }, - { 0x0010, 0x0011 }, - { 0x0011, 0x0017 }, - { 0x0012, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, - { 0x0012, 0x000c }, - { 0x0012, 0x000d }, - { 0x0012, 0x000e }, - { 0x0012, 0x000f }, - { 0x0012, 0x0010 }, - { 0x0012, 0x0011 }, - { 0x0012, 0x0012 }, - { 0x0012, 0x0013 }, - { 0x0012, 0x0014 }, - { 0x0012, 0x0015 }, - { 0x0012, 0x0016 }, - { 0x0012, 0x0017 }, - { 0x0012, 0x0018 }, - { 0x0012, 0x0019 }, - { 0x0012, 0x001a }, - { 0x0012, 0x001b }, - { 0x0012, 0x001c }, - { 0x0012, 0x001d }, - { 0x0012, 0x001e }, - { 0x0012, 0x001f }, - { 0x0012, 0x0020 }, - { 0x0012, 0x0021 }, - { 0x0012, 0x0022 }, - { 0x0012, 0x0023 }, - { 0x0012, 0x0024 }, - { 0x0012, 0x0025 }, - { 0x0012, 0x0026 }, - { 0x0012, 0x0027 }, - { 0x0012, 0x0028 }, - { 0x0012, 0x0029 }, +const UWord16 c_aauiLCLDHuffEnc61[129][2] = { + { 0x0004, 0x0008 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x0009 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0005, 0x0008 }, + { 0x0005, 0x0009 }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0006, 0x0008 }, + { 0x0006, 0x0009 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0007, 0x0008 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0008, 0x0006 }, + { 0x0008, 0x0007 }, + { 0x0008, 0x0008 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0008, 0x000e }, + { 0x0008, 0x000f }, + { 0x0009, 0x0006 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000a, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000b, 0x0005 }, + { 0x000b, 0x0006 }, + { 0x000b, 0x0007 }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000c, 0x0006 }, + { 0x000c, 0x0007 }, + { 0x000c, 0x0008 }, + { 0x000c, 0x0009 }, + { 0x000d, 0x0005 }, + { 0x000d, 0x0006 }, + { 0x000d, 0x0007 }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000d, 0x000a }, + { 0x000e, 0x0008 }, + { 0x000d, 0x000b }, + { 0x000e, 0x0009 }, + { 0x000f, 0x0009 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, + { 0x000f, 0x000c }, + { 0x000f, 0x000d }, + { 0x000f, 0x000e }, + { 0x0010, 0x000c }, + { 0x0011, 0x0015 }, + { 0x0010, 0x000d }, + { 0x000f, 0x000f }, + { 0x0010, 0x000e }, + { 0x0010, 0x000f }, + { 0x0012, 0x0000 }, + { 0x0011, 0x0016 }, + { 0x0010, 0x0010 }, + { 0x0010, 0x0011 }, + { 0x0011, 0x0017 }, + { 0x0012, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, + { 0x0012, 0x000c }, + { 0x0012, 0x000d }, + { 0x0012, 0x000e }, + { 0x0012, 0x000f }, + { 0x0012, 0x0010 }, + { 0x0012, 0x0011 }, + { 0x0012, 0x0012 }, + { 0x0012, 0x0013 }, + { 0x0012, 0x0014 }, + { 0x0012, 0x0015 }, + { 0x0012, 0x0016 }, + { 0x0012, 0x0017 }, + { 0x0012, 0x0018 }, + { 0x0012, 0x0019 }, + { 0x0012, 0x001a }, + { 0x0012, 0x001b }, + { 0x0012, 0x001c }, + { 0x0012, 0x001d }, + { 0x0012, 0x001e }, + { 0x0012, 0x001f }, + { 0x0012, 0x0020 }, + { 0x0012, 0x0021 }, + { 0x0012, 0x0022 }, + { 0x0012, 0x0023 }, + { 0x0012, 0x0024 }, + { 0x0012, 0x0025 }, + { 0x0012, 0x0026 }, + { 0x0012, 0x0027 }, + { 0x0012, 0x0028 }, + { 0x0012, 0x0029 }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc62[153][2] = - { - { 0x0004, 0x0009 }, - { 0x0003, 0x0006 }, - { 0x0003, 0x0007 }, - { 0x0004, 0x000a }, - { 0x0004, 0x000b }, - { 0x0005, 0x000a }, - { 0x0005, 0x000b }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0005, 0x0010 }, - { 0x0005, 0x0011 }, - { 0x0006, 0x000a }, - { 0x0006, 0x000b }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0007, 0x0009 }, - { 0x0007, 0x000a }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0007, 0x0012 }, - { 0x0007, 0x0013 }, - { 0x0008, 0x0009 }, - { 0x0008, 0x000a }, - { 0x0008, 0x000b }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0008, 0x000e }, - { 0x0008, 0x000f }, - { 0x0008, 0x0010 }, - { 0x0008, 0x0011 }, - { 0x0009, 0x0007 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x0009, 0x000c }, - { 0x0009, 0x000d }, - { 0x0009, 0x000e }, - { 0x0009, 0x000f }, - { 0x0009, 0x0010 }, - { 0x0009, 0x0011 }, - { 0x000a, 0x0004 }, - { 0x000a, 0x0005 }, - { 0x000a, 0x0006 }, - { 0x000a, 0x0007 }, - { 0x000a, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000b, 0x0007 }, - { 0x000c, 0x0007 }, - { 0x000c, 0x0008 }, - { 0x000c, 0x0009 }, - { 0x000c, 0x000a }, - { 0x000c, 0x000b }, - { 0x000c, 0x000c }, - { 0x000d, 0x0007 }, - { 0x000c, 0x000d }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000d, 0x000a }, - { 0x000d, 0x000b }, - { 0x000e, 0x0008 }, - { 0x000d, 0x000c }, - { 0x000d, 0x000d }, - { 0x000e, 0x0009 }, - { 0x000e, 0x000a }, - { 0x000e, 0x000b }, - { 0x000e, 0x000c }, - { 0x000f, 0x000c }, - { 0x000e, 0x000d }, - { 0x000f, 0x000d }, - { 0x000f, 0x000e }, - { 0x000f, 0x000f }, - { 0x0010, 0x000f }, - { 0x0010, 0x0010 }, - { 0x0011, 0x0019 }, - { 0x0010, 0x0011 }, - { 0x0010, 0x0012 }, - { 0x0010, 0x0013 }, - { 0x0010, 0x0014 }, - { 0x0010, 0x0015 }, - { 0x0012, 0x0000 }, - { 0x0010, 0x0016 }, - { 0x0011, 0x001a }, - { 0x0010, 0x0017 }, - { 0x0012, 0x0001 }, - { 0x0012, 0x0002 }, - { 0x0012, 0x0003 }, - { 0x0011, 0x001b }, - { 0x0012, 0x0004 }, - { 0x0012, 0x0005 }, - { 0x0012, 0x0006 }, - { 0x0012, 0x0007 }, - { 0x0012, 0x0008 }, - { 0x0012, 0x0009 }, - { 0x0012, 0x000a }, - { 0x0012, 0x000b }, - { 0x0012, 0x000c }, - { 0x0012, 0x000d }, - { 0x0012, 0x000e }, - { 0x0012, 0x000f }, - { 0x0012, 0x0010 }, - { 0x0012, 0x0011 }, - { 0x0012, 0x0012 }, - { 0x0012, 0x0013 }, - { 0x0012, 0x0014 }, - { 0x0012, 0x0015 }, - { 0x0012, 0x0016 }, - { 0x0012, 0x0017 }, - { 0x0012, 0x0018 }, - { 0x0011, 0x001c }, - { 0x0012, 0x0019 }, - { 0x0012, 0x001a }, - { 0x0012, 0x001b }, - { 0x0012, 0x001c }, - { 0x0012, 0x001d }, - { 0x0012, 0x001e }, - { 0x0012, 0x001f }, - { 0x0012, 0x0020 }, - { 0x0012, 0x0021 }, - { 0x0012, 0x0022 }, - { 0x0012, 0x0023 }, - { 0x0012, 0x0024 }, - { 0x0012, 0x0025 }, - { 0x0012, 0x0026 }, - { 0x0012, 0x0027 }, - { 0x0012, 0x0028 }, - { 0x0012, 0x0029 }, - { 0x0012, 0x002a }, - { 0x0012, 0x002b }, - { 0x0012, 0x002c }, - { 0x0012, 0x002d }, - { 0x0012, 0x002e }, - { 0x0012, 0x002f }, - { 0x0012, 0x0030 }, - { 0x0012, 0x0031 }, - { 0x0011, 0x001d }, +const UWord16 c_aauiLCLDHuffEnc62[153][2] = { + { 0x0004, 0x0009 }, + { 0x0003, 0x0006 }, + { 0x0003, 0x0007 }, + { 0x0004, 0x000a }, + { 0x0004, 0x000b }, + { 0x0005, 0x000a }, + { 0x0005, 0x000b }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0005, 0x0010 }, + { 0x0005, 0x0011 }, + { 0x0006, 0x000a }, + { 0x0006, 0x000b }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0007, 0x0009 }, + { 0x0007, 0x000a }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0007, 0x0012 }, + { 0x0007, 0x0013 }, + { 0x0008, 0x0009 }, + { 0x0008, 0x000a }, + { 0x0008, 0x000b }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0008, 0x000e }, + { 0x0008, 0x000f }, + { 0x0008, 0x0010 }, + { 0x0008, 0x0011 }, + { 0x0009, 0x0007 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x0009, 0x000c }, + { 0x0009, 0x000d }, + { 0x0009, 0x000e }, + { 0x0009, 0x000f }, + { 0x0009, 0x0010 }, + { 0x0009, 0x0011 }, + { 0x000a, 0x0004 }, + { 0x000a, 0x0005 }, + { 0x000a, 0x0006 }, + { 0x000a, 0x0007 }, + { 0x000a, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000b, 0x0007 }, + { 0x000c, 0x0007 }, + { 0x000c, 0x0008 }, + { 0x000c, 0x0009 }, + { 0x000c, 0x000a }, + { 0x000c, 0x000b }, + { 0x000c, 0x000c }, + { 0x000d, 0x0007 }, + { 0x000c, 0x000d }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000d, 0x000a }, + { 0x000d, 0x000b }, + { 0x000e, 0x0008 }, + { 0x000d, 0x000c }, + { 0x000d, 0x000d }, + { 0x000e, 0x0009 }, + { 0x000e, 0x000a }, + { 0x000e, 0x000b }, + { 0x000e, 0x000c }, + { 0x000f, 0x000c }, + { 0x000e, 0x000d }, + { 0x000f, 0x000d }, + { 0x000f, 0x000e }, + { 0x000f, 0x000f }, + { 0x0010, 0x000f }, + { 0x0010, 0x0010 }, + { 0x0011, 0x0019 }, + { 0x0010, 0x0011 }, + { 0x0010, 0x0012 }, + { 0x0010, 0x0013 }, + { 0x0010, 0x0014 }, + { 0x0010, 0x0015 }, + { 0x0012, 0x0000 }, + { 0x0010, 0x0016 }, + { 0x0011, 0x001a }, + { 0x0010, 0x0017 }, + { 0x0012, 0x0001 }, + { 0x0012, 0x0002 }, + { 0x0012, 0x0003 }, + { 0x0011, 0x001b }, + { 0x0012, 0x0004 }, + { 0x0012, 0x0005 }, + { 0x0012, 0x0006 }, + { 0x0012, 0x0007 }, + { 0x0012, 0x0008 }, + { 0x0012, 0x0009 }, + { 0x0012, 0x000a }, + { 0x0012, 0x000b }, + { 0x0012, 0x000c }, + { 0x0012, 0x000d }, + { 0x0012, 0x000e }, + { 0x0012, 0x000f }, + { 0x0012, 0x0010 }, + { 0x0012, 0x0011 }, + { 0x0012, 0x0012 }, + { 0x0012, 0x0013 }, + { 0x0012, 0x0014 }, + { 0x0012, 0x0015 }, + { 0x0012, 0x0016 }, + { 0x0012, 0x0017 }, + { 0x0012, 0x0018 }, + { 0x0011, 0x001c }, + { 0x0012, 0x0019 }, + { 0x0012, 0x001a }, + { 0x0012, 0x001b }, + { 0x0012, 0x001c }, + { 0x0012, 0x001d }, + { 0x0012, 0x001e }, + { 0x0012, 0x001f }, + { 0x0012, 0x0020 }, + { 0x0012, 0x0021 }, + { 0x0012, 0x0022 }, + { 0x0012, 0x0023 }, + { 0x0012, 0x0024 }, + { 0x0012, 0x0025 }, + { 0x0012, 0x0026 }, + { 0x0012, 0x0027 }, + { 0x0012, 0x0028 }, + { 0x0012, 0x0029 }, + { 0x0012, 0x002a }, + { 0x0012, 0x002b }, + { 0x0012, 0x002c }, + { 0x0012, 0x002d }, + { 0x0012, 0x002e }, + { 0x0012, 0x002f }, + { 0x0012, 0x0030 }, + { 0x0012, 0x0031 }, + { 0x0011, 0x001d }, - }; +}; -const uint16_t c_aauiLCLDHuffEnc63[181][2] = - { - { 0x0004, 0x0008 }, - { 0x0003, 0x0005 }, - { 0x0002, 0x0003 }, - { 0x0004, 0x0009 }, - { 0x0005, 0x000c }, - { 0x0005, 0x000d }, - { 0x0005, 0x000e }, - { 0x0005, 0x000f }, - { 0x0006, 0x000c }, - { 0x0006, 0x000d }, - { 0x0006, 0x000e }, - { 0x0006, 0x000f }, - { 0x0006, 0x0010 }, - { 0x0006, 0x0011 }, - { 0x0006, 0x0012 }, - { 0x0006, 0x0013 }, - { 0x0006, 0x0014 }, - { 0x0006, 0x0015 }, - { 0x0006, 0x0016 }, - { 0x0006, 0x0017 }, - { 0x0007, 0x000b }, - { 0x0007, 0x000c }, - { 0x0007, 0x000d }, - { 0x0007, 0x000e }, - { 0x0007, 0x000f }, - { 0x0007, 0x0010 }, - { 0x0007, 0x0011 }, - { 0x0007, 0x0012 }, - { 0x0007, 0x0013 }, - { 0x0007, 0x0014 }, - { 0x0007, 0x0015 }, - { 0x0007, 0x0016 }, - { 0x0007, 0x0017 }, - { 0x0008, 0x000c }, - { 0x0008, 0x000d }, - { 0x0008, 0x000e }, - { 0x0008, 0x000f }, - { 0x0008, 0x0010 }, - { 0x0008, 0x0011 }, - { 0x0008, 0x0012 }, - { 0x0008, 0x0013 }, - { 0x0008, 0x0014 }, - { 0x0008, 0x0015 }, - { 0x0009, 0x0008 }, - { 0x0009, 0x0009 }, - { 0x0009, 0x000a }, - { 0x0009, 0x000b }, - { 0x0009, 0x000c }, - { 0x0009, 0x000d }, - { 0x0009, 0x000e }, - { 0x0009, 0x000f }, - { 0x0009, 0x0010 }, - { 0x0009, 0x0011 }, - { 0x0009, 0x0012 }, - { 0x0009, 0x0013 }, - { 0x0009, 0x0014 }, - { 0x0009, 0x0015 }, - { 0x000a, 0x0007 }, - { 0x0009, 0x0016 }, - { 0x0009, 0x0017 }, - { 0x000a, 0x0008 }, - { 0x000a, 0x0009 }, - { 0x000a, 0x000a }, - { 0x000a, 0x000b }, - { 0x000a, 0x000c }, - { 0x000a, 0x000d }, - { 0x000a, 0x000e }, - { 0x000b, 0x0008 }, - { 0x000b, 0x0009 }, - { 0x000b, 0x000a }, - { 0x000a, 0x000f }, - { 0x000b, 0x000b }, - { 0x000b, 0x000c }, - { 0x000b, 0x000d }, - { 0x000c, 0x0009 }, - { 0x000c, 0x000a }, - { 0x000c, 0x000b }, - { 0x000c, 0x000c }, - { 0x000c, 0x000d }, - { 0x000c, 0x000e }, - { 0x000c, 0x000f }, - { 0x000d, 0x0008 }, - { 0x000d, 0x0009 }, - { 0x000d, 0x000a }, - { 0x000d, 0x000b }, - { 0x000d, 0x000c }, - { 0x000d, 0x000d }, - { 0x000d, 0x000e }, - { 0x000d, 0x000f }, - { 0x000d, 0x0010 }, - { 0x000d, 0x0011 }, - { 0x000e, 0x0007 }, - { 0x000e, 0x0008 }, - { 0x000e, 0x0009 }, - { 0x000e, 0x000a }, - { 0x000e, 0x000b }, - { 0x000e, 0x000c }, - { 0x000e, 0x000d }, - { 0x000e, 0x000e }, - { 0x000e, 0x000f }, - { 0x000f, 0x0008 }, - { 0x000f, 0x0009 }, - { 0x000f, 0x000a }, - { 0x000f, 0x000b }, - { 0x000f, 0x000c }, - { 0x0010, 0x0009 }, - { 0x0010, 0x000a }, - { 0x000f, 0x000d }, - { 0x0010, 0x000b }, - { 0x0010, 0x000c }, - { 0x0010, 0x000d }, - { 0x0011, 0x000e }, - { 0x0011, 0x000f }, - { 0x0010, 0x000e }, - { 0x0011, 0x0010 }, - { 0x0011, 0x0011 }, - { 0x0012, 0x0014 }, - { 0x0014, 0x0000 }, - { 0x0010, 0x000f }, - { 0x0012, 0x0015 }, - { 0x0012, 0x0016 }, - { 0x0014, 0x0001 }, - { 0x0012, 0x0017 }, - { 0x0012, 0x0018 }, - { 0x0012, 0x0019 }, - { 0x0013, 0x0010 }, - { 0x0012, 0x001a }, - { 0x0014, 0x0002 }, - { 0x0012, 0x001b }, - { 0x0014, 0x0003 }, - { 0x0014, 0x0004 }, - { 0x0014, 0x0005 }, - { 0x0013, 0x0011 }, - { 0x0014, 0x0006 }, - { 0x0013, 0x0012 }, - { 0x0014, 0x0007 }, - { 0x0014, 0x0008 }, - { 0x0014, 0x0009 }, - { 0x0014, 0x000a }, - { 0x0014, 0x000b }, - { 0x0014, 0x000c }, - { 0x0014, 0x000d }, - { 0x0014, 0x000e }, - { 0x0013, 0x0013 }, - { 0x0014, 0x000f }, - { 0x0014, 0x0010 }, - { 0x0014, 0x0011 }, - { 0x0014, 0x0012 }, - { 0x0014, 0x0013 }, - { 0x0014, 0x0014 }, - { 0x0014, 0x0015 }, - { 0x0014, 0x0016 }, - { 0x0014, 0x0017 }, - { 0x0014, 0x0018 }, - { 0x0014, 0x0019 }, - { 0x0014, 0x001a }, - { 0x0014, 0x001b }, - { 0x0014, 0x001c }, - { 0x0014, 0x001d }, - { 0x0014, 0x001e }, - { 0x0014, 0x001f }, - { 0x0013, 0x0014 }, - { 0x0013, 0x0015 }, - { 0x0013, 0x0016 }, - { 0x0013, 0x0017 }, - { 0x0013, 0x0018 }, - { 0x0013, 0x0019 }, - { 0x0013, 0x001a }, - { 0x0013, 0x001b }, - { 0x0013, 0x001c }, - { 0x0013, 0x001d }, - { 0x0013, 0x001e }, - { 0x0013, 0x001f }, - { 0x0013, 0x0020 }, - { 0x0013, 0x0021 }, - { 0x0013, 0x0022 }, - { 0x0013, 0x0023 }, - { 0x0013, 0x0024 }, - { 0x0013, 0x0025 }, - { 0x0013, 0x0026 }, - { 0x0013, 0x0027 }, +const UWord16 c_aauiLCLDHuffEnc63[181][2] = { + { 0x0004, 0x0008 }, + { 0x0003, 0x0005 }, + { 0x0002, 0x0003 }, + { 0x0004, 0x0009 }, + { 0x0005, 0x000c }, + { 0x0005, 0x000d }, + { 0x0005, 0x000e }, + { 0x0005, 0x000f }, + { 0x0006, 0x000c }, + { 0x0006, 0x000d }, + { 0x0006, 0x000e }, + { 0x0006, 0x000f }, + { 0x0006, 0x0010 }, + { 0x0006, 0x0011 }, + { 0x0006, 0x0012 }, + { 0x0006, 0x0013 }, + { 0x0006, 0x0014 }, + { 0x0006, 0x0015 }, + { 0x0006, 0x0016 }, + { 0x0006, 0x0017 }, + { 0x0007, 0x000b }, + { 0x0007, 0x000c }, + { 0x0007, 0x000d }, + { 0x0007, 0x000e }, + { 0x0007, 0x000f }, + { 0x0007, 0x0010 }, + { 0x0007, 0x0011 }, + { 0x0007, 0x0012 }, + { 0x0007, 0x0013 }, + { 0x0007, 0x0014 }, + { 0x0007, 0x0015 }, + { 0x0007, 0x0016 }, + { 0x0007, 0x0017 }, + { 0x0008, 0x000c }, + { 0x0008, 0x000d }, + { 0x0008, 0x000e }, + { 0x0008, 0x000f }, + { 0x0008, 0x0010 }, + { 0x0008, 0x0011 }, + { 0x0008, 0x0012 }, + { 0x0008, 0x0013 }, + { 0x0008, 0x0014 }, + { 0x0008, 0x0015 }, + { 0x0009, 0x0008 }, + { 0x0009, 0x0009 }, + { 0x0009, 0x000a }, + { 0x0009, 0x000b }, + { 0x0009, 0x000c }, + { 0x0009, 0x000d }, + { 0x0009, 0x000e }, + { 0x0009, 0x000f }, + { 0x0009, 0x0010 }, + { 0x0009, 0x0011 }, + { 0x0009, 0x0012 }, + { 0x0009, 0x0013 }, + { 0x0009, 0x0014 }, + { 0x0009, 0x0015 }, + { 0x000a, 0x0007 }, + { 0x0009, 0x0016 }, + { 0x0009, 0x0017 }, + { 0x000a, 0x0008 }, + { 0x000a, 0x0009 }, + { 0x000a, 0x000a }, + { 0x000a, 0x000b }, + { 0x000a, 0x000c }, + { 0x000a, 0x000d }, + { 0x000a, 0x000e }, + { 0x000b, 0x0008 }, + { 0x000b, 0x0009 }, + { 0x000b, 0x000a }, + { 0x000a, 0x000f }, + { 0x000b, 0x000b }, + { 0x000b, 0x000c }, + { 0x000b, 0x000d }, + { 0x000c, 0x0009 }, + { 0x000c, 0x000a }, + { 0x000c, 0x000b }, + { 0x000c, 0x000c }, + { 0x000c, 0x000d }, + { 0x000c, 0x000e }, + { 0x000c, 0x000f }, + { 0x000d, 0x0008 }, + { 0x000d, 0x0009 }, + { 0x000d, 0x000a }, + { 0x000d, 0x000b }, + { 0x000d, 0x000c }, + { 0x000d, 0x000d }, + { 0x000d, 0x000e }, + { 0x000d, 0x000f }, + { 0x000d, 0x0010 }, + { 0x000d, 0x0011 }, + { 0x000e, 0x0007 }, + { 0x000e, 0x0008 }, + { 0x000e, 0x0009 }, + { 0x000e, 0x000a }, + { 0x000e, 0x000b }, + { 0x000e, 0x000c }, + { 0x000e, 0x000d }, + { 0x000e, 0x000e }, + { 0x000e, 0x000f }, + { 0x000f, 0x0008 }, + { 0x000f, 0x0009 }, + { 0x000f, 0x000a }, + { 0x000f, 0x000b }, + { 0x000f, 0x000c }, + { 0x0010, 0x0009 }, + { 0x0010, 0x000a }, + { 0x000f, 0x000d }, + { 0x0010, 0x000b }, + { 0x0010, 0x000c }, + { 0x0010, 0x000d }, + { 0x0011, 0x000e }, + { 0x0011, 0x000f }, + { 0x0010, 0x000e }, + { 0x0011, 0x0010 }, + { 0x0011, 0x0011 }, + { 0x0012, 0x0014 }, + { 0x0014, 0x0000 }, + { 0x0010, 0x000f }, + { 0x0012, 0x0015 }, + { 0x0012, 0x0016 }, + { 0x0014, 0x0001 }, + { 0x0012, 0x0017 }, + { 0x0012, 0x0018 }, + { 0x0012, 0x0019 }, + { 0x0013, 0x0010 }, + { 0x0012, 0x001a }, + { 0x0014, 0x0002 }, + { 0x0012, 0x001b }, + { 0x0014, 0x0003 }, + { 0x0014, 0x0004 }, + { 0x0014, 0x0005 }, + { 0x0013, 0x0011 }, + { 0x0014, 0x0006 }, + { 0x0013, 0x0012 }, + { 0x0014, 0x0007 }, + { 0x0014, 0x0008 }, + { 0x0014, 0x0009 }, + { 0x0014, 0x000a }, + { 0x0014, 0x000b }, + { 0x0014, 0x000c }, + { 0x0014, 0x000d }, + { 0x0014, 0x000e }, + { 0x0013, 0x0013 }, + { 0x0014, 0x000f }, + { 0x0014, 0x0010 }, + { 0x0014, 0x0011 }, + { 0x0014, 0x0012 }, + { 0x0014, 0x0013 }, + { 0x0014, 0x0014 }, + { 0x0014, 0x0015 }, + { 0x0014, 0x0016 }, + { 0x0014, 0x0017 }, + { 0x0014, 0x0018 }, + { 0x0014, 0x0019 }, + { 0x0014, 0x001a }, + { 0x0014, 0x001b }, + { 0x0014, 0x001c }, + { 0x0014, 0x001d }, + { 0x0014, 0x001e }, + { 0x0014, 0x001f }, + { 0x0013, 0x0014 }, + { 0x0013, 0x0015 }, + { 0x0013, 0x0016 }, + { 0x0013, 0x0017 }, + { 0x0013, 0x0018 }, + { 0x0013, 0x0019 }, + { 0x0013, 0x001a }, + { 0x0013, 0x001b }, + { 0x0013, 0x001c }, + { 0x0013, 0x001d }, + { 0x0013, 0x001e }, + { 0x0013, 0x001f }, + { 0x0013, 0x0020 }, + { 0x0013, 0x0021 }, + { 0x0013, 0x0022 }, + { 0x0013, 0x0023 }, + { 0x0013, 0x0024 }, + { 0x0013, 0x0025 }, + { 0x0013, 0x0026 }, + { 0x0013, 0x0027 }, - }; +}; -const uint16_t ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2] = - { - NULL, - c_aauiLCLDHuffEnc1, - c_aauiLCLDHuffEnc2, - c_aauiLCLDHuffEnc3, - c_aauiLCLDHuffEnc4, - c_aauiLCLDHuffEnc5, - c_aauiLCLDHuffEnc6, - c_aauiLCLDHuffEnc7, - c_aauiLCLDHuffEnc8, - c_aauiLCLDHuffEnc9, - c_aauiLCLDHuffEnc10, - c_aauiLCLDHuffEnc11, - c_aauiLCLDHuffEnc12, - c_aauiLCLDHuffEnc13, - c_aauiLCLDHuffEnc14, - c_aauiLCLDHuffEnc15, - c_aauiLCLDHuffEnc16, - c_aauiLCLDHuffEnc17, - c_aauiLCLDHuffEnc18, - c_aauiLCLDHuffEnc19, - c_aauiLCLDHuffEnc20, - c_aauiLCLDHuffEnc21, - c_aauiLCLDHuffEnc22, - c_aauiLCLDHuffEnc23, - c_aauiLCLDHuffEnc24, - c_aauiLCLDHuffEnc25, - c_aauiLCLDHuffEnc26, - c_aauiLCLDHuffEnc27, - c_aauiLCLDHuffEnc28, - c_aauiLCLDHuffEnc29, - c_aauiLCLDHuffEnc30, - c_aauiLCLDHuffEnc31, - NULL, - c_aauiLCLDHuffEnc33, - c_aauiLCLDHuffEnc34, - c_aauiLCLDHuffEnc35, - c_aauiLCLDHuffEnc36, - c_aauiLCLDHuffEnc37, - c_aauiLCLDHuffEnc38, - c_aauiLCLDHuffEnc39, - c_aauiLCLDHuffEnc40, - c_aauiLCLDHuffEnc41, - c_aauiLCLDHuffEnc42, - c_aauiLCLDHuffEnc43, - c_aauiLCLDHuffEnc44, - c_aauiLCLDHuffEnc45, - c_aauiLCLDHuffEnc46, - c_aauiLCLDHuffEnc47, - c_aauiLCLDHuffEnc48, - c_aauiLCLDHuffEnc49, - c_aauiLCLDHuffEnc50, - c_aauiLCLDHuffEnc51, - c_aauiLCLDHuffEnc52, - c_aauiLCLDHuffEnc53, - c_aauiLCLDHuffEnc54, - c_aauiLCLDHuffEnc55, - c_aauiLCLDHuffEnc56, - c_aauiLCLDHuffEnc57, - c_aauiLCLDHuffEnc58, - c_aauiLCLDHuffEnc59, - c_aauiLCLDHuffEnc60, - c_aauiLCLDHuffEnc61, - c_aauiLCLDHuffEnc62, - c_aauiLCLDHuffEnc63, - }; +const UWord16 ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2] = { + NULL, + c_aauiLCLDHuffEnc1, + c_aauiLCLDHuffEnc2, + c_aauiLCLDHuffEnc3, + c_aauiLCLDHuffEnc4, + c_aauiLCLDHuffEnc5, + c_aauiLCLDHuffEnc6, + c_aauiLCLDHuffEnc7, + c_aauiLCLDHuffEnc8, + c_aauiLCLDHuffEnc9, + c_aauiLCLDHuffEnc10, + c_aauiLCLDHuffEnc11, + c_aauiLCLDHuffEnc12, + c_aauiLCLDHuffEnc13, + c_aauiLCLDHuffEnc14, + c_aauiLCLDHuffEnc15, + c_aauiLCLDHuffEnc16, + c_aauiLCLDHuffEnc17, + c_aauiLCLDHuffEnc18, + c_aauiLCLDHuffEnc19, + c_aauiLCLDHuffEnc20, + c_aauiLCLDHuffEnc21, + c_aauiLCLDHuffEnc22, + c_aauiLCLDHuffEnc23, + c_aauiLCLDHuffEnc24, + c_aauiLCLDHuffEnc25, + c_aauiLCLDHuffEnc26, + c_aauiLCLDHuffEnc27, + c_aauiLCLDHuffEnc28, + c_aauiLCLDHuffEnc29, + c_aauiLCLDHuffEnc30, + c_aauiLCLDHuffEnc31, + NULL, + c_aauiLCLDHuffEnc33, + c_aauiLCLDHuffEnc34, + c_aauiLCLDHuffEnc35, + c_aauiLCLDHuffEnc36, + c_aauiLCLDHuffEnc37, + c_aauiLCLDHuffEnc38, + c_aauiLCLDHuffEnc39, + c_aauiLCLDHuffEnc40, + c_aauiLCLDHuffEnc41, + c_aauiLCLDHuffEnc42, + c_aauiLCLDHuffEnc43, + c_aauiLCLDHuffEnc44, + c_aauiLCLDHuffEnc45, + c_aauiLCLDHuffEnc46, + c_aauiLCLDHuffEnc47, + c_aauiLCLDHuffEnc48, + c_aauiLCLDHuffEnc49, + c_aauiLCLDHuffEnc50, + c_aauiLCLDHuffEnc51, + c_aauiLCLDHuffEnc52, + c_aauiLCLDHuffEnc53, + c_aauiLCLDHuffEnc54, + c_aauiLCLDHuffEnc55, + c_aauiLCLDHuffEnc56, + c_aauiLCLDHuffEnc57, + c_aauiLCLDHuffEnc58, + c_aauiLCLDHuffEnc59, + c_aauiLCLDHuffEnc60, + c_aauiLCLDHuffEnc61, + c_aauiLCLDHuffEnc62, + c_aauiLCLDHuffEnc63, +}; -const uint32_t num_row_aauiLCLDHuff[2 * ALLOC_TABLE_SIZE] = { 0, 16, 16, 25, 36, 36, 49, 64, 81, 100, - 169, 196, 289, 324, 400, 576, 729, 729, 28, 29, - 32, 37, 39, 46, 55, 65, 77, 91, 109, 129, - 153, 181, 0, 16, 16, 25, 36, 36, 49, 64, 81, - 100, 169, 196, 289, 324, 400, 576, 729, 729, 28, - 29, 32, 37, 39, 46, 55, 65, 77, 91, 109, - 129, 153, 181 }; +const UWord32 num_row_aauiLCLDHuff[2 * ALLOC_TABLE_SIZE] = { + 0, 16, 16, 25, 36, 36, 49, 64, 81, 100, + 169, 196, 289, 324, 400, 576, 729, 729, 28, 29, + 32, 37, 39, 46, 55, 65, 77, 91, 109, 129, + 153, 181, 0, 16, 16, 25, 36, 36, 49, 64, 81, + 100, 169, 196, 289, 324, 400, 576, 729, 729, 28, + 29, 32, 37, 39, 46, 55, 65, 77, 91, 109, + 129, 153, 181 +}; #ifdef USE_DEMOD_TABLES -const int32_t c_aaiHuffDemod1[16][2] = { +const Word32 c_aaiHuffDemod1[16][2] = { 0, 0, 0, @@ -11180,7 +10971,7 @@ const int32_t c_aaiHuffDemod1[16][2] = { 3, }; -const int32_t c_aaiHuffDemod2[16][2] = { +const Word32 c_aaiHuffDemod2[16][2] = { 0, 0, 0, @@ -11215,7 +11006,7 @@ const int32_t c_aaiHuffDemod2[16][2] = { 3, }; -const int32_t c_aaiHuffDemod3[25][2] = { +const Word32 c_aaiHuffDemod3[25][2] = { 0, 0, 0, @@ -11268,7 +11059,7 @@ const int32_t c_aaiHuffDemod3[25][2] = { 4, }; -const int32_t c_aaiHuffDemod4[36][2] = { +const Word32 c_aaiHuffDemod4[36][2] = { 0, 0, 0, @@ -11343,7 +11134,7 @@ const int32_t c_aaiHuffDemod4[36][2] = { 5, }; -const int32_t c_aaiHuffDemod5[36][2] = { +const Word32 c_aaiHuffDemod5[36][2] = { 0, 0, 0, @@ -11418,7 +11209,7 @@ const int32_t c_aaiHuffDemod5[36][2] = { 5, }; -const int32_t c_aaiHuffDemod6[49][2] = { +const Word32 c_aaiHuffDemod6[49][2] = { 0, 0, 0, @@ -11519,7 +11310,7 @@ const int32_t c_aaiHuffDemod6[49][2] = { 6, }; -const int32_t c_aaiHuffDemod7[64][2] = { +const Word32 c_aaiHuffDemod7[64][2] = { 0, 0, 0, @@ -11650,7 +11441,7 @@ const int32_t c_aaiHuffDemod7[64][2] = { 7, }; -const int32_t c_aaiHuffDemod8[81][2] = { +const Word32 c_aaiHuffDemod8[81][2] = { 0, 0, 0, @@ -11815,7 +11606,7 @@ const int32_t c_aaiHuffDemod8[81][2] = { 8, }; -const int32_t c_aaiHuffDemod9[100][2] = { +const Word32 c_aaiHuffDemod9[100][2] = { 0, 0, 0, @@ -12018,7 +11809,7 @@ const int32_t c_aaiHuffDemod9[100][2] = { 9, }; -const int32_t c_aaiHuffDemod10[169][2] = { +const Word32 c_aaiHuffDemod10[169][2] = { 0, 0, 0, @@ -12359,7 +12150,7 @@ const int32_t c_aaiHuffDemod10[169][2] = { 12, }; -const int32_t c_aaiHuffDemod11[196][2] = { +const Word32 c_aaiHuffDemod11[196][2] = { 0, 0, 0, @@ -12754,7 +12545,7 @@ const int32_t c_aaiHuffDemod11[196][2] = { 13, }; -const int32_t c_aaiHuffDemod12[289][2] = { +const Word32 c_aaiHuffDemod12[289][2] = { 0, 0, 0, @@ -13335,7 +13126,7 @@ const int32_t c_aaiHuffDemod12[289][2] = { 16, }; -const int32_t c_aaiHuffDemod13[324][2] = { +const Word32 c_aaiHuffDemod13[324][2] = { 0, 0, 0, @@ -13986,7 +13777,7 @@ const int32_t c_aaiHuffDemod13[324][2] = { 17, }; -const int32_t c_aaiHuffDemod14[400][2] = { +const Word32 c_aaiHuffDemod14[400][2] = { 0, 0, 0, @@ -14789,7 +14580,7 @@ const int32_t c_aaiHuffDemod14[400][2] = { 19, }; -const int32_t c_aaiHuffDemod15[576][2] = { +const Word32 c_aaiHuffDemod15[576][2] = { 0, 0, 0, @@ -15944,7 +15735,7 @@ const int32_t c_aaiHuffDemod15[576][2] = { 23, }; -const int32_t c_aaiHuffDemod16[729][2] = { +const Word32 c_aaiHuffDemod16[729][2] = { 0, 0, 0, @@ -17405,7 +17196,7 @@ const int32_t c_aaiHuffDemod16[729][2] = { 26, }; -const int32_t c_aaiHuffDemod17[729][2] = { +const Word32 c_aaiHuffDemod17[729][2] = { 0, 0, 0, @@ -18866,7 +18657,7 @@ const int32_t c_aaiHuffDemod17[729][2] = { 26, }; -const int32_t ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2] = { +const Word32 ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2] = { NULL, c_aaiHuffDemod1, c_aaiHuffDemod2, @@ -18901,6 +18692,7 @@ const int32_t ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2] = { NULL, }; #endif + const Word16 c_aiLogAddTable_fx[LOG_ADD_TABLE_LENGTH] = { 0x40, 0x40, @@ -19415,7 +19207,8 @@ const Word16 c_aiLogAddTable_fx[LOG_ADD_TABLE_LENGTH] = { 0x00, 0x00, }; -const int32_t c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { + +const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { 0x40, 0x40, 0x3F, @@ -19929,6 +19722,7 @@ const int32_t c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { 0x00, 0x00, }; + const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48] = { 0, 0, @@ -19954,8 +19748,9 @@ const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48] = { 180, 213, }; -const int32_t c_aiBandwidthAdjust48[MAX_BANDS_48] = { - + +const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48] = { + 0, 0, 0, @@ -20006,7 +19801,8 @@ const Word16 c_aiAbsoluteThresh48_fx[MAX_BANDS_48] = { -409, -401, }; -const int32_t c_aiAbsoluteThresh48[MAX_BANDS_48] = { + +const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48] = { -1787, -1787, -1787, @@ -20031,8 +19827,9 @@ const int32_t c_aiAbsoluteThresh48[MAX_BANDS_48] = { -409, -401, }; + #if PERCEPTUAL_MODEL_SLGAIN_SHIFT == 4 -const int32_t c_aiDefaultTheta48[MAX_BANDS_48] = { +const Word32 c_aiDefaultTheta48[MAX_BANDS_48] = { 7, 7, 6, @@ -20059,7 +19856,7 @@ const int32_t c_aiDefaultTheta48[MAX_BANDS_48] = { }; #elif PERCEPTUAL_MODEL_SLGAIN_SHIFT == 8 const Word16 c_aiDefaultTheta48_fx[MAX_BANDS_48] = { - + 112, 112, 96, @@ -20085,8 +19882,8 @@ const Word16 c_aiDefaultTheta48_fx[MAX_BANDS_48] = { 64, }; #endif -const int32_t c_aiDefaultTheta48[MAX_BANDS_48] = { - +const Word32 c_aiDefaultTheta48[MAX_BANDS_48] = { + 112, 112, 96, @@ -20642,7 +20439,8 @@ const Word16 c_aaiSpreadFunction48_fx[MAX_BANDS_48 * MAX_BANDS_48] = { -121, -114, }; -const int32_t c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { + +const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { 0, -1561, -2552, @@ -21174,13 +20972,11 @@ const int32_t c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { -114, }; -const Word32 c_pfMagLUT[8] = /* Q31 */ -{ +const Word32 c_pfMagLUT[8] = /* Q31 */ { 0, 394599072, 775760576, 1130504448, 1446750336, 1713728896, 1922348544, 2065504896 }; -const Word32 c_pfP2RRealLUT[32] = /* Q31 */ -{ +const Word32 c_pfP2RRealLUT[32] = /* Q31 */ { INT_MIN, -2106220416, -1984016384, -1785567488, -1518500224, -1193078272, -821806592, -418953280, -94, 418953088, 821806400, 1193077888, 1518500224, 1785567360, 1984016128, 2106220288, 2147483647, 2106220288, @@ -21189,8 +20985,7 @@ const Word32 c_pfP2RRealLUT[32] = /* Q31 */ -1984016384, -2106220416 }; -const Word32 c_pfP2RImagLUT[32] = /* Q31 */ -{ +const Word32 c_pfP2RImagLUT[32] = /* Q31 */ { 188, -418953248, -821806080, -1193077888, -1518500224, -1785567232, -1984016128, -2106220288, INT_MIN, -2106220416, -1984016128, -1785567488, -1518500224, -1193078016, -821806464, -418953280, 0, 418953280, @@ -21199,7 +20994,6 @@ const Word32 c_pfP2RImagLUT[32] = /* Q31 */ 821806080, 418953248 }; -const Word32 c_pfWindowLUT[LCLD_PRED_WIN_LEN] = /* Q31 */ -{ +const Word32 c_pfWindowLUT[LCLD_PRED_WIN_LEN] = /* Q31 */ { 190779840, 338280192, 610825408, 966922816, 1352359680, 1708457216, 1981002240, 2128502656, 2128502528, 1981002240, 1708456960, 1352359808, 966922624, 610825152, 338280192, 190779776 }; diff --git a/lib_isar/isar_lcld_rom_tables.h b/lib_isar/isar_lcld_rom_tables.h index 19d40751f..935c805ad 100644 --- a/lib_isar/isar_lcld_rom_tables.h +++ b/lib_isar/isar_lcld_rom_tables.h @@ -90,7 +90,6 @@ #define PHASE_MAX_VAL ( 12 ) #define PHASE_MIN_VAL ( -PHASE_MAX_VAL ) -#define PHASE_QUANT_FACTOR ( (float) PHASE_MAX_VAL / _PI_ ) #define PHASE_QUANT_FACTOR_FX_Q29 ( 2050695826 ) #define PHASE_DIFF_DIM ( 2 ) #define PHASE_BAND0_BITS ( 5 ) @@ -101,43 +100,43 @@ #define HUFF_DEC_TABLE_SIZE ( 16 ) -extern const int32_t c_aiNumLcldBandsPerBand[MAX_BANDS_48]; -extern const int32_t c_aiBandIdPerLcldBand[LCLD_BANDS]; -extern const float c_afRotRealImag[PRED_MAX_VAL - PRED_MIN_VAL + 1][2]; +/*----------------------------------------------------------------------* + * ISAR binaural rendering LCLD ROM tables + *-----------------------------------------------------------------------*/ + +extern const Word32 c_aiNumLcldBandsPerBand[MAX_BANDS_48]; +extern const Word32 c_aiBandIdPerLcldBand[LCLD_BANDS]; extern const Word32 c_afRotRealImag_fx[PRED_MAX_VAL - PRED_MIN_VAL + 1][2]; extern const Word16 c_aiDefaultTheta48_fx[MAX_BANDS_48]; -extern const int32_t c_aiDefaultTheta48[MAX_BANDS_48]; +extern const Word32 c_aiDefaultTheta48[MAX_BANDS_48]; -extern const float c_afScaleFactor[ALLOC_TABLE_SIZE]; -extern const float c_afInvScaleFactor[ALLOC_TABLE_SIZE]; extern const Word32 c_afInvScaleFactor_fx[ALLOC_TABLE_SIZE]; -extern const float c_afRMSEnvReconstructTable[ENV_RECONSTRUCT_TABLE_SIZE]; -extern const int16_t c_afRMSEnvReconstructTable_exp[ENV_RECONSTRUCT_TABLE_SIZE]; -extern const int32_t c_aiQuantMaxValues[ALLOC_TABLE_SIZE]; -extern const int32_t c_aiHuffmanDim[ALLOC_TABLE_SIZE]; -extern const int32_t c_aiHuffmanMod[ALLOC_TABLE_SIZE]; +extern const Word16 c_afRMSEnvReconstructTable_exp[ENV_RECONSTRUCT_TABLE_SIZE]; +extern const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE]; +extern const Word32 c_aiHuffmanDim[ALLOC_TABLE_SIZE]; +extern const Word32 c_aiHuffmanMod[ALLOC_TABLE_SIZE]; extern const Word32 c_aiHuffmanDim_fx[ALLOC_TABLE_SIZE]; extern const Word32 c_aiHuffmanMod_fx[ALLOC_TABLE_SIZE]; extern const Word32 c_afScaleFactor_fx[ALLOC_TABLE_SIZE]; extern const Word32 c_aiQuantMaxValues_fx[ALLOC_TABLE_SIZE]; -extern const int32_t c_aiHuffmanSize[ALLOC_TABLE_SIZE]; +extern const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE]; #define LOG_ADD_TABLE_LENGTH ( 512 ) -extern const int32_t c_aiBandwidths48[MAX_BANDS_48]; +extern const Word32 c_aiBandwidths48[MAX_BANDS_48]; extern const Word16 c_aiLogAddTable_fx[LOG_ADD_TABLE_LENGTH]; extern const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48]; -extern const int32_t c_aiLogAddTable[LOG_ADD_TABLE_LENGTH]; -extern const int32_t c_aiBandwidthAdjust48[MAX_BANDS_48]; +extern const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH]; +extern const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48]; extern const Word16 c_aiAbsoluteThresh48_fx[MAX_BANDS_48]; extern const Word16 c_aiDefaultTheta48_fx[MAX_BANDS_48]; extern const Word16 c_aaiSpreadFunction48_fx[MAX_BANDS_48 * MAX_BANDS_48]; -extern const int32_t c_aiAbsoluteThresh48[MAX_BANDS_48]; -extern const int32_t c_aiDefaultTheta48[MAX_BANDS_48]; -extern const int32_t c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48]; +extern const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48]; +extern const Word32 c_aiDefaultTheta48[MAX_BANDS_48]; +extern const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48]; #define PRED_QUNAT_FILTER_MAG_BITS ( 3 ) @@ -147,94 +146,94 @@ extern const int32_t c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48]; #define PRED_QUANT_FILTER_PHASE_MIN ( -16 ) #define PRED_QUANT_FILTER_PHASE_MAX ( 15 ) -extern const uint16_t c_aauiLCLDHuffEnc1[16][2]; -extern const uint16_t c_aauiLCLDHuffEnc2[16][2]; -extern const uint16_t c_aauiLCLDHuffEnc3[25][2]; -extern const uint16_t c_aauiLCLDHuffEnc4[36][2]; -extern const uint16_t c_aauiLCLDHuffEnc5[36][2]; -extern const uint16_t c_aauiLCLDHuffEnc6[49][2]; -extern const uint16_t c_aauiLCLDHuffEnc7[64][2]; -extern const uint16_t c_aauiLCLDHuffEnc8[81][2]; -extern const uint16_t c_aauiLCLDHuffEnc9[100][2]; -extern const uint16_t c_aauiLCLDHuffEnc10[169][2]; -extern const uint16_t c_aauiLCLDHuffEnc11[196][2]; -extern const uint16_t c_aauiLCLDHuffEnc12[289][2]; -extern const uint16_t c_aauiLCLDHuffEnc13[324][2]; -extern const uint16_t c_aauiLCLDHuffEnc14[400][2]; -extern const uint16_t c_aauiLCLDHuffEnc15[576][2]; -extern const uint16_t c_aauiLCLDHuffEnc16[729][2]; -extern const uint16_t c_aauiLCLDHuffEnc17[729][2]; -extern const uint16_t c_aauiLCLDHuffEnc18[28][2]; -extern const uint16_t c_aauiLCLDHuffEnc19[29][2]; -extern const uint16_t c_aauiLCLDHuffEnc20[32][2]; -extern const uint16_t c_aauiLCLDHuffEnc21[37][2]; -extern const uint16_t c_aauiLCLDHuffEnc22[39][2]; -extern const uint16_t c_aauiLCLDHuffEnc23[46][2]; -extern const uint16_t c_aauiLCLDHuffEnc24[55][2]; -extern const uint16_t c_aauiLCLDHuffEnc25[65][2]; -extern const uint16_t c_aauiLCLDHuffEnc26[77][2]; -extern const uint16_t c_aauiLCLDHuffEnc27[91][2]; -extern const uint16_t c_aauiLCLDHuffEnc28[109][2]; -extern const uint16_t c_aauiLCLDHuffEnc29[129][2]; -extern const uint16_t c_aauiLCLDHuffEnc30[153][2]; -extern const uint16_t c_aauiLCLDHuffEnc31[181][2]; -extern const uint16_t c_aauiLCLDHuffEnc33[16][2]; -extern const uint16_t c_aauiLCLDHuffEnc34[16][2]; -extern const uint16_t c_aauiLCLDHuffEnc35[25][2]; -extern const uint16_t c_aauiLCLDHuffEnc36[36][2]; -extern const uint16_t c_aauiLCLDHuffEnc37[36][2]; -extern const uint16_t c_aauiLCLDHuffEnc38[49][2]; -extern const uint16_t c_aauiLCLDHuffEnc39[64][2]; -extern const uint16_t c_aauiLCLDHuffEnc40[81][2]; -extern const uint16_t c_aauiLCLDHuffEnc41[100][2]; -extern const uint16_t c_aauiLCLDHuffEnc42[169][2]; -extern const uint16_t c_aauiLCLDHuffEnc43[196][2]; -extern const uint16_t c_aauiLCLDHuffEnc44[289][2]; -extern const uint16_t c_aauiLCLDHuffEnc45[324][2]; -extern const uint16_t c_aauiLCLDHuffEnc46[400][2]; -extern const uint16_t c_aauiLCLDHuffEnc47[576][2]; -extern const uint16_t c_aauiLCLDHuffEnc48[729][2]; -extern const uint16_t c_aauiLCLDHuffEnc49[729][2]; -extern const uint16_t c_aauiLCLDHuffEnc50[28][2]; -extern const uint16_t c_aauiLCLDHuffEnc51[29][2]; -extern const uint16_t c_aauiLCLDHuffEnc52[32][2]; -extern const uint16_t c_aauiLCLDHuffEnc53[37][2]; -extern const uint16_t c_aauiLCLDHuffEnc54[39][2]; -extern const uint16_t c_aauiLCLDHuffEnc55[46][2]; -extern const uint16_t c_aauiLCLDHuffEnc56[55][2]; -extern const uint16_t c_aauiLCLDHuffEnc57[65][2]; -extern const uint16_t c_aauiLCLDHuffEnc58[77][2]; -extern const uint16_t c_aauiLCLDHuffEnc59[91][2]; -extern const uint16_t c_aauiLCLDHuffEnc60[109][2]; -extern const uint16_t c_aauiLCLDHuffEnc61[129][2]; -extern const uint16_t c_aauiLCLDHuffEnc62[153][2]; -extern const uint16_t c_aauiLCLDHuffEnc63[181][2]; -extern const uint16_t ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2]; -extern const uint32_t num_row_aauiLCLDHuff[2 * ALLOC_TABLE_SIZE]; +extern const UWord16 c_aauiLCLDHuffEnc1[16][2]; +extern const UWord16 c_aauiLCLDHuffEnc2[16][2]; +extern const UWord16 c_aauiLCLDHuffEnc3[25][2]; +extern const UWord16 c_aauiLCLDHuffEnc4[36][2]; +extern const UWord16 c_aauiLCLDHuffEnc5[36][2]; +extern const UWord16 c_aauiLCLDHuffEnc6[49][2]; +extern const UWord16 c_aauiLCLDHuffEnc7[64][2]; +extern const UWord16 c_aauiLCLDHuffEnc8[81][2]; +extern const UWord16 c_aauiLCLDHuffEnc9[100][2]; +extern const UWord16 c_aauiLCLDHuffEnc10[169][2]; +extern const UWord16 c_aauiLCLDHuffEnc11[196][2]; +extern const UWord16 c_aauiLCLDHuffEnc12[289][2]; +extern const UWord16 c_aauiLCLDHuffEnc13[324][2]; +extern const UWord16 c_aauiLCLDHuffEnc14[400][2]; +extern const UWord16 c_aauiLCLDHuffEnc15[576][2]; +extern const UWord16 c_aauiLCLDHuffEnc16[729][2]; +extern const UWord16 c_aauiLCLDHuffEnc17[729][2]; +extern const UWord16 c_aauiLCLDHuffEnc18[28][2]; +extern const UWord16 c_aauiLCLDHuffEnc19[29][2]; +extern const UWord16 c_aauiLCLDHuffEnc20[32][2]; +extern const UWord16 c_aauiLCLDHuffEnc21[37][2]; +extern const UWord16 c_aauiLCLDHuffEnc22[39][2]; +extern const UWord16 c_aauiLCLDHuffEnc23[46][2]; +extern const UWord16 c_aauiLCLDHuffEnc24[55][2]; +extern const UWord16 c_aauiLCLDHuffEnc25[65][2]; +extern const UWord16 c_aauiLCLDHuffEnc26[77][2]; +extern const UWord16 c_aauiLCLDHuffEnc27[91][2]; +extern const UWord16 c_aauiLCLDHuffEnc28[109][2]; +extern const UWord16 c_aauiLCLDHuffEnc29[129][2]; +extern const UWord16 c_aauiLCLDHuffEnc30[153][2]; +extern const UWord16 c_aauiLCLDHuffEnc31[181][2]; +extern const UWord16 c_aauiLCLDHuffEnc33[16][2]; +extern const UWord16 c_aauiLCLDHuffEnc34[16][2]; +extern const UWord16 c_aauiLCLDHuffEnc35[25][2]; +extern const UWord16 c_aauiLCLDHuffEnc36[36][2]; +extern const UWord16 c_aauiLCLDHuffEnc37[36][2]; +extern const UWord16 c_aauiLCLDHuffEnc38[49][2]; +extern const UWord16 c_aauiLCLDHuffEnc39[64][2]; +extern const UWord16 c_aauiLCLDHuffEnc40[81][2]; +extern const UWord16 c_aauiLCLDHuffEnc41[100][2]; +extern const UWord16 c_aauiLCLDHuffEnc42[169][2]; +extern const UWord16 c_aauiLCLDHuffEnc43[196][2]; +extern const UWord16 c_aauiLCLDHuffEnc44[289][2]; +extern const UWord16 c_aauiLCLDHuffEnc45[324][2]; +extern const UWord16 c_aauiLCLDHuffEnc46[400][2]; +extern const UWord16 c_aauiLCLDHuffEnc47[576][2]; +extern const UWord16 c_aauiLCLDHuffEnc48[729][2]; +extern const UWord16 c_aauiLCLDHuffEnc49[729][2]; +extern const UWord16 c_aauiLCLDHuffEnc50[28][2]; +extern const UWord16 c_aauiLCLDHuffEnc51[29][2]; +extern const UWord16 c_aauiLCLDHuffEnc52[32][2]; +extern const UWord16 c_aauiLCLDHuffEnc53[37][2]; +extern const UWord16 c_aauiLCLDHuffEnc54[39][2]; +extern const UWord16 c_aauiLCLDHuffEnc55[46][2]; +extern const UWord16 c_aauiLCLDHuffEnc56[55][2]; +extern const UWord16 c_aauiLCLDHuffEnc57[65][2]; +extern const UWord16 c_aauiLCLDHuffEnc58[77][2]; +extern const UWord16 c_aauiLCLDHuffEnc59[91][2]; +extern const UWord16 c_aauiLCLDHuffEnc60[109][2]; +extern const UWord16 c_aauiLCLDHuffEnc61[129][2]; +extern const UWord16 c_aauiLCLDHuffEnc62[153][2]; +extern const UWord16 c_aauiLCLDHuffEnc63[181][2]; +extern const UWord16 ( *c_apauiHuffEncTabels[2 * ALLOC_TABLE_SIZE] )[2]; +extern const UWord32 num_row_aauiLCLDHuff[2 * ALLOC_TABLE_SIZE]; #ifdef USE_DEMOD_TABLES -extern const int32_t c_aaiHuffDemod1[16][2]; -extern const int32_t c_aaiHuffDemod2[16][2]; -extern const int32_t c_aaiHuffDemod3[25][2]; -extern const int32_t c_aaiHuffDemod4[36][2]; -extern const int32_t c_aaiHuffDemod5[36][2]; -extern const int32_t c_aaiHuffDemod6[49][2]; -extern const int32_t c_aaiHuffDemod7[64][2]; -extern const int32_t c_aaiHuffDemod8[81][2]; -extern const int32_t c_aaiHuffDemod9[100][2]; -extern const int32_t c_aaiHuffDemod10[169][2]; -extern const int32_t c_aaiHuffDemod11[196][2]; -extern const int32_t c_aaiHuffDemod12[289][2]; -extern const int32_t c_aaiHuffDemod13[324][2]; -extern const int32_t c_aaiHuffDemod14[400][2]; -extern const int32_t c_aaiHuffDemod15[576][2]; -extern const int32_t c_aaiHuffDemod16[729][2]; -extern const int32_t c_aaiHuffDemod17[729][2]; -extern const int32_t ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2]; +extern const Word32 c_aaiHuffDemod1[16][2]; +extern const Word32 c_aaiHuffDemod2[16][2]; +extern const Word32 c_aaiHuffDemod3[25][2]; +extern const Word32 c_aaiHuffDemod4[36][2]; +extern const Word32 c_aaiHuffDemod5[36][2]; +extern const Word32 c_aaiHuffDemod6[49][2]; +extern const Word32 c_aaiHuffDemod7[64][2]; +extern const Word32 c_aaiHuffDemod8[81][2]; +extern const Word32 c_aaiHuffDemod9[100][2]; +extern const Word32 c_aaiHuffDemod10[169][2]; +extern const Word32 c_aaiHuffDemod11[196][2]; +extern const Word32 c_aaiHuffDemod12[289][2]; +extern const Word32 c_aaiHuffDemod13[324][2]; +extern const Word32 c_aaiHuffDemod14[400][2]; +extern const Word32 c_aaiHuffDemod15[576][2]; +extern const Word32 c_aaiHuffDemod16[729][2]; +extern const Word32 c_aaiHuffDemod17[729][2]; +extern const Word32 ( *c_apaiDemodTables[ALLOC_TABLE_SIZE] )[2]; #endif -extern const uint32_t c_aaiRMSEnvHuffEnc[64][2]; -extern const uint32_t c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; +extern const UWord32 c_aaiRMSEnvHuffEnc[64][2]; +extern const UWord32 c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; extern const Word32 c_pfMagLUT[8]; /* Q31 */ extern const Word32 c_pfP2RRealLUT[32]; /* Q31 */ diff --git a/lib_isar/isar_prot.h b/lib_isar/isar_prot.h index 112ee1155..909e09113 100644 --- a/lib_isar/isar_prot.h +++ b/lib_isar/isar_prot.h @@ -35,14 +35,14 @@ #include "isar_stat.h" - - #include #include "options.h" #include "ivas_error.h" #include "lib_isar_post_rend.h" #include "enh64.h" +/* clang-format off */ + Word32 ISAR_SPLIT_REND_BITStream_read_int32( ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word32 bits ); @@ -50,7 +50,8 @@ Word32 ISAR_SPLIT_REND_BITStream_read_int32( void ISAR_SPLIT_REND_BITStream_write_int32( ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word32 val, - const Word32 bits ); + const Word32 bits +); ivas_error isar_splitBinLCLDEncOpen( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE *hSplitBinLCLDEnc, @@ -58,22 +59,28 @@ ivas_error isar_splitBinLCLDEncOpen( const int16_t iChannels, const int32_t iDataRate, const int16_t iNumBlocks, - const int16_t iNumIterations ); + const int16_t iNumIterations +); ivas_error isar_splitBinRendPLCOpen( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC, int16_t iNumSubSets ); void isar_splitBinRendPLCClose( - ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC ); + ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC +); + ivas_error isar_splitBinLCLDDecOpen( ISAR_BIN_HR_SPLIT_LCLD_DEC_HANDLE *hSplitBinLCLDDec, const Word32 iSampleRate, const Word16 iChannels, const Word16 iNumBlocks, - const Word16 iNumIterations ); + const Word16 iNumIterations +); + void isar_splitBinLCLDDecClose( - ISAR_BIN_HR_SPLIT_LCLD_DEC_HANDLE *hSplitBinLCLDDec ); + ISAR_BIN_HR_SPLIT_LCLD_DEC_HANDLE *hSplitBinLCLDDec +); void isar_splitBinRendPLCsaveState( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, @@ -81,7 +88,8 @@ void isar_splitBinRendPLCsaveState( Word32 Cldfb_ImagBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const int16_t num_chs, const int16_t iNumBlocks, - const int16_t iNumIterations ); + const int16_t iNumIterations +); void isar_splitBinRendPLC_xf_fx( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, @@ -92,7 +100,8 @@ void isar_splitBinRendPLC_xf_fx( const Word16 iNumIterations, Word32 **ppiDecodingFailed, Word32 **ppiDecodingFailedPrev, - Word16 exp ); + Word16 exp +); void isar_splitBinRendPLC( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, @@ -102,7 +111,8 @@ void isar_splitBinRendPLC( const Word16 iNumBlocks, const Word16 iNumIterations, Word32 **ppiDecodingFailed, - Word16 exp ); + Word16 exp +); #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG void isar_log_cldfb2wav_data( @@ -114,7 +124,8 @@ void isar_log_cldfb2wav_data( const int32_t output_Fs, const int16_t start_slot_idx, const int16_t md_band_idx, - const char *filename ); + const char *filename +); #endif #ifndef FIX_1372_ISAR_POST_REND @@ -123,7 +134,8 @@ void isar_SplitRenderer_PostRenderer( MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, Word32 Cldfb_RealBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ Word32 Cldfb_ImagBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ - const IVAS_QUATERNION Quaternion_act ); + const IVAS_QUATERNION Quaternion_act +); #else void isar_SplitRenderer_PostRenderer( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinPostRenderer, /* i/o: binaural renderer handle */ @@ -131,7 +143,8 @@ void isar_SplitRenderer_PostRenderer( Word32 Cldfb_RealBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ Word32 Cldfb_ImagBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o : Reference/out Binaural signals */ const IVAS_QUATERNION Quaternion_act, - Word16 *Q_in ); + Word16 *Q_in +); #endif void isar_splitBinLCLDDecProcess( @@ -140,52 +153,65 @@ void isar_splitBinLCLDDecProcess( Word32 Cldfb_Out_Real_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_Out_Imag_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 *Q_cldfb_final, - const Word16 bfi ); + const Word16 bfi +); void set_fix_rotation_mat_fx( Word32 fix_pos_rot_mat[][BINAURAL_CHANNELS][BINAURAL_CHANNELS], - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData ); + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData +); void isar_splitBinLCLDEncClose( - ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE *hSplitBinLCLDEnc ); + ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE *hSplitBinLCLDEnc +); + void isar_splitBinLCLDEncProcess( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE hSplitBinLCLDEnc, Word32 Cldfb_In_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const Word32 available_bits, ISAR_SPLIT_REND_BITS_HANDLE pBits, - Word16 *q_final ); + Word16 *q_final +); void set_pose_types_fx( ISAR_SPLIT_REND_POSE_TYPE pose_type[MAX_HEAD_ROT_POSES - 1], - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData ); + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData +); void isar_split_rend_init_huff_cfg( - ISAR_BIN_HR_SPLIT_REND_HUFF_HANDLE pHuff_cfg ); + ISAR_BIN_HR_SPLIT_REND_HUFF_HANDLE pHuff_cfg +); ivas_error isar_splitBinPostRendOpen( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE *hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const int32_t output_Fs ); + const int32_t output_Fs +); void isar_splitBinPostRendClose( - ISAR_BIN_HR_SPLIT_POST_REND_HANDLE *hBinHrSplitPostRend ); + ISAR_BIN_HR_SPLIT_POST_REND_HANDLE *hBinHrSplitPostRend +); void isar_SplitRenderer_getdiagdiff( Word16 in_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word16 out_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], const Word16 sign, const Word16 min_val, - const Word16 max_val ); + const Word16 max_val +); void isar_renderSplitGetMultiBinPoseData_fx( const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const ISAR_SPLIT_REND_ROT_AXIS rot_axis ); + const ISAR_SPLIT_REND_ROT_AXIS rot_axis +); + void isar_renderSplitGetMultiBinPoseData( const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const ISAR_SPLIT_REND_ROT_AXIS rot_axis ); + const ISAR_SPLIT_REND_ROT_AXIS rot_axis +); void isar_split_rend_get_quant_params_fx( const Word16 num_md_bands, @@ -199,7 +225,8 @@ void isar_split_rend_get_quant_params_fx( Word16 pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], Word16 pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], const Word16 ro_flag, - Word16 *num_quant_strats ); + Word16 *num_quant_strats +); void isar_split_rend_get_quant_params( const int16_t num_md_bands, @@ -213,7 +240,8 @@ void isar_split_rend_get_quant_params( int16_t pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t *num_quant_strats, - int16_t *num_complex_bands ); + int16_t *num_complex_bands +); void isar_splitBinPostRendMdDec_fx( ISAR_SPLIT_REND_BITS_HANDLE pBits, @@ -238,7 +266,8 @@ void ivas_mat_mult_2by2_complex( float in_re2[2][2], float in_im2[2][2], float out_re2[2][2], - float out_im2[2][2] ); + float out_im2[2][2] +); void isar_mat_mult_2by2_complex_fx( Word32 in_re1_fx[2][2], @@ -252,7 +281,8 @@ void isar_mat_mult_2by2_complex_fx( Word32 out_re2_fx[2][2], Word16 *final_exp_re_1, Word32 out_im2_fx[2][2], - Word16 *final_exp_im_1 ); + Word16 *final_exp_im_1 +); void isar_rend_CldfbSplitPostRendProcess( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, @@ -263,14 +293,16 @@ void isar_rend_CldfbSplitPostRendProcess( Word16 Q_cldfb_in, Word32 output_fx[][L_FRAME48k], Word16 *Q_out, - const Word16 cldfb_in_flag ); + const Word16 cldfb_in_flag +); void isar_init_multi_bin_pose_data_fx( MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData ); /* Copy for encoder, to be removed */ void isar_init_multi_bin_pose_data_fx_enc( - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData ); + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData +); void isar_rend_CldfbSplitPreRendProcess( const ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, @@ -283,19 +315,23 @@ void isar_rend_CldfbSplitPreRendProcess( ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word32 target_md_bits, const Word16 low_res_pre_rend_rot, - const Word16 ro_md_flag ); + const Word16 ro_md_flag +); Word16 isar_renderSplitGetRot_axisNumBits( - const Word16 dof ); + const Word16 dof +); ISAR_SPLIT_REND_ROT_AXIS isar_renderSplitGetRot_axisFromCode( const Word16 dof, - const Word16 code ); + const Word16 code +); Word16 isar_renderSplitGetCodeFromRot_axis( const Word16 dof, const ISAR_SPLIT_REND_ROT_AXIS rot_axis, - Word16 *num_bits ); + Word16 *num_bits +); void isar_init_split_post_rend_handles( ISAR_SPLIT_POST_REND_WRAPPER *hSplitRendWrapper ); @@ -311,41 +347,46 @@ ivas_error isar_splitBinPreRendOpen( ); void isar_splitBinPreRendClose( - ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE *hBinHrSplitPreRend ); + ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE *hBinHrSplitPreRend +); void isar_set_split_rend_ht_setup_fx( SPLIT_REND_WRAPPER *hSplitrend, IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES], - Word32 Rmat_fx[MAX_PARAM_SPATIAL_SUBFRAMES][3][3] ); - + Word32 Rmat_fx[MAX_PARAM_SPATIAL_SUBFRAMES][3][3] +); ivas_error isar_split_rend_validate_config( const ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, - const Word16 is_pcm_out ); + const Word16 is_pcm_out +); Word32 isar_get_lcld_bitrate( const Word32 SplitRendBitRate, - const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode ); - + const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode +); ivas_error splitRendLc3plusEncodeAndWrite( SPLIT_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE pBits, const int32_t available_bits, Word32 *in[], - Word16 Q_sig ); + Word16 Q_sig +); ivas_error isar_framesize_to_ms( const IVAS_RENDER_FRAMESIZE frame_size, /* i : frame size enum */ Word16 *ms /* o : frame size in ms */ ); + Word32 isar_get_split_rend_md_target_brate( const Word32 SplitRendBitRate, - const Word16 pcm_out_flag ); + const Word16 pcm_out_flag +); ivas_error isar_split_rend_choose_default_codec( ISAR_SPLIT_REND_CODEC *pCodec, /* i/o: pointer to codec setting */ - Word16 *pIsar_frame_size_ms, /* i/o: pointer to isar frame size setting */ + Word16 *pIsar_frame_size_ms, /* i/o: pointer to ISAR frame size setting */ Word16 *pCodec_frame_size_ms, /* i/o: pointer to codec frame size setting */ const Word16 cldfb_in_flag, /* i : flag indicating rendering in TD */ const Word16 pcm_out_flag, /* i : flag to indicate PCM output */ @@ -355,35 +396,43 @@ ivas_error isar_split_rend_choose_default_codec( void ISAR_SPLIT_REND_BITStream_init( ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word32 buf_len_bytes, - UWord8 *pbuf ); + UWord8 *pbuf +); void isar_split_rend_huffman_dec_init_min_max_len( - isar_split_rend_huffman_cfg_t *p_huff_cfg ); + isar_split_rend_huffman_cfg_t *p_huff_cfg +); Word16 wrap_a( Word16 val, const Word16 min_val, - const Word16 max_val ); + const Word16 max_val +); void isar_renderSplitUpdateNoCorrectionPoseData( const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData ); + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData +); Word32 get_bit( const Word32 state, - const Word32 bit_id ); + const Word32 bit_id +); ivas_error split_renderer_open_lc3plus( SPLIT_REND_WRAPPER *hSplitRendWrapper, const ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const Word32 OutSampleRate, - const IVAS_RENDER_FRAMESIZE ivas_frame_size ); + const IVAS_RENDER_FRAMESIZE ivas_frame_size +); ISAR_POST_REND_AudioConfigType isar_getAudioConfigType( - const IVAS_AUDIO_CONFIG config ); + const IVAS_AUDIO_CONFIG config +); void isar_init_split_rend_handles( - SPLIT_REND_WRAPPER *hSplitRendWrapper ); + SPLIT_REND_WRAPPER *hSplitRendWrapper +); ivas_error isar_renderMultiTDBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, @@ -398,19 +447,47 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( Word16 Q_sig, const Word16 low_res_pre_rend_rot, const Word16 pcm_out_flag, - const Word16 ro_md_flag ); + const Word16 ro_md_flag +); -void lc3plusTimeAlignCldfbPoseCorr( SPLIT_REND_WRAPPER *hSplitBin, - Word32 Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - Word32 Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - Word16 *Q_in ); +void lc3plusTimeAlignCldfbPoseCorr( + SPLIT_REND_WRAPPER *hSplitBin, + Word32 Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], + Word32 Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], + Word16 *Q_in +); -void ivas_cmult_fix( Word32 in1_re_fx, Word16 exp_re1, Word32 in1_im_fx, Word16 exp_im1, Word32 in2_re_fx, Word16 exp_re2, Word32 in2_im_fx, Word16 exp_im2, Word32 *out1_re_fx, Word32 *out1_im_fx, Word16 *exp_out1_re, Word16 *exp_out1_im ); +void ivas_cmult_fix( + Word32 in1_re_fx, + Word16 exp_re1, + Word32 in1_im_fx, + Word16 exp_im1, + Word32 in2_re_fx, + Word16 exp_re2, + Word32 in2_im_fx, + Word16 exp_im2, + Word32 *out1_re_fx, + Word32 *out1_im_fx, + Word16 *exp_out1_re, + Word16 *exp_out1_im +); -void ivas_calculate_abs_fx( Word32 re_fx, Word16 exp_re, Word32 im_fx, Word16 exp_im, Word32 *out_fx, Word16 *exp_out ); +void ivas_calculate_abs_fx( + Word32 re_fx, + Word16 exp_re, + Word32 im_fx, + Word16 exp_im, + Word32 *out_fx, + Word16 *exp_out +); -void ivas_calculate_rabs_fx( Word32 re_fx, Word16 exp_re, Word32 *out_fx, Word16 *exp_out ); +void ivas_calculate_rabs_fx( + Word32 re_fx, + Word16 exp_re, + Word32 *out_fx, + Word16 *exp_out +); #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 ); \ @@ -419,22 +496,6 @@ void ivas_calculate_rabs_fx( Word32 re_fx, Word16 exp_re, Word32 *out_fx, Word16 #define IVAS_CALCULATE_ABS( re, im, out ) \ out = sqrtf( ( re * re ) + ( im * im ) ); -#define IVAS_CALCULATE_RABS( re, out ) \ - out = sqrtf( re * re ); - -#define IVAS_CALCULATE_SQ_ABS( re, im, out ) \ - out = (float) ( ( re * re ) + ( im * im ) ); - -#define IVAS_RMULT_DOUBLE( in1_re, in2_re, out1_re ) \ - out1_re = ( in1_re * in2_re ); - -#define IVAS_CALCULATE_SQ_ABS_N( re, out ) \ - out = (float) ( re * re ); - -#define IVAS_RMULT_FLOAT( in1_re, in2_re, out1_re ) \ - out1_re = ( in1_re * in2_re ); - - /* clang-format on */ #endif /* IVAS_PROT_REND_H */ diff --git a/lib_isar/isar_rom_post_rend.c b/lib_isar/isar_rom_post_rend.c index 0af50df5c..25472e185 100644 --- a/lib_isar/isar_rom_post_rend.c +++ b/lib_isar/isar_rom_post_rend.c @@ -44,7 +44,7 @@ /*----------------------------------------------------------------------* - * Binuaral split rendering ROM tables + * ISAR binaural split post-rendering ROM table *-----------------------------------------------------------------------*/ /* rotations in this array are relative to ref rotation */ diff --git a/lib_isar/isar_rom_post_rend.h b/lib_isar/isar_rom_post_rend.h index 90bcae60b..8c49e7d38 100644 --- a/lib_isar/isar_rom_post_rend.h +++ b/lib_isar/isar_rom_post_rend.h @@ -42,7 +42,7 @@ #include "isar_cnst.h" /*----------------------------------------------------------------------* - * Binuaral split rendering ROM tables + * ISAR binaural split post-rendering ROM table *-----------------------------------------------------------------------*/ extern const Word32 ivas_split_rend_relative_yaw_pos_angles_fx[SPLIT_REND_MAX_YAW_ONLY_POSES]; diff --git a/lib_isar/isar_splitRendererPre.c b/lib_isar/isar_splitRendererPre.c index b30f25ca7..cfd192647 100644 --- a/lib_isar/isar_splitRendererPre.c +++ b/lib_isar/isar_splitRendererPre.c @@ -54,15 +54,9 @@ /*---------------------------------------------------------------------* * Local function declarations *---------------------------------------------------------------------*/ -static void isar_SplitRenderer_GetRotMd_fx( - ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, /* i/o: binaural renderer handle */ - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - Word32 Cldfb_RealBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Reference Binaural signals */ - Word16 exp_cldfb_re, - Word32 Cldfb_ImagBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Reference Binaural signals */ - Word16 exp_cldfb_im, - const Word16 low_res, - const Word16 ro_md_flag ); + +static void isar_SplitRenderer_GetRotMd_fx( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, Word32 Cldfb_RealBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 exp_cldfb_re, Word32 Cldfb_ImagBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 exp_cldfb_im, const Word16 low_res, const Word16 ro_md_flag ); + /*------------------------------------------------------------------------- * Local functions @@ -96,6 +90,7 @@ static void isar_calc_mat_det_2by2_complex_fx( return; } + static Word16 isar_is_mat_inv_2by2_complex_fx( Word32 in_re[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word16 exp_in_re, @@ -125,6 +120,8 @@ static Word16 isar_is_mat_inv_2by2_complex_fx( return is_det_zero; } + + static void isar_calc_mat_inv_2by2_complex_fx( Word32 in_re_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word16 exp_in_re, @@ -137,9 +134,9 @@ static void isar_calc_mat_inv_2by2_complex_fx( { Word16 exp_buffer_re[BINAURAL_CHANNELS][BINAURAL_CHANNELS], exp_buffer_im[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; - FOR( int i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - FOR( int j = 0; j < BINAURAL_CHANNELS; j++ ) + FOR( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { exp_buffer_re[i][j] = MIN16B; move16(); @@ -240,18 +237,18 @@ static void isar_calc_mat_inv_2by2_complex_fx( move16(); Word16 max_exp_re = MIN16B, max_exp_im = MIN16B; - FOR( int i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - FOR( int j = 0; j < BINAURAL_CHANNELS; j++ ) + FOR( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { max_exp_re = s_max( max_exp_re, exp_buffer_re[i][j] ); max_exp_im = s_max( max_exp_im, exp_buffer_im[i][j] ); } } - FOR( int i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - FOR( int j = 0; j < BINAURAL_CHANNELS; j++ ) + FOR( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { out_re_fx[i][j] = L_shr( out_re_fx[i][j], max_exp_re - exp_buffer_re[i][j] ); move32(); @@ -267,6 +264,8 @@ static void isar_calc_mat_inv_2by2_complex_fx( return; } + + static void ComputePredMat_fx( Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], Word16 exp_cov_ii_re, @@ -453,6 +452,8 @@ static void ComputePredMat_fx( return; } + + static void ComputePostPredCov_fx( Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], Word16 exp_cov_ii_re, @@ -509,6 +510,8 @@ static void ComputePostPredCov_fx( return; } + + static void ComputeBandedCrossCov_fx( Word32 Cldfb_RealBuffer1_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 exp_cldfb_re_1, @@ -624,17 +627,17 @@ static void ComputeBandedCrossCov_fx( } /*make common exponent*/ Word16 max_cov_re = 0, max_cov_im = 0; - FOR( int i = 0; i < num_chs; i++ ) + FOR( Word16 i = 0; i < num_chs; i++ ) { - FOR( int j = 0; j < num_chs; j++ ) + FOR( Word16 j = 0; j < num_chs; j++ ) { max_cov_re = max( max_cov_re, exp_buff_re[i][j] ); max_cov_im = max( max_cov_im, exp_buff_im[i][j] ); } } - FOR( int i = 0; i < num_chs; i++ ) + FOR( Word16 i = 0; i < num_chs; i++ ) { - FOR( int j = 0; j < num_chs; j++ ) + FOR( Word16 j = 0; j < num_chs; j++ ) { out_cov_re_fx[i][j] = L_shr( out_cov_re_fx[i][j], max_cov_re - exp_buff_re[i][j] ); move32(); @@ -648,6 +651,8 @@ static void ComputeBandedCrossCov_fx( return; } + + static void ComputeBandedCov_fx( Word32 Cldfb_RealBuffer_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 exp_cldfb_re, @@ -680,9 +685,9 @@ static void ComputeBandedCov_fx( move16(); Word16 exp_buff_re[BINAURAL_CHANNELS][BINAURAL_CHANNELS], exp_buff_im[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; - FOR( int i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - FOR( int j = 0; j < BINAURAL_CHANNELS; j++ ) + FOR( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { exp_buff_re[i][j] = 0; move16(); @@ -774,18 +779,18 @@ static void ComputeBandedCov_fx( } Word16 exp_max_re = MIN16B, exp_max_im = MIN16B; - FOR( int i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - FOR( int j = 0; j < BINAURAL_CHANNELS; j++ ) + FOR( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { exp_max_re = max( exp_max_re, exp_buff_re[i][j] ); exp_max_im = max( exp_max_im, exp_buff_im[i][j] ); } } - FOR( int i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - FOR( int j = 0; j < BINAURAL_CHANNELS; j++ ) + FOR( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { out_cov_re_fx[i][j] = L_shr( out_cov_re_fx[i][j], exp_max_re - exp_buff_re[i][j] ); move32(); @@ -810,6 +815,8 @@ static void ComputeBandedCov_fx( return; } + + static Word32 GetNormFact_fx( Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], Word16 exp_cov_ii_re, @@ -1039,16 +1046,18 @@ static void isar_split_rend_quant_md_fx( } #endif } + return; } -static void get_lr_gains( Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], - const Word16 exp_cov_ii_re, - Word32 cov_oo_re_fx[][BINAURAL_CHANNELS], - const Word16 exp_cov_oo_re, - Word32 gains_fx[BINAURAL_CHANNELS], - Word16 *exp_gains_fx ) +static void get_lr_gains( + Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], + const Word16 exp_cov_ii_re, + Word32 cov_oo_re_fx[][BINAURAL_CHANNELS], + const Word16 exp_cov_oo_re, + Word32 gains_fx[BINAURAL_CHANNELS], + Word16 *exp_gains_fx ) { Word16 exp_gd_tmp_buf[BINAURAL_CHANNELS] = { 0 }; Word16 exp_gd_tmp = 0, i; @@ -1096,9 +1105,11 @@ static void get_lr_gains( Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], *exp_gains_fx = exp_gd_tmp; move16(); + return; } + static void ComputeCoeffs_fx( Word32 cov_ii_re_fx[][BINAURAL_CHANNELS], Word16 exp_cov_ii_re, @@ -1437,6 +1448,7 @@ static void ComputeCoeffs_fx( return; } + static void get_base2_bits( const ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, @@ -2129,6 +2141,8 @@ static void isar_SplitRenderer_quant_code( return; } + + /*------------------------------------------------------------------------- * Function isar_SplitRenderer_GetRotMd() * @@ -2228,11 +2242,14 @@ static void isar_SplitRenderer_GetRotMd_fx( pop_wmops(); return; } + + /*------------------------------------------------------------------------- * Function isar_rend_CldfbSplitPreRendProcess() * * *------------------------------------------------------------------------*/ + void isar_rend_CldfbSplitPreRendProcess( const ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, const IVAS_QUATERNION headPosition, @@ -2288,9 +2305,9 @@ void isar_rend_CldfbSplitPreRendProcess( } else { - for ( int i = 0; i < BINAURAL_CHANNELS; i++ ) + for ( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { - for ( int j = 0; j < BINAURAL_CHANNELS; j++ ) + for ( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) { hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_re[i][j] = me2f( hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_re_fx[i][j], hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].exp_pred_mat_re ); hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_im[i][j] = me2f( hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_im_fx[i][j], hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].exp_pred_mat_im ); @@ -2380,11 +2397,11 @@ void isar_rend_CldfbSplitPreRendProcess( } else { - for ( int i = 0; i < BINAURAL_CHANNELS; i++ ) + for ( Word16 i = 0; i < BINAURAL_CHANNELS; i++ ) { fixedToFloat_arrL( hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_re_fx[i], hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_re[i], Q_frame, BINAURAL_CHANNELS ); fixedToFloat_arrL( hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_im_fx[i], hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_im[i], Q_frame, BINAURAL_CHANNELS ); - // for ( int j = 0; j < BINAURAL_CHANNELS; j++ ) + // for ( Word16 j = 0; j < BINAURAL_CHANNELS; j++ ) //{ // hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_re[i][j] = me2f( hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_re_fx[i][j], Q6 ); // hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_im[i][j] = me2f( hBinHrSplitPreRend->rot_md[pos_idx][sf_idx][b].pred_mat_im_fx[i][j], Q6 ); @@ -2492,11 +2509,13 @@ void isar_rend_CldfbSplitPreRendProcess( return; } + /*------------------------------------------------------------------------- * Function isar_splitBinPreRendOpen() * * *------------------------------------------------------------------------*/ + ivas_error isar_splitBinPreRendOpen( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE *hBinHrSplitPreRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData @@ -2567,6 +2586,7 @@ ivas_error isar_splitBinPreRendOpen( return IVAS_ERR_OK; } + /*------------------------------------------------------------------------- * Function isar_splitBinPreRendClose() * @@ -2611,12 +2631,14 @@ void isar_splitBinPreRendClose( * * *-------------------------------------------------------------------------*/ + void isar_set_split_rend_ht_setup_fx( SPLIT_REND_WRAPPER *hSplitrend, IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES], Word32 Rmat_fx[MAX_PARAM_SPATIAL_SUBFRAMES][3][3] ) { Word16 sf, i, j; + IF( hSplitrend->multiBinPoseData.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { FOR( sf = 1; sf < MAX_PARAM_SPATIAL_SUBFRAMES; sf++ ) @@ -2637,6 +2659,7 @@ void isar_set_split_rend_ht_setup_fx( return; } + /*------------------------------------------------------------------------- * Function isar_init_split_rend_handles() * @@ -2755,6 +2778,7 @@ ivas_error split_renderer_open_lc3plus( * * *------------------------------------------------------------------------*/ + ivas_error splitRendLc3plusEncodeAndWrite( SPLIT_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE pBits, @@ -2803,6 +2827,7 @@ ivas_error splitRendLc3plusEncodeAndWrite( pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; pBits->codec_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 ); pBits->isar_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.isar_frame_duration_us / 1000 ); + return IVAS_ERR_OK; } @@ -2812,6 +2837,7 @@ ivas_error splitRendLc3plusEncodeAndWrite( * * *------------------------------------------------------------------------*/ + ivas_error isar_renderMultiTDBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, const IVAS_QUATERNION headPosition, @@ -2874,7 +2900,6 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( } } - test(); test(); IF( ( hSplitBin->multiBinPoseData.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) || ( !useLc3plus && !pcm_out_flag ) ) @@ -3049,11 +3074,13 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( return error; } + /*------------------------------------------------------------------------- * Function lc3plusTimeAlignCldfbPoseCorr() * * *------------------------------------------------------------------------*/ + void lc3plusTimeAlignCldfbPoseCorr( SPLIT_REND_WRAPPER *hSplitBin, Word32 Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], diff --git a/lib_isar/isar_splitRenderer_utils.c b/lib_isar/isar_splitRenderer_utils.c index 62f3870d3..ff8922291 100644 --- a/lib_isar/isar_splitRenderer_utils.c +++ b/lib_isar/isar_splitRenderer_utils.c @@ -237,7 +237,7 @@ void ISAR_SPLIT_REND_BITStream_init( * *------------------------------------------------------------------------*/ -void isar_split_rend_huffman_dec_init_min_max_len( +static void isar_split_rend_huffman_dec_init_min_max_len( isar_split_rend_huffman_cfg_t *p_huff_cfg ) { Word16 i, code_len; @@ -1301,7 +1301,7 @@ ivas_error isar_framesize_to_ms( ivas_error isar_split_rend_choose_default_codec( ISAR_SPLIT_REND_CODEC *pCodec, /* i/o: pointer to codec setting */ - int16_t *pIsar_frame_size_ms, /* i/o: pointer to isar frame size setting */ + int16_t *pIsar_frame_size_ms, /* i/o: pointer to ISAR frame size setting */ Word16 *pCodec_frame_size_ms, /* i/o: pointer to codec frame size setting */ const Word16 cldfb_in_flag, /* i : flag indicating rendering in TD */ const Word16 pcm_out_flag, /* i : flag to indicate PCM output */ @@ -1338,7 +1338,8 @@ ivas_error isar_split_rend_choose_default_codec( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Unknown split codec value" ); } } - IF( *pIsar_frame_size_ms == 0 ) /* isar frame size hasn't been set yet - use default for current configuration */ + + IF( *pIsar_frame_size_ms == 0 ) /* ISAR frame size hasn't been set yet - use default for current configuration */ { *pIsar_frame_size_ms = 20; } @@ -1346,6 +1347,7 @@ ivas_error isar_split_rend_choose_default_codec( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * Function get_bit() * diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 723d29000..108969c96 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -1724,6 +1724,7 @@ ivas_error ISAR_POST_REND_GetSplitBinauralSamples( * * *-------------------------------------------------------------------*/ + void ISAR_POST_REND_Close( ISAR_POST_REND_HANDLE *phIvasRend /* i/o: Pointer to renderer handle */ ) @@ -1753,13 +1754,12 @@ void ISAR_POST_REND_Close( ivas_error ISAR_REND_SetSplitRendBitstreamHeader( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - const ISAR_SPLIT_REND_CODEC codec, /* o: codec setting */ - const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection, /* o: pose correction mode */ - const int16_t codec_frame_size_ms /* i: codec frame size setting */ - , - const int16_t isar_frame_size_ms, /* i: isar codec frame size setting */ - const int16_t lc3plus_highres /* i: LC3plus Hig-Res setting. Ignored if codec is not LC3plus */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + const ISAR_SPLIT_REND_CODEC codec, /* o : codec setting */ + const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection, /* o : pose correction mode */ + const int16_t codec_frame_size_ms, /* i : codec frame size setting */ + const int16_t isar_frame_size_ms, /* i : ISAR codec frame size setting */ + const int16_t lc3plus_highres /* i : LC3plus Hig-Res setting. Ignored if codec is not LC3plus */ ) { IF( hIvasRend == NULL ) @@ -1771,6 +1771,7 @@ ivas_error ISAR_REND_SetSplitRendBitstreamHeader( hIvasRend->splitRenderConfig.codec_frame_size_ms = codec_frame_size_ms; hIvasRend->splitRenderConfig.poseCorrectionMode = poseCorrection; hIvasRend->splitRenderConfig.lc3plus_highres = lc3plus_highres; + return IVAS_ERR_OK; } diff --git a/lib_isar/lib_isar_post_rend.h b/lib_isar/lib_isar_post_rend.h index 70b46f57c..85a35cd88 100644 --- a/lib_isar/lib_isar_post_rend.h +++ b/lib_isar/lib_isar_post_rend.h @@ -99,18 +99,18 @@ typedef enum _ISAR_POST_REND_COMPLEXITY_LEVEL /* Functions to be called before rendering */ ivas_error ISAR_POST_REND_open( ISAR_POST_REND_HANDLE *phIvasRend, /* i/o: Pointer to renderer handle */ - const Word32 outputSampleRate, /* i : output sampling rate */ + const Word32 outputSampleRate, /* i : output sampling rate */ const IVAS_AUDIO_CONFIG outConfig, /* i : output audio config */ const bool asHrtfBinary, /* i : load hrtf binary file */ - const Word16 nonDiegeticPan, /* i : non-diegetic object flag */ - const Word32 nonDiegeticPanGain, /* i : non-diegetic panning gain */ - const Word16 num_subframes /* i : number of subframes */ + const Word16 nonDiegeticPan, /* i : non-diegetic object flag */ + const Word32 nonDiegeticPanGain, /* i : non-diegetic panning gain */ + const Word16 num_subframes /* i : number of subframes */ ); /* Functions to be called before/during rendering */ ivas_error ISAR_POST_REND_NumOutChannels( ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */ - Word16 *numOutChannels /* o : number of output channels */ + Word16 *numOutChannels /* o : number of output channels */ ); ivas_error ISAR_POST_REND_AddInput( @@ -126,14 +126,15 @@ ivas_error ISAR_POST_REND_SetInputGain( ); ivas_error ISAR_POST_REND_GetInputNumChannels( - ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */ - const ISAR_POST_REND_InputId inputId, /* i : ID of the input */ - Word16 *numChannels /* o : number of channels of the input */ + ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */ + const ISAR_POST_REND_InputId inputId, /* i : ID of the input */ + Word16 *numChannels /* o : number of channels of the input */ ); + ivas_error ISAR_POST_REND_GetDelay( - ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer state */ - Word16 *nSamples, /* o : Renderer delay in samples */ - Word32 *timeScale /* o : Time scale of the delay, equal to renderer output sampling rate */ + ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer state */ + Word16 *nSamples, /* o : Renderer delay in samples */ + Word32 *timeScale /* o : Time scale of the delay, equal to renderer output sampling rate */ ); /* Functions to be called during rendering */ @@ -148,10 +149,12 @@ ivas_error ISAR_POST_REND_InitConfig( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_AUDIO_CONFIG outAudioConfig /* i : output audioConfig */ ); + Word16 ISAR_POST_REND_GetRenderConfig( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ - const ISAR_SPLIT_REND_CONFIG_HANDLE splitRenderConfig /* o : Render configuration handle */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + const ISAR_SPLIT_REND_CONFIG_HANDLE splitRenderConfig /* o : Render configuration handle */ ); + ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const ISAR_POST_REND_InputId inputId, /* i : ID of the input */ @@ -165,21 +168,21 @@ ivas_error ISAR_POST_REND_GetSplitBinauralSamples( ); ivas_error ISAR_POST_REND_SetHeadRotation( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ - const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */ - const ISAR_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering */ - const Word16 sf_idx /* i : subframe index */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */ + const ISAR_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering */ + const Word16 sf_idx /* i : subframe index */ ); ivas_error ISAR_POST_REND_SetSplitRendBFI( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const Word16 bfi /* i: BFI flag */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const Word16 bfi /* i : BFI flag */ ); ivas_error ISAR_POST_REND_getSamples( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ + IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ); /* Functions to be called after rendering */ @@ -189,27 +192,24 @@ void ISAR_POST_REND_Close( ); ivas_error ISAR_REND_SetSplitRendBitstreamHeader( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - const ISAR_SPLIT_REND_CODEC codec, /* o: codec setting */ - const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection, /* o: pose correction mode */ - const int16_t codec_frame_size_ms /* i: codec frame size setting */ - , - const int16_t isar_frame_size_ms, /* i: isar frame size setting */ - const int16_t lc3plus_highres /* i: LC3plus Hig-Res setting. Ignored if codec is not LC3plus */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + const ISAR_SPLIT_REND_CODEC codec, /* o : codec setting */ + const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection, /* o : pose correction mode */ + const Word16 codec_frame_size_ms, /* i : codec frame size setting */ + const Word16 isar_frame_size_ms, /* i : ISAR frame size setting */ + const Word16 lc3plus_highres /* i : LC3plus Hig-Res setting. Ignored if codec is not LC3plus */ ); - #ifdef DEBUGGING int32_t ISAR_POST_REND_GetNoCLipping( - ISAR_POST_REND_HANDLE hIvasRend /* i : Renderer handle */ + ISAR_POST_REND_HANDLE hIvasRend /* i : Renderer handle */ ); int32_t ISAR_POST_REND_GetCntFramesLimited( - ISAR_POST_REND_CONST_HANDLE hIvasRend /* i : Renderer handle */ + ISAR_POST_REND_CONST_HANDLE hIvasRend /* i : Renderer handle */ ); #endif - /* clang-format on */ #endif /* LIB_ISAR_POST_REND_H */ diff --git a/lib_isar/lib_isar_pre_rend.h b/lib_isar/lib_isar_pre_rend.h index dd0ad5755..66ab6c666 100644 --- a/lib_isar/lib_isar_pre_rend.h +++ b/lib_isar/lib_isar_pre_rend.h @@ -36,44 +36,52 @@ #include "isar_stat.h" #include "isar_prot.h" +/* clang-format off */ +/*----------------------------------------------------------------------------------* + * Renderer function prototypes + *----------------------------------------------------------------------------------*/ + ivas_error ISAR_PRE_REND_open( - SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ - ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, /* i/o: Split renderer pre-renerer config */ - const int32_t output_Fs, /* i: output sampling rate */ - const int16_t cldfb_in_flag, /* i: Flag to indicate CLDFB or time doamin input */ - const int16_t pcm_out_flag, /* i: Flag to indicate PCM output */ - const IVAS_RENDER_FRAMESIZE ivas_frame_size, /* i: IVAS frame size */ - const int16_t mixed_td_cldfb_flag /* i: Flag to indicate combined TD and CLDFB input */ + SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ + ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, /* i/o: Split renderer pre-renerer config */ + const int32_t output_Fs, /* i : output sampling rate */ + const int16_t cldfb_in_flag, /* i : Flag to indicate CLDFB or time doamin input */ + const int16_t pcm_out_flag, /* i : Flag to indicate PCM output */ + const IVAS_RENDER_FRAMESIZE ivas_frame_size, /* i : IVAS frame size */ + const int16_t mixed_td_cldfb_flag /* i : Flag to indicate combined TD and CLDFB input */ ); void ISAR_PRE_REND_close( - SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ - IVAS_REND_AudioBuffer *pSplitRendEncBuffer /* i/o: Split renderer data buffer */ + SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ + IVAS_REND_AudioBuffer *pSplitRendEncBuffer /* i/o: Split renderer data buffer */ ); void ISAR_PRE_REND_GetMultiBinPoseData( - const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i: Split renderer pre-renerer config */ - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ - const ISAR_SPLIT_REND_ROT_AXIS rot_axis /* i: Rotation axis */ + const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i : Split renderer pre-renerer config */ + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ + const ISAR_SPLIT_REND_ROT_AXIS rot_axis /* i : Rotation axis */ ); ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( - SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renerer handle */ - const IVAS_QUATERNION headPosition, /* i: head rotation QUATERNION */ - const Word32 SplitRendBitRate, /* i: Split renderer bitrate */ - ISAR_SPLIT_REND_CODEC splitCodec, /* i/o: Split renderer codec */ - const Word16 isar_frame_size_ms, /* i: ISAR framesize */ - Word16 codec_frame_size_ms, /* i/o: Split renderer codec framesize */ - ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: Split renderer bitstream handle */ - Word32 Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB real buffer */ - Word32 Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB imag buffer */ - const Word16 max_bands, /* i: CLDFB bands */ - Word32 *pOutput_fx[], /* i: low time resolution pre-renderer flag */ - const Word16 low_res_pre_rend_rot, /* i: low time resolution pre-renderer flag */ - const Word16 cldfb_in_flag, /* i: Flag to indicate CLDFB or time doamin input */ - const Word16 pcm_out_flag, /* i: Flag to indicate PCM output */ - const Word16 ro_md_flag, /* i: Flag to indicate real only metadata for yaw */ + SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renerer handle */ + const IVAS_QUATERNION headPosition, /* i : head rotation QUATERNION */ + const Word32 SplitRendBitRate, /* i : Split renderer bitrate */ + ISAR_SPLIT_REND_CODEC splitCodec, /* i/o: Split renderer codec */ + const Word16 isar_frame_size_ms, /* i : ISAR framesize */ + Word16 codec_frame_size_ms, /* i/o: Split renderer codec framesize */ + ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: Split renderer bitstream handle */ + Word32 Cldfb_In_BinReal_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB real buffer */ + Word32 Cldfb_In_BinImag_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB imag buffer */ + const Word16 max_bands, /* i : CLDFB bands */ + Word32 *pOutput_fx[], /* i : low time resolution pre-renderer flag */ + const Word16 low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ + const Word16 cldfb_in_flag, /* i : Flag to indicate CLDFB or time doamin input */ + const Word16 pcm_out_flag, /* i : Flag to indicate PCM output */ + const Word16 ro_md_flag, /* i : Flag to indicate real only metadata for yaw */ Word16 Q_buff, - Word16 *Q_out ); + Word16 *Q_out +); + +/* clang-format off */ #endif /* LIB_ISAR_PRE_REND_H */ diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 41fbff92d..97261956a 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -263,38 +263,37 @@ Word16 IVAS_REND_FeedRenderConfig( ); ivas_error IVAS_REND_FeedSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_REND_InputId inputId, /* i : ID of the input */ - IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_InputId inputId, /* i : ID of the input */ + IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ ); ivas_error IVAS_REND_GetSplitBinauralSamples( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ bool* needNewFrame ); ivas_error IVAS_REND_GetSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ - IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ); ivas_error IVAS_REND_GetSplitRendBitstreamHeader( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - ISAR_SPLIT_REND_CODEC *pCodec, /* o: pointer to codec setting */ - ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o: pointer to pose correction mode */ - Word16 *pCodec_frame_size_ms /* o: pointer to codec frame size setting */ - , - Word16 *pIsar_frame_size_ms /* o: pointer to isar frame size setting */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ + ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ + Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ + Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ ); ivas_error IVAS_REND_SetHeadRotation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ - const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */ - const ISAR_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering*/ - const Word16 sf_idx /* i : subframe index */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */ + const ISAR_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering*/ + const Word16 sf_idx /* i : subframe index */ ); /* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */ diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index ae4b2ef02..22b5c50ae 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -8795,7 +8795,7 @@ static ivas_error getSamplesInternal( if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, - &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) + &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, (const int16_t) ( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) { return error; } @@ -8835,6 +8835,7 @@ static ivas_error getSamplesInternal( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * IVAS_REND_GetSamples() * @@ -8846,18 +8847,17 @@ ivas_error IVAS_REND_GetSamples( IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */ ) { - return getSamplesInternal( hIvasRend, outAudio, NULL ); } + /*-------------------------------------------------------------------* * IVAS_REND_GetSplitBinauralBitstream() * * *-------------------------------------------------------------------*/ -ivas_error -IVAS_REND_GetSplitBinauralBitstream( +ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ @@ -8867,6 +8867,7 @@ IVAS_REND_GetSplitBinauralBitstream( cldfb_in_flag = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); hIvasRend->splitRendEncBuffer.config.is_cldfb = cldfb_in_flag; + if ( hIvasRend->hRendererConfig->split_rend_config.dof == 0 || hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) { hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = outAudio.config.numSamplesPerChannel; @@ -8882,23 +8883,32 @@ IVAS_REND_GetSplitBinauralBitstream( return getSamplesInternal( hIvasRend, outAudio, hBits ); } + +/*-------------------------------------------------------------------* + * IVAS_REND_GetSplitRendBitstreamHeader() + * + * + *-------------------------------------------------------------------*/ + ivas_error IVAS_REND_GetSplitRendBitstreamHeader( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - ISAR_SPLIT_REND_CODEC *pCodec, /* o: pointer to codec setting */ - ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o: pointer to pose correction mode */ - int16_t *pCodec_frame_size_ms /* o: pointer to codec frame size setting */ - , - int16_t *pIsar_frame_size_ms /* o: pointer to isar frame size setting */ + ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ + ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ + int16_t *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ + int16_t *pIsar_frame_size_ms /* o: pointer to ISAR frame size setting */ ) { - if ( hIvasRend == NULL || hIvasRend->hRendererConfig == NULL ) + test(); + IF( hIvasRend == NULL || hIvasRend->hRendererConfig == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + *pCodec = hIvasRend->hRendererConfig->split_rend_config.codec; *pCodec_frame_size_ms = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms; *pIsar_frame_size_ms = hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms; *poseCorrection = hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode; + return IVAS_ERR_OK; } @@ -8909,7 +8919,6 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader( * *-------------------------------------------------------------------*/ - void IVAS_REND_Close( IVAS_REND_HANDLE *phIvasRend /* i/o: Pointer to renderer handle */ ) @@ -8960,6 +8969,7 @@ void IVAS_REND_Close( ivas_external_orientation_close_fx( &hIvasRend->hExternalOrientationData ); ivas_combined_orientation_close_fx( &hIvasRend->hCombinedOrientationData ); + /* Fastconv HRTF memories */ ivas_binaural_hrtf_close( &hIvasRend->hHrtfs.hHrtfFastConv ); @@ -8982,8 +8992,7 @@ void IVAS_REND_Close( * *-------------------------------------------------------------------*/ -ivas_error -IVAS_REND_openCldfb( +ivas_error IVAS_REND_openCldfb( IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS], IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS], const int16_t num_in_chs, @@ -9020,6 +9029,7 @@ IVAS_REND_openCldfb( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * IVAS_REND_closeCldfb() * diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index 43c68cba5..40c1b73b8 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -120,7 +120,7 @@ ivas_error split_rend_reader_open( { return IVAS_ERR_FAILED_FILE_READ; } - /* read isar bitstream frame size signalling */ + /* read ISAR bitstream frame size signalling */ if ( fread( isar_frame_size_ms, sizeof( *isar_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_READ; @@ -209,7 +209,7 @@ ivas_error split_rend_writer_open( { return IVAS_ERR_FAILED_FILE_WRITE; } - /* Write isar bit stream frame size signalling */ + /* Write ISAR bit stream frame size signalling */ if ( fwrite( &isar_frame_size_ms, sizeof( isar_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 ) { return IVAS_ERR_FAILED_FILE_WRITE; -- GitLab From 1d8ae90c6233f46a377ab7295b28c19676daa1bc Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 5 Aug 2025 14:40:06 +0200 Subject: [PATCH 2/9] port MR, part2 --- lib_com/ivas_prot_fx.h | 6 + lib_dec/lib_dec_fx.c | 4 +- lib_isar/isar_MSPred.c | 27 +- lib_isar/isar_lcld_prot.h | 14 +- lib_isar/isar_lcld_rom_tables.c | 6 +- lib_isar/isar_prot.h | 62 +-- lib_isar/isar_splitRendererPLC.c | 16 +- lib_isar/isar_splitRenderer_utils.c | 70 +-- lib_isar/isar_stat.h | 40 +- lib_isar/lib_isar_post_rend.c | 120 +++-- lib_isar/lib_isar_post_rend.h | 6 +- lib_isar/lib_isar_pre_rend.c | 34 +- lib_rend/ivas_crend_fx.c | 156 ------ .../ivas_dirac_dec_binaural_functions_fx.c | 7 +- lib_rend/ivas_hrtf_fx.c | 3 +- lib_rend/ivas_output_init_fx.c | 32 +- lib_rend/ivas_prot_rend_fx.h | 453 +++++++++--------- lib_rend/ivas_render_config_fx.c | 2 +- lib_rend/ivas_rotation_fx.c | 40 +- lib_rend/lib_rend_fx.c | 229 +++++---- lib_util/split_rend_bfi_file_reader.c | 1 - lib_util/split_render_file_read_write.c | 1 - 22 files changed, 628 insertions(+), 701 deletions(-) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index ea14f048f..1b0f697af 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -4008,6 +4008,12 @@ ivas_error ivas_output_buff_dec_fx( const Word16 nchan_out_buff /* i : number of output channels */ ); +/*! r: flag to indicate if split rendering is enabled */ +Word16 is_split_rendering_enabled( + const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ + const IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* i : Render config data structure */ +); + ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ UWord16 *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 244692ae4..307840a44 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -1390,7 +1390,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( move16(); } - IF( EQ_16( IVAS_DEC_is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ), 0 ) ) + IF( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) == 0 ) { return IVAS_ERR_WRONG_PARAMS; } @@ -2893,7 +2893,7 @@ ivas_error IVAS_DEC_GetDelay( } move32(); #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT - nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], EQ_16( (Word16) hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); + nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], (Word16) EQ_16( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); move16(); #else nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], hDecoderConfig->output_config ) ); diff --git a/lib_isar/isar_MSPred.c b/lib_isar/isar_MSPred.c index 86088be8e..0bb5c88ee 100644 --- a/lib_isar/isar_MSPred.c +++ b/lib_isar/isar_MSPred.c @@ -39,16 +39,26 @@ #include "basop_util.h" #include "enh64.h" #include + + /*-------------------------------------------------------------------* - * Function _round() + * Function cplxmult() * * *-------------------------------------------------------------------*/ -static int32_t _round( - float val ) +void cplxmult_fx( + Word32 *pr1, + Word32 *pi1, + const Word32 r2, + const Word32 i2 ) { - return ( val > 0.0f ? (int32_t) ( val + 0.5f ) : (int32_t) ( val - 0.5f ) ); + Word32 r1 = *pr1, i1 = *pi1; + + *pr1 = L_sub( Mpy_32_32( r1, r2 ), Mpy_32_32( i1, i2 ) ); + *pi1 = L_add( Mpy_32_32( r1, i2 ), Mpy_32_32( i1, r2 ) ); + + return; } @@ -59,8 +69,8 @@ static int32_t _round( *-------------------------------------------------------------------*/ Word32 quantPhase_fx( - Word32 phase, - Word16 exp ) // i:31? + const Word32 phase, + const Word16 exp ) // i:31? { Word32 phaseQ; @@ -114,7 +124,7 @@ Word32 requantPhase( Word32 quantPred_fx( const Word32 pred, - Word16 exp ) // i:Q31 + const Word16 exp ) // i:Q31 { // int32_t predQ = _round(pred * PRED_QUANT_FACTOR); Word32 predQ = W_round32_s( W_shl( W_mult_32_32( pred, (Word32) PRED_QUANT_FACTOR ), exp ) ); @@ -131,7 +141,8 @@ Word32 quantPred_fx( * *-------------------------------------------------------------------*/ -Word32 dequantPred_fx( Word32 predQ ) +Word32 dequantPred_fx( + const Word32 predQ ) { if ( predQ == 12 ) { diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 4495882e1..51d6d7a95 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -99,28 +99,28 @@ Word32 DecodeLCLDFrame( *----------------------------------------------------------------------------------*/ Word32 quantPhase_fx( - Word32 phase, - Word16 exp + const Word32 phase, + const Word16 exp ); void cplxmult_fx( Word32 *pr1, Word32 *pi1, - Word32 r2, - Word32 i2 + const Word32 r2, + const Word32 i2 ); Word32 requantPhase( - Word32 phaseQ + Word32 phaseQ ); Word32 quantPred_fx( const Word32 pred, - Word16 exp + const Word16 exp ); Word32 dequantPred_fx( - Word32 predQ + const Word32 predQ ); Word32 PrepEncode( diff --git a/lib_isar/isar_lcld_rom_tables.c b/lib_isar/isar_lcld_rom_tables.c index d0274c153..906755c5e 100644 --- a/lib_isar/isar_lcld_rom_tables.c +++ b/lib_isar/isar_lcld_rom_tables.c @@ -183,7 +183,7 @@ const Word32 c_aiBandwidths48[MAX_BANDS_48] = { }; const Word32 c_afScaleFactor_fx[ALLOC_TABLE_SIZE] = { - //Q24 + // Q24 0, 5931641, 7053950, @@ -219,7 +219,7 @@ const Word32 c_afScaleFactor_fx[ALLOC_TABLE_SIZE] = { }; const Word32 c_afInvScaleFactor_fx[ALLOC_TABLE_SIZE] = { - //Q29 + // Q29 0, 1271049216, 1098656512, @@ -259,7 +259,7 @@ const Word16 c_afRMSEnvReconstructTable_exp[ENV_RECONSTRUCT_TABLE_SIZE] = { }; const Word32 c_aiQuantMaxValues_fx[ALLOC_TABLE_SIZE] = { - //Q21 + // Q21 0, 6291456, 6291456, diff --git a/lib_isar/isar_prot.h b/lib_isar/isar_prot.h index 909e09113..851ee7ac0 100644 --- a/lib_isar/isar_prot.h +++ b/lib_isar/isar_prot.h @@ -55,16 +55,16 @@ void ISAR_SPLIT_REND_BITStream_write_int32( ivas_error isar_splitBinLCLDEncOpen( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE *hSplitBinLCLDEnc, - const int32_t iSampleRate, - const int16_t iChannels, - const int32_t iDataRate, - const int16_t iNumBlocks, - const int16_t iNumIterations + const Word32 iSampleRate, + const Word16 iChannels, + const Word32 iDataRate, + const Word16 iNumBlocks, + const Word16 iNumIterations ); ivas_error isar_splitBinRendPLCOpen( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC, - int16_t iNumSubSets ); + const Word16 iNumSubSets ); void isar_splitBinRendPLCClose( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC @@ -86,9 +86,9 @@ void isar_splitBinRendPLCsaveState( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, Word32 Cldfb_RealBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_ImagBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const int16_t num_chs, - const int16_t iNumBlocks, - const int16_t iNumIterations + const Word16 num_chs, + const Word16 iNumBlocks, + const Word16 iNumIterations ); void isar_splitBinRendPLC_xf_fx( @@ -119,11 +119,11 @@ void isar_log_cldfb2wav_data( float Cldfb_In_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], HANDLE_CLDFB_FILTER_BANK *cldfbSyn, - const int16_t num_chs, - const int16_t num_freq_bands, - const int32_t output_Fs, - const int16_t start_slot_idx, - const int16_t md_band_idx, + const Word16 num_chs, + const Word16 num_freq_bands, + const Word32 output_Fs, + const Word16 start_slot_idx, + const Word16 md_band_idx, const char *filename ); #endif @@ -186,7 +186,7 @@ void isar_split_rend_init_huff_cfg( ivas_error isar_splitBinPostRendOpen( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE *hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const int32_t output_Fs + const Word32 output_Fs ); void isar_splitBinPostRendClose( @@ -228,21 +228,6 @@ void isar_split_rend_get_quant_params_fx( Word16 *num_quant_strats ); -void isar_split_rend_get_quant_params( - const int16_t num_md_bands, - int16_t pred_real_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t pred_imag_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t pred_quant_pnts_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - float pred_quantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - float pred_1byquantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t d_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], - int16_t *num_quant_strats, - int16_t *num_complex_bands -); - void isar_splitBinPostRendMdDec_fx( ISAR_SPLIT_REND_BITS_HANDLE pBits, ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, @@ -260,15 +245,6 @@ void Quat2EulerDegree( float *roll /* o : roll */ ); -void ivas_mat_mult_2by2_complex( - float in_re1[2][2], - float in_im1[2][2], - float in_re2[2][2], - float in_im2[2][2], - float out_re2[2][2], - float out_im2[2][2] -); - void isar_mat_mult_2by2_complex_fx( Word32 in_re1_fx[2][2], Word16 exp_re1, @@ -340,7 +316,7 @@ ivas_error isar_splitBinPreRendOpen( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE *hBinHrSplitPreRend, #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const int32_t output_Fs + const Word32 output_Fs #else MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData #endif @@ -369,7 +345,7 @@ Word32 isar_get_lcld_bitrate( ivas_error splitRendLc3plusEncodeAndWrite( SPLIT_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE pBits, - const int32_t available_bits, + const Word32 available_bits, Word32 *in[], Word16 Q_sig ); @@ -399,10 +375,6 @@ void ISAR_SPLIT_REND_BITStream_init( UWord8 *pbuf ); -void isar_split_rend_huffman_dec_init_min_max_len( - isar_split_rend_huffman_cfg_t *p_huff_cfg -); - Word16 wrap_a( Word16 val, const Word16 min_val, diff --git a/lib_isar/isar_splitRendererPLC.c b/lib_isar/isar_splitRendererPLC.c index c81d0e12f..af0fe79fd 100644 --- a/lib_isar/isar_splitRendererPLC.c +++ b/lib_isar/isar_splitRendererPLC.c @@ -49,6 +49,7 @@ /*------------------------------------------------------------------------- * Local constants *------------------------------------------------------------------------*/ + #define PI_CONST ( 341782638 ) // Q31 #define DO_PERTURB 1 #define PH_PERT_ONLY 1 @@ -62,26 +63,27 @@ #define STH_THRESH ( 2.f / 3.f * PI2 / 12 ) #define PLC_FADE_CNST SR_PLC_FADE_START *CLDFB_NO_COL_MAX #define PLC_MUTE_CNST SR_PLC_MUTE *CLDFB_NO_COL_MAX -Word32 xf_alp_tab[CLDFB_PLC_XF] = { 1431655680, 715827840 }; + +static Word32 xf_alp_tab[CLDFB_PLC_XF] = { 1431655680, 715827840 }; + /*------------------------------------------------------------------------- * Function adaptive_polar_ext_plc() * * *------------------------------------------------------------------------*/ + static void adaptive_polar_ext_plc_fx( const Word32 *prev_real_fx, const Word32 *prev_imag_fx, Word32 *rec_real_fx, Word32 *rec_imag_fx, Word16 *rec_real_exp, - Word16 *rec_imag_exp + Word16 *rec_imag_exp, #if CLDFB_PLC_XF > 0 - , Word32 xf_alp_fx[CLDFB_PLC_XF], - Word32 xf_bet_fx[CLDFB_PLC_XF] + Word32 xf_bet_fx[CLDFB_PLC_XF], #endif - , Word16 exp, const Word16 iNumCols ) @@ -1000,6 +1002,8 @@ static void adaptive_polar_ext_plc_fx( } return; } + + /*------------------------------------------------------------------------- * Function isar_splitBinRendPLCOpen() * @@ -1008,7 +1012,7 @@ static void adaptive_polar_ext_plc_fx( ivas_error isar_splitBinRendPLCOpen( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC, - Word16 iNumSubSets ) + const Word16 iNumSubSets ) { ivas_error error; ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC; diff --git a/lib_isar/isar_splitRenderer_utils.c b/lib_isar/isar_splitRenderer_utils.c index ff8922291..a962e3700 100644 --- a/lib_isar/isar_splitRenderer_utils.c +++ b/lib_isar/isar_splitRenderer_utils.c @@ -54,11 +54,24 @@ /*------------------------------------------------------------------------- - * Function ivas_mat_mult_2by2_complex() + * Function ivas_cmult_fix() * * *------------------------------------------------------------------------*/ -void ivas_cmult_fix( Word32 in1_re_fx, Word16 exp_re1, Word32 in1_im_fx, Word16 exp_im1, Word32 in2_re_fx, Word16 exp_re2, Word32 in2_im_fx, Word16 exp_im2, Word32 *out1_re_fx, Word32 *out1_im_fx, Word16 *exp_out1_re, Word16 *exp_out1_im ) + +void ivas_cmult_fix( + Word32 in1_re_fx, + Word16 exp_re1, + Word32 in1_im_fx, + Word16 exp_im1, + Word32 in2_re_fx, + Word16 exp_re2, + Word32 in2_im_fx, + Word16 exp_im2, + Word32 *out1_re_fx, + Word32 *out1_im_fx, + Word16 *exp_out1_re, + Word16 *exp_out1_im ) { Word16 shift_1 = W_norm( W_mult_32_32( in1_re_fx, in2_re_fx ) ); Word16 shift_2 = W_norm( W_mult_32_32( in1_im_fx, in2_im_fx ) ); @@ -77,9 +90,18 @@ void ivas_cmult_fix( Word32 in1_re_fx, Word16 exp_re1, Word32 in1_im_fx, Word16 *out1_im_fx = BASOP_Util_Add_Mant32Exp( tmp3, exp_re1 + exp_im2 - shift_3, tmp4, exp_re2 + exp_im1 - shift_4, &exp_tmp2 ); *exp_out1_im = exp_tmp2; move16(); + + return; } -void ivas_calculate_abs_fx( Word32 re_fx, Word16 exp_re, Word32 im_fx, Word16 exp_im, Word32 *out_fx, Word16 *exp_out ) + +void ivas_calculate_abs_fx( + Word32 re_fx, + Word16 exp_re, + Word32 im_fx, + Word16 exp_im, + Word32 *out_fx, + Word16 *exp_out ) { Word16 shift_1 = W_norm( W_mult_32_32( re_fx, re_fx ) ); Word16 shift_2 = W_norm( W_mult_32_32( im_fx, im_fx ) ); @@ -89,9 +111,16 @@ void ivas_calculate_abs_fx( Word32 re_fx, Word16 exp_re, Word32 im_fx, Word16 ex Word32 tmp3 = BASOP_Util_Add_Mant32Exp( tmp1, exp_re + exp_re - shift_1, tmp2, exp_im + exp_im - shift_2, &exp_tmp1 ); *out_fx = Sqrt32( tmp3, &exp_tmp1 ); *exp_out = exp_tmp1; + + return; } -void ivas_calculate_rabs_fx( Word32 re_fx, Word16 exp_re, Word32 *out_fx, Word16 *exp_out ) + +void ivas_calculate_rabs_fx( + Word32 re_fx, + Word16 exp_re, + Word32 *out_fx, + Word16 *exp_out ) { Word16 shift_1 = W_norm( W_mult_32_32( re_fx, re_fx ) ); Word32 tmp1 = W_extract_h( W_shl( W_mult_32_32( re_fx, re_fx ), shift_1 ) ); @@ -99,8 +128,11 @@ void ivas_calculate_rabs_fx( Word32 re_fx, Word16 exp_re, Word32 *out_fx, Word16 Word32 tmp2 = Sqrt32( tmp1, &exp_tmp1 ); *out_fx = tmp2; *exp_out = exp_tmp1; + + return; } + void isar_mat_mult_2by2_complex_fx( Word32 in_re1_fx[2][2], Word16 exp_re1, @@ -179,34 +211,6 @@ void isar_mat_mult_2by2_complex_fx( return; } -void ivas_mat_mult_2by2_complex( - float in_re1[2][2], - float in_im1[2][2], - float in_re2[2][2], - float in_im2[2][2], - float out_re2[2][2], - float out_im2[2][2] ) -{ - int16_t i, j; - float tmp_re, tmp_im; - - for ( i = 0; i < 2; i++ ) - { - for ( j = 0; j < 2; j++ ) - { - IVAS_CMULT_FLOAT( in_re1[i][0], in_im1[i][0], in_re2[0][j], in_im2[0][j], tmp_re, tmp_im ); - out_re2[i][j] = tmp_re; - out_im2[i][j] = tmp_im; - - IVAS_CMULT_FLOAT( in_re1[i][1], in_im1[i][1], in_re2[1][j], in_im2[1][j], tmp_re, tmp_im ); - out_re2[i][j] += tmp_re; - out_im2[i][j] += tmp_im; - } - } - - return; -} - /*------------------------------------------------------------------------- * Function ISAR_SPLIT_REND_BITStream_init() @@ -603,7 +607,7 @@ void ISAR_SPLIT_REND_BITStream_write_int32( #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG /*------------------------------------------------------------------------- - * ivas_mat_mult_2by2_complex() + * isar_log_cldfb2wav_data() * * *------------------------------------------------------------------------*/ diff --git a/lib_isar/isar_stat.h b/lib_isar/isar_stat.h index 3fc1580e2..9cfc24e5a 100644 --- a/lib_isar/isar_stat.h +++ b/lib_isar/isar_stat.h @@ -59,7 +59,7 @@ typedef struct { - int8_t headRotEnabled; + Word8 headRotEnabled; IVAS_QUATERNION headPositions[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; Word32 crossfade_fx[L_FRAME48k / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES]; @@ -81,29 +81,29 @@ typedef struct typedef struct isar_split_rend_huffman_cfg_t { const int32_t *codebook; - int16_t min_len; - int16_t max_len; - int16_t sym_len; + Word16 min_len; + Word16 max_len; + Word16 sym_len; } isar_split_rend_huffman_cfg_t; typedef struct isar_binaural_head_rot_split_rendering_huff_struct { isar_split_rend_huffman_cfg_t pred[2]; - int16_t pred_idx_trav[2][ISAR_SPLIT_REND_PRED_63QUANT_PNTS]; - int16_t pred_base2_code_len[2]; + Word16 pred_idx_trav[2][ISAR_SPLIT_REND_PRED_63QUANT_PNTS]; + Word16 pred_base2_code_len[2]; isar_split_rend_huffman_cfg_t pred_roll; - int16_t pred_roll_idx_trav[ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS]; - int16_t pred_roll_base2_code_len; + Word16 pred_roll_idx_trav[ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS]; + Word16 pred_roll_base2_code_len; isar_split_rend_huffman_cfg_t gd; - int16_t gd_base2_code_len; - int16_t gd_idx_trav[ISAR_SPLIT_REND_D_QUANT_PNTS]; + Word16 gd_base2_code_len; + Word16 gd_idx_trav[ISAR_SPLIT_REND_D_QUANT_PNTS]; isar_split_rend_huffman_cfg_t p_gd; - int16_t p_gd_base2_code_len; - int16_t p_gd_idx_trav[ISAR_SPLIT_REND_D_QUANT_PNTS]; + Word16 p_gd_base2_code_len; + Word16 p_gd_idx_trav[ISAR_SPLIT_REND_D_QUANT_PNTS]; isar_split_rend_huffman_cfg_t p_gd_diff; - int16_t p_gd_diff_base2_code_len; - int16_t p_gd_diff_idx_trav[ISAR_SPLIT_REND_D_QUANT_PNTS]; + Word16 p_gd_diff_base2_code_len; + Word16 p_gd_diff_idx_trav[ISAR_SPLIT_REND_D_QUANT_PNTS]; } ISAR_BIN_HR_SPLIT_REND_HUFF, *ISAR_BIN_HR_SPLIT_REND_HUFF_HANDLE; @@ -120,12 +120,13 @@ typedef struct isar_binaural_head_rot_split_rendering_md_struct Word32 gd2_fx; /* Q25 */ Word16 exp_gd; Word16 exp_gd2; - int16_t pred_mat_re_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; - int16_t pred_mat_im_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; - int16_t gd_idx; - int16_t gd2_idx; + Word16 pred_mat_re_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; + Word16 pred_mat_im_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; + Word16 gd_idx; + Word16 gd2_idx; } ISAR_BIN_HR_SPLIT_REND_MD, *ISAR_BIN_HR_SPLIT_REND_MD_HANDLE; + typedef struct isar_binaural_head_rot_split_pre_rendering_struct { ISAR_BIN_HR_SPLIT_REND_MD rot_md[MAX_HEAD_ROT_POSES - 1][MAX_SPLIT_MD_SUBFRAMES][MAX_SPLIT_REND_MD_BANDS]; @@ -133,7 +134,10 @@ typedef struct isar_binaural_head_rot_split_pre_rendering_struct float fix_pos_rot_mat[MAX_HEAD_ROT_POSES - 1][BINAURAL_CHANNELS][BINAURAL_CHANNELS]; ISAR_SPLIT_REND_POSE_TYPE pose_type[MAX_HEAD_ROT_POSES - 1]; ISAR_BIN_HR_SPLIT_REND_HUFF huff_cfg; + } ISAR_BIN_HR_SPLIT_PRE_REND, *ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE; + + /*----------------------------------------------------------------------------------* * Output configuration for renderer (e.g. DirAC, MASA, Binaural Renderer...) *----------------------------------------------------------------------------------*/ diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 108969c96..6a167672e 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -38,7 +38,6 @@ #include "prot_fx.h" #include "ivas_prot_fx.h" #include "prot_fx.h" - #include "ivas_prot_rend_fx.h" #include #include @@ -76,7 +75,7 @@ typedef struct const ISAR_POST_REND_HeadRotData *pHeadRotData; const int16_t *pSplitRendBFI; const ISAR_SPLIT_REND_CONFIG_DATA *pSplitRenderConfig; -} rendering_context; +} rendering_context_isar; /* Common base for input structs */ typedef struct @@ -85,26 +84,26 @@ typedef struct ISAR_POST_REND_InputId id; IVAS_REND_AudioBuffer inputBuffer; Word32 gain_fx; /* Linear, not in dB */ - rendering_context ctx; - int32_t numNewSamplesPerChannel; /* Used to keep track how much new audio was fed before rendering current frame */ -} input_base; + rendering_context_isar ctx; + Word32 numNewSamplesPerChannel; /* Used to keep track how much new audio was fed before rendering current frame */ +} input_base_isar; typedef struct { - input_base base; + input_base_isar base; ISAR_SPLIT_POST_REND_WRAPPER splitPostRendWrapper; Word32 *bufferData_fx; - int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */ + Word16 numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */ ISAR_POST_REND_BitstreamBuffer *hBits; } input_split_post_rend; struct ISAR_POST_REND { - int32_t sampleRateOut; + Word32 sampleRateOut; IVAS_LIMITER_HANDLE hLimiter; #ifdef DEBUGGING - int32_t numClipping; /* Counter of clipped output samples */ + Word32 numClipping; /* Counter of clipped output samples */ #endif input_split_post_rend inputsSplitPost[RENDERER_MAX_BIN_INPUTS]; @@ -113,12 +112,12 @@ struct ISAR_POST_REND AUDIO_CONFIG outputConfig; ISAR_POST_REND_HeadRotData headRotData; - int16_t splitRendBFI; + Word16 splitRendBFI; - int8_t rendererConfigEnabled; + Word8 rendererConfigEnabled; ISAR_SPLIT_REND_CONFIG_DATA splitRenderConfig; - int16_t num_subframes; + Word16 num_subframes; }; /*-------------------------------------------------------------------* @@ -126,6 +125,8 @@ struct ISAR_POST_REND * * *-------------------------------------------------------------------*/ + +/*! r: ISAR audio type */ ISAR_POST_REND_AudioConfigType isar_getAudioConfigType( const AUDIO_CONFIG config ) { @@ -166,6 +167,8 @@ static ivas_error allocateInputBaseBufferData_fx( return IVAS_ERR_OK; } + + static void freeInputBaseBufferData_fx( Word32 **data ) { @@ -178,6 +181,7 @@ static void freeInputBaseBufferData_fx( return; } + static IVAS_QUATERNION quaternionInit( void ) { @@ -221,6 +225,7 @@ static void convertInternalBitsBuffToBitsBuffer( return; } + static void copyBufferTo2dArray_fx( const IVAS_REND_AudioBuffer buffer, Word32 array[][L_FRAME48k] ) @@ -243,6 +248,7 @@ static void copyBufferTo2dArray_fx( return; } + static void accumulate2dArrayToBuffer_fx( Word32 array[][L_FRAME48k], Word16 Q_out[][BINAURAL_CHANNELS], @@ -270,6 +276,7 @@ static void accumulate2dArrayToBuffer_fx( return; } + /*-------------------------------------------------------------------* * limitRendererOutput() * @@ -315,7 +322,6 @@ static Word32 limitRendererOutput_fx( return numClipping; } - #endif @@ -324,6 +330,7 @@ static Word32 limitRendererOutput_fx( * * *-------------------------------------------------------------------*/ + static ivas_error validateOutputSampleRate( const Word32 sampleRate, const AUDIO_CONFIG outConfig ) @@ -348,9 +355,11 @@ static ivas_error validateOutputSampleRate( } } + /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ + static ivas_error initLimiter( IVAS_LIMITER_HANDLE *phLimiter, const Word16 numChannels, @@ -378,6 +387,7 @@ static ivas_error initLimiter( return IVAS_ERR_OK; } + static ivas_error initHeadRotation( ISAR_POST_REND_HANDLE hIvasRend ) { @@ -405,11 +415,13 @@ static ivas_error initHeadRotation( return IVAS_ERR_OK; } + + static void initRendInputBase_fx( - input_base *inputBase, + input_base_isar *inputBase, const AUDIO_CONFIG inConfig, const IVAS_REND_InputId id, - const rendering_context rendCtx, + const rendering_context_isar rendCtx, Word32 *dataBuf, const Word16 dataBufSize ) { @@ -430,10 +442,10 @@ static void initRendInputBase_fx( return; } -static rendering_context getRendCtx( +static rendering_context_isar getRendCtx( ISAR_POST_REND_HANDLE hIvasRend ) { - rendering_context ctx; + rendering_context_isar ctx; /* Note: when refactoring this, always take the ADDRESS of a member of the * renderer struct, so that the context stores a POINTER to the member, even @@ -461,13 +473,14 @@ static ivas_error getRendInputNumChannels( return IVAS_ERR_OK; } + static ivas_error updateSplitPostRendPanGains( input_split_post_rend *inputSplitPostRend, const AUDIO_CONFIG outConfig, ISAR_SPLIT_REND_CONFIG_DATA *hRendCfg ) { ivas_error error; - rendering_context rendCtx; + rendering_context_isar rendCtx; LC3PLUS_CONFIG config; Word16 iNumBlocksPerFrame, iNumLCLDIterationsPerFrame; @@ -504,8 +517,7 @@ static ivas_error updateSplitPostRendPanGains( } ELSE IF( hRendCfg->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) { - IF( ( error = ISAR_LC3PLUS_DEC_Open( config, - &inputSplitPostRend->splitPostRendWrapper.hLc3plusDec ) ) != IVAS_ERR_OK ) + IF( ( error = ISAR_LC3PLUS_DEC_Open( config, &inputSplitPostRend->splitPostRendWrapper.hLc3plusDec ) ) != IVAS_ERR_OK ) { return error; } @@ -519,6 +531,7 @@ static ivas_error updateSplitPostRendPanGains( return IVAS_ERR_OK; } + static ivas_error setRendInputActiveSplitPostRend( void *input, const AUDIO_CONFIG inConfig, @@ -526,7 +539,7 @@ static ivas_error setRendInputActiveSplitPostRend( ISAR_SPLIT_REND_CONFIG_DATA *hRendCfg ) { ivas_error error; - rendering_context rendCtx; + rendering_context_isar rendCtx; AUDIO_CONFIG outConfig; input_split_post_rend *inputSplitPostRend; @@ -551,10 +564,11 @@ static ivas_error setRendInputActiveSplitPostRend( return IVAS_ERR_OK; } + static void clearInputSplitRend( input_split_post_rend *inputSplitRend ) { - rendering_context rendCtx; + rendering_context_isar rendCtx; rendCtx = inputSplitRend->base.ctx; @@ -649,7 +663,6 @@ ivas_error ISAR_POST_REND_open( } /* Initialize inputs */ - FOR( i = 0; i < RENDERER_MAX_BIN_INPUTS; ++i ) { initRendInputBase_fx( &hIvasRend->inputsSplitPost[i].base, IVAS_AUDIO_CONFIG_INVALID, 0, getRendCtx( hIvasRend ), NULL, 0 ); @@ -663,14 +676,16 @@ ivas_error ISAR_POST_REND_open( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_NumOutChannels() * * *-------------------------------------------------------------------*/ + ivas_error ISAR_POST_REND_NumOutChannels( - ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */ - Word16 *numOutChannels /* o : number of output channels */ + ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */ + Word16 *numOutChannels /* o : number of output channels */ ) { /* Validate function arguments */ @@ -684,6 +699,7 @@ ivas_error ISAR_POST_REND_NumOutChannels( return IVAS_ERR_OK; } + static IVAS_REND_InputId makeInputId( AUDIO_CONFIG config, const Word32 inputIndex ) @@ -694,6 +710,7 @@ static IVAS_REND_InputId makeInputId( return (IVAS_REND_InputId) ( ( ( (UWord32) isar_getAudioConfigType( config ) ) << 8 ) | ( inputIndex + 1 ) ); } + static ivas_error getInputById( ISAR_POST_REND_HANDLE hIvasRend, const IVAS_REND_InputId inputId, @@ -701,7 +718,7 @@ static ivas_error getInputById( { Word32 inputIndex; IVAS_REND_AudioConfigType configType; - input_base *pInputBase; + input_base_isar *pInputBase; /* Reverse makeInputId() */ inputIndex = ( inputId & 0xFF ) - 1; @@ -712,6 +729,7 @@ static ivas_error getInputById( { return IVAS_ERR_INVALID_INPUT_ID; } + SWITCH( configType ) { case ISAR_POST_REND_AUDIO_CONFIG_TYPE_BINAURAL: @@ -737,18 +755,20 @@ static ivas_error getInputById( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_SetInputGain() * * *-------------------------------------------------------------------*/ + ivas_error ISAR_POST_REND_SetInputGain( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const ISAR_POST_REND_InputId inputId, /* i : ID of the input */ const Word32 gain /* i : linear gain (not in dB) */ ) { - input_base *inputBase; + input_base_isar *inputBase; ivas_error error; /* Validate function arguments */ @@ -768,6 +788,7 @@ ivas_error ISAR_POST_REND_SetInputGain( return IVAS_ERR_OK; } + static ivas_error getConstInputById( ISAR_POST_REND_CONST_HANDLE hIvasRend, const ISAR_POST_REND_InputId inputId, @@ -775,7 +796,7 @@ static ivas_error getConstInputById( { Word32 inputIndex; IVAS_REND_AudioConfigType configType; - const input_base *pInputBase; + const input_base_isar *pInputBase; /* Reverse makeInputId() */ inputIndex = ( inputId & 0xFF ) - 1; @@ -811,6 +832,7 @@ static ivas_error getConstInputById( return IVAS_ERR_OK; } + static ivas_error findFreeInputSlot( const void *inputs, const Word32 inputStructSize, @@ -827,14 +849,14 @@ static ivas_error findFreeInputSlot( Word32 i; bool canAddInput; const UWord8 *pByte; - const input_base *pInputBase; + const input_base_isar *pInputBase; canAddInput = false; pByte = inputs; /* Find first unused input in array */ FOR( i = 0; i < maxInputs; ++i ) { - pInputBase = (const input_base *) pByte; + pInputBase = (const input_base_isar *) pByte; IF( pInputBase->inConfig == IVAS_AUDIO_CONFIG_INVALID ) { @@ -853,6 +875,7 @@ static ivas_error findFreeInputSlot( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_AddInput() * @@ -905,6 +928,7 @@ ivas_error ISAR_POST_REND_AddInput( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_GetInputNumChannels() * @@ -918,7 +942,7 @@ ivas_error ISAR_POST_REND_GetInputNumChannels( ) { ivas_error error; - const input_base *pInput; + const input_base_isar *pInput; /* Validate function arguments */ IF( hIvasRend == NULL || numChannels == NULL ) @@ -939,6 +963,7 @@ ivas_error ISAR_POST_REND_GetInputNumChannels( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_GetDelay() * @@ -992,11 +1017,13 @@ ivas_error ISAR_POST_REND_GetDelay( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_FeedInputAudio() * * *-------------------------------------------------------------------*/ + ivas_error ISAR_POST_REND_FeedInputAudio( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const ISAR_POST_REND_InputId inputId, /* i : ID of the input */ @@ -1004,7 +1031,7 @@ ivas_error ISAR_POST_REND_FeedInputAudio( ) { ivas_error error; - input_base *inputBase; + input_base_isar *inputBase; Word16 numInputChannels; Word16 cldfb2tdSampleFact; @@ -1060,11 +1087,13 @@ ivas_error ISAR_POST_REND_FeedInputAudio( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_InitConfig() * * *-------------------------------------------------------------------*/ + ivas_error ISAR_POST_REND_InitConfig( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const AUDIO_CONFIG outAudioConfig /* i : output audioConfig */ @@ -1099,11 +1128,13 @@ ivas_error ISAR_POST_REND_InitConfig( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_GetRenderConfig() * * *-------------------------------------------------------------------*/ + Word16 ISAR_POST_REND_GetRenderConfig( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ const ISAR_SPLIT_REND_CONFIG_HANDLE splitRenderConfig /* o : Render configuration handle */ @@ -1130,11 +1161,14 @@ Word16 ISAR_POST_REND_GetRenderConfig( return IVAS_ERR_OK; } + + /*-------------------------------------------------------------------* * ISAR_POST_REND_FeedSplitBinauralBitstream() * * *-------------------------------------------------------------------*/ + ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_REND_InputId inputId, /* i : ID of the input */ @@ -1142,7 +1176,7 @@ ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream( ) { ivas_error error; - input_base *inputBase; + input_base_isar *inputBase; input_split_post_rend *inputSplitPostRend; /* Validate function arguments */ @@ -1163,6 +1197,7 @@ ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_SetHeadRotation() * @@ -1219,8 +1254,8 @@ ivas_error ISAR_POST_REND_SetHeadRotation( *-------------------------------------------------------------------*/ ivas_error ISAR_POST_REND_SetSplitRendBFI( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const Word16 bfi /* i: BFI flag */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const Word16 bfi /* i : BFI flag */ ) { hIvasRend->splitRendBFI = bfi; @@ -1279,6 +1314,7 @@ static ivas_error splitBinLc3plusDecode( return IVAS_ERR_OK; } + static ivas_error renderSplitBinauralWithPostRot( input_split_post_rend *splitBinInput, IVAS_REND_AudioBuffer outAudio, @@ -1567,6 +1603,7 @@ static ivas_error renderSplitBinauralWithPostRot( return error; } + static ivas_error renderInputSplitBin( input_split_post_rend *splitBinInput, const AUDIO_CONFIG outConfig, @@ -1599,6 +1636,7 @@ static ivas_error renderInputSplitBin( return error; } + static ivas_error renderActiveInputsSplitBin( ISAR_POST_REND_HANDLE hIvasRend, IVAS_REND_AudioBuffer outAudio ) @@ -1626,6 +1664,7 @@ static ivas_error renderActiveInputsSplitBin( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_getSamples() * @@ -1696,6 +1735,7 @@ ivas_error ISAR_POST_REND_getSamples( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * ISAR_POST_REND_GetSplitBinauralSamples() * @@ -1703,8 +1743,8 @@ ivas_error ISAR_POST_REND_getSamples( *-------------------------------------------------------------------*/ ivas_error ISAR_POST_REND_GetSplitBinauralSamples( - ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ bool *needNewFrame ) { ivas_error error; @@ -1753,6 +1793,12 @@ void ISAR_POST_REND_Close( } +/*-------------------------------------------------------------------* + * ISAR_REND_SetSplitRendBitstreamHeader() + * + * + + *-------------------------------------------------------------------*/ ivas_error ISAR_REND_SetSplitRendBitstreamHeader( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const ISAR_SPLIT_REND_CODEC codec, /* o : codec setting */ diff --git a/lib_isar/lib_isar_post_rend.h b/lib_isar/lib_isar_post_rend.h index 85a35cd88..ff8c98361 100644 --- a/lib_isar/lib_isar_post_rend.h +++ b/lib_isar/lib_isar_post_rend.h @@ -38,14 +38,14 @@ /*---------------------------------------------------------------------* - * Renderer constants + * ISAR post-renderer constants *---------------------------------------------------------------------*/ #define RENDERER_MAX_ISAR_MD_INPUTS 1 #define RENDERER_MAX_BIN_INPUTS 1 /*---------------------------------------------------------------------* - * Renderer structures + * ISAR post-renderer structures *---------------------------------------------------------------------*/ typedef struct @@ -93,7 +93,7 @@ typedef enum _ISAR_POST_REND_COMPLEXITY_LEVEL /* clang-format off */ /*----------------------------------------------------------------------------------* - * Renderer function prototypes + * ISAR post-renderer function prototypes *----------------------------------------------------------------------------------*/ /* Functions to be called before rendering */ diff --git a/lib_isar/lib_isar_pre_rend.c b/lib_isar/lib_isar_pre_rend.c index d4809fc30..b77c9a54c 100644 --- a/lib_isar/lib_isar_pre_rend.c +++ b/lib_isar/lib_isar_pre_rend.c @@ -76,17 +76,17 @@ ivas_error ISAR_PRE_REND_open( const Word16 cldfb_in_flag, const Word16 pcm_out_flag, const IVAS_RENDER_FRAMESIZE ivas_frame_size, /* i: IVAS frame size */ - const int16_t mixed_td_cldfb_flag ) + const Word16 mixed_td_cldfb_flag ) { ivas_error error, ch, num_ch; UWord8 isCldfbNeeded = 0; Word16 cldfb_in_flag_local = cldfb_in_flag; - if ( ( error = isar_split_rend_choose_default_codec( &( pSplitRendConfig->codec ), - &pSplitRendConfig->isar_frame_size_ms, - &pSplitRendConfig->codec_frame_size_ms, - cldfb_in_flag_local, - pcm_out_flag, (int16_t) ivas_frame_size ) ) != IVAS_ERR_OK ) + IF( ( error = isar_split_rend_choose_default_codec( &( pSplitRendConfig->codec ), + &pSplitRendConfig->isar_frame_size_ms, + &pSplitRendConfig->codec_frame_size_ms, + cldfb_in_flag_local, + pcm_out_flag, (Word16) ivas_frame_size ) ) != IVAS_ERR_OK ) { return error; } @@ -138,8 +138,7 @@ ivas_error ISAR_PRE_REND_open( FOR( ch = 0; ch < num_ch; ch++ ) { if ( ( error = openCldfb_ivas_fx( &( hSplitRendWrapper->hCldfbHandles->cldfbAna[ch] ), - CLDFB_ANALYSIS, - OutSampleRate, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) + CLDFB_ANALYSIS, OutSampleRate, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) { return error; } @@ -171,8 +170,7 @@ ivas_error ISAR_PRE_REND_open( { IF( EQ_16( pSplitRendConfig->codec, ISAR_SPLIT_REND_CODEC_LC3PLUS ) ) { - if ( ( error = split_renderer_open_lc3plus( hSplitRendWrapper, pSplitRendConfig, OutSampleRate, - ivas_frame_size ) ) != IVAS_ERR_OK ) + if ( ( error = split_renderer_open_lc3plus( hSplitRendWrapper, pSplitRendConfig, OutSampleRate, ivas_frame_size ) ) != IVAS_ERR_OK ) { return error; } @@ -192,14 +190,16 @@ ivas_error ISAR_PRE_REND_open( return IVAS_ERR_OK; } + /*------------------------------------------------------------------------- * Function ISAR_PRE_REND_close() * * *------------------------------------------------------------------------*/ + void ISAR_PRE_REND_close( - SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ - IVAS_REND_AudioBuffer *pSplitRendEncBuffer /* i/o: Split renderer data buffer */ + SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ + IVAS_REND_AudioBuffer *pSplitRendEncBuffer /* i/o: Split renderer data buffer */ ) { Word16 i; @@ -284,13 +284,17 @@ void ISAR_PRE_REND_GetMultiBinPoseData( ) { isar_renderSplitGetMultiBinPoseData_fx( pSplit_rend_config, pMultiBinPoseData, rot_axis ); + + return; } + /*------------------------------------------------------------------------- * Function ISAR_PRE_REND_MultiBinToSplitBinaural() * * *------------------------------------------------------------------------*/ + ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, const IVAS_QUATERNION headPosition, @@ -311,7 +315,7 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( Word16 *Q_out ) { ivas_error error; - int32_t bit_len, target_md_bits, available_bits, tmp_32; + Word32 bit_len, target_md_bits, available_bits, tmp_32; Word16 q1 = 31, q2 = 31, q_final, Q_cldfb, tmp, tmp_e; Word16 i, j; error = IVAS_ERR_OK; @@ -335,9 +339,7 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( IF( EQ_16( cldfb_in_flag, 0 ) ) { - error = isar_renderMultiTDBinToSplitBinaural( hSplitBin, headPosition, SplitRendBitRate, - isar_frame_size_ms, - codec_frame_size_ms, pBits, max_bands, pOutput_fx, Q_out[0], low_res_pre_rend_rot, pcm_out_flag, ro_md_flag ); + error = isar_renderMultiTDBinToSplitBinaural( hSplitBin, headPosition, SplitRendBitRate, isar_frame_size_ms, codec_frame_size_ms, pBits, max_bands, pOutput_fx, Q_out[0], low_res_pre_rend_rot, pcm_out_flag, ro_md_flag ); Q_out[1] = Q_out[0]; move16(); diff --git a/lib_rend/ivas_crend_fx.c b/lib_rend/ivas_crend_fx.c index a8195dae3..aa9869b61 100644 --- a/lib_rend/ivas_crend_fx.c +++ b/lib_rend/ivas_crend_fx.c @@ -2316,162 +2316,6 @@ ivas_error ivas_rend_crendProcessSubframe( return IVAS_ERR_OK; } -/*-----------------------------------------------------------------------------------------* - * Function ivas_rend_crend_ProcessSplitBin() - * - * Process call for IVAS Crend renderer - *-----------------------------------------------------------------------------------------*/ - -ivas_error ivas_rend_crendProcessSplitBin( - const CREND_WRAPPER *pCrend, - const AUDIO_CONFIG inConfig, - const AUDIO_CONFIG outConfig, - const MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const DECODER_CONFIG_HANDLE hDecoderConfig, - const COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, - const IVAS_OUTPUT_SETUP_HANDLE hIntSetup, - EFAP_HANDLE hEFAPdata, - Word32 *output[], - const Word32 output_Fs ) -{ - Word16 i, j; - Word16 sf; - Word16 pos_idx, output_frame; - ivas_error error; - Word16 gain_lfe; - Word32 tmpLfeBuffer[L_FRAME48k]; - Word32 tmpInputBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; - Word32 *p_tmpInputBuffer[MAX_OUTPUT_CHANNELS]; - Word32 tmpSplitBinBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k]; - COMBINED_ORIENTATION_DATA combinedOrientationDataLocal; - COMBINED_ORIENTATION_HANDLE pCombinedOrientationDataLocal; - - output_frame = extract_l( Mpy_32_32( output_Fs, ONE_BY_FRAMES_PER_SEC_Q31 ) ); - - /* copy input */ - FOR( i = 0; i < hIntSetup->nchan_out_woLFE; ++i ) - { - Copy32( output[i], tmpInputBuffer[i], output_frame ); - } - - FOR( i = 0; i < MAX_OUTPUT_CHANNELS; ++i ) - { - p_tmpInputBuffer[i] = tmpInputBuffer[i]; - move32(); - } - - /* save current head positions */ - pCombinedOrientationDataLocal = hCombinedOrientationData; - move32(); - combinedOrientationDataLocal = *pCombinedOrientationDataLocal; - move32(); - IF( EQ_32( pMultiBinPoseData->poseCorrectionMode, ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) ) - { - FOR( sf = 1; sf < hCombinedOrientationData->num_subframes; ++sf ) - { - Copy_Quat_fx( &combinedOrientationDataLocal.Quaternions[0], &combinedOrientationDataLocal.Quaternions[sf] ); - FOR( i = 0; i < 3; i++ ) - { - FOR( j = 0; j < 3; j++ ) - { - combinedOrientationDataLocal.Rmat_fx[sf][i][j] = combinedOrientationDataLocal.Rmat_fx[0][i][j]; - move32(); - } - } - } - } - - /* copy LFE to tmpLfeBuffer and apply gain only once */ - IF( GT_16( hIntSetup->num_lfe, 0 ) && NE_16( hIntSetup->index_lfe[0], -1 ) ) - { - Copy32( output[hIntSetup->index_lfe[0]], tmpLfeBuffer, output_frame ); - gain_lfe = ( ( pCrend != NULL ) && ( pCrend->hHrtfCrend != NULL ) ) ? pCrend->hHrtfCrend->gain_lfe_fx : GAIN_LFE_FX; - v_multc_fixed_16( tmpLfeBuffer, gain_lfe, tmpLfeBuffer, output_frame ); // q_input_fx - 1 - Scale_sig32( tmpLfeBuffer, output_frame, 1 ); // q_input_fx - } - ELSE - { - set32_fx( tmpLfeBuffer, 0, output_frame ); - } - - FOR( pos_idx = 0; pos_idx < pMultiBinPoseData->num_poses; ++pos_idx ) - { - /* Update head positions */ - - IVAS_QUATERNION Quaternions_orig[MAX_PARAM_SPATIAL_SUBFRAMES], Quaternions_abs; - FOR( i = 0; i < hCombinedOrientationData->num_subframes; i++ ) - { - Copy_Quat_fx( &combinedOrientationDataLocal.Quaternions[i], &Quaternions_orig[i] ); - Quaternions_abs.w_fx = L_negate( 12582912 ); // Q22 - move32(); - modify_Quat_q_fx( &combinedOrientationDataLocal.Quaternions[i], &combinedOrientationDataLocal.Quaternions[i], Q22 ); - Quat2EulerDegree_fx( combinedOrientationDataLocal.Quaternions[i], &Quaternions_abs.z_fx, &Quaternions_abs.y_fx, &Quaternions_abs.x_fx ); /*order in Quat2Euler seems to be reversed ?*/ - - Quaternions_abs.x_fx = L_add( Quaternions_abs.x_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][0] ); - Quaternions_abs.y_fx = L_add( Quaternions_abs.y_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][1] ); - Quaternions_abs.z_fx = L_add( Quaternions_abs.z_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][2] ); - combinedOrientationDataLocal.Quaternions[i] = Quaternions_abs; - move32(); - move32(); - move32(); - move32(); - modify_Quat_q_fx( &combinedOrientationDataLocal.Quaternions[i], &combinedOrientationDataLocal.Quaternions[i], Quaternions_orig[i].q_fact ); - QuatToRotMat_fx( combinedOrientationDataLocal.Quaternions[i], combinedOrientationDataLocal.Rmat_fx[i] ); - modify_Rmat_q_fx( combinedOrientationDataLocal.Rmat_fx[i], combinedOrientationDataLocal.Rmat_fx[i], sub( shl( Quaternions_orig[i].q_fact, 1 ), 32 ), Q30 ); - } - - - /* render inplace to first two channels of tmpInputBuffer */ - pCombinedOrientationDataLocal = &combinedOrientationDataLocal; - move32(); - - FOR( i = 0; i < 3; i++ ) - { - Copy32( hCombinedOrientationData->Rmat_prev_fx[pos_idx][i], pCombinedOrientationDataLocal->Rmat_prev_fx[0][i], 3 ); - } - - IF( ( error = ivas_rend_crendProcessSubframe( pCrend, inConfig, outConfig, hDecoderConfig, pCombinedOrientationDataLocal, hIntSetup, hEFAPdata, - NULL, p_tmpInputBuffer, p_tmpInputBuffer, output_frame, output_Fs, pos_idx ) ) != IVAS_ERR_OK ) - { - return error; - } - - FOR( i = 0; i < 3; i++ ) - { - Copy32( pCombinedOrientationDataLocal->Rmat_prev_fx[0][i], hCombinedOrientationData->Rmat_prev_fx[pos_idx][i], 3 ); - } - - FOR( i = 0; i < BINAURAL_CHANNELS; ++i ) - { - /* accumulate LFE to output */ - v_add_fx( tmpInputBuffer[i], tmpLfeBuffer, tmpInputBuffer[i], output_frame ); - - /* move to split bin output buffer */ - Copy32( tmpInputBuffer[i], tmpSplitBinBuffer[add( i_mult( pos_idx, BINAURAL_CHANNELS ), i )], output_frame ); - } - - /* overwrite rendered channels with input again for next iteration */ - FOR( i = 0; i < hIntSetup->nchan_out_woLFE; ++i ) - { - Copy32( output[i], tmpInputBuffer[i], output_frame ); - } - - /* restore original headrotation data */ - FOR( i = 0; i < hCombinedOrientationData->num_subframes; i++ ) - { - Copy_Quat_fx( &Quaternions_orig[i], &combinedOrientationDataLocal.Quaternions[i] ); - } - } - - /* copy split binaural rendered signals to final output */ - FOR( i = 0; i < BINAURAL_CHANNELS * pMultiBinPoseData->num_poses; ++i ) - { - Copy32( tmpSplitBinBuffer[i], output[i], output_frame ); - } - - return IVAS_ERR_OK; -} - /*-----------------------------------------------------------------------------------------* * Function ivas_rend_crend_ProcessSubframesSplitBin() diff --git a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c index 80a114052..0eeeff456 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c @@ -151,11 +151,13 @@ static void matrixTransp2Mul_fx( Word32 outIm[BINAURAL_CHANNELS][BINAURAL_CHANNELS] /*q_out*/, Word16 *q_out ); + /*------------------------------------------------------------------------- * ivas_dirac_dec_init_binaural_data() * * Initialize parametric binaural renderer *------------------------------------------------------------------------*/ + ivas_error ivas_dirac_dec_init_binaural_data_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ #ifdef NONBE_FIX_991_PARAMBIN_BINARY_HRTF @@ -1558,13 +1560,14 @@ static void ivas_dirac_dec_binaural_formulate_input_covariance_matrices_fx( return; } + static void ivas_dirac_dec_binaural_formulate_target_covariance_matrices_fx( DIRAC_DEC_BIN_HANDLE hDiracDecBin, const SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, const PARAMBIN_REND_CONFIG_HANDLE hConfig, Word32 Rmat_fx[3][3], - const int16_t subframe, - const int16_t isHeadtracked, + const Word16 subframe, + const Word16 isHeadtracked, const Word32 *subFrameTotalEne_fx, Word16 *subFrameTotalEne_e, const Word32 *IIReneLimiter_fx, diff --git a/lib_rend/ivas_hrtf_fx.c b/lib_rend/ivas_hrtf_fx.c index 2a75dee81..3577e7554 100644 --- a/lib_rend/ivas_hrtf_fx.c +++ b/lib_rend/ivas_hrtf_fx.c @@ -253,6 +253,7 @@ void ivas_HRTF_statistics_close( return; } + /*-----------------------------------------------------------------------* * ivas_HRTF_statistics_init() * @@ -261,7 +262,7 @@ void ivas_HRTF_statistics_close( ivas_error ivas_HRTF_statistics_init( HRTFS_STATISTICS_HANDLE *hHrtfStatistics, - int32_t sampleRate ) + const Word32 sampleRate ) { HRTFS_STATISTICS *HrtfStatistics; diff --git a/lib_rend/ivas_output_init_fx.c b/lib_rend/ivas_output_init_fx.c index 5c19acb5f..92005d9cc 100644 --- a/lib_rend/ivas_output_init_fx.c +++ b/lib_rend/ivas_output_init_fx.c @@ -616,7 +616,6 @@ Word16 ivas_get_nchan_buffers_dec_ivas_fx( } } - return nchan_out_buff; } @@ -626,6 +625,7 @@ Word16 ivas_get_nchan_buffers_dec_ivas_fx( * * Allocate/reallocate output audio buffers *-------------------------------------------------------------------*/ + ivas_error ivas_output_buff_dec_fx( Word32 *p_output_f[], /* i/o: output audio buffers */ const Word16 nchan_out_buff_old, /* i : previous frame number of output channels */ @@ -633,6 +633,7 @@ ivas_error ivas_output_buff_dec_fx( ) { Word16 ch; + IF( GT_16( nchan_out_buff, nchan_out_buff_old ) ) { FOR( ch = nchan_out_buff_old; ch < nchan_out_buff; ch++ ) @@ -652,10 +653,39 @@ ivas_error ivas_output_buff_dec_fx( p_output_f[ch] = NULL; } } + return IVAS_ERR_OK; } +/*---------------------------------------------------------------------* + * is_split_rendering_enabled() + * + * + *---------------------------------------------------------------------*/ + +/*! r: flag to indicate if split rendering is enabled */ +Word16 is_split_rendering_enabled( + const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ + const IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* i : Render config data structure */ +) +{ + test(); + test(); + test(); + test(); + IF( EQ_16( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) || + ( EQ_16( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_STEREO ) && hDecoderConfig->Opt_non_diegetic_pan && hRenderConfig->split_rend_config.dof == 0 ) ) + { + return 1; + } + else + { + return 0; + } +} + + /*---------------------------------------------------------------------* * get_channel_config() * diff --git a/lib_rend/ivas_prot_rend_fx.h b/lib_rend/ivas_prot_rend_fx.h index 77960f73e..ebb3caba1 100644 --- a/lib_rend/ivas_prot_rend_fx.h +++ b/lib_rend/ivas_prot_rend_fx.h @@ -71,14 +71,14 @@ void ivas_output_init( /*! r: number of decoder buffers */ Word16 ivas_get_nchan_buffers_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const Word16 sba_analysis_order, /* i : SBA order evaluated in SBA decoder */ - const Word32 ivas_total_brate /* i : total IVAS bitrate */ + const Word16 sba_analysis_order, /* i : SBA order evaluated in SBA decoder */ + const Word32 ivas_total_brate /* i : total IVAS bitrate */ ); Word16 ivas_get_nchan_buffers_dec_ivas_fx( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const Word16 sba_analysis_order, /* i : SBA order evaluated in SBA decoder */ - const Word32 ivas_total_brate /* i : total IVAS bitrate */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const Word16 sba_analysis_order, /* i : SBA order evaluated in SBA decoder */ + const Word32 ivas_total_brate /* i : total IVAS bitrate */ ); ivas_error get_channel_config( @@ -113,33 +113,33 @@ void limiter_process_fx( *----------------------------------------------------------------------------------*/ ivas_error ivas_td_decorr_dec_open_fx( ivas_td_decorr_state_t **hTdDecorr, /* i/o: TD decorrelator handle */ - const Word32 output_Fs, /* i : output sampling rate */ - const Word16 nchan_internal, /* i : number of internal channels */ - const Word16 ducking_flag /* i : ducking flag */ + const Word32 output_Fs, /* i : output sampling rate */ + const Word16 nchan_internal, /* i : number of internal channels */ + const Word16 ducking_flag /* i : ducking flag */ ); void ivas_td_decorr_dec_close( ivas_td_decorr_state_t **hTdDecorr /* i/o: TD decorrelator handle */ ); void ivas_td_decorr_process_fx( ivas_td_decorr_state_t *hTdDecorr, /* i/o: TD decoderrelator handle */ - Word32 *pcm_in[], /* i : input audio channels */ - Word32 **ppOut_pcm, /* o : output audio channels */ - const Word16 output_frame /* i : output frame length */ + Word32 *pcm_in[], /* i : input audio channels */ + Word32 **ppOut_pcm, /* o : output audio channels */ + const Word16 output_frame /* i : output frame length */ ); ivas_error ivas_td_decorr_reconfig_dec( const IVAS_FORMAT ivas_format, /* i : IVAS format */ - const Word32 ivas_total_brate, /* i : total IVAS bitrate */ - const Word16 nchan_transport, /* i : number of transport channels */ - const Word32 output_Fs, /* i : output sampling rate */ + const Word32 ivas_total_brate, /* i : total IVAS bitrate */ + const Word16 nchan_transport, /* i : number of transport channels */ + const Word32 output_Fs, /* i : output sampling rate */ ivas_td_decorr_state_t **hTdDecorr, /* i/o: TD decorrelator handle */ - UWord16 *useTdDecorr /* i/o: TD decorrelator flag */ + UWord16 *useTdDecorr /* i/o: TD decorrelator flag */ ); void ivas_td_decorr_APD_iir_filter_fx( ivas_td_decorr_APD_filt_state_t *filter_state, /* i/o: TD decorrelator filter handle */ - Word32 *pIn_out, /* i/o: audio channels */ - const Word16 num_APD_sections, /* i : numbef of APD sections */ - const Word16 output_frame /* i : output frame length */ + Word32 *pIn_out, /* i/o: audio channels */ + const Word16 num_APD_sections, /* i : numbef of APD sections */ + const Word16 output_frame /* i : output frame length */ ); /*----------------------------------------------------------------------------------* * Amplitude Panning EFAP prototypes @@ -160,24 +160,26 @@ void efap_determine_gains_fx( const Word32 ele_deg, /* i : elevation in degrees for panning direction (positive up) Q22 */ const Word16 efap_mode /* i : indicates whether EFAP or EFIP is used */ ); + + /*----------------------------------------------------------------------------------* * Amplitude Panning VBAP prototypes *----------------------------------------------------------------------------------*/ ivas_error vbap_init_data_fx( - VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */ - const Word32 *speaker_node_azi_deg_fx, /* i : vector of speaker node azimuths (positive left) Q22 */ - const Word32 *speaker_node_ele_deg_fx, /* i : vector of speaker node elevations (positive up) Q22 */ - const Word16 num_speaker_nodes, /* i : number of speaker nodes in the set */ - const IVAS_FORMAT ivas_format /* i : IVAS format */ + VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */ + const Word32 *speaker_node_azi_deg_fx, /* i : vector of speaker node azimuths (positive left) Q22 */ + const Word32 *speaker_node_ele_deg_fx, /* i : vector of speaker node elevations (positive up) Q22 */ + const Word16 num_speaker_nodes, /* i : number of speaker nodes in the set */ + const IVAS_FORMAT ivas_format /* i : IVAS format */ ); void vbap_determine_gains_fx( - const VBAP_HANDLE hVBAPdata, /* i : prepared VBAP structure */ - Word32 *gains_fx, /* o : gain vector for loudspeakers for given direction Q29 */ - const Word16 azi_deg, /* i : azimuth in degrees for panning direction (positive left) Q0 */ - const Word16 ele_deg, /* i : elevation in degrees for panning direction (positive up) Q0 */ - const Word16 use_object_mode /* i : select between object mode panning and spatial mode panning */ + const VBAP_HANDLE hVBAPdata, /* i : prepared VBAP structure */ + Word32 *gains_fx, /* o : gain vector for loudspeakers for given direction Q29 */ + const Word16 azi_deg, /* i : azimuth in degrees for panning direction (positive left) Q0 */ + const Word16 ele_deg, /* i : elevation in degrees for panning direction (positive up) Q0 */ + const Word16 use_object_mode /* i : select between object mode panning and spatial mode panning */ ); void vbap_free_data_fx( @@ -190,41 +192,44 @@ void vbap_free_data_fx( *----------------------------------------------------------------------------------*/ void ivas_sba_prototype_renderer_fx( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ Word32 inRe_fx[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, real */ Word32 inIm_fx[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i : Input audio in CLDFB domain, imag */ - Word16 q_cldfb[6][CLDFB_SLOTS_PER_SUBFRAME], - const Word16 subframe /* i : Subframe to render */ + Word16 q_cldfb[6][CLDFB_SLOTS_PER_SUBFRAME], + const Word16 subframe /* i : Subframe to render */ ); ivas_error ivas_sba_get_hoa_dec_matrix_fx( - const IVAS_OUTPUT_SETUP hOutSetup, /* i : target output setup */ - Word32 **hoa_dec_mtx, /* o : ALLRAD decoder matrix, Q29 */ - const Word16 ambisonics_order /* i : Ambisonics order */ + const IVAS_OUTPUT_SETUP hOutSetup, /* i : target output setup */ + Word32 **hoa_dec_mtx, /* o : ALLRAD decoder matrix, Q29 */ + const Word16 ambisonics_order /* i : Ambisonics order */ ); + void ivas_dirac_dec_binaural_sba_gain_fx( - Word32 *output[], /* i/o: synthesized core-coder transport channels/DirAC output, inp Qx, out Qx-1 */ - const Word16 nchan_remapped, /* i : num channels after remapping of TCs */ - const Word16 output_frame /* i : output frame length */ + Word32 *output[], /* i/o: synthesized core-coder transport channels/DirAC output, inp Qx, out Qx-1 */ + const Word16 nchan_remapped, /* i : num channels after remapping of TCs */ + const Word16 output_frame /* i : output frame length */ ); void ivas_dirac_dec_binaural_render_fx( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ - UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ - UWord16 *nSamplesAvailable, /* o : number of CLDFB slots still to render */ - const Word16 nchan_transport, /* i : number of transport channels */ - Word32 *output_f[] /* o : rendered time signal, Q11 */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const UWord16 nSamplesAsked, /* i : number of CLDFB slots requested */ + UWord16 *nSamplesRendered, /* o : number of CLDFB slots rendered */ + UWord16 *nSamplesAvailable, /* o : number of CLDFB slots still to render */ + const Word16 nchan_transport, /* i : number of transport channels */ + Word32 *output_f[] /* o : rendered time signal, Q11 */ ); + void ivas_masa_ext_rend_parambin_render_fx( - MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ - Word32 *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output Q11*/ - const Word16 num_subframes, /* i : number of subframes to render */ - const SPLIT_REND_WRAPPER *hSplitRendWrapper, /* i : split rendering orientation data */ + MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ + Word32 *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output Q11*/ + const Word16 num_subframes, /* i : number of subframes to render */ + const SPLIT_REND_WRAPPER *hSplitRendWrapper, /* i : split rendering orientation data */ Word32 Cldfb_Out_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : rendered orientations for split rend. real part of cldfb */ Word32 Cldfb_Out_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] /* o : rendered orientations for split rend. imag part of cldfb */ ); + ivas_error ivas_dirac_dec_init_binaural_data_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ #ifdef NONBE_FIX_991_PARAMBIN_BINARY_HRTF @@ -237,8 +242,9 @@ ivas_error ivas_dirac_dec_init_binaural_data_fx( void ivas_dirac_dec_close_binaural_data( DIRAC_DEC_BIN_HANDLE *hBinaural /* i/o: decoder DirAC binaural data handle */ ); + ivas_error ivas_dirac_dec_binaural_copy_hrtfs_fx( - HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */ + HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */ ); ivas_error ivas_dirac_alloc_mem_fx( @@ -246,7 +252,8 @@ ivas_error ivas_dirac_alloc_mem_fx( const RENDERER_TYPE renderer_type, const Word16 num_freq_bands, DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem, - const Word16 hodirac_flag); + const Word16 hodirac_flag +); void ivas_dirac_free_mem_fx( DIRAC_DEC_STACK_MEM_HANDLE hDirAC_mem @@ -382,11 +389,11 @@ void ivas_lfe_synth_with_cldfb_fx( ); void rotateAziEle_DirAC_fx( - Word16 *azi, /* i/o: array of azimuth values */ - Word16 *ele, /* i/o: array of elevation values */ - const Word16 band1, /* i : bands to work on (lower limit) */ - const Word16 band2, /* i : bands to work on (upper bound) */ - const Word32 *p_Rmat_fx /* i : pointer to real-space rotation matrix q30*/ + Word16 *azi, /* i/o: array of azimuth values */ + Word16 *ele, /* i/o: array of elevation values */ + const Word16 band1, /* i : bands to work on (lower limit) */ + const Word16 band2, /* i : bands to work on (upper bound) */ + const Word32 *p_Rmat_fx /* i : pointer to real-space rotation matrix q30*/ ); ivas_error ivas_dirac_dec_onset_detection_open_fx( @@ -394,7 +401,8 @@ ivas_error ivas_dirac_dec_onset_detection_open_fx( const Word16 num_freq_bands, //Q0 const Word16 max_band_decorr, //Q0 DIRAC_ONSET_DETECTION_PARAMS *ph_dirac_onset_detection_params, - DIRAC_ONSET_DETECTION_STATE *ph_dirac_onset_detection_state ); + DIRAC_ONSET_DETECTION_STATE *ph_dirac_onset_detection_state +); ivas_error ivas_dirac_dec_decorr_open_fx( DIRAC_DECORR_PARAMS **ph_freq_domain_decorr_ap_params, @@ -421,7 +429,7 @@ void ivas_dirac_dec_decorr_process_fx( Word16 num_channels, const Word16 num_protos_diff, const DIRAC_SYNTHESIS_CONFIG synthesisConf, - const Word16 nchan_transport, /* i : number of transport channels */ + const Word16 nchan_transport, /* i : number of transport channels */ const Word32 *input_frame_fx, Word16 q_inp_frame, const Word16 num_protos_dir, @@ -442,16 +450,16 @@ ivas_error ivas_dirac_dec_output_synthesis_open_fx( SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ const RENDERER_TYPE renderer_type, /* i : renderer type */ - const Word16 nchan_transport, /* i : number of transport channels */ - const Word32 output_Fs, /* i : output sampling rate */ - const Word16 hodirac_flag /* i : flag to indicate HO-DirAC mode */ + const Word16 nchan_transport, /* i : number of transport channels */ + const Word32 output_Fs, /* i : output sampling rate */ + const Word16 hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_dirac_dec_output_synthesis_init_fx( - SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ - DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ - const Word16 nchan_out_woLFE, /* i : number of output audio channels without LFE */ - const Word16 hodirac_flag /* i : flag to indicate HO-DirAC mode */ + SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ + DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ + const Word16 nchan_out_woLFE, /* i : number of output audio channels without LFE */ + const Word16 hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); void ivas_dirac_dec_output_synthesis_close_fx( @@ -459,21 +467,22 @@ void ivas_dirac_dec_output_synthesis_close_fx( ); void ivas_dirac_dec_output_synthesis_process_slot_fx( - const Word32 *reference_power, /* i : Estimated power */ - const Word16 *q_reference_power, /* i : Estimated power */ - const Word32 *onset, /* i : onset filter */ + const Word32 *reference_power, /* i : Estimated power */ + const Word16 *q_reference_power, /* i : Estimated power */ + const Word32 *onset, /* i : onset filter */ const Word16 *azimuth, const Word16 *elevation, const Word32 *diffuseness, Word16 q_diffuseness, - SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ - DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ - const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ - const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ - const Word16 nchan_transport, /* i : number of transport channels*/ + SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ + DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ + const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */ + const IVAS_OUTPUT_SETUP hOutSetup, /* i : output setup structure */ + const Word16 nchan_transport, /* i : number of transport channels*/ const Word16 md_idx, - const Word16 hodirac_flag, /* i : flag to indicate HO-DirAC mode */ - const Word16 dec_param_estim); + const Word16 hodirac_flag, /* i : flag to indicate HO-DirAC mode */ + const Word16 dec_param_estim +); void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd_fx( Word32 RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ @@ -485,7 +494,7 @@ void ivas_dirac_dec_output_synthesis_process_subframe_gain_shd_fx( const Word32 *onset_filter, Word32 *diffuseness, const Word16 hodirac_flag, /* i : flag to indicate HO-DirAC mode */ - const Word16 dec_param_estim, /* i : flag to indicate parameter estimation mode */ + const Word16 dec_param_estim, /* i : flag to indicate parameter estimation mode */ Word16 *q_cy_cross_dir_smooth_prev, Word16 *q_cy_auto_diff_smooth_prev ); @@ -495,8 +504,8 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls_fx( Word32 ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX],/* i : LS signals */ SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common spatial renderer data handle */ DIRAC_REND_HANDLE hDirACRend, /* i/o: DirAC renderer handle */ - const Word16 nbslots, /* i : number of slots to process */ - Word32 *diffuseness_vector, /* i : diffuseness (needed for direction smoothing)*/ + const Word16 nbslots, /* i : number of slots to process */ + Word32 *diffuseness_vector, /* i : diffuseness (needed for direction smoothing)*/ Word32 *reference_power_smooth, Word16 *q_reference_power_smooth, Word32 qualityBasedSmFactor, @@ -509,7 +518,8 @@ void compute_hoa_encoder_mtx_fx( const Word32 *elevation, /*q22*/ Word32 *response_fx, /*q31*/ const Word16 num_responses, - const Word16 ambisonics_order ); + const Word16 ambisonics_order +); void ivas_dirac_dec_compute_gain_factors_fx( const Word16 num_freq_bands, @@ -563,19 +573,21 @@ ivas_error ivas_spat_hSpatParamRendCom_config_fx( ivas_error ivas_dirac_allocate_parameters_fx( SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common data for spatial parametric rendering */ - const Word16 params_flag /* i : set of parameters flag */ + const Word16 params_flag /* i : set of parameters flag */ ); void ivas_dirac_deallocate_parameters_fx( SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i/o: common data for spatial parametric rendering */ - const Word16 params_flag /* i : set of parameters flag */ + const Word16 params_flag /* i : set of parameters flag */ ); void ivas_masa_ext_dirac_render_fx( - MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA renderer structure */ - Word32 *output_f[], /* i/o: input/output signals in time domain q11*/ - const Word16 num_subframes /* i : number of subframes to render */ + MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA renderer structure */ + Word32 *output_f[], /* i/o: input/output signals in time domain q11*/ + const Word16 num_subframes /* i : number of subframes to render */ ); + + /*----------------------------------------------------------------------------------* * HRTF *----------------------------------------------------------------------------------*/ @@ -614,7 +626,7 @@ void ivas_HRTF_CRend_binary_close_fx( ivas_error ivas_HRTF_statistics_init( HRTFS_STATISTICS_HANDLE *hHrtfStatistics, /* i/o: HRTF statistics structure */ - int32_t sampleRate /* i : Sample rate */ + const Word32 sampleRate /* i : Sample rate */ ); void ivas_HRTF_statistics_close( @@ -629,19 +641,20 @@ ivas_error ivas_HRTF_statistics_binary_open( /*----------------------------------------------------------------------------------* * TD object renderer *----------------------------------------------------------------------------------*/ + ivas_error ivas_td_binaural_renderer_unwrap_fx( - const REVERB_HANDLE hReverb, /* i : Reverberator handle */ - const AUDIO_CONFIG transport_config, /* i : Transport configuration */ - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD binaural object renderer handle */ - const Word16 num_src, /* i : number of sources to render */ - const Word16 lfe_idx, /* i : LFE channel index */ - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - ISM_METADATA_HANDLE *hIsmMetaData, /* i : ISM metadata handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientaton data handle */ - const Word16 ism_md_subframe_update, /* i : Number of subframes to delay ism metadata to sync with audio */ - Word32 *output_fx[], /* i/o: SCE channels / Binaural synthesis Q11 */ - const Word16 output_frame, /* i : output frame length */ - const Word16 num_subframes /* i : number of subframes to render */ + const REVERB_HANDLE hReverb, /* i : Reverberator handle */ + const AUDIO_CONFIG transport_config, /* i : Transport configuration */ + BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD binaural object renderer handle */ + const Word16 num_src, /* i : number of sources to render */ + const Word16 lfe_idx, /* i : LFE channel index */ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + ISM_METADATA_HANDLE *hIsmMetaData, /* i : ISM metadata handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientaton data handle */ + const Word16 ism_md_subframe_update, /* i : Number of subframes to delay ism metadata to sync with audio */ + Word32 *output_fx[], /* i/o: SCE channels / Binaural synthesis Q11 */ + const Word16 output_frame, /* i : output frame length */ + const Word16 num_subframes /* i : number of subframes to render */ ); ivas_error ivas_td_binaural_renderer_ext_fx( @@ -651,20 +664,20 @@ ivas_error ivas_td_binaural_renderer_ext_fx( const COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData,/* i : Combined head and external orientations */ const IVAS_ISM_METADATA *currentPos, /* i : Object position */ const REVERB_HANDLE hReverb, /* i : Reverberator handle */ - const Word16 ism_md_subframe_update_ext, /* i : Metadata Delay in subframes to sync with audio delay */ - const Word32 output_Fs, /* i : output sampling rate */ - const Word16 output_frame, /* i : output frame length */ - Word32 output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis Q11 */ + const Word16 ism_md_subframe_update_ext, /* i : Metadata Delay in subframes to sync with audio delay */ + const Word32 output_Fs, /* i : output sampling rate */ + const Word16 output_frame, /* i : output frame length */ + Word32 output[][L_FRAME48k], /* i/o: SCE channels / Binaural synthesis Q11 */ Word16 *exp ); ivas_error ivas_td_binaural_open_unwrap_fx( TDREND_HRFILT_FiltSet_t **hHrtfTD, /* i/o: HR filter model (from file or NULL) */ - const Word32 output_Fs, /* i : Output sampling rate */ - const Word16 nchan_transport, /* i : Number of channels */ + const Word32 output_Fs, /* i : Output sampling rate */ + const Word16 nchan_transport, /* i : Number of channels */ const IVAS_FORMAT ivas_format, /* i : IVAS format (ISM/MC) */ const AUDIO_CONFIG transport_config, /* i : Transport configuration */ - const Word16 *directivity, /* i : Directivity pattern (used for ISM) */ + const Word16 *directivity, /* i : Directivity pattern (used for ISM) */ const IVAS_OUTPUT_SETUP hTransSetup, /* i : Loudspeaker layout */ BINAURAL_TD_OBJECT_RENDERER_HANDLE *hBinRendererTd, /* o : TD renderer handle */ Word32 *binaural_latency_ns, /* i : Binauralization delay */ @@ -686,11 +699,11 @@ void ivas_td_binaural_close_fx( ); ivas_error TDREND_GetMix_fx( - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ - Word32 *output[], /* i/o: ISM object synth / rendered output in 0,1 */ - const Word16 subframe_length, /* i/o: subframe length Q11 */ - const Word16 subframe_idx, /* i : Subframe index to 5 ms subframe */ - const Word16 ism_md_subframe_update /* i : Number of subframes to delay ism metadata to sync with audio */ + BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ + Word32 *output[], /* i/o: ISM object synth / rendered output in 0,1 */ + const Word16 subframe_length, /* i/o: subframe length Q11 */ + const Word16 subframe_idx, /* i : Subframe index to 5 ms subframe */ + const Word16 ism_md_subframe_update /* i : Number of subframes to delay ism metadata to sync with audio */ ); void BSplineModelEvalDealloc_fx( @@ -701,15 +714,15 @@ void BSplineModelEvalDealloc_fx( /* ----- Object renderer - hrfilt ----- */ void GetFilterFromAngle_fx( - TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ - const Word32 Elev_fx, /* i : Elevation, degrees Q22 */ - Word32 Azim_fx, /* i : Azimuth, degrees Q22 */ - const Word16 filterlength, /* i : Filter length */ - Word32 *hrf_left_fx, /* o : Left HR filter */ - Word16 *hrf_left_e, /* o : Left HR filter exponent */ - Word32 *hrf_right_fx, /* o : Right HR filter */ - Word16 *hrf_right_e, /* o : Right HR filter exponent */ - Word16 *itd /* o : ITD value Q0 */ + TDREND_HRFILT_FiltSet_t *HrFiltSet_p, /* i/o: HR filter set structure */ + const Word32 Elev_fx, /* i : Elevation, degrees Q22 */ + Word32 Azim_fx, /* i : Azimuth, degrees Q22 */ + const Word16 filterlength, /* i : Filter length */ + Word32 *hrf_left_fx, /* o : Left HR filter */ + Word16 *hrf_left_e, /* o : Left HR filter exponent */ + Word32 *hrf_right_fx, /* o : Right HR filter */ + Word16 *hrf_right_e, /* o : Right HR filter exponent */ + Word16 *itd /* o : ITD value Q0 */ ); void HRTF_model_precalc( @@ -717,22 +730,22 @@ void HRTF_model_precalc( ); ivas_error TDREND_REND_RenderSourceHRFilt_fx( - TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ - Word32 *hrf_left_delta_fx, /* i/o: Left filter interpolation delta */ - Word16 *hrf_left_delta_e, /* i/o: Left filter interpolation delta exp */ - Word32 *hrf_right_delta_fx, /* i/o: Right filter interpolation delta */ - Word16 *hrf_right_delta_e, /* i/o: Right filter interpolation delta exp */ - const Word16 intp_count, /* i : Interpolation count */ - Word32 output_buf_fx[][L_SPATIAL_SUBFR_48k], /* o : Output buffer same Q as Src_p->InputFrame_p_fx Q11 */ - const Word16 subframe_length /* i : Subframe length in use */ + TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ + Word32 *hrf_left_delta_fx, /* i/o: Left filter interpolation delta */ + Word16 *hrf_left_delta_e, /* i/o: Left filter interpolation delta exp */ + Word32 *hrf_right_delta_fx, /* i/o: Right filter interpolation delta */ + Word16 *hrf_right_delta_e, /* i/o: Right filter interpolation delta exp */ + const Word16 intp_count, /* i : Interpolation count */ + Word32 output_buf_fx[][L_SPATIAL_SUBFR_48k], /* o : Output buffer same Q as Src_p->InputFrame_p_fx Q11 */ + const Word16 subframe_length /* i : Subframe length in use */ ); /* ----- Object renderer - sources ----- */ ivas_error TDREND_MIX_SRC_SetPos_fx( - BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ - const Word16 SrcInd, /* i : Source index */ - const Word32 *Vec_p /* i : Position vector */ + BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ + const Word16 SrcInd, /* i : Source index */ + const Word32 *Vec_p /* i : Position vector */ ); ivas_error TDREND_MIX_SRC_SetDir_fx( @@ -876,7 +889,7 @@ ivas_error ivas_rend_openCrend( ); void ivas_rend_closeCrend( - CREND_WRAPPER_HANDLE *pCrend , + CREND_WRAPPER_HANDLE *pCrend, const Word16 num_poses ); @@ -901,8 +914,7 @@ ivas_error ivas_rend_crendProcessSubframe( Word32 *input_f[], /* i : transport channels */ Word32 *output[], /* i/o: input/output audio channels */ const Word16 n_samples_to_render, /* i : output frame length per channel */ - const Word32 output_Fs /* i : output sampling rate */ - , + const Word32 output_Fs, /* i : output sampling rate */ const Word16 pos_idx ); @@ -922,8 +934,6 @@ ivas_error ivas_binaural_reverb_init( const Word32 *defaultEne /* i : default reverberation energies */ ); - - void ivas_binaural_reverb_close_fx( REVERB_STRUCT_HANDLE *hReverb /* i/o: binaural reverb handle */ ); @@ -1183,14 +1193,12 @@ void ivas_headTrack_close_fx( HEAD_TRACK_DATA_HANDLE *hHeadTrackData /* i/o: head track handle */ ); -float rad2deg( - float radians -); + void Euler2Quat_fx( - const Word32 yaw, /* i : yaw (x) Q22 */ - const Word32 pitch, /* i : pitch (y) Q22 */ - const Word32 roll, /* i : roll (z) Q22 */ - IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ + const Word32 yaw, /* i : yaw (x) Q22 */ + const Word32 pitch, /* i : pitch (y) Q22 */ + const Word32 roll, /* i : roll (z) Q22 */ + IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ); Word32 deg2rad_fx( @@ -1202,60 +1210,65 @@ Word32 rad2deg_fx( ); void rotateAziEle_fx( - Word16 azi_in, /* i : output elevation */ - Word16 ele_in, /* i : input elevation */ - Word16 *azi, /* o : rotated azimuth */ - Word16 *ele, /* o : rotated elevation */ - Word32 Rmat[3][3], /* i : real-space rotation matrix */ - const Word16 isPlanar /* i : is roation planar and elevation meaningless? */ + Word16 azi_in, /* i : output elevation */ + Word16 ele_in, /* i : input elevation */ + Word16 *azi, /* o : rotated azimuth */ + Word16 *ele, /* o : rotated elevation */ + Word32 Rmat[3][3], /* i : real-space rotation matrix */ + const Word16 isPlanar /* i : is roation planar and elevation meaningless? */ ); void rotateAziEle_fx_frac_az_el( - Word32 azi_in, /* i : output elevation */ - Word32 ele_in, /* i : input elevation */ - Word32 *azi, /* o : rotated azimuth */ - Word32 *ele, /* o : rotated elevation */ - Word32 Rmat[3][3], /* i : real-space rotation matrix */ - const Word16 isPlanar /* i : is roation planar and elevation meaningless? */ + Word32 azi_in, /* i : output elevation */ + Word32 ele_in, /* i : input elevation */ + Word32 *azi, /* o : rotated azimuth */ + Word32 *ele, /* o : rotated elevation */ + Word32 Rmat[3][3], /* i : real-space rotation matrix */ + const Word16 isPlanar /* i : is roation planar and elevation meaningless? */ ); void rotateAziEle_fixed( - Word16 azi_in, /* i : output elevation */ - Word16 ele_in, /* i : input elevation */ - Word32 *azi, /* o : rotated azimuth */ - Word32 *ele, /* o : rotated elevation */ - Word32 Rmat[3][3], /* i : real-space rotation matrix */ - const Word16 isPlanar /* i : is roation planar and elevation meaningless? */ + Word16 azi_in, /* i : output elevation */ + Word16 ele_in, /* i : input elevation */ + Word32 *azi, /* o : rotated azimuth */ + Word32 *ele, /* o : rotated elevation */ + Word32 Rmat[3][3], /* i : real-space rotation matrix */ + const Word16 isPlanar /* i : is roation planar and elevation meaningless? */ ); + void SHrotmatgen_fx( - Word16 SHrotmat[SBA_NHARM_HOA3][SBA_NHARM_HOA3], /* o : SHD rotation matrix */ - Word32 Rmat[3][3], /* i : real-space rotation matrix */ - const Word16 order /* i : ambisonics order */ + Word16 SHrotmat[SBA_NHARM_HOA3][SBA_NHARM_HOA3], /* o : SHD rotation matrix */ + Word32 Rmat[3][3], /* i : real-space rotation matrix */ + const Word16 order /* i : ambisonics order */ ); + void rotateFrame_shd( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : head and external orientation combined handle */ - Word32 *output[], /* i/o: unrotated HOA3 signal buffer in TD */ - const Word16 subframe_len, /* i : subframe length per channel */ + Word32 *output[], /* i/o: unrotated HOA3 signal buffer in TD */ + const Word16 subframe_len, /* i : subframe length per channel */ const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ - const Word16 subframe_idx /* i : subframe index */ + const Word16 subframe_idx /* i : subframe index */ ); void rotateFrame_sd( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : head and external orientation combined handle */ - Word32 *output[], /* i/o: unrotated SD signal buffer in TD */ - const Word16 subframe_len, /* i : subframe length per channel */ + Word32 *output[], /* i/o: unrotated SD signal buffer in TD */ + const Word16 subframe_len, /* i : subframe length per channel */ const IVAS_OUTPUT_SETUP hTransSetup, /* i : format for rotation */ const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ - const Word16 subframe_idx /* i : subframe index */ + const Word16 subframe_idx /* i : subframe index */ ); + void ivas_combined_orientation_update_index( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientation handle */ - const Word16 samples_rendered /* i : samples rendered since the last call */ + const Word16 samples_rendered /* i : samples rendered since the last call */ ); + void ivas_combined_orientation_update_start_index( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i/o: combined orientation handle */ - const Word16 samples_rendered /* i : samples rendered since the last call */ + const Word16 samples_rendered /* i : samples rendered since the last call */ ); + void ivas_combined_orientation_set_to_start_index( COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ); @@ -1263,48 +1276,53 @@ void ivas_combined_orientation_set_to_start_index( void rotateFrame_shd_cldfb( Word32 Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain real part */ Word32 Cldfb_ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain imag part */ - Word32 Rmat[3][3], /* i : real-space rotation matrix */ - const Word16 nInChannels, /* i : number of channels */ - const Word16 numTimeSlots, /* i : number of time slots to process */ - const Word16 shd_rot_max_order /* i : split-order rotation method */ + Word32 Rmat[3][3], /* i : real-space rotation matrix */ + const Word16 nInChannels, /* i : number of channels */ + const Word16 numTimeSlots, /* i : number of time slots to process */ + const Word16 shd_rot_max_order /* i : split-order rotation method */ ); + void rotateFrame_sd_cldfb_fixed( - Word32 Rmat[3][3], /* i : real-space rotation matrix */ + Word32 Rmat[3][3], /* i : real-space rotation matrix */ Word32 Cldfb_RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i/o: unrotated HOA3 signal buffer in cldfb domain real part */ Word32 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 Word16 numTimeSlots, /* i : number of time slots to process */ - const Word16 nb_band /* i : number of CLDFB bands to process */ + const IVAS_OUTPUT_SETUP_HANDLE hOutputSetup, /* i : output format setup number of channels */ + const EFAP_HANDLE hEFAPdata, /* i : EFAP structure */ + const Word16 numTimeSlots, /* i : number of time slots to process */ + const Word16 nb_band /* i : number of CLDFB bands to process */ ); ivas_error ivas_external_orientation_open( - EXTERNAL_ORIENTATION_HANDLE *hExtOrientationData, /* o : external orientation handle */ - const Word16 num_subframes /* i : number of subframes */ + EXTERNAL_ORIENTATION_HANDLE *hExtOrientationData, /* o : external orientation handle */ + const Word16 num_subframes /* i : number of subframes */ ); + void ivas_external_orientation_close_fx( - EXTERNAL_ORIENTATION_HANDLE *hExtOrientationData /* i/o: external orientation handle */ + EXTERNAL_ORIENTATION_HANDLE *hExtOrientationData /* i/o: external orientation handle */ ); ivas_error ivas_combined_orientation_open( COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData, /* o : combined orientation handle */ - const Word32 fs, /* i : sampling rate */ - const Word16 num_subframes /* i : number of subframes */ + const Word32 fs, /* i : sampling rate */ + const Word16 num_subframes /* i : number of subframes */ ); + void ivas_combined_orientation_close_fx( - COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData /* i/o: combined orientation handle */ + COMBINED_ORIENTATION_HANDLE *hCombinedOrientationData /* i/o: combined orientation handle */ ); + ivas_error combine_external_and_head_orientations_dec( - HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ + HEAD_TRACK_DATA_HANDLE hHeadTrackData, /* i : head track handle */ + EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ); ivas_error combine_external_and_head_orientations_rend( - IVAS_REND_HeadRotData *hHeadTrackData, /* i : head track handle */ - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ + IVAS_REND_HeadRotData *hHeadTrackData, /* i : head track handle */ + EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, /* i : external orientation handle */ + COMBINED_ORIENTATION_HANDLE hCombinedOrientationData /* i/o: combined orientation handle */ ); + /*----------------------------------------------------------------------------------* * Renderer configuration *----------------------------------------------------------------------------------*/ @@ -1344,38 +1362,39 @@ void QuaternionSlerp_fx( IVAS_QUATERNION *const r ); + /*----------------------------------------------------------------------------------* * Orientation tracking *----------------------------------------------------------------------------------*/ ivas_error ivas_orient_trk_Init_fx( - ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ + ivas_orient_trk_state_t *pOTR /* i/o: orientation tracker handle */ ); ivas_error ivas_orient_trk_SetReferenceRotation_fx( - ivas_orient_trk_state_t *pOTR_fx, /* i/o: orientatoin trakcer handle */ - const IVAS_QUATERNION refRot /* i : reference rotation */ + ivas_orient_trk_state_t *pOTR_fx, /* i/o: orientatoin trakcer handle */ + const IVAS_QUATERNION refRot /* i : reference rotation */ ); ivas_error ivas_orient_trk_SetReferenceVector_fx( - ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ - const IVAS_VECTOR3 listenerPos, /* i : Listener position */ - const IVAS_VECTOR3 refPos /* i : Reference position */ + ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ + const IVAS_VECTOR3 listenerPos, /* i : Listener position */ + const IVAS_VECTOR3 refPos /* i : Reference position */ ); ivas_error ivas_orient_trk_SetTrackingType_fx( - ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ - const IVAS_HEAD_ORIENT_TRK_T orientation_tracking /* i : orientation tracking type */ + ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ + const IVAS_HEAD_ORIENT_TRK_T orientation_tracking /* i : orientation tracking type */ ); ivas_error ivas_orient_trk_GetMainOrientation_fx( - ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ - IVAS_QUATERNION *pOrientation /* i/o: average/reference orientation */ + ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ + IVAS_QUATERNION *pOrientation /* i/o: average/reference orientation */ ); ivas_error ivas_orient_trk_GetTrackedRotation_fx( - ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ - IVAS_QUATERNION *pRotation /* i/o: processed rotation */ + ivas_orient_trk_state_t *pOTR, /* i/o: orientation tracker handle */ + IVAS_QUATERNION *pRotation /* i/o: processed rotation */ ); ivas_error ivas_orient_trk_Process_fx( @@ -1385,6 +1404,7 @@ ivas_error ivas_orient_trk_Process_fx( IVAS_QUATERNION *pTrkRot /* o : tracked rotation */ ); + /*----------------------------------------------------------------------------------* * Rendering & merging to MASA format *----------------------------------------------------------------------------------*/ @@ -1394,6 +1414,7 @@ ivas_error ivas_mcmasa_ana_open( const AUDIO_CONFIG inConfig, /* i : Input config */ Word32 input_Fs /* i : Sampling frequency */ ); + void ivas_mcmasa_ana_fx( MCMASA_ANA_HANDLE hMcMasa, /* i/o: McMASA encoder handle */ Word32 data[][L_FRAME48k], /* i/o: Input / transport audio signals */ @@ -1469,7 +1490,7 @@ void ivas_dirac_ana_fx( const Word16 input_frame, /* i : Input frame size */ const Word16 nchan_transport, /* i : Number of transport channels */ const Word16 data_q /*i : Q of data_in_fx*/ - ); +); void ivas_dirac_ana_close_fx( DIRAC_ANA_HANDLE ( *hDirAC ) /* i/o: analysis DIRAC handle */ @@ -1492,6 +1513,7 @@ ivas_error masaPrerendOpen_fx( Word16 numTransports, /* i : number of transport channels */ Word32 input_Fs /* i : signal sampling rate */ ); + void masaPrerendClose_fx( MASA_PREREND_HANDLE *hMasaPrerendPtr /* i/o: prerenderer handle to be closed */ ); @@ -1502,8 +1524,8 @@ void masaPrerendClose_fx( ivas_error ivas_td_binaural_renderer_sf_splitBinaural( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - Word32 *output[], /* i/o: SCE channels / Binaural synthesis */ - const int16_t nSamplesRendered /* i : number of samples to render */ + Word32 *output[], /* i/o: SCE channels / Binaural synthesis */ + const Word16 nSamplesRendered /* i : number of samples to render */ ); ivas_error ivas_rend_crendProcessSubframesSplitBin( @@ -1516,23 +1538,10 @@ ivas_error ivas_rend_crendProcessSubframesSplitBin( const IVAS_OUTPUT_SETUP_HANDLE hIntSetup, /* i : internal setup handle */ const EFAP_HANDLE hEFAPdata, /* i : EFAP handle */ DECODER_TC_BUFFER_HANDLE hTcBuffer, /* i/o: JBM handle */ - Word32 *input_f[], /* i : transport channels */ - Word32 *output[], /* i/o: input/output audio channels */ - const Word16 n_samples_to_render, /* i : output frame length per channel */ - const Word32 output_Fs /* i : output sampling rate */ -); - -ivas_error ivas_rend_crendProcessSplitBin( - const CREND_WRAPPER *pCrend, - const AUDIO_CONFIG inConfig, - const AUDIO_CONFIG outConfig, - const MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, - const DECODER_CONFIG_HANDLE hDecoderConfig, - const COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, - const IVAS_OUTPUT_SETUP_HANDLE hIntSetup, - EFAP_HANDLE hEFAPdata, - Word32 *output[], - const Word32 output_Fs + Word32 *input_f[], /* i : transport channels */ + Word32 *output[], /* i/o: input/output audio channels */ + const Word16 n_samples_to_render, /* i : output frame length per channel */ + const Word32 output_Fs /* i : output sampling rate */ ); ivas_error ivas_rend_openMultiBinCrend( diff --git a/lib_rend/ivas_render_config_fx.c b/lib_rend/ivas_render_config_fx.c index fc5c26351..c669d7dbe 100644 --- a/lib_rend/ivas_render_config_fx.c +++ b/lib_rend/ivas_render_config_fx.c @@ -137,7 +137,7 @@ ivas_error ivas_render_config_init_from_rom_fx( move16(); } - ( *hRenderConfig )->split_rend_config.splitRendBitRate = SPLIT_REND_768k; + ( *hRenderConfig )->split_rend_config.splitRendBitRate = ISAR_MAX_SPLIT_REND_BITRATE; move32(); ( *hRenderConfig )->split_rend_config.dof = 3; move16(); diff --git a/lib_rend/ivas_rotation_fx.c b/lib_rend/ivas_rotation_fx.c index 22786c76c..2db143ab4 100644 --- a/lib_rend/ivas_rotation_fx.c +++ b/lib_rend/ivas_rotation_fx.c @@ -45,8 +45,14 @@ #include "debug.h" #include "ivas_rom_binaural_crend_head.h" -Word16 square_root16_table[] = { 0, 0x4000, 0x5A82 }; // Q14 -Word16 square_root30_q12[31] = { + +/*-----------------------------------------------------------------------* + * Local ROM tables + *-----------------------------------------------------------------------*/ + +static Word16 square_root16_table[] = { 0, 0x4000, 0x5A82 }; // Q14 + +static Word16 square_root30_q12[31] = { // Q12 0, 4096, @@ -80,23 +86,18 @@ Word16 square_root30_q12[31] = { 22058, 22435, }; + /*-----------------------------------------------------------------------* - * Local funtion declarations + * Local function declarations *-----------------------------------------------------------------------*/ -static ivas_error combine_external_and_head_orientations( - IVAS_QUATERNION *headRotQuaternions, - IVAS_VECTOR3 *listenerPos, - ISAR_SPLIT_REND_ROT_AXIS sr_pose_pred_axis, /* i : split rend pose prediction axis*/ - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData ); -static void external_target_interpolation_fx( - EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, - COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, - const Word16 i ); +static ivas_error combine_external_and_head_orientations( IVAS_QUATERNION *headRotQuaternions, IVAS_VECTOR3 *listenerPos, ISAR_SPLIT_REND_ROT_AXIS sr_pose_pred_axis, EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData ); + +static void external_target_interpolation_fx( EXTERNAL_ORIENTATION_HANDLE hExtOrientationData, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, const Word16 i ); static bool are_orientations_same_fx( const IVAS_QUATERNION *orientation1, const IVAS_QUATERNION *orientation2 ); + /*-----------------------------------------------------------------------* * ivas_headTrack_open() * @@ -256,6 +257,7 @@ void QuatToRotMat_fx( * * Converts normalized radians to degrees *------------------------------------------------------------------------*/ + Word32 rad2deg_fx( Word32 radians // Q13 ) @@ -272,6 +274,8 @@ Word32 rad2deg_fx( return W_extract_l( W_mult0_32_32( radians, _180_OVER_PI_FX ) ); // Q23 } + + /*------------------------------------------------------------------------- * rotateAziEle() * @@ -1474,9 +1478,8 @@ ivas_error combine_external_and_head_orientations_dec( { sr_pose_pred_axis = DEFAULT_AXIS; } - return combine_external_and_head_orientations( pHeadRotQuaternion, listenerPos, - sr_pose_pred_axis, - hExtOrientationData, hCombinedOrientationData ); + + return combine_external_and_head_orientations( pHeadRotQuaternion, listenerPos, sr_pose_pred_axis, hExtOrientationData, hCombinedOrientationData ); } @@ -1521,9 +1524,7 @@ ivas_error combine_external_and_head_orientations_rend( } } - return combine_external_and_head_orientations( headRotQuaternions, listenerPos, - sr_pose_pred_axis, - hExtOrientationData, hCombinedOrientationData ); + return combine_external_and_head_orientations( headRotQuaternions, listenerPos, sr_pose_pred_axis, hExtOrientationData, hCombinedOrientationData ); } @@ -1533,6 +1534,7 @@ ivas_error combine_external_and_head_orientations_rend( * Combine the external orientations and the head orientation. * NOTE that the external orientations are inversed. *------------------------------------------------------------------------*/ + ivas_error combine_external_and_head_orientations( IVAS_QUATERNION *headRotQuaternions, /* i : quaternions for head rotation */ IVAS_VECTOR3 *listenerPos, /* i : listener position */ diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 22b5c50ae..640aeb23f 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -100,6 +100,7 @@ typedef struct const SPLIT_REND_WRAPPER *pSplitRendWrapper; const COMBINED_ORIENTATION_HANDLE *pCombinedOrientationData; } rendering_context; + /* Common base for input structs */ typedef struct { @@ -229,32 +230,26 @@ struct IVAS_REND hrtf_handles hHrtfs; }; + /*-------------------------------------------------------------------* * Local function prototypes *-------------------------------------------------------------------*/ + static ivas_error initMasaExtRenderer( input_masa *inputMasa, const AUDIO_CONFIG outConfig, const RENDER_CONFIG_DATA *hRendCfg, hrtf_handles *hHrtfs ); static void freeMasaExtRenderer( MASA_EXT_REND_HANDLE *hMasaExtRendOut ); -static void intermidiate_ext_dirac_render( - MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA renderer structure */ - Word16 to_fix ); -static ivas_error renderSbaToMultiBinauralCldfb( - input_sba *sbaInput, - Word32 Cldfb_Out_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - Word32 Cldfb_Out_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - const Word16 low_res_pre_rend_rot, - const Word16 num_subframes, - const Word16 Q_in ); +static void intermidiate_ext_dirac_render( MASA_EXT_REND_HANDLE hMasaExtRend, Word16 to_fix ); + +static ivas_error renderSbaToMultiBinauralCldfb( input_sba *sbaInput, Word32 Cldfb_Out_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_Out_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const Word16 low_res_pre_rend_rot, const Word16 num_subframes, const Word16 Q_in ); + +static ivas_error renderSbaToMultiBinaural( input_sba *sbaInput, const AUDIO_CONFIG outConfig, Word32 out[][L_FRAME48k] ); -static ivas_error renderSbaToMultiBinaural( - input_sba *sbaInput, - const AUDIO_CONFIG outConfig, - Word32 out[][L_FRAME48k] ); /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ + static ivas_error allocateInputBaseBufferData_fx( Word32 **data, /* Qx */ const Word16 data_size ) @@ -3760,6 +3755,12 @@ static ivas_error findFreeInputSlot_fx( } +/*------------------------------------------------------------------------- + * Function getCldfbRendFlag() + * + * + *------------------------------------------------------------------------*/ + static Word16 getCldfbRendFlag( IVAS_REND_HANDLE hIvasRend, /* i : Renderer handle */ const IVAS_REND_AudioConfigType new_configType ) @@ -3814,6 +3815,7 @@ static Word16 getCldfbRendFlag( return isCldfbRend; } + /*------------------------------------------------------------------------- * Function ivas_pre_rend_init() * @@ -3894,6 +3896,7 @@ static ivas_error ivas_pre_rend_init( * * *-------------------------------------------------------------------*/ + ivas_error IVAS_REND_AddInput_fx( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const AUDIO_CONFIG inConfig, /* i : audio config for a new input */ @@ -4578,6 +4581,7 @@ ivas_error IVAS_REND_FeedInputObjectMetadataToOMasa( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * IVAS_REND_FeedInputMasaMetadata() * @@ -4625,6 +4629,7 @@ ivas_error IVAS_REND_FeedInputMasaMetadata( * * *-------------------------------------------------------------------*/ + ivas_error IVAS_REND_InitConfig( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const AUDIO_CONFIG outAudioConfig /* i : output audioConfig */ @@ -4665,6 +4670,7 @@ ivas_error IVAS_REND_InitConfig( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * IVAS_REND_GetRenderConfig() * @@ -4700,7 +4706,7 @@ Word16 IVAS_REND_GetRenderConfig( Copy32( hRCin->roomAcoustics.pAcoustic_rt60_fx, hRCout->roomAcoustics.pAcoustic_rt60_fx, CLDFB_NO_CHANNELS_MAX ); Copy32( hRCin->roomAcoustics.pAcoustic_dsr_fx, hRCout->roomAcoustics.pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX ); - hRCout->split_rend_config.splitRendBitRate = SPLIT_REND_768k; + hRCout->split_rend_config.splitRendBitRate = ISAR_MAX_SPLIT_REND_BITRATE; hRCout->split_rend_config.dof = 3; hRCout->split_rend_config.hq_mode = 0; hRCout->split_rend_config.codec_delay_ms = 0; @@ -4711,7 +4717,6 @@ Word16 IVAS_REND_GetRenderConfig( hRCout->split_rend_config.rendererSelection = hRCin->split_rend_config.rendererSelection; hRCout->split_rend_config.lc3plus_highres = 0; - hRCout->roomAcoustics.use_er = hRCin->roomAcoustics.use_er; hRCout->roomAcoustics.lowComplexity = hRCin->roomAcoustics.lowComplexity; move16(); @@ -5051,14 +5056,14 @@ ivas_error IVAS_REND_DisableHeadRotation( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * IVAS_REND_SetSplitRendBFI() * * *-------------------------------------------------------------------*/ -ivas_error -IVAS_REND_SetSplitRendBFI( +ivas_error IVAS_REND_SetSplitRendBFI( IVAS_REND_HANDLE hIvasRend, const int16_t bfi ) { @@ -5149,6 +5154,7 @@ ivas_error IVAS_REND_SetReferenceVector( return ivas_orient_trk_SetReferenceVector_fx( hIvasRend->headRotData.hOrientationTracker, listenerPos, refPos ); } + /*---------------------------------------------------------------------* * IVAS_REND_SetExternalOrientation() * @@ -5194,6 +5200,7 @@ ivas_error IVAS_REND_SetExternalOrientation( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * IVAS_REND_CombineHeadAndExternalOrientation() * @@ -5208,8 +5215,9 @@ ivas_error IVAS_REND_CombineHeadAndExternalOrientation( { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } - ivas_error error_type = combine_external_and_head_orientations_rend( &hIvasRend->headRotData, hIvasRend->hExternalOrientationData, hIvasRend->hCombinedOrientationData ); - return error_type; + ivas_error error = combine_external_and_head_orientations_rend( &hIvasRend->headRotData, hIvasRend->hExternalOrientationData, hIvasRend->hCombinedOrientationData ); + + return error; } @@ -5386,6 +5394,8 @@ static void renderBufferChannelLerp_fx( return; } + + /* Take one channel from input buffer and copy it to each channel in output buffer, with different gain applied per output channel */ static void renderBufferChannel_fx( @@ -5436,6 +5446,7 @@ static ivas_error rotateFrameMc_fx( rotation_gains_Word32 gains; Word32 tmp_gains[MAX_INPUT_CHANNELS]; /* Q30 */ ivas_error error; + push_wmops( "rotateFrameMc_fx" ); IF( NE_32( ( error = chooseCrossfade_fx( headRotData, &crossfade ) ), IVAS_ERR_OK ) ) { @@ -5723,6 +5734,7 @@ static ivas_error rotateFrameSba_fx( return IVAS_ERR_OK; } + static ivas_error renderIsmToBinaural( input_ism *ismInput, IVAS_REND_AudioBuffer outAudio ) @@ -5733,6 +5745,7 @@ static ivas_error renderIsmToBinaural( Word16 i; Word16 exp = *outAudio.pq_fact; move16(); + push_wmops( "renderIsmToBinaural" ); /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */ ism_md_subframe_update_ext = extract_l( Mpy_32_32( ismInput->ism_metadata_delay_ms_fx, 429496730 /* 1000 / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES in Q31 */ ) ); @@ -5773,6 +5786,7 @@ static ivas_error renderIsmToBinaural( return IVAS_ERR_OK; } + static Word16 getNumSubframesInBuffer( const IVAS_REND_AudioBuffer *buffer, const Word32 sampleRate ) @@ -5785,6 +5799,7 @@ static Word16 getNumSubframesInBuffer( temp = BASOP_Util_Divide1616_Scale( buffer->config.numSamplesPerChannel, temp, &scale ); temp = shr( temp, sub( 15, scale ) ); /* Q0 */ temp = shr( temp, cldfb2tdShift ); + return temp; } @@ -5909,10 +5924,7 @@ static ivas_error renderIsmToBinauralRoom( /* compute gains only if position changed */ IF( position_changed ) { - IF( NE_32( ( error = getEfapGains_fx( *ismInput->base.ctx.pEfapOutWrapper, - rotatedPos.azimuth_fx, - rotatedPos.elevation_fx, - currentPanGains ) ), + IF( NE_32( ( error = getEfapGains_fx( *ismInput->base.ctx.pEfapOutWrapper, rotatedPos.azimuth_fx, rotatedPos.elevation_fx, currentPanGains ) ), IVAS_ERR_OK ) ) { return error; @@ -5934,17 +5946,11 @@ static ivas_error renderIsmToBinauralRoom( IF( position_changed ) { - renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, - currentPanGains, - ismInput->prev_pan_gains_fx, - tmpMcBuffer ); + renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, currentPanGains, ismInput->prev_pan_gains_fx, tmpMcBuffer ); } ELSE { - renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, - ismInput->prev_pan_gains_fx, - NULL, - tmpMcBuffer ); + renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, ismInput->prev_pan_gains_fx, NULL, tmpMcBuffer ); } copyBufferTo2dArray_fx( tmpMcBuffer, tmpRendBuffer ); @@ -5959,7 +5965,7 @@ static ivas_error renderIsmToBinauralRoom( { Copy32( currentPanGains, ismInput->prev_pan_gains_fx, MAX_OUTPUT_CHANNELS ); } - // Crend_process porting + CREND_HANDLE hCrend; hCrend = ismInput->crendWrapper->hCrend[0]; IF( hCrend->reflections != NULL ) @@ -5982,6 +5988,7 @@ static ivas_error renderIsmToBinauralRoom( { return error; } + IF( hCrend->hReverb != NULL ) { *exp = sub( *exp, 2 ); @@ -5995,6 +6002,8 @@ static ivas_error renderIsmToBinauralRoom( return IVAS_ERR_OK; } + + static ivas_error renderIsmToBinauralReverb( input_ism *ismInput, IVAS_REND_AudioBuffer outAudio ) @@ -6043,6 +6052,7 @@ static ivas_error renderIsmToBinauralReverb( return IVAS_ERR_OK; } + static ivas_error renderIsmToMc( input_ism *ismInput, const IVAS_REND_AudioBuffer outAudio ) @@ -6141,17 +6151,11 @@ static ivas_error renderIsmToMc( * This should have been validated in IVAS_REND_FeedInputAudio() */ IF( position_changed ) { - renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, - currentPanGains_fx, - ismInput->prev_pan_gains_fx, - outAudio ); + renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, currentPanGains_fx, ismInput->prev_pan_gains_fx, outAudio ); } ELSE { - renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, - ismInput->prev_pan_gains_fx, - NULL, - outAudio ); + renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, ismInput->prev_pan_gains_fx, NULL, outAudio ); } IF( position_changed ) @@ -6164,6 +6168,8 @@ static ivas_error renderIsmToMc( return IVAS_ERR_OK; } + + static ivas_error renderIsmToSba( input_ism *ismInput, const AUDIO_CONFIG outConfig, @@ -6210,11 +6216,7 @@ static ivas_error renderIsmToSba( // TODO tmu review when #215 is resolved azimuth_tmp = extract_l( L_shr( ismInput->previousPos.azimuth_fx, Q22 ) ); elevation_tmp = extract_l( L_shr( ismInput->previousPos.elevation_fx, Q22 ) ); - ivas_dirac_dec_get_response_fx( azimuth_tmp, - elevation_tmp, - ismInput->prev_pan_gains_fx, - ambiOrderOut, - Q29 ); + ivas_dirac_dec_get_response_fx( azimuth_tmp, elevation_tmp, ismInput->prev_pan_gains_fx, ambiOrderOut, Q29 ); FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { ismInput->prev_pan_gains_fx[i] = L_shl_sat( ismInput->prev_pan_gains_fx[i], Q2 ); /* Q29 + Q2 = Q31 */ @@ -6228,11 +6230,7 @@ static ivas_error renderIsmToSba( // TODO tmu review when #215 is resolved azimuth_tmp = extract_l( L_shr( ismInput->currentPos.azimuth_fx, Q22 ) ); elevation_tmp = extract_l( L_shr( ismInput->currentPos.elevation_fx, Q22 ) ); - ivas_dirac_dec_get_response_fx( azimuth_tmp, - elevation_tmp, - currentPanGains_fx, - ambiOrderOut, - Q29 ); + ivas_dirac_dec_get_response_fx( azimuth_tmp, elevation_tmp, currentPanGains_fx, ambiOrderOut, Q29 ); FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { currentPanGains_fx[i] = L_shl_sat( currentPanGains_fx[i], Q2 ); /* Q29 + Q2 = Q31 */ @@ -6244,17 +6242,11 @@ static ivas_error renderIsmToSba( * This should have been validated in IVAS_REND_FeedInputAudio() */ IF( position_changed ) { - renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, - currentPanGains_fx, - ismInput->prev_pan_gains_fx, - outAudio ); + renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, currentPanGains_fx, ismInput->prev_pan_gains_fx, outAudio ); } ELSE { - renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, - ismInput->prev_pan_gains_fx, - NULL, - outAudio ); + renderBufferChannelLerp_fx( ismInput->base.inputBuffer, 0, ismInput->prev_pan_gains_fx, NULL, outAudio ); } IF( position_changed ) @@ -6266,6 +6258,7 @@ static ivas_error renderIsmToSba( return error; } + static ivas_error renderIsmToSplitBinaural( input_ism *ismInput, const IVAS_REND_AudioBuffer outAudio ) @@ -6324,17 +6317,12 @@ static ivas_error renderIsmToSplitBinaural( q_fact_orig = originalHeadRot[i].q_fact; modify_Quat_q_fx( &originalHeadRot[i], &localHeadRot[i], Q22 ); /*euler*/ - Quat2EulerDegree_fx( localHeadRot[i], - &pCombinedOrientationData->Quaternions[i].z_fx, - &pCombinedOrientationData->Quaternions[i].y_fx, - &pCombinedOrientationData->Quaternions[i].x_fx ); + Quat2EulerDegree_fx( localHeadRot[i], &pCombinedOrientationData->Quaternions[i].z_fx, &pCombinedOrientationData->Quaternions[i].y_fx, &pCombinedOrientationData->Quaternions[i].x_fx ); pCombinedOrientationData->Quaternions[i].x_fx = L_add( pCombinedOrientationData->Quaternions[i].x_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][0] ); pCombinedOrientationData->Quaternions[i].y_fx = L_add( pCombinedOrientationData->Quaternions[i].y_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][1] ); pCombinedOrientationData->Quaternions[i].z_fx = L_add( pCombinedOrientationData->Quaternions[i].z_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][2] ); - Euler2Quat_fx( deg2rad_fx( pCombinedOrientationData->Quaternions[i].x_fx ), - deg2rad_fx( pCombinedOrientationData->Quaternions[i].y_fx ), - deg2rad_fx( pCombinedOrientationData->Quaternions[i].z_fx ), &pCombinedOrientationData->Quaternions[i] ); + Euler2Quat_fx( deg2rad_fx( pCombinedOrientationData->Quaternions[i].x_fx ), deg2rad_fx( pCombinedOrientationData->Quaternions[i].y_fx ), deg2rad_fx( pCombinedOrientationData->Quaternions[i].z_fx ), &pCombinedOrientationData->Quaternions[i] ); modify_Quat_q_fx( &pCombinedOrientationData->Quaternions[i], &pCombinedOrientationData->Quaternions[i], q_fact_orig ); } @@ -6345,12 +6333,14 @@ static ivas_error renderIsmToSplitBinaural( { Scale_sig32( tmpProcessing[i], L_FRAME48k, sub( Q11, exp ) ); /* Q11 */ } + /* Render */ IF( ( error = ivas_td_binaural_renderer_ext_fx( ( pos_idx == 0 ) ? &ismInput->tdRendWrapper : &ismInput->splitTdRendWrappers[sub( pos_idx, 1 )], ismInput->base.inConfig, NULL, ismInput->base.ctx.pCombinedOrientationData, &ismInput->currentPos, NULL, ism_md_subframe_update_ext, *ismInput->base.ctx.pOutSampleRate, output_frame, tmpProcessing, &exp ) ) != IVAS_ERR_OK ) { return error; } + FOR( i = 0; i < BINAURAL_CHANNELS; ++i ) { Scale_sig32( tmpProcessing[i], L_FRAME48k, negate( sub( Q11, exp ) ) ); /* Q(exp) */ @@ -6831,9 +6821,7 @@ static ivas_error renderMcToBinauralRoom( tmpRotBuffer.data_fx = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( Word32 ) ); set32_fx( tmpRotBuffer.data_fx, 0, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); - IF( NE_32( ( error = rotateFrameMc_fx( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, - mcInput->rot_gains_prev_fx[0], - mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ), + IF( NE_32( ( error = rotateFrameMc_fx( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev_fx[0], mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ), IVAS_ERR_OK ) ) { return error; @@ -6924,9 +6912,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( tmpRotBuffer.data_fx = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( Word32 ) ); set32_fx( tmpRotBuffer.data_fx, 0, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels ); - IF( NE_32( ( error = rotateFrameMc_fx( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, - mcInput->rot_gains_prev_fx[0], - mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ), + IF( NE_32( ( error = rotateFrameMc_fx( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev_fx[0], mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ), IVAS_ERR_OK ) ) { return error; @@ -7126,17 +7112,12 @@ static ivas_error renderMcToSplitBinaural( q_fact_orig = Quaternions_orig[i].q_fact; modify_Quat_q_fx( &combinedOrientationDataLocal.Quaternions[i], &combinedOrientationDataLocal.Quaternions[i], Q22 ); /*euler*/ - Quat2EulerDegree_fx( combinedOrientationDataLocal.Quaternions[i], - &Quaternions_abs.z_fx, - &Quaternions_abs.y_fx, - &Quaternions_abs.x_fx ); + Quat2EulerDegree_fx( combinedOrientationDataLocal.Quaternions[i], &Quaternions_abs.z_fx, &Quaternions_abs.y_fx, &Quaternions_abs.x_fx ); Quaternions_abs.x_fx = L_add( Quaternions_abs.x_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][0] ); Quaternions_abs.y_fx = L_add( Quaternions_abs.y_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][1] ); Quaternions_abs.z_fx = L_add( Quaternions_abs.z_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][2] ); - Euler2Quat_fx( deg2rad_fx( Quaternions_abs.x_fx ), - deg2rad_fx( Quaternions_abs.y_fx ), - deg2rad_fx( Quaternions_abs.z_fx ), &Quaternions_abs ); + Euler2Quat_fx( deg2rad_fx( Quaternions_abs.x_fx ), deg2rad_fx( Quaternions_abs.y_fx ), deg2rad_fx( Quaternions_abs.z_fx ), &Quaternions_abs ); modify_Quat_q_fx( &Quaternions_abs, &Quaternions_abs, q_fact_orig ); @@ -7317,6 +7298,8 @@ static ivas_error renderInputMc( } return error; } + + static ivas_error renderActiveInputsMc( IVAS_REND_HANDLE hIvasRend, IVAS_REND_AudioBuffer outAudio ) @@ -7342,6 +7325,8 @@ static ivas_error renderActiveInputsMc( return IVAS_ERR_OK; } + + static void renderSbaToMc( const input_sba *sbaInput, IVAS_REND_AudioBuffer outAudio ) @@ -7442,17 +7427,12 @@ static ivas_error renderSbaToMultiBinaural( q_fact_orig = combinedOrientationDataLocal.Quaternions[i].q_fact; modify_Quat_q_fx( &combinedOrientationDataLocal.Quaternions[i], &combinedOrientationDataLocal.Quaternions[i], Q22 ); /*euler*/ - Quat2EulerDegree_fx( combinedOrientationDataLocal.Quaternions[i], - &Quaternions_abs.z_fx, - &Quaternions_abs.y_fx, - &Quaternions_abs.x_fx ); + Quat2EulerDegree_fx( combinedOrientationDataLocal.Quaternions[i], &Quaternions_abs.z_fx, &Quaternions_abs.y_fx, &Quaternions_abs.x_fx ); Quaternions_abs.x_fx = L_add( Quaternions_abs.x_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][0] ); Quaternions_abs.y_fx = L_add( Quaternions_abs.y_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][1] ); Quaternions_abs.z_fx = L_add( Quaternions_abs.z_fx, pMultiBinPoseData->relative_head_poses_fx[pos_idx][2] ); - Euler2Quat_fx( deg2rad_fx( Quaternions_abs.x_fx ), - deg2rad_fx( Quaternions_abs.y_fx ), - deg2rad_fx( Quaternions_abs.z_fx ), &Quaternions_abs ); + Euler2Quat_fx( deg2rad_fx( Quaternions_abs.x_fx ), deg2rad_fx( Quaternions_abs.y_fx ), deg2rad_fx( Quaternions_abs.z_fx ), &Quaternions_abs ); modify_Quat_q_fx( &Quaternions_abs, &Quaternions_abs, q_fact_orig ); @@ -7534,13 +7514,11 @@ static ivas_error renderSbaToSplitBinaural( low_res_pre_rend_rot = 1; push_wmops( "renderSbaToSplitBinaural" ); - error = IVAS_ERR_OK; - move32(); IF( EQ_32( sbaInput->base.ctx.hhRendererConfig[0]->split_rend_config.rendererSelection, ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) ) { - if ( ( renderSbaToMultiBinauralCldfb( sbaInput, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, low_res_pre_rend_rot, - getNumSubframesInBuffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ), *outAudio.pq_fact ) ) != IVAS_ERR_OK ) + if ( ( error = renderSbaToMultiBinauralCldfb( sbaInput, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, low_res_pre_rend_rot, + getNumSubframesInBuffer( &outAudio, *sbaInput->base.ctx.pOutSampleRate ), *outAudio.pq_fact ) ) != IVAS_ERR_OK ) { return error; } @@ -7549,10 +7527,11 @@ static ivas_error renderSbaToSplitBinaural( } else { - if ( ( renderSbaToMultiBinaural( sbaInput, outConfig, tmpCrendBuffer ) ) != IVAS_ERR_OK ) + IF( ( error = renderSbaToMultiBinaural( sbaInput, outConfig, tmpCrendBuffer ) ) != IVAS_ERR_OK ) { return error; } + IF( sbaInput->crendWrapper->hCrend[0]->hReverb != NULL ) { *outAudio.pq_fact = sub( *outAudio.pq_fact, Q2 ); @@ -7563,9 +7542,10 @@ static ivas_error renderSbaToSplitBinaural( } pop_wmops(); - return error; + return IVAS_ERR_OK; } + static ivas_error renderSbaToBinaural( input_sba *sbaInput, const AUDIO_CONFIG outConfig, @@ -7625,13 +7605,11 @@ static ivas_error renderSbaToBinaural( tmpRotBuffer = sbaInput->base.inputBuffer; tmpRotBuffer.data_fx = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( Word32 ) ); - /* copy input for in-place rotation */ + /* copy input for in-place rotation */ Copy32( sbaInput->base.inputBuffer.data_fx, tmpRotBuffer.data_fx, i_mult( tmpRotBuffer.config.numChannels, tmpRotBuffer.config.numSamplesPerChannel ) ); - - IF( NE_16( ( error = rotateFrameSba_fx( sbaInput->base.inputBuffer, sbaInput->base.inConfig, sbaInput->base.ctx.pHeadRotData, - sbaInput->base.ctx.pCombinedOrientationData, sbaInput->rot_gains_prev_fx[0], tmpRotBuffer ) ), + IF( NE_16( ( error = rotateFrameSba_fx( sbaInput->base.inputBuffer, sbaInput->base.inConfig, sbaInput->base.ctx.pHeadRotData, sbaInput->base.ctx.pCombinedOrientationData, sbaInput->rot_gains_prev_fx[0], tmpRotBuffer ) ), IVAS_ERR_OK ) ) { return error; @@ -7644,7 +7622,7 @@ static ivas_error renderSbaToBinaural( { copyBufferTo2dArray_fx( sbaInput->base.inputBuffer, output_buffer_fx ); } - // Porting Crend_process function + CREND_HANDLE hCrend; hCrend = sbaInput->crendWrapper->hCrend[0]; @@ -7659,12 +7637,15 @@ static ivas_error renderSbaToBinaural( *outAudio.pq_fact = sub( *outAudio.pq_fact, Q2 ); move16(); } + accumulate2dArrayToBuffer_fx( output_buffer_fx, &outAudio ); } pop_wmops(); return IVAS_ERR_OK; } + + static ivas_error renderSbaToBinauralRoom( input_sba *sbaInput, const AUDIO_CONFIG outConfig, @@ -7723,10 +7704,7 @@ static ivas_error renderSbaToBinauralRoom( /* copy input for in-place rotation */ Copy32( sbaInput->base.inputBuffer.data_fx, tmpRotBuffer.data_fx, i_mult( tmpRotBuffer.config.numChannels, tmpRotBuffer.config.numSamplesPerChannel ) ); - IF( NE_32( ( error = rotateFrameSba_fx( sbaInput->base.inputBuffer, sbaInput->base.inConfig, sbaInput->base.ctx.pHeadRotData, - sbaInput->base.ctx.pCombinedOrientationData, - sbaInput->rot_gains_prev_fx[0], - tmpRotBuffer ) ), + IF( NE_32( ( error = rotateFrameSba_fx( sbaInput->base.inputBuffer, sbaInput->base.inConfig, sbaInput->base.ctx.pHeadRotData, sbaInput->base.ctx.pCombinedOrientationData, sbaInput->rot_gains_prev_fx[0], tmpRotBuffer ) ), IVAS_ERR_OK ) ) { return error; @@ -7759,7 +7737,6 @@ static ivas_error renderSbaToBinauralRoom( renderBufferChannel_fx( *tmpBufPtr, i, sbaInput->hoaDecMtx_fx[i], tmpMcBuffer ); } copyBufferTo2dArray_fx( tmpMcBuffer, tmpCrendBuffer ); - // Porting Crend_process function /* call CREND */ IF( NE_32( ( error = ivas_rend_crendProcessSubframe( sbaInput->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, NULL, NULL, NULL, NULL, NULL, p_tmpCrendBuffer, p_tmpCrendBuffer, sbaInput->base.inputBuffer.config.numSamplesPerChannel, *sbaInput->base.ctx.pOutSampleRate, 0 ) ), IVAS_ERR_OK ) ) @@ -7784,6 +7761,8 @@ static ivas_error renderSbaToBinauralRoom( pop_wmops(); return IVAS_ERR_OK; } + + static void renderSbaToMasa( input_sba *sbaInput, IVAS_REND_AudioBuffer outAudio ) @@ -7798,6 +7777,8 @@ static void renderSbaToMasa( pop_wmops(); return; } + + static ivas_error renderInputSba( input_sba *sbaInput, const AUDIO_CONFIG outConfig, @@ -7863,6 +7844,8 @@ static ivas_error renderInputSba( return error; } + + static ivas_error renderActiveInputsSba( IVAS_REND_HANDLE hIvasRend, IVAS_REND_AudioBuffer outAudio ) @@ -7885,6 +7868,7 @@ static ivas_error renderActiveInputsSba( return error; } } + return IVAS_ERR_OK; } @@ -8228,15 +8212,12 @@ static ivas_error renderInputMasa( copyMasaMetadataToDiracRenderer_fx( &masaInput->masaMetadata, masaInput->hMasaExtRend->hSpatParamRendCom, maxBin ); Scale_sig32( tmpBuffer_buff_fx[0], L_FRAME48k, sub( Q11, *outAudio.pq_fact ) ); /* Q11 */ Scale_sig32( tmpBuffer_buff_fx[1], L_FRAME48k, sub( Q11, *outAudio.pq_fact ) ); /* Q11 */ - // scale_sig32( outAudio.data_fx, i_mult( outAudio.config.numChannels, outAudio.config.numSamplesPerChannel ), sub( Q11, *outAudio.pq_fact ) ); - ivas_masa_ext_rend_parambin_render_fx( masaInput->hMasaExtRend, *masaInput->base.ctx.pCombinedOrientationData, tmpBuffer_fx, num_subframes, masaInput->base.ctx.pSplitRendWrapper, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural ); accumulateCLDFBArrayToBuffer_fx( Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, &outAudio ); - *outAudio.pq_fact = Q6; move16(); } @@ -8301,6 +8282,8 @@ static ivas_error renderInputMasa( return IVAS_ERR_OK; } + + static ivas_error renderActiveInputsMasa( IVAS_REND_HANDLE hIvasRend, IVAS_REND_AudioBuffer outAudio ) @@ -8329,6 +8312,7 @@ static ivas_error renderActiveInputsMasa( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * IVAS_REND_GetMasaMetadata( ) * @@ -8504,8 +8488,9 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects( * * Set the Metadata Delay in ms in order to sync with audio delay *---------------------------------------------------------------------*/ + ivas_error IVAS_REND_SetIsmMetadataDelay( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const Word32 sync_md_delay /* i : ISM Metadata Delay in ms to sync with audio delay */ ) { @@ -8524,6 +8509,7 @@ ivas_error IVAS_REND_SetIsmMetadataDelay( return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * getSamplesInternal() * @@ -8531,15 +8517,16 @@ ivas_error IVAS_REND_SetIsmMetadataDelay( *-------------------------------------------------------------------*/ static ivas_error getSamplesInternal( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */, - IVAS_REND_BitstreamBuffer *hBits /*i/o: buffer for input/output bitstream. Needed in split rendering mode*/ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_BitstreamBuffer *hBits /* i/o: buffer for input/output bitstream. Needed in split rendering */ ) { ivas_error error; Word16 numOutChannels; int16_t cldfb2tdSampleShift; IVAS_REND_AudioBuffer outAudioOrig; + /* Validate function arguments */ test(); IF( hIvasRend == NULL || outAudio.data_fx == NULL ) @@ -8562,6 +8549,8 @@ static ivas_error getSamplesInternal( return IVAS_ERR_WRONG_NUM_CHANNELS; } + test(); + test(); test(); IF( EQ_32( getAudioConfigType( hIvasRend->outputConfig ), IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL ) && NE_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && @@ -8891,11 +8880,11 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_GetSplitRendBitstreamHeader( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ - ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ - int16_t *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ - int16_t *pIsar_frame_size_ms /* o: pointer to ISAR frame size setting */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ + ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ + int16_t *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ + int16_t *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ ) { test(); @@ -9082,8 +9071,7 @@ void IVAS_REND_cldfbAnalysis_ts_wrapper( Word16 Q_cldfb = Q_in; assert( Q_in == h_cldfb->Q_cldfb_state ); - cldfbAnalysis_ts_fx_fixed_q( timeIn, realBuffer, imagBuffer, samplesToProcess, h_cldfb, - &Q_cldfb ); + cldfbAnalysis_ts_fx_fixed_q( timeIn, realBuffer, imagBuffer, samplesToProcess, h_cldfb, &Q_cldfb ); *Q_out = sub( Q_in, 5 ); @@ -9364,7 +9352,6 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( set16_fx( hDirACRend->frequency_axis_fx, 0, hSpatParamRendCom->num_freq_bands ); ivas_dirac_dec_get_frequency_axis_fx( hDirACRend->frequency_axis_fx, output_Fs, hSpatParamRendCom->num_freq_bands ); - test(); IF( EQ_16( hDirACRend->panningConf, DIRAC_PANNING_HOA3 ) && EQ_16( nchan_transport, 2 ) ) { @@ -9514,7 +9501,6 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( } /* direct/diffuse responses */ - IF( ( hDirACRend->diffuse_response_function_fx = (Word16 *) malloc( sizeof( Word16 ) * hDirACRend->num_outputs_dir ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); @@ -9842,6 +9828,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( return error; } } + /* External renderer uses constant regularization factor */ hDiracDecBin->reqularizationFactor_fx = 6554; /* 0.4f in Q14 */ move16(); @@ -9856,6 +9843,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( return error; } + static ivas_error initMasaExtRenderer( input_masa *inputMasa, const AUDIO_CONFIG outConfig, @@ -10034,6 +10022,7 @@ static ivas_error initMasaExtRenderer( return IVAS_ERR_OK; } + static void freeMasaExtRenderer( MASA_EXT_REND_HANDLE *hMasaExtRendOut ) { @@ -10066,7 +10055,6 @@ static void freeMasaExtRenderer( } } - IF( hMasaExtRend->hReverb != NULL ) { ivas_binaural_reverb_close_fx( &hMasaExtRend->hReverb ); @@ -10352,8 +10340,11 @@ static void intermidiate_ext_dirac_render( move16(); } } + + return; } + static ivas_error printConfigInfo_rend( IVAS_REND_HANDLE hIvasRend /* i : IVAS renderer handle */ ) diff --git a/lib_util/split_rend_bfi_file_reader.c b/lib_util/split_rend_bfi_file_reader.c index 6b7e1acd3..1ac4f4979 100644 --- a/lib_util/split_rend_bfi_file_reader.c +++ b/lib_util/split_rend_bfi_file_reader.c @@ -31,7 +31,6 @@ *******************************************************************************************************/ #include -#include "options.h" #include "split_rend_bfi_file_reader.h" #include #include "prot_fx.h" diff --git a/lib_util/split_render_file_read_write.c b/lib_util/split_render_file_read_write.c index 40c1b73b8..10684fd7a 100644 --- a/lib_util/split_render_file_read_write.c +++ b/lib_util/split_render_file_read_write.c @@ -31,7 +31,6 @@ *******************************************************************************************************/ #include -#include "options.h" #include "split_render_file_read_write.h" #include #include "prot_fx.h" -- GitLab From dc0793aa3f1bc3331cd63598209f76359f5b22d1 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 6 Aug 2025 11:48:37 +0200 Subject: [PATCH 3/9] port MR, part3 --- lib_isar/isar_NoiseGen.c | 1 - lib_isar/isar_PerceptualModel.c | 64 +++-- lib_isar/isar_PredDecoder.c | 43 ++- lib_isar/isar_PredEncoder.c | 408 ---------------------------- lib_isar/isar_RMSEnvGrouping.c | 12 +- lib_isar/isar_lc3plus_common.c | 5 +- lib_isar/isar_lcld_encoder.c | 1 + lib_isar/isar_lcld_prot.h | 41 +-- lib_isar/isar_prot.h | 6 +- lib_isar/isar_rom_post_rend.c | 333 ++++++++++++++--------- lib_isar/isar_rom_post_rend.h | 25 +- lib_isar/isar_splitRend_lcld_dec.c | 11 +- lib_isar/isar_splitRend_lcld_enc.c | 2 +- lib_isar/isar_splitRendererPLC.c | 11 +- lib_isar/isar_splitRendererPost.c | 47 +++- lib_isar/isar_splitRendererPre.c | 59 ++-- lib_isar/isar_splitRenderer_utils.c | 6 +- lib_isar/lib_isar_post_rend.c | 52 ++-- lib_isar/lib_isar_post_rend.h | 16 +- lib_isar/lib_isar_pre_rend.c | 32 +-- lib_isar/lib_isar_pre_rend.h | 8 +- 21 files changed, 419 insertions(+), 764 deletions(-) diff --git a/lib_isar/isar_NoiseGen.c b/lib_isar/isar_NoiseGen.c index 1a6881681..363e758ff 100644 --- a/lib_isar/isar_NoiseGen.c +++ b/lib_isar/isar_NoiseGen.c @@ -52,5 +52,4 @@ void DeleteNoiseGen( NoiseGen *psNoiseGen ) return; } -extern float GetNoise( NoiseGen *psNoiseGen ); extern Word32 GetNoise_fx( NoiseGen *psNoiseGen ); diff --git a/lib_isar/isar_PerceptualModel.c b/lib_isar/isar_PerceptualModel.c index b9a5b1b33..857aca4fc 100644 --- a/lib_isar/isar_PerceptualModel.c +++ b/lib_isar/isar_PerceptualModel.c @@ -82,17 +82,19 @@ static inline Word16 LogAdd_fx( return iRetVal; } + + /*------------------------------------------------------------------------------------------* * Function LogAdd() * * *------------------------------------------------------------------------------------------*/ -static inline int32_t LogAdd( - const int32_t iVal1, - const int32_t iVal2 ) +static inline Word32 LogAdd( + const Word32 iVal1, + const Word32 iVal2 ) { - int32_t iRetVal; + Word32 iRetVal; if ( iVal1 > iVal2 ) { @@ -109,6 +111,8 @@ static inline int32_t LogAdd( return iRetVal; } + + /*------------------------------------------------------------------------------------------* * Function PerceptualModel() * @@ -178,16 +182,16 @@ void PerceptualModel_fx( *------------------------------------------------------------------------------------------*/ void PerceptualModel( - const int32_t iMaxQuantBands, - const int32_t *piRMSEnvelope, - int32_t *piExcitation, - int32_t *piSMR ) + const Word32 iMaxQuantBands, + const Word32 *piRMSEnvelope, + Word32 *piExcitation, + Word32 *piSMR ) { - int32_t n; + Word32 n; for ( n = 0; n < iMaxQuantBands; n++ ) { - int32_t iSLOffset; + Word32 iSLOffset; piExcitation[n] = PERCEPTUAL_MODEL_SCALE * piRMSEnvelope[n] + c_aiBandwidthAdjust48[n]; @@ -205,8 +209,8 @@ void PerceptualModel( /* Spread excitation function */ for ( n = 0; n < iMaxQuantBands; n++ ) { - int32_t k; - const int32_t *piSpread; + Word32 k; + const Word32 *piSpread; piSpread = &c_aaiSpreadFunction48[n * MAX_BANDS_48]; piSMR[n] = piExcitation[n] + piSpread[n]; @@ -227,6 +231,8 @@ void PerceptualModel( return; } + + /*------------------------------------------------------------------------------------------* * Function PerceptualModelStereo() * @@ -234,21 +240,21 @@ void PerceptualModel( *------------------------------------------------------------------------------------------*/ void PerceptualModelStereo( - const int32_t iMaxQuantBands, - const int32_t *piMSFlags, - const int32_t *piRMSEnvelope0, - const int32_t *piRMSEnvelope1, - int32_t *piExcitation0, - int32_t *piExcitation1, - int32_t *piSMR0, - int32_t *piSMR1 ) + const Word32 iMaxQuantBands, + const Word32 *piMSFlags, + const Word32 *piRMSEnvelope0, + const Word32 *piRMSEnvelope1, + Word32 *piExcitation0, + Word32 *piExcitation1, + Word32 *piSMR0, + Word32 *piSMR1 ) { - int32_t n; + Word32 n; for ( n = 0; n < iMaxQuantBands; n++ ) { - int32_t iMaxRMSEnv; - int32_t iSLOffset; + Word32 iMaxRMSEnv; + Word32 iSLOffset; iMaxRMSEnv = piRMSEnvelope0[n]; @@ -268,8 +274,8 @@ void PerceptualModelStereo( /* Spread excitation function */ for ( n = 0; n < iMaxQuantBands; n++ ) { - int32_t k; - const int32_t *piSpread; + Word32 k; + const Word32 *piSpread; piSpread = &c_aaiSpreadFunction48[n * MAX_BANDS_48]; piSMR0[n] = piExcitation0[n] + piSpread[n]; @@ -284,8 +290,8 @@ void PerceptualModelStereo( for ( n = 0; n < iMaxQuantBands; n++ ) { - int32_t iMaxRMSEnv; - int32_t iSLOffset; + Word32 iMaxRMSEnv; + Word32 iSLOffset; iMaxRMSEnv = piRMSEnvelope1[n]; @@ -305,8 +311,8 @@ void PerceptualModelStereo( /* Spread excitation function */ for ( n = 0; n < iMaxQuantBands; n++ ) { - int32_t k; - const int32_t *piSpread; + Word32 k; + const Word32 *piSpread; piSpread = &c_aaiSpreadFunction48[n * MAX_BANDS_48]; piSMR1[n] = piExcitation1[n] + piSpread[n]; diff --git a/lib_isar/isar_PredDecoder.c b/lib_isar/isar_PredDecoder.c index 777514b34..ad32f8c20 100644 --- a/lib_isar/isar_PredDecoder.c +++ b/lib_isar/isar_PredDecoder.c @@ -247,6 +247,8 @@ void DeletePredictionDecoder_fx( return; } + + /*-------------------------------------------------------------------* * Function ReadPredictors() * @@ -357,10 +359,14 @@ Word16 ReadPredictors_fx( return iBitsRead; } + + /* PLC_IMPROVEMENT */ -void SetDecodingPassed( PredictionDecoder *psPredictionDecoder ) +void SetDecodingPassed( + PredictionDecoder *psPredictionDecoder ) { - int32_t n, ch; + Word32 n, ch; + for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) @@ -368,10 +374,16 @@ void SetDecodingPassed( PredictionDecoder *psPredictionDecoder ) psPredictionDecoder->ppiDecodingFailed[ch][n] = 0; } } + + return; } -int32_t AnyDecodingUnresolved( PredictionDecoder *psPredictionDecoder ) + + +Word32 AnyDecodingUnresolved( + PredictionDecoder *psPredictionDecoder ) { - int32_t n, ch; + Word32 n, ch; + for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) @@ -382,12 +394,16 @@ int32_t AnyDecodingUnresolved( PredictionDecoder *psPredictionDecoder ) } } } + return 0; } -void UpdateDecodingFailedStatus( PredictionDecoder *psPredictionDecoder ) + +void UpdateDecodingFailedStatus( + PredictionDecoder *psPredictionDecoder ) { - int32_t n, ch; + Word32 n, ch; + for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) @@ -395,13 +411,17 @@ void UpdateDecodingFailedStatus( PredictionDecoder *psPredictionDecoder ) psPredictionDecoder->ppiDecodingFailedPrev[ch][n] = psPredictionDecoder->ppiDecodingFailed[ch][n]; } } + + return; } -void UpdateDecodingUnresolved( PredictionDecoder *psPredictionDecoder ) + +void UpdateDecodingUnresolved( + PredictionDecoder *psPredictionDecoder ) { - int32_t n, ch; + Word32 n, ch; - int32_t iCurrentSubSet = psPredictionDecoder->iSubSetId; + Word32 iCurrentSubSet = psPredictionDecoder->iSubSetId; for ( ch = 0; ch < psPredictionDecoder->iChannels; ch++ ) { @@ -410,7 +430,7 @@ void UpdateDecodingUnresolved( PredictionDecoder *psPredictionDecoder ) for ( n = 0; n < psPredictionDecoder->iNumSubSets; n++ ) { - int32_t iSubSetActive = get_bit( psPredictionDecoder->piPredChanEnable[ch], n ); + Word32 iSubSetActive = get_bit( psPredictionDecoder->piPredChanEnable[ch], n ); if ( iSubSetActive == 0 ) { /* Prediction information available inactive subsets (e.g. no Prediction) */ @@ -418,8 +438,11 @@ void UpdateDecodingUnresolved( PredictionDecoder *psPredictionDecoder ) } } } + + return; } + /*-------------------------------------------------------------------* * Function ApplyInversePredictors() * diff --git a/lib_isar/isar_PredEncoder.c b/lib_isar/isar_PredEncoder.c index df78fa873..0fde9bfb7 100644 --- a/lib_isar/isar_PredEncoder.c +++ b/lib_isar/isar_PredEncoder.c @@ -280,183 +280,6 @@ ivas_error CreatePredictionEncoder_fx( return IVAS_ERR_OK; } -ivas_error CreatePredictionEncoder( - PredictionEncoder **psPredictionEncoder_out, - const int32_t iChannels, - const int32_t iNumBlocks, - const int32_t iNumSubSets, - const int32_t iMaxNumPredBands ) -{ - int32_t k, n; - PredictionEncoder *psPredictionEncoder = NULL; - - if ( ( psPredictionEncoder = (PredictionEncoder *) malloc( sizeof( PredictionEncoder ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - - psPredictionEncoder->iChannels = iChannels; - psPredictionEncoder->iNumBlocks = iNumBlocks; - psPredictionEncoder->iSubSetId = 0; - psPredictionEncoder->iMaxNumPredBands = iMaxNumPredBands; - psPredictionEncoder->iNumSubSets = iNumSubSets; - - if ( ( psPredictionEncoder->piPredChanEnable = (int32_t *) malloc( sizeof( int32_t ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - - if ( ( psPredictionEncoder->piNumPredBands = (int32_t *) malloc( sizeof( int32_t ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - for ( n = 0; n < psPredictionEncoder->iChannels; n++ ) - { - psPredictionEncoder->piPredChanEnable[n] = 0; - psPredictionEncoder->piNumPredBands[n] = 40; // Will need to be set correctly - } - - if ( ( psPredictionEncoder->ppiPredBandEnable = (int32_t **) malloc( sizeof( int32_t * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfA1Real = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfA1Imag = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppiA1Mag = (int32_t **) malloc( sizeof( int32_t * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppiA1Phase = (int32_t **) malloc( sizeof( int32_t * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->pppfInpBufReal = (float ***) malloc( sizeof( float ** ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->pppfInpBufImag = (float ***) malloc( sizeof( float ** ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfInpPrevReal = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfInpPrevImag = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfPredStateReal = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfPredStateImag = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfPredStateRealTmp = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfPredStateImagTmp = (float **) malloc( sizeof( float * ) * iChannels ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - - for ( n = 0; n < psPredictionEncoder->iChannels; n++ ) - { - if ( ( psPredictionEncoder->ppiPredBandEnable[n] = (int32_t *) malloc( sizeof( int32_t ) * LCLD_BANDS ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfA1Real[n] = (float *) malloc( sizeof( float ) * LCLD_BANDS ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfA1Imag[n] = (float *) malloc( sizeof( float ) * LCLD_BANDS ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppiA1Mag[n] = (int32_t *) malloc( sizeof( int32_t ) * LCLD_BANDS ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppiA1Phase[n] = (int32_t *) malloc( sizeof( int32_t ) * LCLD_BANDS ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->pppfInpBufReal[n] = (float **) malloc( sizeof( float * ) * LCLD_PRED_WIN_LEN ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->pppfInpBufImag[n] = (float **) malloc( sizeof( float * ) * LCLD_PRED_WIN_LEN ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - for ( k = 0; k < LCLD_PRED_WIN_LEN; k++ ) - { - if ( ( psPredictionEncoder->pppfInpBufReal[n][k] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->pppfInpBufImag[n][k] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - set_zero( psPredictionEncoder->pppfInpBufReal[n][k], LCLD_BANDS ); - set_zero( psPredictionEncoder->pppfInpBufImag[n][k], LCLD_BANDS ); - } - if ( ( psPredictionEncoder->ppfPredStateReal[n] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfPredStateImag[n] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - set_zero( psPredictionEncoder->ppfPredStateReal[n], LCLD_BANDS ); - set_zero( psPredictionEncoder->ppfPredStateImag[n], LCLD_BANDS ); - - if ( ( psPredictionEncoder->ppfInpPrevReal[n] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfInpPrevImag[n] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - - set_zero( psPredictionEncoder->ppfInpPrevReal[n], LCLD_BANDS ); - set_zero( psPredictionEncoder->ppfInpPrevImag[n], LCLD_BANDS ); - - if ( ( psPredictionEncoder->ppfPredStateRealTmp[n] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - if ( ( psPredictionEncoder->ppfPredStateImagTmp[n] = (float *) malloc( LCLD_BANDS * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD PredictionEncoder Module \n" ) ); - } - set_zero( psPredictionEncoder->ppfPredStateRealTmp[n], LCLD_BANDS ); - set_zero( psPredictionEncoder->ppfPredStateImagTmp[n], LCLD_BANDS ); - for ( k = 0; k < LCLD_BANDS; k++ ) - { - psPredictionEncoder->ppiPredBandEnable[n][k] = 0; - psPredictionEncoder->ppfA1Real[n][k] = 0.0f; - psPredictionEncoder->ppfA1Imag[n][k] = 0.0f; - } - } - - *psPredictionEncoder_out = psPredictionEncoder; - - return IVAS_ERR_OK; -} /*-------------------------------------------------------------------* @@ -507,57 +330,6 @@ void DeletePredictionEncoder_fx( free( psPredictionEncoder->ppfPredStateRealTmp_fx ); free( psPredictionEncoder->ppfPredStateImagTmp_fx ); - - free( psPredictionEncoder ); - - return; -} - - -void DeletePredictionEncoder( - PredictionEncoder *psPredictionEncoder ) -{ - int32_t n; - - for ( n = 0; n < psPredictionEncoder->iChannels; n++ ) - { - int32_t k; - free( psPredictionEncoder->ppiPredBandEnable[n] ); - free( psPredictionEncoder->ppfA1Real[n] ); - free( psPredictionEncoder->ppfA1Imag[n] ); - free( psPredictionEncoder->ppiA1Mag[n] ); - free( psPredictionEncoder->ppiA1Phase[n] ); - for ( k = 0; k < LCLD_PRED_WIN_LEN; k++ ) - { - free( psPredictionEncoder->pppfInpBufReal[n][k] ); - free( psPredictionEncoder->pppfInpBufImag[n][k] ); - } - free( psPredictionEncoder->pppfInpBufReal[n] ); - free( psPredictionEncoder->pppfInpBufImag[n] ); - free( psPredictionEncoder->ppfInpPrevReal[n] ); - free( psPredictionEncoder->ppfInpPrevImag[n] ); - free( psPredictionEncoder->ppfPredStateReal[n] ); - free( psPredictionEncoder->ppfPredStateImag[n] ); - free( psPredictionEncoder->ppfPredStateRealTmp[n] ); - free( psPredictionEncoder->ppfPredStateImagTmp[n] ); - } - free( psPredictionEncoder->piPredChanEnable ); - free( psPredictionEncoder->piNumPredBands ); - free( psPredictionEncoder->ppiPredBandEnable ); - free( psPredictionEncoder->ppfA1Real ); - free( psPredictionEncoder->ppfA1Imag ); - free( psPredictionEncoder->ppiA1Mag ); - free( psPredictionEncoder->ppiA1Phase ); - free( psPredictionEncoder->pppfInpBufReal ); - free( psPredictionEncoder->pppfInpBufImag ); - free( psPredictionEncoder->ppfInpPrevReal ); - free( psPredictionEncoder->ppfInpPrevImag ); - free( psPredictionEncoder->ppfPredStateReal ); - free( psPredictionEncoder->ppfPredStateImag ); - free( psPredictionEncoder->ppfPredStateRealTmp ); - free( psPredictionEncoder->ppfPredStateImagTmp ); - - free( psPredictionEncoder ); return; @@ -570,186 +342,6 @@ void DeletePredictionEncoder( * *-------------------------------------------------------------------*/ -void ComputePredictors( - PredictionEncoder *psPredictionEncoder, - float ***pppfReal, - float ***pppfImag ) -{ - int32_t c; - - int32_t b0 = psPredictionEncoder->iSubSetId; - int32_t bstep = psPredictionEncoder->iNumSubSets; - int32_t iNumBlocks = psPredictionEncoder->iNumBlocks; - float ***pppfRealBuf; - float ***pppfImagBuf; - float pfEstPredBitGain[LCLD_BANDS] = { 0 }; - - if ( iNumBlocks < LCLD_PRED_WIN_LEN ) - { - pppfRealBuf = psPredictionEncoder->pppfInpBufReal; - pppfImagBuf = psPredictionEncoder->pppfInpBufImag; - for ( c = 0; c < psPredictionEncoder->iChannels; c++ ) - { - int32_t n; - for ( n = 0; n < LCLD_PRED_WIN_LEN - iNumBlocks; n++ ) - { - mvr2r( pppfRealBuf[c][n + iNumBlocks], pppfRealBuf[c][n], LCLD_BANDS ); - mvr2r( pppfImagBuf[c][n + iNumBlocks], pppfImagBuf[c][n], LCLD_BANDS ); - } - for ( n = 0; n < iNumBlocks; n++ ) - { - mvr2r( pppfReal[c][n], pppfRealBuf[c][n + LCLD_PRED_WIN_LEN - iNumBlocks], LCLD_BANDS ); - mvr2r( pppfImag[c][n], pppfImagBuf[c][n + LCLD_PRED_WIN_LEN - iNumBlocks], LCLD_BANDS ); - } - } - } - else - { - pppfRealBuf = pppfReal; - pppfImagBuf = pppfImag; - } - - for ( c = 0; c < psPredictionEncoder->iChannels; c++ ) - { - int32_t b; - for ( b = b0; b < psPredictionEncoder->iMaxNumPredBands; b += bstep ) - { - int32_t n; - float fGain = 0.0; - float fBitGain = 0.0; - float *pfRxxReal; - float *pfRxxImag; - float fA1Real; - float fA1Imag; - int32_t iA1Mag; - int32_t iA1Phase; - - pfRxxReal = psPredictionEncoder->pfRxxReal; - pfRxxImag = psPredictionEncoder->pfRxxImag; - - pfRxxReal[0] = 0.0; - pfRxxImag[0] = 0.0; - for ( n = 0; n < LCLD_PRED_WIN_LEN; n++ ) - { - pfRxxReal[0] += ( pppfRealBuf[c][n][b] * pppfRealBuf[c][n][b] + pppfImagBuf[c][n][b] * pppfImagBuf[c][n][b] ); - } - - pfRxxReal[1] = 0.0; - pfRxxImag[1] = 0.0; - for ( n = 1; n < LCLD_PRED_WIN_LEN; n++ ) - { - pfRxxReal[1] += ( pppfRealBuf[c][n][b] * pppfRealBuf[c][n - 1][b] + pppfImagBuf[c][n][b] * pppfImagBuf[c][n - 1][b] ); - pfRxxImag[1] += ( pppfImagBuf[c][n][b] * pppfRealBuf[c][n - 1][b] - pppfRealBuf[c][n][b] * pppfImagBuf[c][n - 1][b] ); - } - - if ( pfRxxReal[0] > 1e-12f ) - { - float fA1Mag; - float fA1Phase; - float fGain2; - float fBitGain2; - int32_t iNumBlocksPerPredCoef = min( iNumBlocks * psPredictionEncoder->iNumSubSets, LCLD_PRED_WIN_LEN ); - - const float fMagScale = ( 2.0f * (float) ( 1 << ( PRED_QUNAT_FILTER_MAG_BITS ) ) + 1.0f ) / M_PI; - const float fInvMagScale = M_PI / ( 2.0f * (float) ( 1 << ( PRED_QUNAT_FILTER_MAG_BITS ) ) + 1.0f ); - const float fPhaseScale = (float) ( 1 << ( PRED_QUANT_FILTER_PHASE_BITS - 1 ) ) / M_PI; - const float fInvPhaseScale = M_PI / (float) ( 1 << ( PRED_QUANT_FILTER_PHASE_BITS - 1 ) ); - - /* Compute filter coefficeints */ - fA1Real = -pfRxxReal[1] / pfRxxReal[0]; - fA1Imag = -pfRxxImag[1] / pfRxxReal[0]; - - /* compute these before quant */ - /* Compute est coding gain based on quantized filter coefficients */ - fGain = 1.0f / ( 1.0f - fA1Real * fA1Real - fA1Imag * fA1Imag ); - fBitGain = 0.65f * log2f( fGain ) * (float) ( iNumBlocksPerPredCoef ) - (float) ( PRED_QUNAT_FILTER_MAG_BITS + PRED_QUANT_FILTER_PHASE_BITS ); // Wrong fix (iNumBlocks-1) - fA1Mag = sqrtf( fA1Real * fA1Real + fA1Imag * fA1Imag ); - fA1Mag = fMagScale * asinf( fA1Mag ); - iA1Mag = (int32_t) ( fA1Mag + 0.5f ); - iA1Mag = ( iA1Mag > PRED_QUANT_FILTER_MAG_MIN ) ? iA1Mag : PRED_QUANT_FILTER_MAG_MIN; - iA1Mag = ( iA1Mag < PRED_QUANT_FILTER_MAG_MAX ) ? iA1Mag : PRED_QUANT_FILTER_MAG_MAX; - fA1Mag = sinf( fInvMagScale * (float) iA1Mag ); - - fA1Phase = atan2f( fA1Imag, fA1Real ); - fA1Phase = fPhaseScale * fA1Phase; - iA1Phase = ( fA1Phase > 0.0f ) ? (int32_t) ( fA1Phase + 0.5f ) : (int32_t) ( fA1Phase - 0.5f ); - iA1Phase = ( iA1Phase > PRED_QUANT_FILTER_PHASE_MIN ) ? iA1Phase : PRED_QUANT_FILTER_PHASE_MIN; - iA1Phase = ( iA1Phase < PRED_QUANT_FILTER_PHASE_MAX ) ? iA1Phase : PRED_QUANT_FILTER_PHASE_MAX; // Is this the correct way to deal with this? should wrap? - fA1Phase = fInvPhaseScale * (float) iA1Phase; - - fA1Real = fA1Mag * cosf( fA1Phase ); - fA1Imag = fA1Mag * sinf( fA1Phase ); - - fGain2 = 1.0f / ( 1.0f - fA1Real * fA1Real - fA1Imag * fA1Imag ); - fBitGain2 = 0.65f * log2f( fGain ) * (float) ( iNumBlocksPerPredCoef ) - (float) ( PRED_QUNAT_FILTER_MAG_BITS + PRED_QUANT_FILTER_PHASE_BITS ); // Wrong fix (iNumBlocks-1) - fGain = ( fGain < fGain2 ) ? fGain : fGain2; - fBitGain = ( fBitGain < fBitGain2 ) ? fBitGain : fBitGain2; - } - else - { - fA1Real = 0.0f; - fA1Imag = 0.0f; - iA1Mag = 0; - iA1Phase = 0; - fGain = -10.0f; // Fix this - } - - pfEstPredBitGain[b] = fBitGain; - psPredictionEncoder->ppiPredBandEnable[c][b] = ( fBitGain > 0.0f ); // Initial prediction enable - psPredictionEncoder->ppfA1Real[c][b] = fA1Real; - psPredictionEncoder->ppfA1Imag[c][b] = fA1Imag; - psPredictionEncoder->ppiA1Mag[c][b] = iA1Mag; - psPredictionEncoder->ppiA1Phase[c][b] = iA1Phase; - } - - { - float fBestCost; - int32_t iPredBands; - float fBitGain; - int32_t iPredChanEnable = 0; - - fBestCost = 0.0; - iPredBands = 0; - fBitGain = -7.0; - for ( b = b0; b < psPredictionEncoder->iMaxNumPredBands; b += bstep ) - { // still getting this decision wrong! - fBitGain -= 1.0; - if ( psPredictionEncoder->ppiPredBandEnable[c][b] == 1 ) - { - fBitGain += pfEstPredBitGain[b]; - } - if ( fBitGain > fBestCost ) - { - fBestCost = fBitGain; - iPredBands = b; - iPredChanEnable = 1; - } - } - - if ( iPredChanEnable == 1 ) - { - for ( b = iPredBands + bstep; b < LCLD_BANDS; b += bstep ) - { - psPredictionEncoder->ppiPredBandEnable[c][b] = 0; - } - activate_bit( &psPredictionEncoder->piPredChanEnable[c], psPredictionEncoder->iSubSetId ); - psPredictionEncoder->piNumPredBands[c] = iPredBands + bstep; - } - else - { - for ( b = b0; b < LCLD_BANDS; b += bstep ) - { - psPredictionEncoder->ppiPredBandEnable[c][b] = 0; - } - deactivate_bit( &psPredictionEncoder->piPredChanEnable[c], psPredictionEncoder->iSubSetId ); - psPredictionEncoder->piNumPredBands[c] = 0; - } - } - } - - return; -} - void ComputePredictors_fx( PredictionEncoder *psPredictionEncoder, diff --git a/lib_isar/isar_RMSEnvGrouping.c b/lib_isar/isar_RMSEnvGrouping.c index 0128fe7d2..748710c14 100644 --- a/lib_isar/isar_RMSEnvGrouping.c +++ b/lib_isar/isar_RMSEnvGrouping.c @@ -187,8 +187,8 @@ RMSEnvelopeGrouping *CreateRMSEnvelopeGrouping( for ( n = 0; n < psRMSEnvelopeGrouping->iNumBlocks; n++ ) { - psRMSEnvelopeGrouping->psGMNodes[n].pfMergedEnergydB_fx = (Word32 *) malloc( MAX_BANDS * 2 * sizeof( float ) ); - psRMSEnvelopeGrouping->psGMNodes[n].piQRMSEnvelope = (Word32 *) malloc( MAX_BANDS * 2 * sizeof( int32_t ) ); + psRMSEnvelopeGrouping->psGMNodes[n].pfMergedEnergydB_fx = (Word32 *) malloc( MAX_BANDS * 2 * sizeof( Word32 ) ); + psRMSEnvelopeGrouping->psGMNodes[n].piQRMSEnvelope = (Word32 *) malloc( MAX_BANDS * 2 * sizeof( Word32 ) ); psRMSEnvelopeGrouping->psGMNodes[n].iGroupRMSEnvelopeCost = -1; psRMSEnvelopeGrouping->psGMNodes[n].fGroupSNRPenalty_fx = L_negate( ONE_IN_Q30 ); psRMSEnvelopeGrouping->psGMNodes[n].fGroupSNRPenalty_exp = 1; @@ -703,10 +703,10 @@ static Word32 TryMerge2( static void ComputeGreedyGroups3( RMSEnvelopeGrouping *psRMSEnvelopeGrouping, - const int32_t iChannels, - const int32_t iNumBands, - const int32_t *piBandwidths, - const int32_t iMaxGroups ) + const Word32 iChannels, + const Word32 iNumBands, + const Word32 *piBandwidths, + const Word32 iMaxGroups ) { Word32 iDone = 0; diff --git a/lib_isar/isar_lc3plus_common.c b/lib_isar/isar_lc3plus_common.c index 5c56c0b43..78269491c 100644 --- a/lib_isar/isar_lc3plus_common.c +++ b/lib_isar/isar_lc3plus_common.c @@ -56,7 +56,10 @@ ivas_error ISAR_LC3PLUS_LC3plusErrToIvasErr( return IVAS_ERR_INTERNAL; } -ivas_error IVAS_LC3PLUS_LC3plusRtpErrToIvasErr( const LC3PLUS_RTP_ERR lc3PlusRtpError ) + + +ivas_error IVAS_LC3PLUS_LC3plusRtpErrToIvasErr( + const LC3PLUS_RTP_ERR lc3PlusRtpError ) { switch ( lc3PlusRtpError ) { diff --git a/lib_isar/isar_lcld_encoder.c b/lib_isar/isar_lcld_encoder.c index 327edb6ad..519c13e7e 100644 --- a/lib_isar/isar_lcld_encoder.c +++ b/lib_isar/isar_lcld_encoder.c @@ -803,6 +803,7 @@ enum MS_BS_TYPES MS_SOME = 2, MS_PRED = 3 }; + static Word32 MSModeCalculation_fx( const Word32 iNumBlocks, const Word32 iNumBands, diff --git a/lib_isar/isar_lcld_prot.h b/lib_isar/isar_lcld_prot.h index 51d6d7a95..9111033eb 100644 --- a/lib_isar/isar_lcld_prot.h +++ b/lib_isar/isar_lcld_prot.h @@ -186,17 +186,6 @@ void DeleteNoiseGen( NoiseGen *psNoiseGen ); -inline float GetNoise( NoiseGen *psNoiseGen ) -{ - float fNoiseSample; - - fNoiseSample = psNoiseGen->pfNoiseBuffer[psNoiseGen->iNoiseBufferIndex]; - psNoiseGen->iNoiseBufferIndex++; - psNoiseGen->iNoiseBufferIndex &= psNoiseGen->iNoiseBufferMask; - - return fNoiseSample; -} - inline Word32 GetNoise_fx( NoiseGen *psNoiseGen ) { Word32 fNoiseSample; @@ -208,6 +197,7 @@ inline Word32 GetNoise_fx( NoiseGen *psNoiseGen ) return fNoiseSample; } + /*----------------------------------------------------------------------------------* * PereptualModel prototypes *----------------------------------------------------------------------------------*/ @@ -269,18 +259,8 @@ typedef struct PREDICTION_ENCODER Word32 **ppfPredStateImagTmp_fx; Word32 **ppfInpPrevReal_fx; /* channels, bands */ Word32 **ppfInpPrevImag_fx; - float ***pppfInpBufReal; /* channels, LCLD_PRED_WIN_LEN, bands */ - float ***pppfInpBufImag; - float **ppfPredStateReal; /* channels, bands */ - float **ppfPredStateImag; - float **ppfPredStateRealTmp; - float **ppfPredStateImagTmp; - float **ppfInpPrevReal; /* channels, bands */ - float **ppfInpPrevImag; Word32 pfRxxReal_fx[2]; Word32 pfRxxImag_fx[2]; - float pfRxxReal[2]; - float pfRxxImag[2]; Word32 *piPredChanEnable; Word32 *piNumPredBands; @@ -288,8 +268,6 @@ typedef struct PREDICTION_ENCODER Word32 **ppfA1Real_fx; Word32 **ppfA1Imag_fx; - float **ppfA1Real; - float **ppfA1Imag; Word32 **ppiA1Mag; Word32 **ppiA1Phase; @@ -304,29 +282,14 @@ ivas_error CreatePredictionEncoder_fx( ); void DeletePredictionEncoder_fx( - PredictionEncoder *psPredictionEncoder ); -ivas_error CreatePredictionEncoder( - PredictionEncoder **psPredictionEncoder_out, - const Word32 iChannels, - const Word32 iNumBlocks, - const Word32 iNumSubSets, - const Word32 iMaxNumPredBands -); - -void DeletePredictionEncoder( PredictionEncoder *psPredictionEncoder ); -void ComputePredictors( - PredictionEncoder *psPredictionEncoder, - float ***pppfReal, - float ***pppfImag -); void ComputePredictors_fx( PredictionEncoder *psPredictionEncoder, Word32 ***pppfReal_fx, //Q12? Word32 ***pppfImag_fx //Q12? - ); +); Word32 WritePredictors( PredictionEncoder *psPredictionEncoder, diff --git a/lib_isar/isar_prot.h b/lib_isar/isar_prot.h index 851ee7ac0..d7bad997b 100644 --- a/lib_isar/isar_prot.h +++ b/lib_isar/isar_prot.h @@ -461,12 +461,10 @@ void ivas_calculate_rabs_fx( Word16 *exp_out ); -#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 ); \ - out1_im = ( in1_re * in2_im ) + ( in2_re * in1_im ); - +#ifdef SPLIT_POSE_CORRECTION_DEBUG #define IVAS_CALCULATE_ABS( re, im, out ) \ out = sqrtf( ( re * re ) + ( im * im ) ); +#endif /* clang-format on */ diff --git a/lib_isar/isar_rom_post_rend.c b/lib_isar/isar_rom_post_rend.c index 25472e185..954d89f63 100644 --- a/lib_isar/isar_rom_post_rend.c +++ b/lib_isar/isar_rom_post_rend.c @@ -40,155 +40,234 @@ #include #include "wmc_auto.h" -/* clang-format off */ - /*----------------------------------------------------------------------* * ISAR binaural split post-rendering ROM table *-----------------------------------------------------------------------*/ /* rotations in this array are relative to ref rotation */ -const Word32 ivas_split_rend_relative_yaw_pos_angles_fx[SPLIT_REND_MAX_YAW_ONLY_POSES] = { -62914560, 62914560 }; /* Q22 */ -const Word32 ivas_split_rend_relative_pitch_pos_angles_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { 41943040, 41943040 }; /* Q22 */ -const Word32 ivas_split_rend_relative_roll_pos_angles_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { 41943040, 41943040 }; /* Q22 */ -const float ivas_split_rend_relative_yaw_pos_angles[SPLIT_REND_MAX_YAW_ONLY_POSES] = {-15.0f, 15.0f}; -const float ivas_split_rend_relative_pitch_pos_angles[SPLIT_REND_MAX_PITCH_ONLY_POSES] = {10.0f, 10.0f}; -const float ivas_split_rend_relative_roll_pos_angles[SPLIT_REND_MAX_PITCH_ONLY_POSES] = {10.0f, 10.0f}; -const float ivas_split_rend_relative_one_axis_pos_angles[SPLIT_REND_MAX_ONE_AXIS_MD_POSES] = {-15.0f, 15.0f}; - -const Word32 ivas_split_rend_relative_yaw_pos_angles_hq_fx[SPLIT_REND_MAX_YAW_ONLY_POSES] = { -62914560, 62914560 }; /* Q22 */ -const Word32 ivas_split_rend_relative_pitch_pos_angles_hq_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { -62914560, 62914560 }; /* Q22 */ -const Word32 ivas_split_rend_relative_roll_pos_angles_hq_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { -62914560, 62914560 }; /* Q22 */ -const float ivas_split_rend_relative_yaw_pos_angles_hq[SPLIT_REND_MAX_YAW_ONLY_POSES] = {-15.0f, 15.0f}; -const float ivas_split_rend_relative_pitch_pos_angles_hq[SPLIT_REND_MAX_PITCH_ONLY_POSES] = {-15.0f, 15.0f}; -const float ivas_split_rend_relative_roll_pos_angles_hq[SPLIT_REND_MAX_PITCH_ONLY_POSES] = {-15.0f, 15.0f}; -const float ivas_split_rend_relative_one_axis_pos_angles_hq[SPLIT_REND_MAX_ONE_AXIS_MD_POSES] = {-15.0f, 15.0f}; +const Word32 ivas_split_rend_relative_yaw_pos_angles_fx[SPLIT_REND_MAX_YAW_ONLY_POSES] = { + -62914560, 62914560 +}; /* Q22 */ + +const Word32 ivas_split_rend_relative_pitch_pos_angles_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { + 41943040, 41943040 +}; /* Q22 */ + +const Word32 ivas_split_rend_relative_roll_pos_angles_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { + 41943040, 41943040 +}; /* Q22 */ + +const Word32 ivas_split_rend_relative_yaw_pos_angles_hq_fx[SPLIT_REND_MAX_YAW_ONLY_POSES] = { + -62914560, 62914560 +}; /* Q22 */ + +const Word32 ivas_split_rend_relative_pitch_pos_angles_hq_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { + -62914560, 62914560 +}; /* Q22 */ + +const Word32 ivas_split_rend_relative_roll_pos_angles_hq_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES] = { + -62914560, 62914560 +}; /* Q22 */ /* Values in degrees : -30, -22.5, -15, 0, 15, 22.5 and 30 */ -const Word32 ivas_split_rend_fix_pos_rot_mat_cos_fx[4] = { ONE_IN_Q31, 2074309917, 1984016189, 1859775393 }; /* Q31 */ +const Word32 ivas_split_rend_fix_pos_rot_mat_cos_fx[4] = { + ONE_IN_Q31, 2074309917, 1984016189, 1859775393 +}; /* Q31 */ -const int16_t isar_split_rend_band_grouping[MAX_SPLIT_REND_MD_BANDS + 1] = -{ +const Word16 isar_split_rend_band_grouping[MAX_SPLIT_REND_MD_BANDS + 1] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 20, 25, 30, 35, 40, 50, 60 }; -const int32_t ivas_split_rend_huff_p_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3] = -{ - {0,8,252},{1,8,253},{2,7,124},{3,6,60},{4,5,28},{5,4,12}, - {6,3,4},{7,1,0},{8,3,5},{9,4,13},{10,5,29},{11,6,61}, - {12,7,125},{13,8,254},{14,8,255} +const Word32 ivas_split_rend_huff_p_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3] = { + { 0, 8, 252 }, + { 1, 8, 253 }, + { 2, 7, 124 }, + { 3, 6, 60 }, + { 4, 5, 28 }, + { 5, 4, 12 }, + { 6, 3, 4 }, + { 7, 1, 0 }, + { 8, 3, 5 }, + { 9, 4, 13 }, + { 10, 5, 29 }, + { 11, 6, 61 }, + { 12, 7, 125 }, + { 13, 8, 254 }, + { 14, 8, 255 } }; -const int32_t ivas_split_rend_huff_p_d_diff_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3] = -{ - { 0, 1, 0 },{ 1, 2, 2 },{ 2, 3, 6 },{ 3, 4, 14 }, - { 4, 5, 30 },{ 5, 6, 62 },{ 6, 7, 126 },{ 7, 8, 254 }, - { 8, 9, 510 },{ 9, 10, 1022 },{ 10, 11, 2046 },{ 11, 12, 4094 }, - { 12, 13, 8190 },{ 13, 14, 16382 },{ 14, 14, 16383 } +const Word32 ivas_split_rend_huff_p_d_diff_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3] = { + { 0, 1, 0 }, + { 1, 2, 2 }, + { 2, 3, 6 }, + { 3, 4, 14 }, + { 4, 5, 30 }, + { 5, 6, 62 }, + { 6, 7, 126 }, + { 7, 8, 254 }, + { 8, 9, 510 }, + { 9, 10, 1022 }, + { 10, 11, 2046 }, + { 11, 12, 4094 }, + { 12, 13, 8190 }, + { 13, 14, 16382 }, + { 14, 14, 16383 } }; -const int32_t ivas_split_rend_huff_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3] = -{ - { 0, 1, 0 },{ 1, 2, 2 },{ 2, 3, 6 },{ 3, 4, 14 }, - { 4, 5, 30 },{ 5, 6, 62 },{ 6, 7, 126 },{ 7, 8, 254 }, - { 8, 9, 510 },{ 9, 10, 1022 },{ 10, 11, 2046 },{ 11, 12, 4094 }, - { 12, 13, 8190 },{ 13, 14, 16382 },{ 14, 14, 16383 } +const Word32 ivas_split_rend_huff_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3] = { + { 0, 1, 0 }, + { 1, 2, 2 }, + { 2, 3, 6 }, + { 3, 4, 14 }, + { 4, 5, 30 }, + { 5, 6, 62 }, + { 6, 7, 126 }, + { 7, 8, 254 }, + { 8, 9, 510 }, + { 9, 10, 1022 }, + { 10, 11, 2046 }, + { 11, 12, 4094 }, + { 12, 13, 8190 }, + { 13, 14, 16382 }, + { 14, 14, 16383 } }; -const int32_t ivas_split_rend_huff_pred63_consts[ISAR_SPLIT_REND_PRED_63QUANT_PNTS][3] = -{ - {-31,11,2040}, - {-30,11,2041}, - {-29,11,2042}, - {-28,11,2043}, - {-27,10,1012}, - {-26,10,1013}, - {-25,10,1014}, - {-24,10,1015}, - {-23,9,498}, - {-22,9,499}, - {-21,9,500}, - {-20,9,501}, - {-19,8,242}, - {-18,8,243}, - {-17,8,244}, - {-16,8,245}, - {-15,7,112}, - {-14,7,113}, - {-13,7,114}, - {-12,7,115}, - {-11,6,48}, - {-10,6,49}, - {-9,6,50}, - {-8,6,51}, - {-7,5,16}, - {-6,5,17}, - {-5,5,18}, - {-4,5,19}, - {-3,4,2}, - {-2,4,3}, - {-1,4,4}, - {0,3,0}, - {1,4,5}, - {2,4,6}, - {3,4,7}, - {4,5,20}, - {5,5,21}, - {6,5,22}, - {7,5,23}, - {8,6,52}, - {9,6,53}, - {10,6,54}, - {11,6,55}, - {12,7,116}, - {13,7,117}, - {14,7,118}, - {15,7,119}, - {16,7,120}, - {17,8,246}, - {18,8,247}, - {19,8,248}, - {20,9,502}, - {21,9,503}, - {22,9,504}, - {23,9,505}, - {24,10,1016}, - {25,10,1017}, - {26,10,1018}, - {27,10,1019}, - {28,11,2044}, - {29,11,2045}, - {30,11,2046}, - {31,11,2047}, +const Word32 ivas_split_rend_huff_pred63_consts[ISAR_SPLIT_REND_PRED_63QUANT_PNTS][3] = { + { -31, 11, 2040 }, + { -30, 11, 2041 }, + { -29, 11, 2042 }, + { -28, 11, 2043 }, + { -27, 10, 1012 }, + { -26, 10, 1013 }, + { -25, 10, 1014 }, + { -24, 10, 1015 }, + { -23, 9, 498 }, + { -22, 9, 499 }, + { -21, 9, 500 }, + { -20, 9, 501 }, + { -19, 8, 242 }, + { -18, 8, 243 }, + { -17, 8, 244 }, + { -16, 8, 245 }, + { -15, 7, 112 }, + { -14, 7, 113 }, + { -13, 7, 114 }, + { -12, 7, 115 }, + { -11, 6, 48 }, + { -10, 6, 49 }, + { -9, 6, 50 }, + { -8, 6, 51 }, + { -7, 5, 16 }, + { -6, 5, 17 }, + { -5, 5, 18 }, + { -4, 5, 19 }, + { -3, 4, 2 }, + { -2, 4, 3 }, + { -1, 4, 4 }, + { 0, 3, 0 }, + { 1, 4, 5 }, + { 2, 4, 6 }, + { 3, 4, 7 }, + { 4, 5, 20 }, + { 5, 5, 21 }, + { 6, 5, 22 }, + { 7, 5, 23 }, + { 8, 6, 52 }, + { 9, 6, 53 }, + { 10, 6, 54 }, + { 11, 6, 55 }, + { 12, 7, 116 }, + { 13, 7, 117 }, + { 14, 7, 118 }, + { 15, 7, 119 }, + { 16, 7, 120 }, + { 17, 8, 246 }, + { 18, 8, 247 }, + { 19, 8, 248 }, + { 20, 9, 502 }, + { 21, 9, 503 }, + { 22, 9, 504 }, + { 23, 9, 505 }, + { 24, 10, 1016 }, + { 25, 10, 1017 }, + { 26, 10, 1018 }, + { 27, 10, 1019 }, + { 28, 11, 2044 }, + { 29, 11, 2045 }, + { 30, 11, 2046 }, + { 31, 11, 2047 }, }; -const int32_t ivas_split_rend_huff_pred31_consts[ISAR_SPLIT_REND_PRED_31QUANT_PNTS][3] = -{ - {-15,10,1020},{-14,10,1021},{-13,9,506},{-12,9,507}, - {-11,8,250},{-10,8,251},{-9,7,120},{-8,7,121}, - {-7,6,56},{-6,6,57},{-5,5,24},{-4,5,25},{-3,4,8}, - {-2,4,9},{-1,3,2},{0,2,0},{1,3,3}, - {2,4,10},{3,4,11},{4,5,26},{5,5,27}, - {6,6,58},{7,6,59},{8,7,122},{9,7,123}, - {10,7,124},{11,8,252},{12,9,508},{13,9,509}, - {14,10,1022},{15,10,1023}, +const Word32 ivas_split_rend_huff_pred31_consts[ISAR_SPLIT_REND_PRED_31QUANT_PNTS][3] = { + { -15, 10, 1020 }, + { -14, 10, 1021 }, + { -13, 9, 506 }, + { -12, 9, 507 }, + { -11, 8, 250 }, + { -10, 8, 251 }, + { -9, 7, 120 }, + { -8, 7, 121 }, + { -7, 6, 56 }, + { -6, 6, 57 }, + { -5, 5, 24 }, + { -4, 5, 25 }, + { -3, 4, 8 }, + { -2, 4, 9 }, + { -1, 3, 2 }, + { 0, 2, 0 }, + { 1, 3, 3 }, + { 2, 4, 10 }, + { 3, 4, 11 }, + { 4, 5, 26 }, + { 5, 5, 27 }, + { 6, 6, 58 }, + { 7, 6, 59 }, + { 8, 7, 122 }, + { 9, 7, 123 }, + { 10, 7, 124 }, + { 11, 8, 252 }, + { 12, 9, 508 }, + { 13, 9, 509 }, + { 14, 10, 1022 }, + { 15, 10, 1023 }, }; -const int32_t ivas_split_rend_huff_roll_pred_consts[ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS][3] = -{ - {-15,10,1020},{-14,10,1021},{-13,9,506},{-12,9,507}, - {-11,8,250},{-10,8,251},{-9,7,120},{-8,7,121}, - {-7,6,56},{-6,6,57},{-5,5,24},{-4,5,25},{-3,4,8}, - {-2,4,9},{-1,3,2},{0,2,0},{1,3,3}, - {2,4,10},{3,4,11},{4,5,26},{5,5,27}, - {6,6,58},{7,6,59},{8,7,122},{9,7,123}, - {10,7,124},{11,8,252},{12,9,508},{13,9,509}, -{14,10,1022},{15,10,1023}, +const Word32 ivas_split_rend_huff_roll_pred_consts[ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS][3] = { + { -15, 10, 1020 }, + { -14, 10, 1021 }, + { -13, 9, 506 }, + { -12, 9, 507 }, + { -11, 8, 250 }, + { -10, 8, 251 }, + { -9, 7, 120 }, + { -8, 7, 121 }, + { -7, 6, 56 }, + { -6, 6, 57 }, + { -5, 5, 24 }, + { -4, 5, 25 }, + { -3, 4, 8 }, + { -2, 4, 9 }, + { -1, 3, 2 }, + { 0, 2, 0 }, + { 1, 3, 3 }, + { 2, 4, 10 }, + { 3, 4, 11 }, + { 4, 5, 26 }, + { 5, 5, 27 }, + { 6, 6, 58 }, + { 7, 6, 59 }, + { 8, 7, 122 }, + { 9, 7, 123 }, + { 10, 7, 124 }, + { 11, 8, 252 }, + { 12, 9, 508 }, + { 13, 9, 509 }, + { 14, 10, 1022 }, + { 15, 10, 1023 }, }; - /* Tables for split renderer fixed converison */ -const Word16 fade_table_fx[4] = -{ 8192, 16384, 24576, 32767 }; - -/* clang-format on */ +const Word16 fade_table_fx[4] = { + 8192, 16384, 24576, 32767 +}; diff --git a/lib_isar/isar_rom_post_rend.h b/lib_isar/isar_rom_post_rend.h index 8c49e7d38..a08bb174f 100644 --- a/lib_isar/isar_rom_post_rend.h +++ b/lib_isar/isar_rom_post_rend.h @@ -48,31 +48,22 @@ extern const Word32 ivas_split_rend_relative_yaw_pos_angles_fx[SPLIT_REND_MAX_YAW_ONLY_POSES]; extern const Word32 ivas_split_rend_relative_pitch_pos_angles_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES]; extern const Word32 ivas_split_rend_relative_roll_pos_angles_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES]; -extern const float ivas_split_rend_relative_yaw_pos_angles[SPLIT_REND_MAX_YAW_ONLY_POSES]; -extern const float ivas_split_rend_relative_pitch_pos_angles[SPLIT_REND_MAX_PITCH_ONLY_POSES]; -extern const float ivas_split_rend_relative_roll_pos_angles[SPLIT_REND_MAX_PITCH_ONLY_POSES]; -extern const float ivas_split_rend_relative_one_axis_pos_angles[SPLIT_REND_MAX_ONE_AXIS_MD_POSES]; -extern const float ivas_split_rend_relative_one_axis_pos_angles_hq[SPLIT_REND_MAX_ONE_AXIS_MD_POSES]; extern const Word32 ivas_split_rend_relative_yaw_pos_angles_hq_fx[SPLIT_REND_MAX_YAW_ONLY_POSES]; extern const Word32 ivas_split_rend_relative_pitch_pos_angles_hq_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES]; extern const Word32 ivas_split_rend_relative_roll_pos_angles_hq_fx[SPLIT_REND_MAX_PITCH_ONLY_POSES]; -extern const float ivas_split_rend_relative_yaw_pos_angles_hq[SPLIT_REND_MAX_YAW_ONLY_POSES]; -extern const float ivas_split_rend_relative_pitch_pos_angles_hq[SPLIT_REND_MAX_PITCH_ONLY_POSES]; -extern const float ivas_split_rend_relative_roll_pos_angles_hq[SPLIT_REND_MAX_PITCH_ONLY_POSES]; /* Values in degrees : -30, -22.5, -15, 0, 15, 22.5 and 30 */ extern const Word32 ivas_split_rend_fix_pos_rot_mat_cos_fx[4]; /* Q31 */ -extern const float ivas_split_rend_relative_pos_angles[MAX_HEAD_ROT_POSES][3]; -extern const int16_t isar_split_rend_band_grouping[MAX_SPLIT_REND_MD_BANDS + 1]; -extern const int32_t ivas_split_rend_huff_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3]; -extern const int32_t ivas_split_rend_huff_pred63_consts[ISAR_SPLIT_REND_PRED_31QUANT_PNTS][3]; -extern const int32_t ivas_split_rend_huff_pred31_consts[ISAR_SPLIT_REND_PRED_31QUANT_PNTS][3]; -extern const int32_t ivas_split_rend_huff_roll_pred_consts[ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS][3]; -extern const int32_t ivas_split_rend_huff_p_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3]; -extern const int32_t ivas_split_rend_huff_p_d_diff_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3]; -extern const int32_t split_rend_brate_tbl[]; +extern const Word16 isar_split_rend_band_grouping[MAX_SPLIT_REND_MD_BANDS + 1]; +extern const Word32 ivas_split_rend_huff_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3]; +extern const Word32 ivas_split_rend_huff_pred63_consts[ISAR_SPLIT_REND_PRED_31QUANT_PNTS][3]; +extern const Word32 ivas_split_rend_huff_pred31_consts[ISAR_SPLIT_REND_PRED_31QUANT_PNTS][3]; +extern const Word32 ivas_split_rend_huff_roll_pred_consts[ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS][3]; +extern const Word32 ivas_split_rend_huff_p_d_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3]; +extern const Word32 ivas_split_rend_huff_p_d_diff_consts[ISAR_SPLIT_REND_D_QUANT_PNTS][3]; +extern const Word32 split_rend_brate_tbl[]; /* Tables for fixed point conversion */ extern const Word16 fade_table_fx[4]; diff --git a/lib_isar/isar_splitRend_lcld_dec.c b/lib_isar/isar_splitRend_lcld_dec.c index 723888709..e1ddadf35 100644 --- a/lib_isar/isar_splitRend_lcld_dec.c +++ b/lib_isar/isar_splitRend_lcld_dec.c @@ -48,6 +48,7 @@ * * *------------------------------------------------------------------------*/ + ivas_error isar_splitBinLCLDDecOpen( ISAR_BIN_HR_SPLIT_LCLD_DEC_HANDLE *hSplitBinLCLDDec, const Word32 iSampleRate, @@ -55,7 +56,7 @@ ivas_error isar_splitBinLCLDDecOpen( const Word16 iNumBlocks, const Word16 iNumIterations ) { - int16_t n; + Word16 n; ISAR_BIN_HR_SPLIT_LCLD_DEC_HANDLE splitBinLCLDDec; ivas_error error; @@ -240,7 +241,7 @@ void isar_splitBinLCLDDecProcess( *Q_cldfb_final = 11; } /* continue concealing */ - isar_splitBinRendPLC( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (int16_t) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations, GetDecodingFailedStatus( hSplitBinLCLDDec->psLCLDDecoder ), *Q_cldfb_final ); + isar_splitBinRendPLC( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (Word16) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations, GetDecodingFailedStatus( hSplitBinLCLDDec->psLCLDDecoder ), *Q_cldfb_final ); } IF( AnyDecodingFailedPrev( hSplitBinLCLDDec->psLCLDDecoder ) ) { @@ -260,7 +261,7 @@ void isar_splitBinLCLDDecProcess( *Q_cldfb_final = 11; } /* cross-fade recovered frame into good frame */ - isar_splitBinRendPLC_xf_fx( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (int16_t) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations, GetDecodingFailedStatus( hSplitBinLCLDDec->psLCLDDecoder ), GetDecodingFailedPrevStatus( hSplitBinLCLDDec->psLCLDDecoder ), *Q_cldfb_final ); + isar_splitBinRendPLC_xf_fx( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (Word16) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations, GetDecodingFailedStatus( hSplitBinLCLDDec->psLCLDDecoder ), GetDecodingFailedPrevStatus( hSplitBinLCLDDec->psLCLDDecoder ), *Q_cldfb_final ); } } } @@ -270,11 +271,11 @@ void isar_splitBinLCLDDecProcess( SetDecodingUnresolved( hSplitBinLCLDDec->psLCLDDecoder ); /* do PLC for lost split renderer frame */ - isar_splitBinRendPLC( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (int16_t) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations, GetDecodingFailedStatus( hSplitBinLCLDDec->psLCLDDecoder ), *Q_cldfb_final ); + isar_splitBinRendPLC( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (Word16) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations, GetDecodingFailedStatus( hSplitBinLCLDDec->psLCLDDecoder ), *Q_cldfb_final ); } /* save PLC state */ - isar_splitBinRendPLCsaveState( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (int16_t) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations ); + isar_splitBinRendPLCsaveState( hSplitBinLCLDDec->hSplitRendPLC, Cldfb_Out_Real_fx, Cldfb_Out_Imag_fx, (Word16) hSplitBinLCLDDec->iChannels, hSplitBinLCLDDec->iNumBlocks, hSplitBinLCLDDec->iNumIterations ); hSplitBinLCLDDec->hSplitRendPLC->CldfbPLC_state.Q_Prev_Bin_fx = *Q_cldfb_final; move16(); pop_wmops(); diff --git a/lib_isar/isar_splitRend_lcld_enc.c b/lib_isar/isar_splitRend_lcld_enc.c index e75910e8c..e6efe1ff2 100644 --- a/lib_isar/isar_splitRend_lcld_enc.c +++ b/lib_isar/isar_splitRend_lcld_enc.c @@ -124,7 +124,7 @@ void isar_splitBinLCLDEncClose( { DeleteLCLDEncoder( ( *hSplitBinLCLDEnc )->psLCLDEncoder ); - FOR( int16_t n = 0; n < ( *hSplitBinLCLDEnc )->iChannels; n++ ) + FOR( Word16 n = 0; n < ( *hSplitBinLCLDEnc )->iChannels; n++ ) { free( ( *hSplitBinLCLDEnc )->pppfLCLDReal_fx[n] ); free( ( *hSplitBinLCLDEnc )->pppfLCLDImag_fx[n] ); diff --git a/lib_isar/isar_splitRendererPLC.c b/lib_isar/isar_splitRendererPLC.c index af0fe79fd..60eeff746 100644 --- a/lib_isar/isar_splitRendererPLC.c +++ b/lib_isar/isar_splitRendererPLC.c @@ -1157,6 +1157,7 @@ void isar_splitBinRendPLC_xf_fx( * * Conceal bad frame *------------------------------------------------------------------------*/ + void isar_splitBinRendPLC( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, Word32 Cldfb_RealBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], @@ -1164,7 +1165,7 @@ void isar_splitBinRendPLC( const Word16 num_chs, const Word16 iNumBlocks, const Word16 iNumIterations, - int32_t **ppiDecodingFailed, + Word32 **ppiDecodingFailed, Word16 exp ) { Word32 i, n, k; @@ -1276,8 +1277,8 @@ void isar_splitBinRendPLC( { FOR( k = 0; k < iNumCols; k++ ) { - v_multc_fixed( &Cldfb_RealBuffer_Binaural_fx[n][k][0], fade_fac_fx, &Cldfb_RealBuffer_Binaural_fx[n][k][0], (int16_t) CLDFB_NO_CHANNELS_MAX ); - v_multc_fixed( &Cldfb_ImagBuffer_Binaural_fx[n][k][0], fade_fac_fx, &Cldfb_ImagBuffer_Binaural_fx[n][k][0], (int16_t) CLDFB_NO_CHANNELS_MAX ); + v_multc_fixed( &Cldfb_RealBuffer_Binaural_fx[n][k][0], fade_fac_fx, &Cldfb_RealBuffer_Binaural_fx[n][k][0], (Word16) CLDFB_NO_CHANNELS_MAX ); + v_multc_fixed( &Cldfb_ImagBuffer_Binaural_fx[n][k][0], fade_fac_fx, &Cldfb_ImagBuffer_Binaural_fx[n][k][0], (Word16) CLDFB_NO_CHANNELS_MAX ); } } } @@ -1287,8 +1288,8 @@ void isar_splitBinRendPLC( { FOR( k = 0; k < iNumCols; k++ ) { - set_val_Word32( &Cldfb_RealBuffer_Binaural_fx[n][k][0], 0, (int16_t) CLDFB_NO_CHANNELS_MAX ); - set_val_Word32( &Cldfb_ImagBuffer_Binaural_fx[n][k][0], 0, (int16_t) CLDFB_NO_CHANNELS_MAX ); + set_val_Word32( &Cldfb_RealBuffer_Binaural_fx[n][k][0], 0, (Word16) CLDFB_NO_CHANNELS_MAX ); + set_val_Word32( &Cldfb_ImagBuffer_Binaural_fx[n][k][0], 0, (Word16) CLDFB_NO_CHANNELS_MAX ); } } hSplitRendPLC->bf_count = mute_cntr; diff --git a/lib_isar/isar_splitRendererPost.c b/lib_isar/isar_splitRendererPost.c index 09e2d7fc2..f27d2f6a0 100644 --- a/lib_isar/isar_splitRendererPost.c +++ b/lib_isar/isar_splitRendererPost.c @@ -673,14 +673,14 @@ void isar_splitBinPostRendMdDec_fx( num_bits = isar_renderSplitGetRot_axisNumBits( split_rend_config.dof ); if ( num_bits > 0 ) { - axis_code = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, (int32_t) num_bits ); + axis_code = (Word16) ISAR_SPLIT_REND_BITStream_read_int32( pBits, (Word32) num_bits ); } else { axis_code = 0; } rot_axis = isar_renderSplitGetRot_axisFromCode( split_rend_config.dof, axis_code ); - ro_md_flag = (int16_t) ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_RO_FLAG_BITS ); + ro_md_flag = (Word16) ISAR_SPLIT_REND_BITStream_read_int32( pBits, ISAR_SPLIT_REND_RO_FLAG_BITS ); isar_renderSplitGetMultiBinPoseData_fx( &split_rend_config, pMultiBinPoseData, rot_axis ); set_fix_rotation_mat_fx( hBinHrSplitPostRend->fix_pos_rot_mat_fx, pMultiBinPoseData ); @@ -727,8 +727,11 @@ void isar_splitBinPostRendMdDec_fx( pred_imag_bands_roll, ro_md_flag, &num_quant_strats ); + quant_strat_bits = L_deposit_l( ceil_log_2( num_quant_strats ) ); + is_huff_coding = ISAR_SPLIT_REND_BITStream_read_int32( pBits, 1 ); + quant_strat = ISAR_SPLIT_REND_BITStream_read_int32( pBits, quant_strat_bits ); IF( EQ_32( is_huff_coding, 0 ) ) @@ -1085,6 +1088,7 @@ static void wrap_around_ypr_fx( * * *-----------------------------------------------------------------------------------------*/ + static Word32 get_interp_fact_fx( Word32 p_fx[MAX_HEAD_ROT_POSES], const Word32 p_t_fx, @@ -1092,6 +1096,7 @@ static Word32 get_interp_fact_fx( Word16 *exp ) { Word32 n_fx, d_fx, interp_fact_fx; + *exp = 31; move16(); IF( NE_16( ind[0], ind[1] ) ) @@ -1102,6 +1107,7 @@ static Word32 get_interp_fact_fx( move32(); interp_fact_fx = L_deposit_h( BASOP_Util_Divide3232_Scale( d_fx, n_fx, exp ) ); // Q31-exp move32(); + IF( LT_32( interp_fact_fx, 0 ) ) { d_fx = max( -( MAX_EXTRAPOLATION_ANGLE_Q22 ), ( min( ( MAX_EXTRAPOLATION_ANGLE_Q22 ), d_fx ) ) ); @@ -1119,14 +1125,17 @@ static Word32 get_interp_fact_fx( interp_fact_fx = 0; move32(); } + return interp_fact_fx; } + /*-----------------------------------------------------------------------------------------* * Function get_nearest_pose_ind() * * *-----------------------------------------------------------------------------------------*/ + static void get_nearest_pose_ind_fx( Word32 p[MAX_HEAD_ROT_POSES], const Word32 p_t, @@ -1171,13 +1180,14 @@ static void get_nearest_pose_ind_fx( * * *-----------------------------------------------------------------------------------------*/ + static void get_interpolation_vars( MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, const IVAS_QUATERNION *Quaternions_ref, const IVAS_QUATERNION *Quaternions_act, - int16_t interp_yaw_pose_idx[2], - int16_t interp_pitch_pose_idx[2], - int16_t interp_roll_pose_idx[2], + Word16 interp_yaw_pose_idx[2], + Word16 interp_pitch_pose_idx[2], + Word16 interp_roll_pose_idx[2], Word32 *interp_yaw_fact_fx, Word32 *interp_pitch_fact_fx, Word32 *interp_roll_fact_fx, @@ -1188,7 +1198,7 @@ static void get_interpolation_vars( IVAS_QUATERNION quaternions_diff, quaternions_ref_euler, quaternions_act_euler, quaternions_ref_q22, quaternions_act_q22; Word32 y_fx[MAX_HEAD_ROT_POSES], p_fx[MAX_HEAD_ROT_POSES], r_fx[MAX_HEAD_ROT_POSES]; - int16_t pos_idx, num_poses; + Word16 pos_idx, num_poses; Word16 exp; quaternions_diff.x_fx = 0; @@ -1250,11 +1260,13 @@ static void get_interpolation_vars( return; } + /*-----------------------------------------------------------------------------------------* * Function interpolate_pred_matrix() * * *-----------------------------------------------------------------------------------------*/ + static void interpolate_pred_matrix_fx( ISAR_BIN_HR_SPLIT_REND_MD rot_md[][MAX_SPLIT_MD_SUBFRAMES][MAX_SPLIT_REND_MD_BANDS], const Word16 sf_idx, @@ -1366,6 +1378,8 @@ static void interpolate_pred_matrix_fx( return; } + + /*-----------------------------------------------------------------------------------------* * Function interpolate_rend_md() * @@ -1568,11 +1582,13 @@ static void interpolate_rend_md_fx( return; } + /*-----------------------------------------------------------------------------------------* * Function isar_SplitRenderer_PostRenderer() * * *-----------------------------------------------------------------------------------------*/ + #ifndef FIX_1372_ISAR_POST_REND void isar_SplitRenderer_PostRenderer( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinPostRenderer, /* i/o: binaural renderer handle */ @@ -1590,8 +1606,8 @@ void isar_SplitRenderer_PostRenderer( Word16 *Q_in ) #endif { - int16_t pos_idx, b, brange[2], ch_idx1; - int16_t num_md_bands, slot_idx, b2, index_slot, num_slots, sf_idx_md; + Word16 pos_idx, b, brange[2], ch_idx1; + Word16 num_md_bands, slot_idx, b2, index_slot, num_slots, sf_idx_md; Word32 gd_int_fx; #ifndef FIX_1372_ISAR_POST_REND Word32 pred_out_re_fx[BINAURAL_CHANNELS], pred_out_im_fx[BINAURAL_CHANNELS]; @@ -1603,7 +1619,7 @@ void isar_SplitRenderer_PostRenderer( Word16 shift64 = 63; #endif ISAR_BIN_HR_SPLIT_REND_MD rot_md_act[1][MAX_SPLIT_REND_MD_BANDS]; - int16_t interp_yaw_pose_idx[2], interp_pitch_pose_idx[2], interp_roll_pose_idx[2]; + Word16 interp_yaw_pose_idx[2], interp_pitch_pose_idx[2], interp_roll_pose_idx[2]; Word32 interp_yaw_fact_fx, interp_pitch_fact_fx, interp_roll_fact_fx; Word16 Q_yaw = Q31, Q_pitch = Q31, Q_roll = Q31; Word32 mix_mat_re_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS]; @@ -1611,7 +1627,7 @@ void isar_SplitRenderer_PostRenderer( Word16 fade_fx; Word32 *pMix_mat_re_prev_fx[BINAURAL_CHANNELS]; Word32 *pMix_mat_im_prev_fx[BINAURAL_CHANNELS]; - const int16_t *pBand_grouping = isar_split_rend_band_grouping; + const Word16 *pBand_grouping = isar_split_rend_band_grouping; num_md_bands = MAX_SPLIT_REND_MD_BANDS; @@ -1788,15 +1804,18 @@ void isar_SplitRenderer_PostRenderer( } } hBinPostRenderer->cf_flag = 1; + pop_wmops(); return; } + /*-----------------------------------------------------------------------------------------* * Function isar_rend_CldfbSplitPostRendProcessTdIn() * * *-----------------------------------------------------------------------------------------*/ + static void isar_rend_CldfbSplitPostRendProcessTdIn( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, @@ -1804,7 +1823,7 @@ static void isar_rend_CldfbSplitPostRendProcessTdIn( Word32 output_fx[][L_FRAME48k], Word16 *Q_out ) { - int16_t ch_idx, slot_idx, num_cldfb_bands; + Word16 ch_idx, slot_idx, num_cldfb_bands; Word32 Cldfb_RealBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX] = { 0 }; Word32 Cldfb_ImagBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX] = { 0 }; num_cldfb_bands = hBinHrSplitPostRend->cldfbSyn[0]->no_channels; @@ -1865,11 +1884,14 @@ static void isar_rend_CldfbSplitPostRendProcessTdIn( return; } + + /*-----------------------------------------------------------------------------------------* * Function isar_rend_CldfbSplitPostRendProcess() * * *-----------------------------------------------------------------------------------------*/ + void isar_rend_CldfbSplitPostRendProcess( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, @@ -1881,7 +1903,7 @@ void isar_rend_CldfbSplitPostRendProcess( Word16 *Q_out, const Word16 cldfb_in_flag ) { - int16_t ch_idx, slot_idx, num_cldfb_bands; + Word16 ch_idx, slot_idx, num_cldfb_bands; push_wmops( "isar_rend_CldfbSplitPostRendProcess" ); @@ -1931,6 +1953,7 @@ void isar_rend_CldfbSplitPostRendProcess( return; } + /*-----------------------------------------------------------------------------------------* * Function isar_init_split_post_rend_handles() * diff --git a/lib_isar/isar_splitRendererPre.c b/lib_isar/isar_splitRendererPre.c index cfd192647..d16de43e0 100644 --- a/lib_isar/isar_splitRendererPre.c +++ b/lib_isar/isar_splitRendererPre.c @@ -48,15 +48,8 @@ #ifdef DBG_WAV_WRITER #include "string.h" #endif -#include "prot_fx.h" #include "basop_util.h" -/*---------------------------------------------------------------------* - * Local function declarations - *---------------------------------------------------------------------*/ - -static void isar_SplitRenderer_GetRotMd_fx( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, Word32 Cldfb_RealBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 exp_cldfb_re, Word32 Cldfb_ImagBuffer_Ref_Binaural_fx[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word16 exp_cldfb_im, const Word16 low_res, const Word16 ro_md_flag ); - /*------------------------------------------------------------------------- * Local functions @@ -206,7 +199,6 @@ static void isar_calc_mat_inv_2by2_complex_fx( ivas_cmult_fix( det_re_fx, exp_det_re, L_negate( det_im_fx ), exp_det_im, in_re_fx[1][0], exp_in_re, in_im_fx[1][0], exp_in_im, &re_fx, &im_fx, &exp_re, &exp_im ); - Word64 tmp11 = W_mult_32_32( L_negate( re_fx ), det_fx ); Word16 tmp11_nrm = W_norm( tmp11 ); out_re_fx[1][0] = W_extract_h( W_shl( tmp11, tmp11_nrm ) ); @@ -902,10 +894,11 @@ static void isar_split_rend_huffman_encode( return; } + static void isar_split_rend_quant_md_fx( ISAR_BIN_HR_SPLIT_REND_MD_HANDLE hMd, const ISAR_SPLIT_REND_POSE_TYPE pose_type, - const int16_t real_only, + const Word16 real_only, Word32 fix_pos_rot_mat[][BINAURAL_CHANNELS], const Word32 pred_1byquantstep, // Q26 const Word16 Q_frame @@ -916,13 +909,14 @@ static void isar_split_rend_quant_md_fx( #endif ) { - int16_t ch1, ch2; - int16_t gd_idx_min; + Word16 ch1, ch2; + Word16 gd_idx_min; Word32 quant_val; #ifdef DEBUG_QUANT_MD_FX float quant_val_flt; Word16 tmp; #endif + if ( pose_type == PRED_ONLY || pose_type == PRED_ROLL_ONLY ) { Word32 onebyquantstep; @@ -1213,7 +1207,7 @@ static void ComputeCoeffs_fx( move16(); hMd->exp_pred_mat_im = hMd->exp_pred_mat_re; move16(); - for ( i = 0; i < BINAURAL_CHANNELS; i++ ) + FOR( i = 0; i < BINAURAL_CHANNELS; i++ ) { hMd->pred_mat_re_fx[i][i] = gd_tmp_fx[i]; hMd->pred_mat_re2[i] = gd_tmp_fx[i]; @@ -1856,15 +1850,16 @@ static void isar_SplitRenderer_code_md_huff( return; } + static void isar_SplitRenderer_quant_code( const ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, const IVAS_QUATERNION headPosition, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word16 low_res_pre_rend_rot, - const int16_t ro_md_flag, + const Word16 ro_md_flag, const Word32 target_md_bits, - Word16 Q_frame ) + const Word16 Q_frame ) { Word16 q, num_subframes, sf_idx, pos_idx, b, num_quant_strats; Word32 overhead_bits, quant_strat_bits, huff_bits, start_bit; @@ -1898,9 +1893,9 @@ static void isar_SplitRenderer_quant_code( rot_axis_code = isar_renderSplitGetCodeFromRot_axis( pMultiBinPoseData->dof, pMultiBinPoseData->rot_axis, &num_bits ); if ( num_bits > 0 ) { - ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) rot_axis_code, num_bits ); + ISAR_SPLIT_REND_BITStream_write_int32( pBits, (Word32) rot_axis_code, num_bits ); } - ISAR_SPLIT_REND_BITStream_write_int32( pBits, (int32_t) ro_md_flag, ISAR_SPLIT_REND_RO_FLAG_BITS ); + ISAR_SPLIT_REND_BITStream_write_int32( pBits, (Word32) ro_md_flag, ISAR_SPLIT_REND_RO_FLAG_BITS ); /* code ref pose*/ FOR( sf_idx = 0; sf_idx < num_subframes; sf_idx++ ) @@ -2053,8 +2048,7 @@ static void isar_SplitRenderer_quant_code( ISAR_SPLIT_REND_BITStream_write_int32( pBits, q, quant_strat_bits ); isar_SplitRenderer_code_md_base2( hBinHrSplitPreRend, pMultiBinPoseData, num_subframes, pred_real_bands_yaw[q], pred_imag_bands_yaw[q], - pred_quant_pnts_yaw[q], - d_bands_yaw[q], bands_pitch[q], pred_real_bands_roll[q], pred_imag_bands_roll[q], pBits ); + pred_quant_pnts_yaw[q], d_bands_yaw[q], bands_pitch[q], pred_real_bands_roll[q], pred_imag_bands_roll[q], pBits ); } BREAK; } @@ -2704,14 +2698,15 @@ ivas_error split_renderer_open_lc3plus( ivas_error error; Word16 i, delayBufferLength; LC3PLUS_CONFIG config; - int16_t isar_frame_size_ms; + Word16 isar_frame_size_ms; - if ( ( error = isar_framesize_to_ms( isar_frame_size, &isar_frame_size_ms ) ) != IVAS_ERR_OK ) + IF( ( error = isar_framesize_to_ms( isar_frame_size, &isar_frame_size_ms ) ) != IVAS_ERR_OK ) { return error; } + /* Check configuration validity */ - if ( isar_frame_size_ms < pSplitRendConfig->codec_frame_size_ms ) + IF( isar_frame_size_ms < pSplitRendConfig->codec_frame_size_ms ) { return IVAS_ERROR( IVAS_ERR_INVALID_SPLIT_REND_CONFIG, "SR codec frame doesn't fit in one output frame" ); } @@ -2738,7 +2733,7 @@ ivas_error split_renderer_open_lc3plus( /* Alocate buffers for delay compensation */ IF( pSplitRendConfig->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) { - delayBufferLength = (Word16) ( OutSampleRate / (int32_t) FRAMES_PER_SEC + hSplitRendWrapper->lc3plusDelaySamples ); + delayBufferLength = (Word16) ( OutSampleRate / (Word32) FRAMES_PER_SEC + hSplitRendWrapper->lc3plusDelaySamples ); FOR( i = 0; i < hSplitRendWrapper->multiBinPoseData.num_poses * BINAURAL_CHANNELS; ++i ) { IF( ( hSplitRendWrapper->lc3plusDelayBuffers_fx[i] = malloc( delayBufferLength * sizeof( Word32 ) ) ) == NULL ) @@ -2782,13 +2777,13 @@ ivas_error split_renderer_open_lc3plus( ivas_error splitRendLc3plusEncodeAndWrite( SPLIT_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE pBits, - const int32_t available_bits, + const Word32 available_bits, Word32 *in[], Word16 Q_sig ) { ivas_error error; - int16_t i; - int32_t lc3plusBitstreamSize; + Word16 i; + Word32 lc3plusBitstreamSize; Word32 *channel_ptrs[MAX_HEAD_ROT_POSES * 2]; Word16 Q_in[16]; assert( hSplitBin->hLc3plusEnc != NULL ); @@ -2804,12 +2799,12 @@ ivas_error splitRendLc3plusEncodeAndWrite( channel_ptrs[i] = in[i]; } - if ( ( error = IVAS_LC3PLUS_ENC_SetBitrate( hSplitBin->hLc3plusEnc, available_bits * FRAMES_PER_SEC ) ) != IVAS_ERR_OK ) + IF( ( error = IVAS_LC3PLUS_ENC_SetBitrate( hSplitBin->hLc3plusEnc, available_bits * FRAMES_PER_SEC ) ) != IVAS_ERR_OK ) { return error; } - if ( ( error = ISAR_LC3PLUS_ENC_GetOutputBitstreamSize( hSplitBin->hLc3plusEnc, &lc3plusBitstreamSize ) ) != IVAS_ERR_OK ) + IF( ( error = ISAR_LC3PLUS_ENC_GetOutputBitstreamSize( hSplitBin->hLc3plusEnc, &lc3plusBitstreamSize ) ) != IVAS_ERR_OK ) { return error; } @@ -2817,7 +2812,7 @@ ivas_error splitRendLc3plusEncodeAndWrite( /* Write bitstream */ set16_fx( Q_in, Q_sig, 16 ); move16(); - if ( ( error = ISAR_LC3PLUS_ENC_Encode( hSplitBin->hLc3plusEnc, channel_ptrs, &pBits->bits_buf[pBits->bits_written / 8], lc3plusBitstreamSize, Q_in ) ) != IVAS_ERR_OK ) + IF( ( error = ISAR_LC3PLUS_ENC_Encode( hSplitBin->hLc3plusEnc, channel_ptrs, &pBits->bits_buf[pBits->bits_written / 8], lc3plusBitstreamSize, Q_in ) ) != IVAS_ERR_OK ) { return error; } @@ -2825,8 +2820,8 @@ ivas_error splitRendLc3plusEncodeAndWrite( pBits->bits_written += 8 * lc3plusBitstreamSize; pBits->codec = ISAR_SPLIT_REND_CODEC_LC3PLUS; pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; - pBits->codec_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 ); - pBits->isar_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.isar_frame_duration_us / 1000 ); + pBits->codec_frame_size_ms = (Word16) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 ); + pBits->isar_frame_size_ms = (Word16) ( hSplitBin->hLc3plusEnc->config.isar_frame_duration_us / 1000 ); return IVAS_ERR_OK; } @@ -2842,7 +2837,7 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( SPLIT_REND_WRAPPER *hSplitBin, const IVAS_QUATERNION headPosition, const Word32 SplitRendBitRate, - const int16_t isar_frame_size_ms, + const Word16 isar_frame_size_ms, const Word16 codec_frame_size_ms, ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word16 max_bands, @@ -2854,7 +2849,7 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( const Word16 ro_md_flag ) { ivas_error error; - int32_t bit_len, available_bits, target_md_bits, tmp_32; + Word32 bit_len, available_bits, target_md_bits, tmp_32; Word16 num_cldfb_bands, ch, slot_idx, pos_idx, num_poses; Word16 tmp, tmp_e; Word32 Cldfb_In_BinReal_fx[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] = { 0 }; diff --git a/lib_isar/isar_splitRenderer_utils.c b/lib_isar/isar_splitRenderer_utils.c index a962e3700..29f1c7e40 100644 --- a/lib_isar/isar_splitRenderer_utils.c +++ b/lib_isar/isar_splitRenderer_utils.c @@ -539,6 +539,7 @@ void isar_SplitRenderer_getdiagdiff( * * *------------------------------------------------------------------------*/ + Word32 ISAR_SPLIT_REND_BITStream_read_int32( ISAR_SPLIT_REND_BITS_HANDLE pBits, const Word32 bits ) @@ -1276,7 +1277,7 @@ void isar_init_multi_bin_pose_data_fx_enc( ivas_error isar_framesize_to_ms( const IVAS_RENDER_FRAMESIZE frame_size, /* i : frame size enum */ - int16_t *ms /* o : frame size in ms */ + Word16 *ms /* o : frame size in ms */ ) { switch ( frame_size ) @@ -1297,6 +1298,7 @@ ivas_error isar_framesize_to_ms( return IVAS_ERR_OK; } + /*------------------------------------------------------------------------- * Function isar_split_rend_choose_default_codec() * @@ -1305,7 +1307,7 @@ ivas_error isar_framesize_to_ms( ivas_error isar_split_rend_choose_default_codec( ISAR_SPLIT_REND_CODEC *pCodec, /* i/o: pointer to codec setting */ - int16_t *pIsar_frame_size_ms, /* i/o: pointer to ISAR frame size setting */ + Word16 *pIsar_frame_size_ms, /* i/o: pointer to ISAR frame size setting */ Word16 *pCodec_frame_size_ms, /* i/o: pointer to codec frame size setting */ const Word16 cldfb_in_flag, /* i : flag indicating rendering in TD */ const Word16 pcm_out_flag, /* i : flag to indicate PCM output */ diff --git a/lib_isar/lib_isar_post_rend.c b/lib_isar/lib_isar_post_rend.c index 6a167672e..23cb4ed7f 100644 --- a/lib_isar/lib_isar_post_rend.c +++ b/lib_isar/lib_isar_post_rend.c @@ -37,18 +37,12 @@ #include "isar_prot.h" #include "prot_fx.h" #include "ivas_prot_fx.h" -#include "prot_fx.h" #include "ivas_prot_rend_fx.h" #include #include #include "wmc_auto.h" -#include "prot_fx.h" -/*-------------------------------------------------------------------* - * Local constants - *-------------------------------------------------------------------*/ - /*-------------------------------------------------------------------* * Local types *-------------------------------------------------------------------*/ @@ -70,10 +64,10 @@ typedef struct * const ensures that this data is only read, but not modified by the rendering functions. */ typedef struct { - const int32_t *pOutSampleRate; + const Word32 *pOutSampleRate; const AUDIO_CONFIG *pOutConfig; const ISAR_POST_REND_HeadRotData *pHeadRotData; - const int16_t *pSplitRendBFI; + const Word16 *pSplitRendBFI; const ISAR_SPLIT_REND_CONFIG_DATA *pSplitRenderConfig; } rendering_context_isar; @@ -120,8 +114,9 @@ struct ISAR_POST_REND Word16 num_subframes; }; + /*-------------------------------------------------------------------* - * getAudioConfigType() + * isar_getAudioConfigType() * * *-------------------------------------------------------------------*/ @@ -147,9 +142,6 @@ ISAR_POST_REND_AudioConfigType isar_getAudioConfigType( return type; } -/*-------------------------------------------------------------------* - * Local function prototypes - *-------------------------------------------------------------------*/ /*-------------------------------------------------------------------* * Local functions @@ -191,6 +183,7 @@ static IVAS_QUATERNION quaternionInit( return q; } + static void convertBitsBufferToInternalBitsBuff( const ISAR_POST_REND_BitstreamBuffer outBits, ISAR_SPLIT_REND_BITS_HANDLE hBits ) @@ -208,6 +201,7 @@ static void convertBitsBufferToInternalBitsBuff( return; } + static void convertInternalBitsBuffToBitsBuffer( ISAR_POST_REND_BitstreamBuffer *hOutBits, const ISAR_SPLIT_REND_BITS_DATA bits ) @@ -286,11 +280,11 @@ static void accumulate2dArrayToBuffer_fx( #ifndef DISABLE_LIMITER /*! r: number of clipped output samples */ static Word32 limitRendererOutput_fx( - IVAS_LIMITER_HANDLE hLimiter, /* i/o: limiter struct handle */ - Word32 *output, /* i/o: I/O buffer */ - const Word16 output_frame, /* i : number of samples per channel in the buffer */ - const Word32 threshold, /* i : signal amplitude above which limiting starts to be applied */ - Word16 q_factor ) /* i : q factor of output samples */ + IVAS_LIMITER_HANDLE hLimiter, /* i/o: limiter struct handle */ + Word32 *output, /* i/o: I/O buffer */ + const Word16 output_frame, /* i : number of samples per channel in the buffer */ + const Word32 threshold, /* i : signal amplitude above which limiting starts to be applied */ + Word16 q_factor ) /* i : q factor of output samples */ { Word16 i; Word32 **channels; @@ -298,6 +292,8 @@ static Word32 limitRendererOutput_fx( Word32 numClipping = 0; /* return early if given bad parameters */ + test(); + test(); IF( hLimiter == NULL || output == NULL || output_frame <= 0 ) { return 0; @@ -600,6 +596,7 @@ static void clearInputSplitRend( * * *------------------------------------------------------------------------*/ + ivas_error ISAR_POST_REND_open( ISAR_POST_REND_HANDLE *phIvasRend, /* i/o: Pointer to renderer handle */ const Word32 outputSampleRate, /* i : output sampling rate */ @@ -920,7 +917,7 @@ ivas_error ISAR_POST_REND_AddInput( } *inputId = makeInputId( inConfig, inputIndex ); - if ( ( error = activateInput( (uint8_t *) inputsArray + inputStructSize * inputIndex, inConfig, *inputId, &hIvasRend->splitRenderConfig ) ) != IVAS_ERR_OK ) + IF( ( error = activateInput( (UWord8 *) inputsArray + inputStructSize * inputIndex, inConfig, *inputId, &hIvasRend->splitRenderConfig ) ) != IVAS_ERR_OK ) { return error; } @@ -996,7 +993,7 @@ ivas_error ISAR_POST_REND_GetDelay( latency_ns = 0; IF( hIvasRend->inputsSplitPost[i].splitPostRendWrapper.hLc3plusDec != NULL ) { - int32_t lc3plusDelaySamples; + Word32 lc3plusDelaySamples; ISAR_LC3PLUS_DEC_GetDelay( hIvasRend->inputsSplitPost[i].splitPostRendWrapper.hLc3plusDec, &lc3plusDelaySamples ); latency_ns = (Word32) ( ( ( (Word64) lc3plusDelaySamples * 1000000000 ) + ( *timeScale / 2 ) ) / *timeScale ); } @@ -1272,7 +1269,7 @@ static ivas_error splitBinLc3plusDecode( ISAR_SPLIT_POST_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE bits, Word32 outputBuffer[BINAURAL_CHANNELS][L_FRAME48k], - const int16_t SplitRendBFI ) + const Word16 SplitRendBFI ) { ivas_error error; Word32 *channel_ptrs[MAX_HEAD_ROT_POSES * 2]; @@ -1328,7 +1325,7 @@ static ivas_error renderSplitBinauralWithPostRot( Word32 Cldfb_ImagBuffer_Binaural_5ms_fx[MAX_PARAM_SPATIAL_SUBFRAMES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX] = { 0 }; IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES]; - int16_t sf_idx, ch_idx; + Word16 sf_idx, ch_idx; ISAR_SPLIT_REND_BITS_DATA bits; Word32 tmpCrendBuffer_fx[BINAURAL_CHANNELS][L_FRAME48k] = { 0 }; Word32 tmpCrendBuffer_sf_fx[BINAURAL_CHANNELS][L_FRAME48k] = { 0 }; @@ -1404,7 +1401,7 @@ static ivas_error renderSplitBinauralWithPostRot( { isPostRendInputCldfb = 1; } - numSamplesPerChannelCacheSize = (int16_t) ( *splitBinInput->base.ctx.pOutSampleRate * bits.isar_frame_size_ms / 1000 ) - outBufNumSamplesPerChannel; + numSamplesPerChannelCacheSize = (Word16) ( *splitBinInput->base.ctx.pOutSampleRate * bits.isar_frame_size_ms / 1000 ) - outBufNumSamplesPerChannel; outBufNumColPerChannel = MAX_PARAM_SPATIAL_SUBFRAMES; numColPerChannelCacheSize = sub( DEPR_i_mult( iNumBlocksPerFrame, iNumLCLDIterationsPerFrame ), outBufNumColPerChannel ); @@ -1641,9 +1638,10 @@ static ivas_error renderActiveInputsSplitBin( ISAR_POST_REND_HANDLE hIvasRend, IVAS_REND_AudioBuffer outAudio ) { - int16_t i; + Word16 i; input_split_post_rend *pCurrentInput; ivas_error error; + pCurrentInput = hIvasRend->inputsSplitPost; FOR( i = 0; i < RENDERER_MAX_BIN_INPUTS; ++i ) { @@ -1799,19 +1797,21 @@ void ISAR_POST_REND_Close( * *-------------------------------------------------------------------*/ + ivas_error ISAR_REND_SetSplitRendBitstreamHeader( ISAR_POST_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const ISAR_SPLIT_REND_CODEC codec, /* o : codec setting */ const ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection, /* o : pose correction mode */ - const int16_t codec_frame_size_ms, /* i : codec frame size setting */ - const int16_t isar_frame_size_ms, /* i : ISAR codec frame size setting */ - const int16_t lc3plus_highres /* i : LC3plus Hig-Res setting. Ignored if codec is not LC3plus */ + const Word16 codec_frame_size_ms, /* i : codec frame size setting */ + const Word16 isar_frame_size_ms, /* i : ISAR codec frame size setting */ + const Word16 lc3plus_highres /* i : LC3plus Hig-Res setting. Ignored if codec is not LC3plus */ ) { IF( hIvasRend == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } + hIvasRend->splitRenderConfig.codec = codec; hIvasRend->splitRenderConfig.isar_frame_size_ms = isar_frame_size_ms; hIvasRend->splitRenderConfig.codec_frame_size_ms = codec_frame_size_ms; diff --git a/lib_isar/lib_isar_post_rend.h b/lib_isar/lib_isar_post_rend.h index ff8c98361..ba22fba6a 100644 --- a/lib_isar/lib_isar_post_rend.h +++ b/lib_isar/lib_isar_post_rend.h @@ -50,20 +50,20 @@ typedef struct { - int32_t bufLenInBytes; - int32_t bitsWritten; - int32_t bitsRead; + Word32 bufLenInBytes; + Word32 bitsWritten; + Word32 bitsRead; ISAR_SPLIT_REND_CODEC codec; ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection; - int16_t codec_frame_size_ms; - int16_t isar_frame_size_ms; - int16_t lc3plusHighRes; + Word16 codec_frame_size_ms; + Word16 isar_frame_size_ms; + Word16 lc3plusHighRes; } ISAR_POST_REND_BitstreamBufferConfig; typedef struct { ISAR_POST_REND_BitstreamBufferConfig config; - uint8_t *bits; + UWord8 *bits; } ISAR_POST_REND_BitstreamBuffer; typedef enum @@ -81,7 +81,7 @@ typedef struct typedef struct ISAR_POST_REND *ISAR_POST_REND_HANDLE; typedef struct ISAR_POST_REND const *ISAR_POST_REND_CONST_HANDLE; -typedef uint16_t ISAR_POST_REND_InputId; +typedef UWord16 ISAR_POST_REND_InputId; typedef enum _ISAR_POST_REND_COMPLEXITY_LEVEL { diff --git a/lib_isar/lib_isar_pre_rend.c b/lib_isar/lib_isar_pre_rend.c index b77c9a54c..5ac36bfd8 100644 --- a/lib_isar/lib_isar_pre_rend.c +++ b/lib_isar/lib_isar_pre_rend.c @@ -47,22 +47,6 @@ #include "wmc_auto.h" -/*-------------------------------------------------------------------* - * Local constants - *-------------------------------------------------------------------*/ - -/*-------------------------------------------------------------------* - * Local types - *-------------------------------------------------------------------*/ - -/*-------------------------------------------------------------------* - * Local function prototypes - *-------------------------------------------------------------------*/ - -/*-------------------------------------------------------------------* - * Local functions - *-------------------------------------------------------------------*/ - /*------------------------------------------------------------------------- * Function ISAR_PRE_REND_open() * @@ -278,9 +262,9 @@ void ISAR_PRE_REND_close( *-------------------------------------------------------------------------*/ void ISAR_PRE_REND_GetMultiBinPoseData( - const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i: Split renderer pre-renerer config */ - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ - const ISAR_SPLIT_REND_ROT_AXIS rot_axis /* i: Rotation axis */ + const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i : Split renderer pre-renerer config */ + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ + const ISAR_SPLIT_REND_ROT_AXIS rot_axis /* i : Rotation axis */ ) { isar_renderSplitGetMultiBinPoseData_fx( pSplit_rend_config, pMultiBinPoseData, rot_axis ); @@ -320,13 +304,9 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( Word16 i, j; error = IVAS_ERR_OK; Word16 Q_buff_re, Q_buff_im; + push_wmops( "ISAR_PRE_REND_MultiBinToSplitBinaural" ); -#ifdef CLDFB_SYNTH_DEBUG - /* FILE *fp = fopen( "Fixed_code_output.txt", "ab+" ); - FILE *fp1 = fopen( "Fixed_code_cldfb_state.txt", "ab+" ); - FILE *fp = fopen( "Float_code_output.txt", "ab+" ); - FILE *fp1 = fopen( "Float_code_cldfb_state.txt", "ab+" );*/ -#endif + Q_buff_re = Q_buff; move16(); Q_buff_im = Q_buff; @@ -578,7 +558,5 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( } pop_wmops(); - /* fclose(fp); - fclose(fp1);*/ return error; } diff --git a/lib_isar/lib_isar_pre_rend.h b/lib_isar/lib_isar_pre_rend.h index 66ab6c666..772637db9 100644 --- a/lib_isar/lib_isar_pre_rend.h +++ b/lib_isar/lib_isar_pre_rend.h @@ -44,11 +44,11 @@ ivas_error ISAR_PRE_REND_open( SPLIT_REND_WRAPPER *hSplitBinRend, /* i/o: Split renderer pre-renerer handle */ ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, /* i/o: Split renderer pre-renerer config */ - const int32_t output_Fs, /* i : output sampling rate */ - const int16_t cldfb_in_flag, /* i : Flag to indicate CLDFB or time doamin input */ - const int16_t pcm_out_flag, /* i : Flag to indicate PCM output */ + const Word32 output_Fs, /* i : output sampling rate */ + const Word16 cldfb_in_flag, /* i : Flag to indicate CLDFB or time doamin input */ + const Word16 pcm_out_flag, /* i : Flag to indicate PCM output */ const IVAS_RENDER_FRAMESIZE ivas_frame_size, /* i : IVAS frame size */ - const int16_t mixed_td_cldfb_flag /* i : Flag to indicate combined TD and CLDFB input */ + const Word16 mixed_td_cldfb_flag /* i : Flag to indicate combined TD and CLDFB input */ ); void ISAR_PRE_REND_close( -- GitLab From e82e1cac2c861fc3b5c019ae4f14ca522106ac43 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 6 Aug 2025 16:13:09 +0200 Subject: [PATCH 4/9] port MR, part4 --- lib_isar/isar_cnst.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib_isar/isar_cnst.h b/lib_isar/isar_cnst.h index 2fcfb13f1..9e8793130 100644 --- a/lib_isar/isar_cnst.h +++ b/lib_isar/isar_cnst.h @@ -90,16 +90,22 @@ typedef enum #define ISAR_SPLIT_REND_PRED_31QUANT_PNTS 31 #define ISAR_SPLIT_REND_ROLL_PRED_QUANT_PNTS 31 #define ISAR_SPLIT_REND_D_QUANT_PNTS 15 +#ifdef DEBUG_QUANT_MD_FX #define ISAR_SPLIT_REND_PRED_MIN_VAL -1.4f #define ISAR_SPLIT_REND_PRED_MAX_VAL 1.4f +#endif +#ifdef DEBUG_QUANT_MD_FX #define ISAR_SPLIT_REND_PITCH_G_MIN_VAL 0.5f #define ISAR_SPLIT_REND_PITCH_G_MAX_VAL 1.5f +#endif #define ISAR_SPLIT_REND_PITCH_G_MIN_VAL_Q30 (1<<29) //0.5f in Q30 #define ISAR_SPLIT_REND_PITCH_G_MAX_VAL_Q30 1610612736 //1.5f in Q30 #define ISAR_SPLIT_REND_PITCH_G_QUANT_PNTS ISAR_SPLIT_REND_D_QUANT_PNTS +#ifdef DEBUG_QUANT_MD_FX #define ISAR_SPLIT_REND_D_MIN_VAL 0.0f #define ISAR_SPLIT_REND_D_MAX_VAL 1.0f +#endif #define ISAR_SPLIT_REND_D_MIN_VAL_FX 0 //Q31 #define ISAR_SPLIT_REND_D_MAX_VAL_FX MAX_32 //Q31 -- GitLab From 510da55d5611130f79b0460ef76b30326dc46165 Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 9 Aug 2025 12:55:59 +0200 Subject: [PATCH 5/9] - port No. 223 (with parts from No. 221) and No. 331 --- apps/decoder.c | 2 +- lib_dec/lib_dec_fx.c | 7 +- lib_rend/lib_rend.h | 94 ++++++++++---------- lib_rend/lib_rend_fx.c | 196 ++++++++++++++++++++++++++++++++--------- 4 files changed, 208 insertions(+), 91 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 9dcd22043..88c17d08d 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -258,7 +258,7 @@ int main( if ( arg.hrtfReaderEnabled ) { /* sanity check */ - if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) + if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { arg.hrtfReaderEnabled = false; fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" ); diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 7ed15b9e2..f8618e0b5 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -2837,9 +2837,12 @@ ivas_error IVAS_DEC_FeedRenderConfig( hRenderConfig->split_rend_config.poseCorrectionMode = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE; } - IF( ( error = isar_split_rend_validate_config( &hRenderConfig->split_rend_config, ( hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK ) + IF( is_split_rendering_enabled( hIvasDec->st_ivas->hDecoderConfig, hRenderConfig ) ) { - return error; + IF( ( error = isar_split_rend_validate_config( &hRenderConfig->split_rend_config, ( hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK ) + { + return error; + } } return IVAS_ERR_OK; diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 97261956a..26318818a 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -189,29 +189,29 @@ ivas_error IVAS_REND_GetDelay( /*! r: error code */ ivas_error IVAS_REND_GetHrtfHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS rendder handle */ - IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS rendder handle */ + IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ ); /*! r: error code */ ivas_error IVAS_REND_GetHrtfCRendHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ - IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ + IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */ ); ivas_error IVAS_REND_GetHrtfFastConvHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ - IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv /* o : FASTCONV HRTF handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ + IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv /* o : FASTCONV HRTF handle */ ); ivas_error IVAS_REND_GetHrtfParamBinHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ - IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o : Parametric binauralizer HRTF handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS render handle */ + IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o : Parametric binauralizer HRTF handle */ ); ivas_error IVAS_REND_GetHrtfStatisticsHandle( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics /* o : HRTF statistics handle */ + IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics /* o : HRTF statistics handle */ ); /* Functions to be called during rendering */ @@ -253,47 +253,47 @@ ivas_error IVAS_REND_InitConfig( ); Word16 IVAS_REND_GetRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ); Word16 IVAS_REND_FeedRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); ivas_error IVAS_REND_FeedSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_REND_InputId inputId, /* i : ID of the input */ - IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_REND_InputId inputId, /* i : ID of the input */ + IVAS_REND_BitstreamBuffer *hBits /* i : buffer for input bitstream */ ); ivas_error IVAS_REND_GetSplitBinauralSamples( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ bool* needNewFrame ); ivas_error IVAS_REND_GetSplitBinauralBitstream( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ - IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_REND_AudioBuffer outAudio, /* i/o: buffer for output audio */ + IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ); ivas_error IVAS_REND_GetSplitRendBitstreamHeader( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ - Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ - Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ + Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ + Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ ); ivas_error IVAS_REND_SetHeadRotation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ - const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */ - const ISAR_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering*/ - const Word16 sf_idx /* i : subframe index */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */ + const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */ + const ISAR_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering*/ + const Word16 sf_idx /* i : subframe index */ ); /* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */ @@ -332,13 +332,13 @@ ivas_error IVAS_REND_SetSplitRendBFI( const Word16 bfi); ivas_error IVAS_REND_SetExternalOrientation( - IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ - IVAS_QUATERNION *orientation, /* i : external orientation data */ - Word8 enableHeadRotation, /* i : flag to enable head rotation for this frame */ - Word8 enableExternalOrientation, /* i : flag to enable external orientation for this frame */ - Word8 enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ - Word16 numFramesToTargetOrientation, /* i : number of frames until target orientation is reached */ - const Word16 sf_idx /* i : subframe index */ + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + IVAS_QUATERNION *orientation, /* i : external orientation data */ + Word8 enableHeadRotation, /* i : flag to enable head rotation for this frame */ + Word8 enableExternalOrientation, /* i : flag to enable external orientation for this frame */ + Word8 enableRotationInterpolation, /* i : flag to interpolate rotations from current and previous frames */ + Word16 numFramesToTargetOrientation, /* i : number of frames until target orientation is reached */ + const Word16 sf_idx /* i : subframe index */ ); ivas_error IVAS_REND_CombineHeadAndExternalOrientation( @@ -351,31 +351,31 @@ ivas_error IVAS_REND_GetCombinedOrientation( ); ivas_error IVAS_REND_GetMasaMetadata( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_MASA_DECODER_EXT_OUT_META_HANDLE *hMasaExtOutMeta, /* o : pointer to handle, which will be set to point to analyzed MASA metadata */ - const IVAS_REND_AudioConfigType inputType /* i : Input type */ + const IVAS_REND_AudioConfigType inputType /* i : Input type */ ); ivas_error IVAS_REND_MergeMasaMetadata( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_MASA_DECODER_EXT_OUT_META_HANDLE *hMasaExtOutMeta, /* o : pointer to handle, which will be set to point to merged metadata */ - const IVAS_REND_AudioConfigType inputType1, /* i : Input type 1 */ - const IVAS_REND_AudioConfigType inputType2 /* i : Input type 2 */ + const IVAS_REND_AudioConfigType inputType1, /* i : Input type 1 */ + const IVAS_REND_AudioConfigType inputType2 /* i : Input type 2 */ ); ivas_error IVAS_REND_SetTotalNumberOfObjects( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - const UWord16 total_num_objects /* i : total number of objects */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ + const UWord16 total_num_objects /* i : total number of objects */ ); ivas_error IVAS_REND_SetIsmMetadataDelay( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - const Word32 sync_md_delay /* i : Metadata Delay in ms to sync with audio delay */ + const Word32 sync_md_delay /* i : Metadata Delay in ms to sync with audio delay */ ); ivas_error IVAS_REND_GetNumAllObjects( IVAS_REND_CONST_HANDLE hIvasRend, /* i : Renderer handle */ - Word16 *numChannels /* o : number of all objects */ + Word16 *numChannels /* o : number of all objects */ ); ivas_error IVAS_REND_GetSamples( @@ -411,7 +411,8 @@ void IVAS_REND_cldfbAnalysis_ts_wrapper( const Word16 samplesToProcess, /* i : samples to process */ IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb, /* i : filterbank state */ Word16 Q_in, - Word16 *Q_out ); + Word16 *Q_out +); void IVAS_REND_cldfbSynthesis_wrapper( Word32 **realBuffer, /* i : real values */ @@ -420,7 +421,8 @@ void IVAS_REND_cldfbSynthesis_wrapper( const int16_t samplesToProcess, /* i : number of processed samples */ IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb, /* i : filter bank state */ Word16 Q_cldfb, - Word16 *Q_out ); + Word16 *Q_out +); /* Disclaimer and info printing */ diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 640aeb23f..d69c053d9 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -29,6 +29,7 @@ the United Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ + #include "basop_util.h" #include "options.h" #include "lib_rend.h" @@ -50,7 +51,6 @@ #include "debug.h" #endif - /*-------------------------------------------------------------------* * Local constants *-------------------------------------------------------------------*/ @@ -215,7 +215,7 @@ struct IVAS_REND EFAP_WRAPPER efapOutWrapper; IVAS_LSSETUP_CUSTOM_STRUCT customLsOut; - SPLIT_REND_WRAPPER splitRendWrapper; + SPLIT_REND_WRAPPER *splitRendWrapper; IVAS_REND_AudioBuffer splitRendEncBuffer; IVAS_REND_HeadRotData headRotData; Word16 splitRendBFI; @@ -642,7 +642,6 @@ static ivas_error validateOutputSampleRate( /* Otherwise rendering to binaural, support the same set as IVAS decoder */ SWITCH( sampleRate ) { - case 8000: case 16000: case 32000: case 48000: @@ -652,6 +651,7 @@ static ivas_error validateOutputSampleRate( return IVAS_ERR_INVALID_SAMPLING_RATE; } } + /*-------------------------------------------------------------------* * getAudioConfigNumChannels() * @@ -716,6 +716,7 @@ ivas_error getAudioConfigNumChannels( move16(); return IVAS_ERR_OK; } + /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ @@ -1338,7 +1339,7 @@ static rendering_context getRendCtx( ctx.pHeadRotData = &hIvasRend->headRotData; ctx.hhRendererConfig = &hIvasRend->hRendererConfig; ctx.pSplitRendBFI = &hIvasRend->splitRendBFI; - ctx.pSplitRendWrapper = &hIvasRend->splitRendWrapper; + ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper; ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData; return ctx; @@ -1380,13 +1381,23 @@ static ivas_error initIsmMasaRendering( const Word32 inSampleRate ) { ivas_error error; + Word16 num_poses; + + num_poses = 1; + move16(); + if ( inputIsm->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } IF( inputIsm->tdRendWrapper.hBinRendererTd != NULL ) { ivas_td_binaural_close_fx( &inputIsm->tdRendWrapper.hBinRendererTd ); } - ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); + ivas_rend_closeCrend( &inputIsm->crendWrapper, num_poses ); + ivas_reverb_close( &inputIsm->hReverb ); IF( NE_32( ( error = ivas_omasa_ana_open( &inputIsm->hOMasa, inSampleRate, inputIsm->total_num_objects ) ), IVAS_ERR_OK ) ) @@ -1413,6 +1424,8 @@ static ivas_error setRendInputActiveIsm( Word16 SrcInd[MAX_NUM_TDREND_CHANNELS]; Word16 num_src; Word16 ivas_format; + Word16 num_poses; + IF( EQ_32( getAudioConfigType( inConfig ), IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) ) { ivas_format = MC_FORMAT; @@ -1422,11 +1435,18 @@ static ivas_error setRendInputActiveIsm( ivas_format = ISM_FORMAT; } - inputIsm = (input_ism *) input; rendCtx = inputIsm->base.ctx; outConfig = *rendCtx.pOutConfig; + num_poses = 1; + move16(); + if ( rendCtx.pSplitRendWrapper != NULL ) + { + num_poses = rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } + IF( !isIoConfigPairSupported( inConfig, outConfig ) ) { return IVAS_ERR_IO_CONFIG_PAIR_NOT_SUPPORTED; @@ -1574,7 +1594,7 @@ static ivas_error setRendInputActiveIsm( } ELSE IF( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) { - IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) + IF( NE_32( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hrtfs->hSetOfHRTF, hrtfs->hHrtfStatistics, *rendCtx.pOutSampleRate, num_poses ) ), IVAS_ERR_OK ) ) { return error; } @@ -1588,7 +1608,15 @@ static void clearInputIsm( input_ism *inputIsm ) { rendering_context rendCtx; - int16_t i; + Word16 i, num_poses; + + num_poses = 1; + move16(); + if ( inputIsm->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } rendCtx = inputIsm->base.ctx; @@ -1597,7 +1625,7 @@ static void clearInputIsm( initRendInputBase_fx( &inputIsm->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); /* Free input's internal handles */ - ivas_rend_closeCrend( &inputIsm->crendWrapper, inputIsm->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); + ivas_rend_closeCrend( &inputIsm->crendWrapper, num_poses ); ivas_reverb_close( &inputIsm->hReverb ); @@ -1684,6 +1712,7 @@ static void fillIdentityPanMatrix_fx( return; } + static ivas_error initMcPanGainsWithIdentMatrix( input_mc *inputMc ) { @@ -1691,6 +1720,7 @@ static ivas_error initMcPanGainsWithIdentMatrix( return IVAS_ERR_OK; } + static ivas_error initMcPanGainsWithConversionMapping_fx( input_mc *inputMc, const AUDIO_CONFIG outConfig ) @@ -1727,6 +1757,7 @@ static ivas_error initMcPanGainsWithConversionMapping_fx( return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Missing multichannel conversion mapping" ); } + static ivas_error initMcPanGainsWithEfap_fx( input_mc *inputMc, const AUDIO_CONFIG outConfig ) @@ -1803,6 +1834,7 @@ static ivas_error initMcPanGainsWithEfap_fx( } return IVAS_ERR_OK; } + static ivas_error getRendInputNumChannels( const void *rendInput, Word16 *numInChannels ) @@ -1832,6 +1864,7 @@ static ivas_error getRendInputNumChannels( return IVAS_ERR_OK; } + static ivas_error initMcPanGainsWithMonoOut_fx( input_mc *inputMc ) { @@ -2392,7 +2425,15 @@ static ivas_error initMcBinauralRendering( Word32 binauralDelayNs; Word32 outSampleRate; Word8 useTDRend; - int16_t i; + Word16 i, num_poses; + + num_poses = 1; + move16(); + if ( inputMc->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } /* Allocate TD binaural renderer for custom loudspeaker layouts (regardless of headrotation) or planar MC layouts with headrotation, CREND for the rest */ @@ -2437,7 +2478,7 @@ static ivas_error initMcBinauralRendering( /* if we need to use TD renderer and CREND was open, close it */ IF( useTDRend ) { - ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); + ivas_rend_closeCrend( &inputMc->crendWrapper, num_poses ); } test(); @@ -2598,13 +2639,22 @@ static ivas_error initMcMasaRendering( const Word32 inSampleRate ) { ivas_error error; + Word16 num_poses; + + num_poses = 1; + move16(); + if ( inputMc->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } IF( inputMc->tdRendWrapper.hBinRendererTd != NULL ) { ivas_td_binaural_close_fx( &inputMc->tdRendWrapper.hBinRendererTd ); } - ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); + ivas_rend_closeCrend( &inputMc->crendWrapper, num_poses ); ivas_reverb_close( &inputMc->hReverb ); @@ -2620,6 +2670,7 @@ static ivas_error initMcMasaRendering( return IVAS_ERR_OK; } + static lfe_routing defaultLfeRouting( const AUDIO_CONFIG inConfig, const LSSETUP_CUSTOM_STRUCT customLsIn, @@ -2776,11 +2827,20 @@ static ivas_error setRendInputActiveMc( return IVAS_ERR_OK; } + static void clearInputMc( input_mc *inputMc ) { rendering_context rendCtx; - Word16 i; + Word16 i, num_poses; + + num_poses = 1; + move16(); + if ( inputMc->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } rendCtx = inputMc->base.ctx; freeMcLfeDelayBuffer_fx( &inputMc->lfeDelayBuffer_fx ); @@ -2793,7 +2853,7 @@ static void clearInputMc( efap_free_data_fx( &inputMc->efapInWrapper.hEfap ); } - ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); + ivas_rend_closeCrend( &inputMc->crendWrapper, num_poses ); ivas_reverb_close( &inputMc->hReverb ); @@ -2815,6 +2875,7 @@ static void clearInputMc( return; } + static ivas_error initSbaPanGainsForMcOut( input_sba *inputSba, const AUDIO_CONFIG outConfig, @@ -2905,18 +2966,18 @@ static ivas_error initSbaPanGainsForSbaOut( return error; } + static ivas_error updateSbaPanGains( input_sba *inputSba, const AUDIO_CONFIG outConfig, RENDER_CONFIG_DATA *hRendCfg, IVAS_DEC_HRTF_CREND_HANDLE hMixconv, - IVAS_DEC_HRTF_STATISTICS_HANDLE hHrtfStatistics - -) + IVAS_DEC_HRTF_STATISTICS_HANDLE hHrtfStatistics ) { ivas_error error; AUDIO_CONFIG inConfig; rendering_context rendCtx; + Word16 num_poses; /* Reset to all zeros - some functions below only write non-zero elements. */ setZeroPanMatrix_fx( inputSba->hoaDecMtx_fx ); @@ -2924,6 +2985,14 @@ static ivas_error updateSbaPanGains( inConfig = inputSba->base.inConfig; rendCtx = inputSba->base.ctx; + num_poses = 1; + move16(); + if ( rendCtx.pSplitRendWrapper != NULL ) + { + num_poses = rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } + SWITCH( getAudioConfigType( outConfig ) ) { case IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED: @@ -2970,7 +3039,7 @@ static ivas_error updateSbaPanGains( } else { - IF( NE_32( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) + IF( NE_32( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, num_poses ) ), IVAS_ERR_OK ) ) { return error; } @@ -2983,7 +3052,7 @@ static ivas_error updateSbaPanGains( { return error; } - IF( NE_32( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ), IVAS_ERR_OK ) ) + IF( NE_32( ( error = ivas_rend_openCrend( &inputSba->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, hMixconv, hHrtfStatistics, *rendCtx.pOutSampleRate, num_poses ) ), IVAS_ERR_OK ) ) { return error; } @@ -3014,8 +3083,17 @@ static ivas_error initSbaMasaRendering( Word32 inSampleRate ) { ivas_error error; + Word16 num_poses; - ivas_rend_closeCrend( &inputSba->crendWrapper, inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses ); + num_poses = 1; + move16(); + if ( inputSba->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputSba->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } + + ivas_rend_closeCrend( &inputSba->crendWrapper, num_poses ); IF( NE_32( ( error = ivas_dirac_ana_open_fx( &inputSba->hDirAC, inSampleRate ) ), IVAS_ERR_OK ) ) { @@ -3276,8 +3354,17 @@ ivas_error IVAS_REND_Open( } /* Initialize inputs */ - isar_init_split_rend_handles( &hIvasRend->splitRendWrapper ); - hIvasRend->splitRendEncBuffer.data_fx = NULL; + hIvasRend->splitRendWrapper = NULL; + test(); + IF( EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) + { + if ( ( hIvasRend->splitRendWrapper = (SPLIT_REND_WRAPPER *) malloc( sizeof( SPLIT_REND_WRAPPER ) ) ) == NULL ) + { + return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS renderer handle" ); + } + + isar_init_split_rend_handles( hIvasRend->splitRendWrapper ); + } FOR( i = 0; i < RENDERER_MAX_ISM_INPUTS; ++i ) { @@ -3922,7 +4009,7 @@ ivas_error IVAS_REND_AddInput_fx( Word16 cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, getAudioConfigType( inConfig ) ); - IF( ( error = ivas_pre_rend_init( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) + IF( ( error = ivas_pre_rend_init( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) { return error; } @@ -4378,7 +4465,7 @@ ivas_error IVAS_REND_GetDelay_fx( { IF( NE_32( hIvasRend->inputsSba[i].base.inConfig, IVAS_AUDIO_CONFIG_INVALID ) ) { - if ( hIvasRend->splitRendWrapper.hBinHrSplitPreRend != NULL ) + if ( hIvasRend->splitRendWrapper->hBinHrSplitPreRend != NULL ) { if ( hIvasRend->hRendererConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) { @@ -4678,7 +4765,7 @@ ivas_error IVAS_REND_InitConfig( *-------------------------------------------------------------------*/ Word16 IVAS_REND_GetRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_HANDLE hRCout /* o : Render configuration handle */ ) { @@ -4733,7 +4820,7 @@ Word16 IVAS_REND_GetRenderConfig( *-------------------------------------------------------------------*/ Word16 IVAS_REND_FeedRenderConfig( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ) { @@ -4902,9 +4989,14 @@ Word16 IVAS_REND_FeedRenderConfig( { int16_t cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); - ISAR_PRE_REND_close( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); + IF( hIvasRend->splitRendWrapper != NULL ) + { + ISAR_PRE_REND_close( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); + free( hIvasRend->splitRendWrapper ); + hIvasRend->splitRendWrapper = NULL; + } - IF( ( error = ivas_pre_rend_init( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) + IF( ( error = ivas_pre_rend_init( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer, &hIvasRend->hRendererConfig->split_rend_config, hIvasRend->headRotData, hIvasRend->sampleRateOut, hIvasRend->outputConfig, cldfb_in_flag, hIvasRend->num_subframes ) ) != IVAS_ERR_OK ) { return error; } @@ -6632,6 +6724,7 @@ static ivas_error renderLfeToBinaural_fx( return IVAS_ERR_OK; } + static ivas_error renderMcToBinaural( input_mc *mcInput, const AUDIO_CONFIG outConfig, @@ -6743,9 +6836,11 @@ static ivas_error renderMcToBinaural( } *outAudio.pq_fact = exp; move16(); + pop_wmops(); return IVAS_ERR_OK; } + static ivas_error renderMcToBinauralRoom( input_mc *mcInput, const AUDIO_CONFIG outConfig, @@ -6762,6 +6857,7 @@ static ivas_error renderMcToBinauralRoom( Word16 subframe_idx; Word16 exp = *outAudio.pq_fact; move16(); + FOR( i = 0; i < MAX_OUTPUT_CHANNELS; i++ ) { p_tmpRendBuffer[i] = tmpRendBuffer[i]; @@ -6860,9 +6956,11 @@ static ivas_error renderMcToBinauralRoom( } *outAudio.pq_fact = exp; move16(); + pop_wmops(); return IVAS_ERR_OK; } + static ivas_error renderMcCustomLsToBinauralRoom( input_mc *mcInput, const AUDIO_CONFIG outConfig, @@ -6978,6 +7076,7 @@ static ivas_error renderMcCustomLsToBinauralRoom( pop_wmops(); return IVAS_ERR_OK; } + static void renderMcToMc( const input_mc *mcInput, IVAS_REND_AudioBuffer outAudio ) @@ -6996,6 +7095,7 @@ static void renderMcToMc( pop_wmops(); return; } + static void renderMcToSba( const input_mc *mcInput, IVAS_REND_AudioBuffer outAudio ) @@ -8649,14 +8749,14 @@ static ivas_error getSamplesInternal( EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { Word16 num_poses_orig; - num_poses_orig = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; + num_poses_orig = hIvasRend->splitRendWrapper->multiBinPoseData.num_poses; move16(); outAudio.config = hIvasRend->splitRendEncBuffer.config; outAudio.data_fx = hIvasRend->splitRendEncBuffer.data_fx; - ISAR_PRE_REND_GetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper.multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis ); + ISAR_PRE_REND_GetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper->multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis ); - assert( num_poses_orig == hIvasRend->splitRendWrapper.multiBinPoseData.num_poses && "number of poses should not change dynamically" ); + assert( num_poses_orig == hIvasRend->splitRendWrapper->multiBinPoseData.num_poses && "number of poses should not change dynamically" ); /* Clear output buffer for split rendering bitstream */ set32_fx( outAudio.data_fx, 0, outAudio.config.numChannels * outAudio.config.numSamplesPerChannel ); @@ -8742,7 +8842,7 @@ static ivas_error getSamplesInternal( Word16 q1 = 31, q2 = 31, Q_buff; Word16 Q_out[CLDFB_NO_COL_MAX]; Q_out[0] = 31; - Word16 num_poses = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; + Word16 num_poses = hIvasRend->splitRendWrapper->multiBinPoseData.num_poses; for ( i = 0; i < num_poses * BINAURAL_CHANNELS; i++ ) { @@ -8766,7 +8866,7 @@ static ivas_error getSamplesInternal( IF( EQ_16( cldfb_in_flag, 0 ) ) { /*TD input*/ - num_poses = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses; + num_poses = hIvasRend->splitRendWrapper->multiBinPoseData.num_poses; FOR( i = 0; i < num_poses * BINAURAL_CHANNELS; ++i ) { @@ -8781,7 +8881,7 @@ static ivas_error getSamplesInternal( Q_out[0] = Q_out[0] + *outAudio.pq_fact; } - if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, + if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, (const int16_t) ( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) @@ -8952,7 +9052,12 @@ void IVAS_REND_Close( ivas_limiter_close_fx( &hIvasRend->hLimiter ); /* Split binaural rendering */ - ISAR_PRE_REND_close( &hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); + IF( hIvasRend->splitRendWrapper != NULL ) + { + ISAR_PRE_REND_close( hIvasRend->splitRendWrapper, &hIvasRend->splitRendEncBuffer ); + free( hIvasRend->splitRendWrapper ); + hIvasRend->splitRendWrapper = NULL; + } closeHeadRotation( hIvasRend ); @@ -9113,7 +9218,7 @@ void IVAS_REND_cldfbSynthesis_wrapper( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_GetHrtfHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */ ) { @@ -9135,7 +9240,7 @@ ivas_error IVAS_REND_GetHrtfHandle( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_GetHrtfCRendHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */ ) { @@ -9157,7 +9262,7 @@ ivas_error IVAS_REND_GetHrtfCRendHandle( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_GetHrtfFastConvHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv /* o : FASTCONV HRTF handle */ ) { @@ -9179,7 +9284,7 @@ ivas_error IVAS_REND_GetHrtfFastConvHandle( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_GetHrtfParamBinHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o : Parametric binauralizer HRTF handle */ ) { @@ -9201,7 +9306,7 @@ ivas_error IVAS_REND_GetHrtfParamBinHandle( *---------------------------------------------------------------------*/ ivas_error IVAS_REND_GetHrtfStatisticsHandle( - IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS decoder handle */ + IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics /* o : HRTF statistics handle */ ) { @@ -9661,8 +9766,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( Word16 tmpFloat_fx; ivas_error error; Word16 frequency_axis_fx[CLDFB_NO_CHANNELS_MAX]; - int16_t pos_idx; - + Word16 pos_idx, num_poses; Word16 tmp; Word16 tmp_e; Word16 tmp2; @@ -9683,6 +9787,14 @@ static ivas_error ivas_masa_ext_rend_parambin_init( renderer_type = inputMasa->hMasaExtRend->renderer_type; move32(); + num_poses = 1; + move16(); + if ( inputMasa->base.ctx.pSplitRendWrapper != NULL ) + { + num_poses = inputMasa->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } + for ( pos_idx = 0; pos_idx < inputMasa->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; pos_idx++ ) { hDiracDecBin = inputMasa->hMasaExtRend->hDiracDecBin[pos_idx]; -- GitLab From f508a0fe6ab50819e2a44633214f784d4d71431b Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 9 Aug 2025 13:17:23 +0200 Subject: [PATCH 6/9] fix porting --- lib_rend/lib_rend_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 11b74619f..963edcbdc 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -8884,7 +8884,7 @@ static ivas_error getSamplesInternal( if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, - &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) + &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, (const int16_t) ( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) { return error; } @@ -9795,7 +9795,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( move16(); } - for ( pos_idx = 0; pos_idx < inputMasa->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses; pos_idx++ ) + for ( pos_idx = 0; pos_idx < num_poses; pos_idx++ ) { hDiracDecBin = inputMasa->hMasaExtRend->hDiracDecBin[pos_idx]; -- GitLab From 578fce585411bebd87d599ce9effccf8d2bd24a5 Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 9 Aug 2025 13:34:01 +0200 Subject: [PATCH 7/9] clang-format --- lib_rend/lib_rend_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 963edcbdc..7e273978f 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -8884,7 +8884,7 @@ static ivas_error getSamplesInternal( if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, - &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, (const int16_t) ( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) + &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) { return error; } -- GitLab From ca146a55c431febad6b6f022ad6d6ab3eca89b13 Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 9 Aug 2025 15:40:41 +0200 Subject: [PATCH 8/9] fix --- lib_rend/lib_rend_fx.c | 102 +++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 45 deletions(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 7e273978f..8cedf3ce3 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -111,6 +111,7 @@ typedef struct rendering_context ctx; Word32 numNewSamplesPerChannel; /* Used to keep track how much new audio was fed before rendering current frame */ } input_base; + typedef struct { input_base base; @@ -132,6 +133,7 @@ typedef struct UWord16 total_num_objects; Word32 ism_metadata_delay_ms_fx; /* Q0 */ } input_ism; + typedef struct { Word16 numLfeChannels; @@ -145,6 +147,7 @@ typedef struct // IVAS_REND_LfePanMtx lfePanMtx; IVAS_REND_LfePanMtx_fx lfePanMtx_fx; /* Q31 */ } lfe_routing; + typedef struct { input_base base; @@ -168,6 +171,7 @@ typedef struct Word32 *lfeDelayBuffer_fx; MCMASA_ANA_HANDLE hMcMasa; } input_mc; + typedef struct { input_base base; @@ -180,7 +184,6 @@ typedef struct DIRAC_ANA_HANDLE hDirAC; } input_sba; - typedef struct { input_base base; @@ -200,6 +203,7 @@ typedef struct hrtf_handles IVAS_DEC_HRTF_STATISTICS_HANDLE hHrtfStatistics; } hrtf_handles; + struct IVAS_REND { Word32 sampleRateOut; @@ -403,14 +407,15 @@ static void accumulateCLDFBArrayToBuffer_fx( { UWord32 smplIdx, slotIdx; UWord32 numCldfbSamples, num_bands; - UWord32 chnlIdx; + Word16 chnlIdx; Word32 *writePtr; assert( ( buffer->config.is_cldfb == 1 ) && "for time domain input call copyBufferTo2dArray()" ); writePtr = buffer->data_fx; numCldfbSamples = (UWord32) shr( buffer->config.numSamplesPerChannel, 1 ); num_bands = (UWord32) Mpy_32_32( numCldfbSamples, ONE_BY_CLDFB_NO_COL_MAX_Q31 ); - FOR( chnlIdx = 0; chnlIdx < (uint32_t) buffer->config.numChannels; ++chnlIdx ) + + FOR( chnlIdx = 0; chnlIdx < buffer->config.numChannels; ++chnlIdx ) { FOR( slotIdx = 0; slotIdx < CLDFB_NO_COL_MAX; ++slotIdx ) { @@ -2585,9 +2590,7 @@ static ivas_error initMcBinauralRendering( ELSE IF( !useTDRend && inputMc->crendWrapper == NULL ) { /* open CREND */ - IF( NE_32( ( error = ivas_rend_openCrend( &inputMc->crendWrapper, ( inConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) ? IVAS_AUDIO_CONFIG_7_1_4 : inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, - outSampleRate, ( ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) || ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ? inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses : 1 ) ), - IVAS_ERR_OK ) ) + IF( NE_32( ( error = ivas_rend_openCrend( &inputMc->crendWrapper, ( inConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) ? IVAS_AUDIO_CONFIG_7_1_4 : inConfig, outConfig, hRendCfg, hMixconv, hHrtfStatistics, outSampleRate, num_poses ) ), IVAS_ERR_OK ) ) { return error; } @@ -3019,8 +3022,7 @@ static ivas_error updateSbaPanGains( else { assert( ( *rendCtx.pOutSampleRate == 48000 ) && "split binaural crend mode is currently supported with 48k sampling rate only" ); - if ( ( error = ivas_rend_openMultiBinCrend( &inputSba->crendWrapper, inConfig, outConfig, - &rendCtx.pSplitRendWrapper->multiBinPoseData, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_rend_openMultiBinCrend( &inputSba->crendWrapper, inConfig, outConfig, &rendCtx.pSplitRendWrapper->multiBinPoseData, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) { return error; } @@ -3031,8 +3033,7 @@ static ivas_error updateSbaPanGains( { if ( hRendCfg->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV ) { - if ( ( error = ivas_rend_openCldfbRend( &inputSba->cldfbRendWrapper, inConfig, outConfig, - &rendCtx.pSplitRendWrapper->multiBinPoseData, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_rend_openCldfbRend( &inputSba->cldfbRendWrapper, inConfig, outConfig, &rendCtx.pSplitRendWrapper->multiBinPoseData, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK ) { return error; } @@ -3108,15 +3109,13 @@ static ivas_error setRendInputActiveSba( const AUDIO_CONFIG inConfig, const IVAS_REND_InputId id, RENDER_CONFIG_DATA *hRendCfg, - hrtf_handles *hrtfs - -) + hrtf_handles *hrtfs ) { ivas_error error; rendering_context rendCtx; AUDIO_CONFIG outConfig; input_sba *inputSba; - int16_t pos_idx; + Word16 pos_idx; inputSba = (input_sba *) input; rendCtx = inputSba->base.ctx; @@ -3160,18 +3159,28 @@ static ivas_error setRendInputActiveSba( return error; } + static void clearInputSba( input_sba *inputSba ) { rendering_context rendCtx; + Word16 num_poses; rendCtx = inputSba->base.ctx; + num_poses = 1; + move16(); + if ( rendCtx.pSplitRendWrapper != NULL ) + { + num_poses = rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses; + move16(); + } + freeInputBaseBufferData_fx( &inputSba->bufferData_fx ); initRendInputBase_fx( &inputSba->base, IVAS_AUDIO_CONFIG_INVALID, 0, rendCtx, NULL, 0 ); - ivas_rend_closeCrend( &inputSba->crendWrapper, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ); + ivas_rend_closeCrend( &inputSba->crendWrapper, num_poses ); IF( inputSba->cldfbRendWrapper.hCldfbRend != NULL ) { @@ -3922,6 +3931,7 @@ static ivas_error ivas_pre_rend_init( ivas_error error; IVAS_REND_AudioBufferConfig bufConfig; + test(); IF( EQ_32( outConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( outConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { IF( EQ_32( pSplit_rend_config->poseCorrectionMode, ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) ) @@ -4987,7 +4997,7 @@ Word16 IVAS_REND_FeedRenderConfig( /* if its not initialized yet then no need to re-initialize, initialization will happen while adding inputs*/ IF( hIvasRend->splitRendEncBuffer.data_fx != NULL && hIvasRend->hRendererConfig != NULL ) { - int16_t cldfb_in_flag; + Word16 cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); IF( hIvasRend->splitRendWrapper != NULL ) { @@ -5156,8 +5166,9 @@ ivas_error IVAS_REND_DisableHeadRotation( *-------------------------------------------------------------------*/ ivas_error IVAS_REND_SetSplitRendBFI( - IVAS_REND_HANDLE hIvasRend, - const int16_t bfi ) + IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ + const Word16 bfi /* i : Bad Frame Indicator */ +) { hIvasRend->splitRendBFI = bfi; @@ -7886,7 +7897,7 @@ static ivas_error renderInputSba( { ivas_error error; IVAS_REND_AudioBuffer inAudio; - int16_t cldfb2tdShift; + Word16 cldfb2tdShift; error = IVAS_ERR_OK; move32(); inAudio = sbaInput->base.inputBuffer; @@ -8240,7 +8251,7 @@ static ivas_error renderInputMasa( Word16 maxBin; Word32 *tmpBuffer_fx[MAX_OUTPUT_CHANNELS]; Word32 tmpBuffer_buff_fx[MAX_OUTPUT_CHANNELS][L_FRAME48k]; - int16_t cldfb2tdShift; + Word16 cldfb2tdShift; Word32 Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; @@ -8624,7 +8635,7 @@ static ivas_error getSamplesInternal( { ivas_error error; Word16 numOutChannels; - int16_t cldfb2tdSampleShift; + Word16 cldfb2tdSampleShift; IVAS_REND_AudioBuffer outAudioOrig; /* Validate function arguments */ @@ -8744,7 +8755,9 @@ static ivas_error getSamplesInternal( set32_fx( outAudio.data_fx, 0, imult1616( outAudio.config.numChannels, outAudio.config.numSamplesPerChannel ) ); outAudioOrig = outAudio; + /* Use internal buffer if outputting split rendering bitstream */ + test(); IF( EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { @@ -8780,15 +8793,13 @@ static ivas_error getSamplesInternal( } test(); - test(); - - IF( EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( hIvasRend->outputConfig, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { ISAR_SPLIT_REND_BITS_DATA bits; Word16 cldfb_in_flag, i, j, k, ch, ro_md_flag; Word32 Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; + FOR( i = 0; i < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; i++ ) { FOR( j = 0; j < CLDFB_NO_COL_MAX; j++ ) @@ -8884,7 +8895,7 @@ static ivas_error getSamplesInternal( if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms, - &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) + &bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const Word16 )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0, ro_md_flag, Q_buff, &Q_out[0] ) ) != IVAS_ERR_OK ) { return error; } @@ -8952,7 +8963,7 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_BitstreamBuffer *hBits /* o : buffer for output bitstream */ ) { - int16_t cldfb_in_flag; + Word16 cldfb_in_flag; cldfb_in_flag = getCldfbRendFlag( hIvasRend, IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN ); hIvasRend->splitRendEncBuffer.config.is_cldfb = cldfb_in_flag; @@ -8963,8 +8974,9 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( } else { - hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = (int16_t) ( hIvasRend->sampleRateOut / FRAMES_PER_SEC ); + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel = (Word16) ( hIvasRend->sampleRateOut / FRAMES_PER_SEC ); } + hIvasRend->splitRendEncBuffer.config.numSamplesPerChannel *= cldfb_in_flag ? 2 : 1; /* hIvasRend->splitRendEncBuffer used for BINAURAL_SPLIT_CODED output @@ -8983,8 +8995,8 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ - int16_t *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ - int16_t *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ + Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ + Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ ) { test(); @@ -9089,33 +9101,33 @@ void IVAS_REND_Close( ivas_error IVAS_REND_openCldfb( IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS], IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS], - const int16_t num_in_chs, - const int16_t num_out_chs, - const int32_t output_Fs ) + const Word16 num_in_chs, + const Word16 num_out_chs, + const Word32 output_Fs ) { - int16_t n; + Word16 n; ivas_error error; - for ( n = 0; n < num_in_chs; n++ ) + FOR( n = 0; n < num_in_chs; n++ ) { - if ( ( error = openCldfb_ivas_fx( &( cldfbAna[n] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) + IF( ( error = openCldfb_ivas_fx( &( cldfbAna[n] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) { return error; } } - for ( ; n < IVAS_MAX_INPUT_CHANNELS; n++ ) + FOR( ; n < IVAS_MAX_INPUT_CHANNELS; n++ ) { cldfbAna[n] = NULL; } - for ( n = 0; n < num_out_chs; n++ ) + FOR( n = 0; n < num_out_chs; n++ ) { - if ( ( error = openCldfb_ivas_fx( &( cldfbSyn[n] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) + IF( ( error = openCldfb_ivas_fx( &( cldfbSyn[n] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS, DEC ) ) != IVAS_ERR_OK ) { return error; } } - for ( ; n < IVAS_MAX_OUTPUT_CHANNELS; n++ ) + FOR( ; n < IVAS_MAX_OUTPUT_CHANNELS; n++ ) { cldfbSyn[n] = NULL; } @@ -9134,20 +9146,20 @@ void IVAS_REND_closeCldfb( IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS], IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS] ) { - int16_t n; + Word16 n; - for ( n = 0; n < IVAS_MAX_INPUT_CHANNELS; n++ ) + FOR( n = 0; n < IVAS_MAX_INPUT_CHANNELS; n++ ) { - if ( cldfbAna[n] != NULL ) + IF( cldfbAna[n] != NULL ) { deleteCldfb_ivas_fx( &( cldfbAna[n] ) ); cldfbAna[n] = NULL; } } - for ( n = 0; n < IVAS_MAX_OUTPUT_CHANNELS; n++ ) + FOR( n = 0; n < IVAS_MAX_OUTPUT_CHANNELS; n++ ) { - if ( cldfbSyn[n] != NULL ) + IF( cldfbSyn[n] != NULL ) { deleteCldfb_ivas_fx( &( cldfbSyn[n] ) ); cldfbSyn[n] = NULL; @@ -9194,7 +9206,7 @@ void IVAS_REND_cldfbSynthesis_wrapper( Word32 **realBuffer, /* i : real values */ Word32 **imagBuffer, /* i : imag values */ Word32 *timeOut, /* o : output time domain samples */ - const int16_t samplesToProcess, /* i : number of processed samples */ + const Word16 samplesToProcess, /* i : number of processed samples */ IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb, /* i : filter bank state */ Word16 Q_cldfb, Word16 *Q_out ) -- GitLab From 03bf60e04c06a312204ae0e1d22e4b3b27e00adf Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 13 Aug 2025 16:26:22 +0200 Subject: [PATCH 9/9] revert No. 331 --- apps/decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index 88c17d08d..9dcd22043 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -258,7 +258,7 @@ int main( if ( arg.hrtfReaderEnabled ) { /* sanity check */ - if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { arg.hrtfReaderEnabled = false; fprintf( stderr, "\nError: HRTF binary file cannot be used in this output configuration.\n\n" ); -- GitLab