[xiph-commits] r12387 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Sat Jan 27 10:00:15 PST 2007
Author: xiphmont
Date: 2007-01-27 10:00:13 -0800 (Sat, 27 Jan 2007)
New Revision: 12387
Modified:
trunk/sushivision/objective.c
trunk/sushivision/objective.h
Log:
Add phase/magnitude objective output types
Modified: trunk/sushivision/objective.c
===================================================================
--- trunk/sushivision/objective.c 2007-01-27 17:36:19 UTC (rev 12386)
+++ trunk/sushivision/objective.c 2007-01-27 18:00:13 UTC (rev 12387)
@@ -108,9 +108,19 @@
p->z_func = s->function_list[function_map[i]];
break;
+ case 'M':
+ if(p->m_func){
+ fprintf(stderr,"Objective %d: More than one magnitude [M] dimension specified.\n",
+ number);
+ return -EINVAL;
+ }
+ p->m_fout = output_map[i];
+ p->m_func = s->function_list[function_map[i]];
+ break;
+
case 'E':
if(p->e2_func){
- fprintf(stderr,"Objective %d: More than two E dimensions specified.\n",
+ fprintf(stderr,"Objective %d: More than two error [E] dimensions specified.\n",
number);
return -EINVAL;
}
@@ -123,6 +133,21 @@
}
break;
+ case 'P':
+ if(p->p2_func){
+ fprintf(stderr,"Objective %d: More than two phase [P] dimensions specified.\n",
+ number);
+ return -EINVAL;
+ }
+ if(p->p1_func){
+ p->p2_fout = output_map[i];
+ p->p2_func = s->function_list[function_map[i]];
+ }else{
+ p->p1_fout = output_map[i];
+ p->p1_func = s->function_list[function_map[i]];
+ }
+ break;
+
default:
fprintf(stderr,"Objective %d: '%c' is an usupported output type.\n",
number,output_types[i]);
Modified: trunk/sushivision/objective.h
===================================================================
--- trunk/sushivision/objective.h 2007-01-27 17:36:19 UTC (rev 12386)
+++ trunk/sushivision/objective.h 2007-01-27 18:00:13 UTC (rev 12387)
@@ -25,11 +25,17 @@
sushiv_function_t *z_func;
sushiv_function_t *e1_func;
sushiv_function_t *e2_func;
+ sushiv_function_t *p1_func;
+ sushiv_function_t *p2_func;
+ sushiv_function_t *m_func;
int x_fout;
int y_fout;
int z_fout;
int e1_fout;
int e2_fout;
+ int p1_fout;
+ int p2_fout;
+ int m_fout;
};
More information about the commits
mailing list