Commit a45b753e authored by premathasara's avatar premathasara
Browse files

Merge branch 'maintenance_20230227' into 'main'

Fix asserts so that they actually trigger, and the clarify the use of zero_vert_comp in sba_getTCs

See merge request !464
parents b0284f1e fc46679b
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ int16_t ivas_map_num_pred_r_to_idx(
                pred_r_to_idx = PRED_Q_31;
                break;
            default:
                assert( "Forbidden value for prediction quantization strategy index" );
                assert( !"Forbidden value for prediction quantization strategy index" );
                break;
        }
    }
@@ -145,7 +145,7 @@ int16_t ivas_map_num_pred_r_to_idx(
                pred_r_to_idx = PRED_Q_21_ACTIVE_W;
                break;
            default:
                assert( "Forbidden value for prediction quantization strategy index" );
                assert( !"Forbidden value for prediction quantization strategy index" );
                break;
        }
    }
@@ -179,7 +179,7 @@ int16_t ivas_map_num_drct_r_to_idx(
            drct_r_to_idx = DRCT_Q_11;
            break;
        default:
            assert( "Forbidden value for DRCT quantization strategy index" );
            assert( !"Forbidden value for DRCT quantization strategy index" );
            break;
    }
    return drct_r_to_idx;
@@ -217,7 +217,7 @@ int16_t ivas_map_num_decd_r_to_idx(
            decd_r_to_idx = DECD_Q_11;
            break;
        default:
            assert( "Forbidden value for DECD quantization strategy index" );
            assert( !"Forbidden value for DECD quantization strategy index" );
            break;
    }

+1 −1
Original line number Diff line number Diff line
@@ -963,7 +963,7 @@ static void read_stereo_mode_and_bwidth(
                hCPE->element_mode = IVAS_CPE_MDCT;
                break;
            case SID_SBA_1TC:
                assert( "Forbidden value for SID format in CPE (SBA 1TC), should have already been adressed earlier" );
                assert( !"Forbidden value for SID format in CPE (SBA 1TC), should have already been adressed earlier" );
                break;
            case SID_MASA_1TC:
                hCPE->element_mode = IVAS_SCE;
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ ivas_error ivas_mct_enc(
#ifdef DEBUG_FORCE_MCT_CP
    if ( ivas_format == MC_FORMAT )
    {
        assert( "Debugging switch works only with SBA modes" );
        assert( !"Debugging switch works only with SBA modes" );
    }
#endif

+4 −1
Original line number Diff line number Diff line
@@ -57,8 +57,11 @@ void ivas_sba_getTCs(
    Encoder_Struct *st_ivas,      /* i/o: Encoder struct               */
    const int16_t input_frame     /* i  : frame length                 */
)
{
    if ( st_ivas->hEncoderConfig->sba_planar )
    {
        ivas_sba_zero_vert_comp( sba_data, st_ivas->sba_analysis_order, st_ivas->hEncoderConfig->sba_planar, input_frame );
    }

    st_ivas->nchan_transport = ivas_get_sba_num_TCs( st_ivas->hEncoderConfig->ivas_total_brate, st_ivas->sba_analysis_order );

+0 −5
Original line number Diff line number Diff line
@@ -343,11 +343,6 @@ ivas_error ivas_spar_enc(
        return error;
    }

    if ( hEncoderConfig->sba_planar )
    {
        ivas_sba_zero_vert_comp( data_f, st_ivas->sba_analysis_order, hEncoderConfig->sba_planar, input_frame ); // TODO tmu: do we need a second call to this function ?
    }

    *nb_bits_metadata = hMetaData->nb_bits_tot;

    /* Force IVAS front pre-proc decision for higher bitrates */