Improve error pattern generator to the version 2 - Patterns for use in the HEVC robustness test
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
|
||||
#OUTPUT_DIR=ErrorPattern_Ballet_QP20_PCKT3778_N5_P1.1.7_B1.1.5
|
||||
|
||||
SEQNAME=BookArrivalHEVC
|
||||
NLOOP=15
|
||||
NPACKETS=100
|
||||
PLOSS_INI=50
|
||||
PLOSS_INC=10
|
||||
PLOSS_FIN=50
|
||||
SEQNAME=NALLoss
|
||||
NLOOP=100
|
||||
NPACKETS=334
|
||||
PLOSS_INI=10
|
||||
PLOSS_INC=20
|
||||
PLOSS_FIN=90
|
||||
BLENGTH_INI=1
|
||||
BLENGTH_INC=1
|
||||
BLENGTH_FIN=1
|
||||
|
||||
OUTPUT_DIR="ErrorPattern_"$SEQNAME"_PCKT"$NPACKETS_A"_N"$NLOOP"_P"$PLOSS_INI"-"$PLOSS_INC"-"$PLOSS_FIN"_B"$BLENGTH_INI"-"$BLENGTH_INC"-"$BLENGTH_FIN
|
||||
OUTPUT_DIR="ErrorPattern_"$SEQNAME"_PCKT"$NPACKETS"_N"$NLOOP"_P"$PLOSS_INI"-"$PLOSS_INC"-"$PLOSS_FIN
|
||||
|
||||
if [ $PLOSS_INC = 0 ]; then
|
||||
PLOSS_INC=1
|
||||
@@ -31,3 +31,6 @@ do
|
||||
./SQNGen $NLOOP $NPACKETS 0 loss_GI $PLOSS $BLENGTH -o $OUTPUT_DIR"/"$SEQNAME
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
mv data.dat $OUTPUT_DIR/data.dat
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//This program was used to test the loss generation algorithms implemented in Netem2
|
||||
//available at http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetEm2
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -654,14 +655,14 @@ int main (int argc, char *argv[]) {
|
||||
for (int sample=0;sample<num_of_samples;sample++) {
|
||||
FILE *out_file = NULL;
|
||||
char filename[100];
|
||||
sprintf(filename,"%s_P%d_B%d_%d_ERRORPATTERN.dat", filename_common, (int)(ploss*1000), (int)burst_length, sample);
|
||||
sprintf(filename,"%s_P%d_%d.dat", filename_common, (int)(ploss*1000), sample);
|
||||
out_file = fopen (filename, "w");
|
||||
if (out_file == NULL)
|
||||
{
|
||||
printf("Error opening the error pattern file\n");
|
||||
return 0;
|
||||
}
|
||||
fprintf(out_file, "nPackets: %d\nVector:\n",length);
|
||||
//fprintf(out_file, "nPackets: %d\nVector:\n",length);
|
||||
data.open("data.dat", ios::out | ios::app);
|
||||
data <<"\n"<<(sample+1)<<";";
|
||||
data <<num_of_samples<<";";
|
||||
@@ -674,7 +675,7 @@ int main (int argc, char *argv[]) {
|
||||
if((argv[6]) && (argv[7]) && (argv[8])) data <<atof(argv[8])<<";"; else data <<"0"<<";";
|
||||
if((argv[6]) && (argv[7]) && (argv[8]) && (argv[9])) data <<atof(argv[9])<<";"; else data <<"N/A"<<";";
|
||||
data.close();
|
||||
//sleep (1);
|
||||
sleep (1);
|
||||
if ((strcmp (argv[4],"loss_bern") == 0) || (strcmp (argv[4],"loss_gilb") == 0) || (strcmp (argv[4],"loss_gilb_ell") == 0))
|
||||
gilb_ell_gen(q, sequence, length, p, r, k, h);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user