Commit 9a67a759 authored by Stefan Doehla's avatar Stefan Doehla
Browse files

[fix] wire up SR-ToC D bit for in-band pose-correction signaling

parent 1e1c2fbf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3900,6 +3900,9 @@ static ivas_error decodeVoIP(
            srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms;
            srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD;
            srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms;
#ifdef FIX_1587_SR_TOC_D_BIT
            srInfo.diegetic = ( splitRendBits->pose_correction != ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE );
#endif

            if ( ( error = IVAS_RTP_WriteNextFrame( &srRtp, splitRendBits->bits_buf, &srInfo, (int16_t) splitRendBits->bits_written, false, false ) ) != IVAS_ERR_OK )
            {
+16 −0
Original line number Diff line number Diff line
@@ -746,6 +746,10 @@ static ivas_error parseSRParamsFile(
        return IVAS_ERR_FAILED_FILE_OPEN;
    }

#ifdef FIX_1587_SR_TOC_D_BIT
    bool dofExplicitlySet = false;
#endif

    *codec = ISAR_SPLIT_REND_CODEC_NONE;
    *poseCorrection = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
    *codec_frame_size_ms = 5;
@@ -765,6 +769,9 @@ static ivas_error parseSRParamsFile(
                if ( val == 0 || val == 1 )
                {
                    *poseCorrection = ( val == 0 ) ? ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE : ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB;
#ifdef FIX_1587_SR_TOC_D_BIT
                    dofExplicitlySet = true;
#endif
                }
            }
            else if ( 0 == strncmp( key, "LC3PLUS_HIGHRES", 15 ) )
@@ -812,6 +819,12 @@ static ivas_error parseSRParamsFile(
                *codec = ( srInfo.codec == IVAS_SR_TRANSPORT_LCLD ) ? ISAR_SPLIT_REND_CODEC_LCLD : ISAR_SPLIT_REND_CODEC_LC3PLUS;
                *codec_frame_size_ms = (int16_t) srInfo.codecFrameSizeMs;
                *isar_frame_size_ms = *codec_frame_size_ms; /* for rtp force codec framesize as isar renderer frame size */
#ifdef FIX_1587_SR_TOC_D_BIT
                if ( !dofExplicitlySet )
                {
                    *poseCorrection = srInfo.diegetic ? ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB : ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
                }
#endif
                break;
            }
        }
@@ -1220,6 +1233,9 @@ int main(
                bitBuffer += ( auSizeBits + 7 ) / 8;
                bitsBuffer.config.bitsWritten += auSizeBits;
                bitsBuffer.config.codec = srInfo.codec == IVAS_SR_TRANSPORT_LC3PLUS ? ISAR_SPLIT_REND_CODEC_LC3PLUS : ISAR_SPLIT_REND_CODEC_LCLD;
#ifdef FIX_1587_SR_TOC_D_BIT
                bitsBuffer.config.poseCorrection = srInfo.diegetic ? ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB : ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
#endif
                frameMS += bitsBuffer.config.codec_frame_size_ms;
            }
        }
+1 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@
#define FIX_FMSW_DEC_2                                  /* float issue 1575: fix crash for format switching when bitsream starts with EVS */
#define FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW     /* Orange: float issue 1548: Harmonize non diegetic panning law in ISM and renderers */
#define FIX_FLOAT_1578_OMASA_REND_SPIKES                /* Nokia: Float issue 1578: Fix spikes and collapsed perception in OMASA/MASA rendering to FOA/HOA */
#define FIX_1587_SR_TOC_D_BIT                           /* FhG: SR-ToC D bit set by pre-renderer and used by post-renderer for in-band pose-correction signaling */

/* ##################### End NON-BE switches ########################### */