Commit 534c9baa authored by Jonas Svedberg's avatar Jonas Svedberg
Browse files

added long FEr burst file

parent 76f46ee7
Loading
Loading
Loading
Loading
Loading

scripts/sim_bursts.sh

0 → 100644
+150 −0
Original line number Diff line number Diff line
#!/bin/bash -xv

#
#   (C) 2022-2024 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
#   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
#   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
#   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
#   contributors to this repository. All Rights Reserved.
#
#   This software is protected by copyright law and by international treaties.
#   The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB,
#   Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD.,
#   Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange,
#   Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other
#   contributors to this repository retain full ownership rights in their respective contributions in
#   the software. This notice grants no license of any kind, including but not limited to patent
#   license, nor is any license granted by implication, estoppel or otherwise.
#
#   Contributors are required to enter into the IVAS codec Public Collaboration agreement before making
#   contributions.
#
#   This software is provided "AS IS", without any express or implied warranties. The software is in the
#   development stage. It is intended exclusively for experts who have experience with such software and
#   solely for the purpose of inspection. All implied warranties of non-infringement, merchantability
#   and fitness for a particular purpose are hereby disclaimed and excluded.
#
#   Any dispute, controversy or claim arising under or in relation to providing this software shall be
#   submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in
#   accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and
#   the United Nations Convention on Contracts on the International Sales of Goods.
#

set -euo pipefail  # find when variables are not set but used anyway
IFS=$'\n\t'        # space is not a separator in bash vectors definitions, for simple matrix row creation
#IFS=$' '          # space is a separation, for matrix row adressing

NARG="$#"
echo NARG=$NARG

help=0
deconly=0
#opt_cnt=0

if [ $NARG -gte 1 ] ; then
if [ "$1" == "-h" ] || [ "$1" == "-help" ]; then
   help=1;
  if [ $help -ne 0 ]; then
    echo "Usage: $0 [-d]  "
    echo "       -d: deconly (do not rerun encoder)"
   exit
  fi
fi

if [ "$1" == "-d" ] || [ "$1" == "-deconly" ]; then
   deconly=1;
fi

fi



echo  POSTARGS
#MONOFILE="./testv/stv_muting_tones_and_noise3p2s_L48n"
#STEREOFILE="./testv/stv_muting_tones_and_noise3p2s_ST48n"

#MONOFILE="./testv/stv_mut3x20s_L48n"
#STEREOFILE="./testv/stv_mut3x20s_ST48n"

#MONOFILE="./testv/stv1MASA1TC48n"
#STEREOFILE="./testv/stv1MASA2TC48n"

MONOFILE="./testv/stv_mut_pink20s_L48n"
STEREOFILE="./testv/stv_mut3x20s_ST48n"


#FECFILE="./testv/FEC_burstlens_10to34in40.g192"

#FECFILE="./testv/FEC_bl10to34in40.g192"
#FERTAG="bl10to34"

FECFILE="./testv/FEC_bl10to69in70.g192"
FERTAG="bl10to69"


#FECFILE="./testv/FEC_bl35to65in70.g192"
#FERTAG="bl35to65"

IO="48"

BR_ISM1="32000"
BR_ISM2="64000"

#COND="HQLOCK"
#COND="DEFAULT"

declare -a cond_arr=(HQONLY DEFAULT)

## now loop through the condition array
for cond in "${cond_arr[@]}"
do
  ENCOPT=(-FORCE MUSIC)   # as array,  working expand as ${ENCOPT[@]}
   # ENCOPT="-FORCE MUSIC"   # as string not !  working

  IVASCOD="../IVAS_cod_$cond.exe"
  IVASDEC="../IVAS_dec_$cond.exe"

  if [ "$cond" == "DEFAULT" ] ; then
    ENCOPT=()

    IVASCOD="../IVAS_cod.exe"
    IVASDEC="../IVAS_dec.exe"
  fi


  echo ISM1
  #ISM1
    if  [ $deconly -ne 1 ] ; then
    rm -f $MONOFILE.ism1.$cond.ana
      $IVASCOD ${ENCOPT[@]}  -ISM 1  NULL   $BR_ISM1 $IO $MONOFILE.wav  $MONOFILE.ism1.$cond.ana
    fi
    $IVASDEC                MONO  $IO      $MONOFILE.ism1.$cond.ana  $MONOFILE.ism1.$cond.dec.no.fer.wav
    rm -f tmp.ana
    ~/bin/eid-xor -fer $MONOFILE.ism1.$cond.ana $FECFILE tmp.ana
    #$IVASDEC -FEC $FECFILE  MONO  $IO      $MONOFILE.ism1.$cond.ana  $MONOFILE.ism1.$cond.dec.$FERTAG.fer.wav
    $IVASDEC    MONO  $IO      tmp.ana  $MONOFILE.ism1.$cond.dec.$FERTAG.fer.wav

    #ISM2
    if [  $deconly -ne 1 ] ; then
      \rm -f $STEREOFILE.ism2.$cond.ana
      $IVASCOD ${ENCOPT[@]} -ISM 2 NULL NULL  $BR_ISM2 $IO  $STEREOFILE.wav $STEREOFILE.ism2.$cond.ana
    fi
    $IVASDEC               STEREO  $IO    $STEREOFILE.ism2.$cond.ana  $STEREOFILE.ism2.$cond.dec.no.fer.wav
    rm -f tmp.ana
    ~/bin/eid-xor -fer   $STEREOFILE.ism2.$cond.ana $FECFILE tmp.ana
    $IVASDEC  STEREO  $IO  tmp.ana  $MONOFILE.ism2.$cond.dec.$FERTAG.fer.wav

  #stereo
  if [  $deconly -ne 1 ] ; then
   \rm -f $STEREOFILE.stereo.$cond.ana
    $IVASCOD ${ENCOPT[@]} -stereo  $BR_ISM2 $IO  $STEREOFILE.wav $STEREOFILE.stereo.$cond.ana
  fi
  $IVASDEC               STEREO  $IO    $STEREOFILE.stereo.$cond.ana  $STEREOFILE.stereo.$cond.dec.no.fer.wav
  rm -f tmp.ana
  ~/bin/eid-xor -fer    $STEREOFILE.stereo.$cond.ana $FECFILE tmp.ana
  $IVASDEC  STEREO  $IO    tmp.ana  $STEREOFILE.stereo.$cond.dec.$FERTAG.fer.wav

  #EVS  (TBD)
  echo $0 done with cond $cond

done
+1 −0
Original line number Diff line number Diff line
!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k!k k k k k k k k k k k!k!k!k!k!k!k!k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k!k!k!k!k!k!k
 No newline at end of file