Commit bbe8ae81 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

DLB MC changes at 160 kbps

parent de6eaffe
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -290,6 +290,7 @@
    <ClCompile Include="..\lib_dec\ivas_mct_core_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_mct_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_mct_dec_mct.c" />
    <ClCompile Include="..\lib_dec\ivas_mc_couple_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_mc_param_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_mdct_core_dec.c" />
    <ClCompile Include="..\lib_dec\ivas_mono_dmx_renderer.c" />
+1 −0
Original line number Diff line number Diff line
@@ -213,6 +213,7 @@
    <ClCompile Include="..\lib_enc\ivas_entropy_coder.c" />
    <ClCompile Include="..\lib_enc\ivas_ism_dtx_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_lfe_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_mc_couple_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_mc_param_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_pca_enc.c" />
    <ClCompile Include="..\lib_enc\ivas_range_uni_enc.c" />
+4 −0
Original line number Diff line number Diff line
@@ -835,7 +835,11 @@ static ivas_error write_indices_element(
        }

        /* TODO implemented only for MCT for now */
#ifdef MC_PARAMUPMIX_MODE
        if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT || st_ivas->mc_mode == MC_MODE_PARAMUPMIX ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) )
#else
        if ( ( st_ivas->hEncoderConfig->ivas_format == MC_FORMAT ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && ( element_id * CPE_CHANNELS + n == LFE_CHANNEL ) )
#endif
        {
            continue;
        }
+58 −0
Original line number Diff line number Diff line
@@ -153,6 +153,9 @@ typedef enum
    RENDERER_PARAM_ISM,
    RENDERER_BINAURAL_MIXER_CONV,
    RENDERER_BINAURAL_MIXER_CONV_ROOM
#ifdef MC_PARAMUPMIX_MODE
    ,RENDERER_MC_COUPLE
#endif

} RENDERER_TYPE;

@@ -1224,7 +1227,12 @@ typedef enum
    MC_MODE_NONE,
    MC_MODE_MCT,
    MC_MODE_PARAMMC,
#ifndef MC_PARAMUPMIX_MODE
    MC_MODE_MCMASA
#else
    MC_MODE_MCMASA,
    MC_MODE_PARAMUPMIX
#endif
} MC_MODE;

typedef enum
@@ -1288,7 +1296,57 @@ typedef enum
    MCT_CHAN_MODE_IGNORE
} MCT_CHAN_MODE;

#ifdef MC_PARAMUPMIX_MODE
/*----------------------------------------------------------------------------------*
 * MC Param-Upmix Mode Constants
 *----------------------------------------------------------------------------------*/
#define MC_PARAMUPMIX_MAX_TRANSPORT_CHANS  8
#define MC_PARAMUPMIX_MAX_INPUT_CHANS      12
#define MC_PARAMUPMIX_MAX_BITS             1024        /* Maximum number of bits for the MC Param-Upmix metadata */
#define MC_PARAMUPMIX_COMBINATIONS         4           /* number of sets of 2 channels combined */
#define MC_PARAMUPMIX_NCH                  2           /* number of channels to combine into 1 */
#define MC_PARAMUPMIX_MIN_CLDFB            8

typedef struct {
    const int32_t *value;
    const uint16_t *length;
} HUFF_TAB;

typedef struct {
    int32_t value[81];
    unsigned short length[81];
} HUFF_ELEMENTS;

typedef struct {
    HUFF_ELEMENTS df0;
    HUFF_ELEMENTS df;
    HUFF_ELEMENTS dt;
} HUFF_TABLE;

typedef enum {
    ALPHA,
    BETA
} PAR_TYPE;

typedef enum {
    FINE,
    COARSE
} QUANT_TYPE;

typedef struct {
    int16_t nquant;
    int16_t offset;
    float data[35];
} ACPL_QUANT_TABLE;  

typedef struct
{
    const int16_t (*alpha[2])[2];
    const int16_t (*beta[2])[2];
} HUFF_NODE_TABLE;


#endif
/*----------------------------------------------------------------------------------*
 * Parametric MC Constants
 *----------------------------------------------------------------------------------*/
+12 −1
Original line number Diff line number Diff line
@@ -103,10 +103,21 @@ MC_MODE ivas_mc_mode_select(
            {
                mc_mode = MC_MODE_MCMASA;
            }
#ifndef MC_PARAMUPMIX_MODE
            else if (total_brate < IVAS_192k)
            {
                mc_mode = MC_MODE_PARAMMC;
            }
#else
            else if (total_brate < IVAS_160k)
            {
                mc_mode = MC_MODE_PARAMMC;
            }
            else if (total_brate < IVAS_192k)
            {
                mc_mode = MC_MODE_PARAMUPMIX;
            }
#endif
            break;
        default:
            assert( 0 && "LS Setup not supported or defined for MC mode!\n" );
Loading