Commit 6c090f8b authored by sagnowski's avatar sagnowski
Browse files

Use BASOPs for computing allocation size

parent 65607ba9
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1239,8 +1239,12 @@ static ivas_error isar_render_poses(
    /* init flush buffer for rate switch if not already initizalized */
    IF( hIvasDec->flushbuffer == NULL )
    {
        hIvasDec->flushbuffer = (void *) malloc( sizeof( Word16 ) * numPoses * BINAURAL_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES );
        set16_fx( (Word16 *) hIvasDec->flushbuffer, 0, numPoses * BINAURAL_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES );
        /* hIvasDec->flushbuffer = (void *) malloc( sizeof( Word16 ) * numPoses * BINAURAL_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ); */
        /* set16_fx( (Word16 *) hIvasDec->flushbuffer, 0, numPoses * BINAURAL_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ); */
        Word32 size;
        size = L_mult0( mult0( sizeof( Word16 ), mult0( numPoses, BINAURAL_CHANNELS ) ), shl( div_l( hIvasDec->nSamplesFrame, IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ), 1 ) );
        hIvasDec->flushbuffer = (void *) malloc( size );
        set16_fx( (Word16 *) hIvasDec->flushbuffer, 0, size );
    }

    /* render */