Tinker, Peter (Tinker#m#_Peter++at++MSMAIL4.HAC.COM)
14 Nov 1996 09:27:01 -0800
Pete Tinker
Hughes Research Labs
Here's the code I use:
if (getenv("CA_USEDVR")) {
esChannel* chan;
float frac;
int x1,y1;
int nPixels = 0;
int nPipes;
esPipe** pipes;
esPipe* pipe;
int* pipePixels;
pfPipeVideoChannel** pvChans;
int i;
/* Determine the number of pixels per pipe. */
nPipes = 0;
for (pipe = global->pipes; pipe; pipe = pipe->next) {
nPipes++;
}
pipes = NEWN(esPipe*,nPipes);
pipePixels = NEWN(int,nPipes);
pvChans = NEWN(pfPipeVideoChannel*,nPipes);
for (i = 0,pipe = global->pipes; i < nPipes; i++,pipe = pipe->next) {
pipes [i] = pipe;
pipePixels [i] = 0;
}
for (chan = global->channels; chan; chan = chan->next) {
pfPipeVideoChannel* pvChan = pfGetChanPVChan(chan->pfchan);
pfGetChanSize(chan->pfchan,&x1,&y1);
for (i = 0; i < nPipes; i++) {
if (chan->pipe == pipes [i]) {
pipePixels [i] += x1 * y1;
pvChans [i] = pvChan;
}
}
}
for (chan = global->channels; chan; chan = chan->next) {
for (i = 0; i < nPipes; i++) {
if (chan->pipe == pipes [i]) {
pfGetChanSize(chan->pfchan,&x1,&y1);
pfPVChanDVRMode(pvChans [i],PFPVC_DVR_AUTO);
/* Allocate bandwidth based on number of pixels. */
frac = (float) (x1 * y1) / (float) pipePixels [i];
pfPVChanStressFilter(pvChans [i],frac,0.80f,0.95f,1.5f,2.0f,10.0f);
}
}
}
free(pipes);
free(pipePixels);
}
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:57 PDT