Commit d62d10ac authored by malenov's avatar malenov
Browse files

dumping core.loc2, coder_type and ism_imp

parent c6fbe78d
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -734,6 +734,19 @@ ivas_error pre_proc_front_ivas(

    st->coder_type = find_uv( st, pitch_fr, voicing_fr, inp_12k8, ee, &dE1X, corr_shift, *relE, Etot, hp_E, &flag_spitch, last_core_orig, hStereoClassif );

#ifdef DEBUG_FORCE_DIR
    if ( st->force_dir[0] != '\0' )
    {
        dbgread( &st->coder_type, sizeof( int16_t ), 1, fname( st->force_dir, "force_coder_type.enf", -1, -1, -1 ) );
        dbgread( &st->coder_type_raw, sizeof( int16_t ), 1, fname( st->force_dir, "force_coder_type_raw.enf", -1, -1, -1 ) );
    }
    else
    {
        dbgwrite( &st->coder_type, sizeof( int16_t ), 1, 1, "res/force_coder_type.enf" );
        dbgwrite( &st->coder_type_raw, sizeof( int16_t ), 1, 1, "res/force_coder_type_raw.enf" );
    }
#endif

    /*-----------------------------------------------------------------*
     * channel aware mode configuration                                *
     *-----------------------------------------------------------------*/
+22 −11
Original line number Diff line number Diff line
@@ -166,6 +166,17 @@ void ivas_decision_matrix_enc(
        }
    }

#ifdef DEBUG_FORCE_DIR
    if ( st->force_dir[0] != '\0' )
    {
        dbgread( &st->core, sizeof( int16_t ), 1, fname( st->force_dir, "force_core_loc1.enf", -1, -1, -1 ) );
    }
    else
    {
        dbgwrite( &st->core, sizeof( int16_t ), 1, 1, "res/force_core_loc1.enf" );
    }
#endif

    /* do not allow TD stereo ACELP core -> DFT stereo TCX core switching as it is on the WC complexity path */
    if ( ( ( st->last_core == ACELP_CORE && last_element_mode == IVAS_CPE_TD && st->element_mode == IVAS_CPE_DFT ) || ( st->tdm_LRTD_flag == 1 && st->total_brate <= IVAS_16k4 ) ) && st->core == TCX_20_CORE && st->total_brate <= MAX_ACELP_BRATE ) /* Override TCX in case of LRTD && primary channel has low bitrate*/
    {
@@ -218,17 +229,6 @@ void ivas_decision_matrix_enc(
    }
#endif

#ifdef DEBUG_FORCE_DIR
    if ( st->force_dir[0] != '\0' )
    {
        dbgread( &st->core, sizeof( int16_t ), 1, fname( st->force_dir, "force_core.enf", -1, -1, -1 ) );
    }
    else
    {
        dbgwrite( &st->core, sizeof( int16_t ), 1, 1, "res/force_core.enf" );
    }
#endif

    /* TCX not available at low bitrates -> replace it by GSC */
    if ( st->core == TCX_20_CORE && st->total_brate < STEREO_TCX_MIN_RATE )
    {
@@ -257,6 +257,17 @@ void ivas_decision_matrix_enc(
        st->core = TCX_20_CORE;
    }

#ifdef DEBUG_FORCE_DIR
    if ( st->force_dir[0] != '\0' )
    {
        dbgread( &st->core, sizeof( int16_t ), 1, fname( st->force_dir, "force_core_loc2.enf", -1, -1, -1 ) );
    }
    else
    {
        dbgwrite( &st->core, sizeof( int16_t ), 1, 1, "res/force_core_loc2.enf" );
    }
#endif

    /*---------------------------------------------------------------------*
     * Select ACELP and GSC extension layer
     *---------------------------------------------------------------------*/
+19 −1
Original line number Diff line number Diff line
@@ -171,6 +171,10 @@ ivas_error ivas_ism_enc(

        st->bits_frame_nominal = ( int16_t )( ( hSCE->element_brate / FRAMES_PER_SEC ) - ISM_NB_BITS_METADATA_NOMINAL );

#ifdef DEBUG_MODE_INFO
        dbgwrite( &st->element_mode, sizeof( int16_t ), 1, input_frame, fname( debug_dir, "element_mode", 0, st->id_element, ENC ) );
#endif

        /*----------------------------------------------------------------*
         * Front Pre-processing
         *----------------------------------------------------------------*/
@@ -427,7 +431,21 @@ ivas_error ivas_ism_enc(
            }
        }
    }

    for ( sce_id = 0; sce_id < nchan_transport_ism; sce_id++ )
    {
        float tmpF;
        int16_t id;

        st = st_ivas->hSCE[sce_id]->hCoreCoder[0];
        id = st->id_element;

        tmpF = st->element_brate / 1000.0f;
        dbgwrite( &tmpF, sizeof( float ), 1, input_frame, fname( debug_dir, "element_brate", 0, id, ENC ) );
    }

#endif

    pop_wmops();

    return error;
+12 −0
Original line number Diff line number Diff line
@@ -297,6 +297,18 @@ ivas_error ivas_ism_metadata_enc(
        }
    }

#ifdef DEBUG_FORCE_DIR
    if ( hSCE[0]->hCoreCoder[0]->force_dir[0] != '\0' )
    {
        dbgread( ism_imp, sizeof( int16_t ), nchan_ism, fname( hSCE[0]->hCoreCoder[0]->force_dir, "force_ism_imp.enf", -1, -1, -1 ) );
    }
    else
    {
        dbgwrite( ism_imp, sizeof( int16_t ), nchan_ism, 1, "res/force_ism_imp.enf" );
    }
#endif


    /*----------------------------------------------------------------*
     * Write ISM common signaling
     *----------------------------------------------------------------*/