+91 94 448 29 228 --- E-Mail ID:networksimulators2@gmail.com

EvalVid SVC

EvalVid SVC (Scalable Video Coding) is the latest extension of the famous Advance Video Coding standard.Main idea of EvalVid SVC extension is to apply multi-layer coding into the AVC codec.It is latest techniques for video coding transmission in a efficient manner in different medium at different quality.

EvalVidSVC is an evaluation platform for Scalable Video Coding transmission

Evalvid SVC Scalable Video Coding was standardized as an extension of H.264/AVC which is derived from H.264/AVC. Evalvid utilizes same original content and uses seperate encoding or transcoder method for publication of different quality in various devices as per requirement.

It maintains two different concepts. Such as,

Video Coding Layer
Network Abstraction Layer

Types of scalability supported by EvalVid SVC:

  1. Quality scalability.
  2. Temporal scalability.
  3. Spatial scalability.

EvalVid-Scalable-video-coding

Data flow Streaming in EvalVid SVC:

  • Raw video in.
  • SVC encoder/decoder.
  • Hinter.
  • Mpv4 trace.
  • Networks.
  • SVC Re-builder.
  • Error generator.
  • SVC evaluator.
  • Sender/Receiver nodes.

EvalVid SVC Sample Code in Ns2

#include <stdio.h> 
#include <stdlib.h>
#include <string.h> 
#define cif_L  152064 
#define qcif_L 	38016   
char *skips(char *p, const char *s, int n) {   int i, j;   size_t l = strlen(s);  for (i=0; i<n; i++)     if ((p = strstr(p, s)) != 0) p += l;     else break;  return p; }  int main(int cn, char *cl[]) { 	int i, l; char buf[100], buf1[cif_L], last_buf1[cif_L], buf2[qcif_L], last_buf2[qcif_L], *p, *e; 	FILE *f=0, *fi=0, *fo=0; 	int nF=0, choice=0; 	int no_missing=0, no_nd=0, no_good=0;  if (cn != 6) {     		puts("myfixyuv <df> <cif/qcif> <noframe> <err.yuv> <fix.yuv>");     		puts("df\t\tdecoded frame status file");     		puts("noframe\t no of frames");     		puts("err.yuv\tdecoded video");     		puts("fix.yuv\tfixed video");     		puts("myfixyuv.exe df qcif 400 err.yuv fix.yuv");     		return 0;   	}  	   	if ((f = fopen(cl[1], "r")) == 0) {     		fprintf(stderr, "error opening %s\n", cl[1]);     		return 0;   	}   	  	if(strcmp(cl[2],"cif")==0)   		choice=0;   	else    		choice=1;     	nF=atoi(cl[3]);   	  	int mF[nF], dF[nF];     	   	if ((fi = fopen(cl[4], "rb")) == 0) {     		fprintf(stderr, "error opening %s\n", cl[1]);     		return 0;   	} 
         if ((fo = fopen(cl[5], "wb")) == 0) { 
    		fprintf(stderr, "error opening %s\n", cl[1]);     		return 0;   	} 
  	for(i=0; i<nF; i++){ 		mF[i]=1; 		dF[i]=1; 	} 
	while (!feof(f) && !ferror(f)) { 		if (!fgets(buf, sizeof buf, f) || feof(f) || ferror(f)) break; 		e=buf; 		if(strstr(buf,"Time")){ 			p = skips(buf, "Time...", 1); 			l = strtoul(p, &e, 10); 			mF[l]=0;  		} 
		if(strstr(buf,"Not coded")){ 
			dF[l]=0;  		}	 	} 
	for(i=0; i<nF; i++) { 		if(mF[i]==1){ 			dF[i]=0; 			printf("mF[%d]:%d is missing\n", i); 
		} 
		if(dF[i]==0) 			printf("dF[%d]:%d is not decoded\n", i); 		if(mF[i]==1 && dF[i]==1) 			printf("parse error in frame %d\n", i);	 	}	 
 	for(i=0; i<nF; i++) { 		if(mF[i]==0 && dF[i]==1){  		 	if(choice==0) { 		 		if(!feof(fi)){ 					fread(buf1, cif_L, 1, fi); 					fwrite(buf1, cif_L, 1, fo); 					strcpy(last_buf1, buf1); 					no_good++; 				} else { 					printf("error occurs\n"); 				} 
			} else { 				if(!feof(fi)){ 					fread(buf2, qcif_L, 1, fi); 					fwrite(buf2, qcif_L, 1, fo); 					strcpy(last_buf2, buf2); 					no_good++; 				} else { 					printf("error occurs\n"); 				}  } 			continue; 		} 
		if(mF[i]==0 && dF[i]==0){  			if(choice==0) { 				if(!feof(fi)){ 					fread(buf1, cif_L, 1, fi); 					fwrite(last_buf1, cif_L, 1, fo); 					no_nd++; 
				} else { 					fwrite(last_buf1, cif_L, 1, fo); 					no_nd++; 
				} 
			} else { 
				if(!feof(fi)){ 					fread(buf2, qcif_L, 1, fi); 					fwrite(last_buf2, qcif_L, 1, fo); 					no_nd++; 
				} else { 					fwrite(last_buf2, qcif_L, 1, fo); 					no_nd++; 				} }  
			continue; 	} 
		if(mF[i]==1 && dF[i]==0){  			if(choice==0) { 				fwrite(last_buf1, cif_L, 1, fo); 				no_missing++; 
			} else { 				fwrite(last_buf2, qcif_L, 1, fo);	 
				no_missing++; 
			}}} 	fclose(f); 	fclose(fi);   	fclose(fo);   	printf("Frmae-> good:%d, not_decoded:%d, missing:%d\n", no_good, no_nd, no_missing);   	 	return 0;	} 


NS2 Member Accounts | |
© 2005 - 2018 Vanet Projects

© 2005 - 2018 Matlab Projects