Commit e94604a8 authored by bayers's avatar bayers
Browse files

fix rs for OMASA and unified channel mem, disable unified channel mem for the moment

parent 5273a518
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@
#ifdef NONBE_UNIFIED_DECODING_PATHS
#define REMOVE_5MS_FLAG
#define FIX_XXX_JBM_PARAMUPMIX_RS
#define UNIFY_CHANNEL_MEM_HEAP
/*#define UNIFY_CHANNEL_MEM_HEAP*/
#endif
#define NONBE_FIX_722_MEMORY_LEAK_IN_PARAMUPMIX               /* Dlb : issue 722: memory leak fix in MC param upmix mode with BR switching*/
#define NONBE_FIX_780_ISM_STARTS_WITH_SID                     /* VA: issue 780: fix Crash in ISM decoding when bitstream starts with an SID and output_config is not EXT */
+15 −8
Original line number Diff line number Diff line
@@ -1512,6 +1512,8 @@ ivas_error ivas_masa_dec_reconfigure(
        }

#ifdef UNIFY_CHANNEL_MEM_HEAP
        if ( st_ivas->ivas_format != MASA_ISM_FORMAT )
        {
            if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
@@ -1532,7 +1534,11 @@ ivas_error ivas_masa_dec_reconfigure(
                st_ivas->hSpatParamRendCom->nb_subframes = st_ivas->hTcBuffer->nb_subframes;
                st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered;
            }
#ifdef UNIFY_CHANNEL_MEM_HEAP
        }
#endif

#ifndef UNIFY_CHANNEL_MEM_HEAP
        if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC )
        {
            int16_t granularityMultiplier = st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size;
@@ -1542,6 +1548,7 @@ ivas_error ivas_masa_dec_reconfigure(
                st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier;
            }
        }
#endif
    }

    return error;
+25 −0
Original line number Diff line number Diff line
@@ -442,6 +442,31 @@ ivas_error ivas_omasa_dec_config(
        }
    }

#ifdef UNIFY_CHANNEL_MEM_HEAP
    if ( ( error = ivas_jbm_dec_tc_buffer_reconfigure( st_ivas ) ) != IVAS_ERR_OK )
    {
        return error;
    }

    if ( st_ivas->hSpatParamRendCom != NULL && st_ivas->hSpatParamRendCom->slot_size == st_ivas->hTcBuffer->n_samples_granularity )
    {
        mvs2s( st_ivas->hTcBuffer->subframe_nbslots, st_ivas->hSpatParamRendCom->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS );
        st_ivas->hSpatParamRendCom->nb_subframes = st_ivas->hTcBuffer->nb_subframes;
        st_ivas->hSpatParamRendCom->subframes_rendered = st_ivas->hTcBuffer->subframes_rendered;
    }


    if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC )
    {
        int16_t granularityMultiplier = st_ivas->hTcBuffer->n_samples_granularity / st_ivas->hSpatParamRendCom->slot_size;
        int16_t n;
        for ( n = 0; n < MAX_JBM_SUBFRAMES_5MS; n++ )
        {
            st_ivas->hSpatParamRendCom->subframe_nbslots[n] = st_ivas->hTcBuffer->subframe_nbslots[n] * granularityMultiplier;
        }
    }
#endif

    return IVAS_ERR_OK;
}