Commit 7313f8e4 authored by bayers's avatar bayers
Browse files

add dummy frame size fields to header for better comparison of SR MD bit streams

parent 8c4ae155
Loading
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -200,6 +200,18 @@ ivas_error split_rend_write_bitstream_to_file(
        return IVAS_ERR_FAILED_FILE_WRITE;
    }

    /* write dummy header field for framelength*/
#ifdef API_5MS
    /* Write frame size signalling */
    {
        int16_t codec_frame_size_ms = 20;
        if ( fwrite( &codec_frame_size_ms, sizeof( codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 )
        {
            return IVAS_ERR_FAILED_FILE_WRITE;
        }
    }
#endif

    /*write num bytes*/
    if ( fwrite( bits_written, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 )
    {
@@ -278,6 +290,17 @@ ivas_error split_rend_read_bits_from_file(
    {
        return IVAS_ERR_FAILED_FILE_READ;
    }
#ifdef API_5MS
    /* read frame size signalling */
    {
        int16_t codec_frame_size_ms;
        if ( fread( &codec_frame_size_ms, sizeof( codec_frame_size_ms ), 1, hSplitRendFileReadWrite->file ) != 1 )
        {
            return IVAS_ERR_FAILED_FILE_WRITE;
        }
    }
#endif


    /*write num bytes*/
    if ( fread( &bit_len, sizeof( int32_t ), 1, hSplitRendFileReadWrite->file ) != 1 )