Commit e63bc713 authored by Jouni Paulus's avatar Jouni Paulus
Browse files

rename switch to include issue number

parent 01b00ef3
Loading
Loading
Loading
Loading
+22 −22
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@

#include "lib_dec.h"
#include <string.h>
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
#include <math.h>
#endif
#include "cmdl_tools.h"
@@ -48,7 +48,7 @@
#include "rotation_file_reader.h"
#include "aeid_file_reader.h"
#include "split_render_file_read_write.h"
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
#include "obj_edit_file_reader.h"
#endif
#ifdef VARIABLE_SPEED_DECODING
@@ -157,7 +157,7 @@ typedef struct
    bool dpidEnabled;
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];
    bool objEditEnabled;
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    char *objEditFileName;
#endif

@@ -188,7 +188,7 @@ typedef struct

static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec );
#else
@@ -201,7 +201,7 @@ static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBs
static int16_t app_own_random( int16_t *seed );
static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar );
#endif
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader );
#else
static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters );
@@ -236,7 +236,7 @@ int main(
    int16_t *pcmBuf = NULL;
    IVAS_RENDER_FRAMESIZE asked_frame_size;
    IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary;
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader *objectEditFileReader = NULL;
#endif
#ifdef DEBUGGING
@@ -442,7 +442,7 @@ int main(
        }
    }

#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    /*------------------------------------------------------------------------------------------*
     * Open object editing instruction file
     *------------------------------------------------------------------------------------------*/
@@ -775,7 +775,7 @@ int main(

    if ( arg.voipMode )
    {
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec );
#else
        error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec );
@@ -783,7 +783,7 @@ int main(
    }
    else
    {
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, hIvasDec, pcmBuf );
#else
        error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf );
@@ -851,7 +851,7 @@ cleanup:
    RotationFileReader_close( &refRotReader );
    Vector3PairFileReader_close( &referenceVectorReader );
    RenderConfigReader_close( &renderConfigReader );
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader_close( &objectEditFileReader );
#endif

@@ -1052,7 +1052,7 @@ static bool parseCmdlIVAS_dec(
    }

    arg->objEditEnabled = false;
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    arg->objEditFileName = NULL;
#endif

@@ -1512,7 +1512,7 @@ static bool parseCmdlIVAS_dec(
        {
            arg->objEditEnabled = true;
            i++;
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
            if ( argc - i <= 3 || argv[i][0] == '-' )
            {
                fprintf( stderr, "Error: Object editing instruction filename not specified!\n\n" );
@@ -1732,7 +1732,7 @@ static void usage_dec( void )
    fprintf( stdout, "-aeid ID | File     : Acoustic environment ID (number > 0)\n" );
    fprintf( stdout, "                      alternatively, it can be a text file where each line contains \"ID duration\"\n" );
    fprintf( stdout, "                      for BINAURAL_ROOM_REVERB output configuration.\n" );
#ifndef OBJECT_EDIT_FILE_INTERFACE
#ifndef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    fprintf( stdout, "-obj_edit           : Enable objects editing\n" );
#else
    fprintf( stdout, "-obj_edit File      : Object editing instructions file or NULL for built-in example\n" );
@@ -2058,7 +2058,7 @@ static ivas_error decodeG192(
    RotFileReader *externalOrientationFileReader,
    RotFileReader *refRotReader,
    Vector3PairFileReader *referenceVectorReader,
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader *objectEditFileReader,
#endif
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,
@@ -2458,7 +2458,7 @@ static ivas_error decodeG192(
                        return error;
                    }

#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
                    if ( arg.objEditFileName != NULL )
                    {
                        if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK )
@@ -2470,7 +2470,7 @@ static ivas_error decodeG192(
#endif

                    /* Do object metadata editing here ... */
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
                    do_object_editing( &editableParameters, objectEditFileReader );
#else
                    do_object_editing( &editableParameters );
@@ -2997,7 +2997,7 @@ static ivas_error decodeVoIP(
    RotFileReader *externalOrientationFileReader,
    RotFileReader *refRotReader,
    Vector3PairFileReader *referenceVectorReader,
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader *objectEditFileReader,
#endif
    IVAS_DEC_HANDLE hIvasDec )
@@ -3279,7 +3279,7 @@ static ivas_error decodeVoIP(
            }
        }

#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) )
        {
            if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK )
@@ -3390,7 +3390,7 @@ static ivas_error decodeVoIP(
                }

                /* Do object metadata editing here ... */
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
                do_object_editing( &editableParameters, objectEditFileReader );
#else
                do_object_editing( &editableParameters );
@@ -3694,7 +3694,7 @@ cleanup:
 *---------------------------------------------------------------------*/

static void do_object_editing(
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    IVAS_EDITABLE_PARAMETERS *editableParameters,
    ObjectEditFileReader *objectEditFileReader )
#else
@@ -3715,7 +3715,7 @@ static void do_object_editing(
        }
    }

#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    if ( objectEditFileReader != NULL )
    {
        ReadObjectEditInfo *readInfo;
@@ -3798,7 +3798,7 @@ static void do_object_editing(
        }

        editableParameters->gain_bed = 0.5f;
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    }
#endif

+2 −2
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ typedef enum
    IVAS_ERR_DIRECTIVITY_NOT_SUPPORTED,
    IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED,
    IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED,
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED,
#endif
    IVAS_ERR_INVALID_HRTF,
@@ -263,7 +263,7 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Acoustic environment not supported";
        case IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED:
            return "Objects editing not supported";
#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        case IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED:
            return "Wrong use of both Object editing and Non-diegetic panning";
#endif
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1228_SAMPLING_RATE_MISMATCH_IN_HRTF_FILE    /* VA: issue 1228: Exit the processing when a HRTF binary file with wrong sampling rate is provided */
#define FIX_1225_DISCLAIMER                             /* VA: issue 1225: Add disclaimer for external renderer + Add info about IVAS reference version */
#define OBJECT_EDIT_FILE_INTERFACE                      /* Nokia: add decoder functionality to read object edit instructions from a file */
#define FIX_1217_OBJECT_EDIT_FILE_INTERFACE             /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */

/* #################### End BE switches ################################## */

+1 −1
Original line number Diff line number Diff line
@@ -3243,7 +3243,7 @@ static ivas_error doSanityChecks_IVAS(
        }
    }

#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on & st_ivas->hDecoderConfig->Opt_non_diegetic_pan )
    {
        return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, "Wrong set-up: Only object editing or Non-diegetic panning can be used." );
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ the United Nations Convention on Contracts on the International Sales of Goods.
#include "prot.h"


#ifdef OBJECT_EDIT_FILE_INTERFACE
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
/*-----------------------------------------------------------------------*
 * ObjectEditFileReader_open()
 *
Loading