Loading CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ target_link_libraries(ISAR_post_rend lib_basop lib_isar lib_util lib_com) target_include_directories(ISAR_post_rend PRIVATE lib_basop lib_isar) add_executable(ambi_converter apps/ambi_converter.c) target_link_libraries(ambi_converter lib_util lib_com lib_basop) target_link_libraries(ambi_converter lib_util lib_com lib_basop lib_debug) if(UNIX) target_link_libraries(ambi_converter m) endif() Loading apps/decoder.c +16 −129 File changed.Preview size limit exceeded, changes collapsed. Show changes apps/isar_post_rend.c +0 −18 Original line number Diff line number Diff line Loading @@ -992,9 +992,7 @@ int main( while ( 1 ) { #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi = 0; #endif int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; Loading @@ -1003,11 +1001,7 @@ int main( { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi ); #else error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten ); #endif if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1074,24 +1068,13 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi; #endif if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #endif } #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( splitBinNeedsNewFrame ) { if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) Loading @@ -1100,7 +1083,6 @@ int main( goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { Loading lib_com/basop_util.c +65 −2 Original line number Diff line number Diff line Loading @@ -2563,7 +2563,71 @@ Word16 BASOP_Util_Cmp_Mant32Exp /*!< o: flag: result of comparison */ headroom is introduced into acc */ #ifdef OPT_2146_BASOP_UTIL_ADD_MANT32EXP Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ ( Word32 a_m, /* i : Mantissa of 1st operand a */ Word16 a_e, /* i : Exponent of 1st operand a */ Word32 b_m, /* i : Mantissa of 2nd operand b */ Word16 b_e, /* i : Exponent of 2nd operand b */ Word16 *ptr_e ) /* o : exponent of result */ { Word16 shift; /* Compare exponents: the difference is limited to +/- 31 The Word32 mantissa of the operand with lower exponent is shifted right by the exponent difference. Then, the unshifted mantissa of the operand with the higher exponent is added. The addition result is normalized and the result represents the mantissa to return. The returned exponent takes into account all shift operations. */ if ( !a_m ) { a_e = b_e; move16(); } if ( !b_m ) { b_e = a_e; move16(); } shift = sub( a_e, b_e ); if ( shift > 0 ) shift = s_min( shift, 31 ); if ( shift < 0 ) shift = s_max( shift, -31 ); /* shift > 0 exponent of a is greater than exponent of b */ if ( shift > 0 ) b_m = L_shr( b_m, shift ); /* shift < 0 exponent of b is greater than exponent of a */ if ( shift < 0 ) a_m = L_shl( a_m, shift ); a_m = L_add( L_shr( a_m, 1 ), L_shr( b_m, 1 ) ); if ( shift >= 0 ) a_e = add( a_e, 1 ); if ( shift < 0 ) a_e = add( b_e, 1 ); shift = norm_l( a_m ); if ( shift ) a_m = L_shl( a_m, shift ); if ( !a_m ) { a_e = 0; move16(); } if ( a_m ) a_e = sub( a_e, shift ); *ptr_e = a_e; return ( a_m ); } #else Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ ( Word32 a_m, /* i : Mantissa of 1st operand a */ Word16 a_e, /* i : Exponent of 1st operand a */ Loading @@ -2580,7 +2644,6 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ is normalized and the result represents the mantissa to return. The returned exponent takes into account all shift operations. */ if ( !a_m ) { a_e = b_e; Loading Loading @@ -2622,7 +2685,7 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ return ( L_tmp ); } #endif static const Word16 shift_lc[] = { 9, 10 }; Loading lib_com/ivas_cnst.h +5 −4 Original line number Diff line number Diff line Loading @@ -192,14 +192,15 @@ typedef enum #define JBM_CLDFB_SLOTS_IN_SUBFRAME_LOG2 2 /* To be used for shift operation instead of division */ #define MAX_JBM_CLDFB_TIMESLOTS 32 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #ifdef JBM_MEMORY_OPT #define MAX_JBM_L_FRAME48k ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920: max. time-scaled frame buffer length (per channel) in samples */ #define MAX_JBM_L_FRAME_NS 40000000L /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k */ #else #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #endif #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) #endif typedef enum { Loading Loading
CMakeLists.txt +1 −1 Original line number Diff line number Diff line Loading @@ -216,7 +216,7 @@ target_link_libraries(ISAR_post_rend lib_basop lib_isar lib_util lib_com) target_include_directories(ISAR_post_rend PRIVATE lib_basop lib_isar) add_executable(ambi_converter apps/ambi_converter.c) target_link_libraries(ambi_converter lib_util lib_com lib_basop) target_link_libraries(ambi_converter lib_util lib_com lib_basop lib_debug) if(UNIX) target_link_libraries(ambi_converter m) endif() Loading
apps/isar_post_rend.c +0 −18 Original line number Diff line number Diff line Loading @@ -992,9 +992,7 @@ int main( while ( 1 ) { #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi = 0; #endif int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; Loading @@ -1003,11 +1001,7 @@ int main( { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi ); #else error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten ); #endif if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1074,24 +1068,13 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi; #endif if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #endif } #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( splitBinNeedsNewFrame ) { if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) Loading @@ -1100,7 +1083,6 @@ int main( goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { Loading
lib_com/basop_util.c +65 −2 Original line number Diff line number Diff line Loading @@ -2563,7 +2563,71 @@ Word16 BASOP_Util_Cmp_Mant32Exp /*!< o: flag: result of comparison */ headroom is introduced into acc */ #ifdef OPT_2146_BASOP_UTIL_ADD_MANT32EXP Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ ( Word32 a_m, /* i : Mantissa of 1st operand a */ Word16 a_e, /* i : Exponent of 1st operand a */ Word32 b_m, /* i : Mantissa of 2nd operand b */ Word16 b_e, /* i : Exponent of 2nd operand b */ Word16 *ptr_e ) /* o : exponent of result */ { Word16 shift; /* Compare exponents: the difference is limited to +/- 31 The Word32 mantissa of the operand with lower exponent is shifted right by the exponent difference. Then, the unshifted mantissa of the operand with the higher exponent is added. The addition result is normalized and the result represents the mantissa to return. The returned exponent takes into account all shift operations. */ if ( !a_m ) { a_e = b_e; move16(); } if ( !b_m ) { b_e = a_e; move16(); } shift = sub( a_e, b_e ); if ( shift > 0 ) shift = s_min( shift, 31 ); if ( shift < 0 ) shift = s_max( shift, -31 ); /* shift > 0 exponent of a is greater than exponent of b */ if ( shift > 0 ) b_m = L_shr( b_m, shift ); /* shift < 0 exponent of b is greater than exponent of a */ if ( shift < 0 ) a_m = L_shl( a_m, shift ); a_m = L_add( L_shr( a_m, 1 ), L_shr( b_m, 1 ) ); if ( shift >= 0 ) a_e = add( a_e, 1 ); if ( shift < 0 ) a_e = add( b_e, 1 ); shift = norm_l( a_m ); if ( shift ) a_m = L_shl( a_m, shift ); if ( !a_m ) { a_e = 0; move16(); } if ( a_m ) a_e = sub( a_e, shift ); *ptr_e = a_e; return ( a_m ); } #else Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ ( Word32 a_m, /* i : Mantissa of 1st operand a */ Word16 a_e, /* i : Exponent of 1st operand a */ Loading @@ -2580,7 +2644,6 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ is normalized and the result represents the mantissa to return. The returned exponent takes into account all shift operations. */ if ( !a_m ) { a_e = b_e; Loading Loading @@ -2622,7 +2685,7 @@ Word32 BASOP_Util_Add_Mant32Exp /* o : normalized result mantissa */ return ( L_tmp ); } #endif static const Word16 shift_lc[] = { 9, 10 }; Loading
lib_com/ivas_cnst.h +5 −4 Original line number Diff line number Diff line Loading @@ -192,14 +192,15 @@ typedef enum #define JBM_CLDFB_SLOTS_IN_SUBFRAME_LOG2 2 /* To be used for shift operation instead of division */ #define MAX_JBM_CLDFB_TIMESLOTS 32 #define DEFAULT_JBM_CLDFB_TIMESLOTS 16 #ifdef JBM_MEMORY_OPT #define MAX_JBM_L_FRAME48k ( IVAS_MAX_FRAME_SIZE * 2 ) /* 1920: max. time-scaled frame buffer length (per channel) in samples */ #define MAX_JBM_L_FRAME_NS 40000000L /* 40 ms: time-scaled frame size in ns, proportional to MAX_JBM_L_FRAME48k */ #else #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #endif #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) #endif typedef enum { Loading