Skip to content

Renderer granularity revision

The renderer granularity in JBM decoding is chaotic and seems buggy for some configurations which might cause issues e.g. in bitrate switching.

The granularity is set in function ivas_jbm_dec_get_render_granularity() in some formats only while it is set inconsistently in other formats. Thus:

Also, some granularity changing scenarios are not tested (see https://ivas-codec-pc.3gpp.org/ivas-codec/coverage/lib_dec/ivas_jbm_dec.c.gcov.html, lines 1442-1580) and it would be good to add testvectors that will cover them:

  • MC format involving switching with TD and Crend
  • ISM format involving switching with Crend
  • OSBA format involving switching with TD rend

An example of likely a buggy setting is in OSBA where there is the following:

ivas_sba_dec_reconfigure():

        /* determine new granularity */
        granularity_new = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS );

        /* this will change anyway only with binaural */
        if ( renderer_type_new == RENDERER_BINAURAL_FASTCONV && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            granularity_new *= JBM_CLDFB_SLOTS_IN_SUBFRAME;
        }

Which sets the granularity_new to 240 samples (at 48 kHz) for BINAURAL output config. only. However, for BINAURAL_ROOM_REVERB output config., the TD renderer with the granularity of 5 ms is used but the new granularity is set here to 1.25 ms.