Commit 6baddf5e authored by vaclav's avatar vaclav
Browse files

cleaning: remove unnecessary includes and unused defines in bitstream handling related files

parent c97757a8
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -133,9 +133,6 @@ enum{

#define MAX_V_MULT_MAT                  100             /* maximum array length for the function v_mult_mat() */

#define G192_BIN0                       (uint16_t) 0x007F
#define G192_BIN1                       (uint16_t) 0x0081


/*----------------------------------------------------------------------------------*
 * Layers
+9 −12
Original line number Diff line number Diff line
@@ -34,11 +34,8 @@
    EVS Codec 3GPP TS26.443 Nov 04, 2021. Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
  ====================================================================================*/

/* WMC_TOOL_SKIP_FILE (basic ops file) */

#include "options.h"
#include "g192.h"
#include "cnst.h"
#include "common_api_types.h"
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
@@ -124,7 +121,7 @@ G192_ERROR G192_ReadFrame_compact(
    int16_t *const num_bits,
    int16_t *const bfi )
{
    uint16_t short_serial[MAX_BITS_PER_FRAME];
    uint16_t short_serial[IVAS_MAX_BITS_PER_FRAME];
    G192_ERROR err;
    int16_t i;

@@ -153,7 +150,7 @@ G192_ERROR G192_ReadVoipFrame_compact(
    uint32_t *const rtpTimeStamp,
    uint32_t *const rcvTime_ms )
{
    int16_t short_serial[MAX_BITS_PER_FRAME];
    int16_t short_serial[IVAS_MAX_BITS_PER_FRAME];
    G192_ERROR err;
    int16_t i;

@@ -223,7 +220,7 @@ G192_ERROR G192_ReadFrame_short(
                return G192_READ_ERROR;
            }

            if ( *num_bits > MAX_BITS_PER_FRAME )
            if ( *num_bits > IVAS_MAX_BITS_PER_FRAME )
            {
                fprintf( stderr, "\n Frame is too large  " );
                return G192_READ_ERROR;
@@ -386,7 +383,7 @@ G192_ERROR G192_ReadVoipFrame_short(
    }

    *num_bits = rtpPayloadG192[1];
    if ( *num_bits == 0u || *num_bits + 2u != rtpPayloadSize || *num_bits > MAX_BITS_PER_FRAME )
    if ( *num_bits == 0u || *num_bits + 2u != rtpPayloadSize || *num_bits > IVAS_MAX_BITS_PER_FRAME )
    {
        fprintf( stderr, "error in parsing RTP payload: rtpPayloadSize=%u nBits=%d", rtpPayloadSize, *num_bits );
        return G192_INVALID_DATA;
@@ -453,10 +450,10 @@ G192_ERROR G192_WriteFrame(
    const uint16_t *serial,
    const int16_t numBits )
{
    uint16_t G192_HEADER[2], G192_DATA[MAX_BITS_PER_FRAME];
    uint16_t G192_HEADER[2], G192_DATA[IVAS_MAX_BITS_PER_FRAME];
    uint16_t i, bit;

    assert( numBits <= MAX_BITS_PER_FRAME );
    assert( numBits <= IVAS_MAX_BITS_PER_FRAME );

    G192_HEADER[0] = G192_SYNC_GOOD_FRAME;
    G192_HEADER[1] = numBits; /* Frame Length */
@@ -492,7 +489,7 @@ G192_ERROR G192_WriteVoipFrame_short(
    uint16_t const rtpTimeStamp,
    uint32_t const rcvTime_ms )
{
    int16_t G192_HEADER[2], G192_DATA[MAX_BITS_PER_FRAME];
    int16_t G192_HEADER[2], G192_DATA[IVAS_MAX_BITS_PER_FRAME];
    int16_t i, bit;

    uint32_t rtpPacketSize = numBits + 12 + 2;
@@ -502,7 +499,7 @@ G192_ERROR G192_WriteVoipFrame_short(
    uint32_t rtpTimeStamp_2 = htonl( rtpTimeStamp );
    uint16_t ssrc_2 = (uint16_t) htonl( ssrc );

    assert( numBits <= MAX_BITS_PER_FRAME );
    assert( numBits <= IVAS_MAX_BITS_PER_FRAME );

    fwrite( &rtpPacketSize, sizeof( rtpPacketSize ), 1, hG192->file );
    fwrite( &rcvTime_ms, sizeof( rcvTime_ms ), 1, hG192->file );