Commit 1edc4726 authored by vaclav's avatar vaclav
Browse files

Introduce a signaling bit for combined format coding; under COMBINED_FORMAT_SIGNALING

parent bc0f1537
Loading
Loading
Loading
Loading
Loading
+75 −65
Original line number Diff line number Diff line
@@ -1914,7 +1914,11 @@ ivas_error preview_indices(
                k = IVAS_FORMAT_SIGNALING_NBITS;
                if ( st_ivas->ivas_format == MASA_FORMAT )
                {
#ifdef COMBINED_FORMAT_SIGNALING
                    k = IVAS_FORMAT_SIGNALING_NBITS_EXTENDED;
#else
                    k = IVAS_FORMAT_SIGNALING_NBITS_SBA;
#endif
                }

                if ( total_brate < MIN_BRATE_MDCT_STEREO )
@@ -1954,9 +1958,15 @@ ivas_error preview_indices(
        else if ( st_ivas->ivas_format == SBA_FORMAT )
        {
            /* Read SBA planar flag and SBA order */
#ifdef COMBINED_FORMAT_SIGNALING
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED] == 1 );
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + 1] == 1 );
#else
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 );
            st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 );
            st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 );
#endif

            st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( total_brate, st_ivas->sba_order );

+4 −0
Original line number Diff line number Diff line
@@ -78,7 +78,11 @@ typedef enum
 *----------------------------------------------------------------------------------*/

#define IVAS_FORMAT_SIGNALING_NBITS             2                           /* number of bits for signaling the IVAS format */
#ifdef COMBINED_FORMAT_SIGNALING
#define IVAS_FORMAT_SIGNALING_NBITS_EXTENDED    ( IVAS_FORMAT_SIGNALING_NBITS + 1 )
#else
#define IVAS_FORMAT_SIGNALING_NBITS_SBA         ( IVAS_FORMAT_SIGNALING_NBITS + 1 )
#endif


/*----------------------------------------------------------------------------------*
+5 −0
Original line number Diff line number Diff line
@@ -2154,8 +2154,13 @@ void ivas_spar_set_bitrate_config(
        max_bits += (int16_t) ( ivas_spar_br_table_consts[table_idx].core_brs[i][1] / FRAMES_PER_SEC );
    }

#ifdef COMBINED_FORMAT_SIGNALING
    pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_EXTENDED - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - total_bits;
    pSpar_md_cfg->max_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_EXTENDED - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - max_bits;
#else
    pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - total_bits;
    pSpar_md_cfg->max_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - max_bits;
#endif

    md_coding_bits_header = SPAR_NUM_CODING_STRAT_BITS + pSpar_md_cfg->quant_strat_bits;

+4 −0
Original line number Diff line number Diff line
@@ -177,6 +177,10 @@
#define FIX_435_ISM_MERGE_BUG                           /* Eri: Merge bug fix for ISM NULL metadata and tcx_only cases */
#define FIX_355_REFACTOR_PARAMBIN_TO_5MS                /* Nokia: Fixes issue 355 by refactoring parametric binauralizer code to 5 ms mode */

#define COMBINED_FORMAT_SIGNALING                       /* VA: Introduce a signaling bit for combined format coding */



/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+16 −0
Original line number Diff line number Diff line
@@ -369,8 +369,24 @@ static ivas_error ivas_read_format(
                st_ivas->ivas_format = MC_FORMAT;
                break;
            case 2:
#ifdef COMBINED_FORMAT_SIGNALING
                st_ivas->ivas_format = ISM_FORMAT;

                if ( ivas_total_brate >= IVAS_24k4 )
                {
                    if ( st_ivas->bit_stream[*num_bits_read] )
                    {
                        /* placeholder for combined format signaling */

                        ( *num_bits_read )++;
                    }

                    ( *num_bits_read )++;
                }
#else
                st_ivas->ivas_format = ISM_FORMAT;
#endif

                break;
            case 3:
                if ( st_ivas->bit_stream[*num_bits_read] )
Loading