Skip to content

Dead code in function create_mct_enc()

In the function create_mct_enc(), there is the following instance:

    if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCT )
    {
        ...
    }
    else if ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT )
    {
        ...
    }
    else if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMMC )
    {
        ...
    }
    else if ( ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
    {
        ...
    }
    else if ( ivas_format == SBA_FORMAT )
    {
       ...
    }
    else
    {
        assert( !"IVAS format currently not supported for MCT" );
    }

First, there are two if branches for SBA_FORMAT, so the later one could be removed (also the code coverage test points to it).

Then, I find the else branch having only the assert weird and would suggest to a) either put it under DEBUGGING, or b) replace it with return( IVAS_ERROR( ...) );