Lines Matching refs:idx

82     int idx;
88 for (idx = 0; idx < nLayers; idx++)
90 decCtrl->volbuf[idx] = volbuf[idx];
91 decCtrl->volbuf_size[idx] = volbuf_size[idx];
165 for (idx = 0; idx < nLayers; idx++)
169 video->vopHeader[idx] = IMEM_vopHeader[idx];
171 video->vopHeader[idx] = (Vop *) oscl_malloc(sizeof(Vop));
173 if (video->vopHeader[idx] == NULL)
180 oscl_memset(video->vopHeader[idx], 0, sizeof(Vop));
181 video->vopHeader[idx]->timeStamp = 0;
185 video->vol[idx] = IMEM_vol[idx];
187 oscl_memset(video->vol[idx], 0, sizeof(Vol));
188 if (video->vol[idx] == NULL) status = PV_FALSE;
191 video->vol[idx] = (Vol *) oscl_malloc(sizeof(Vol));
192 if (video->vol[idx] == NULL)
200 oscl_memset(video->vol[idx], 0, sizeof(Vol));
214 if ((buffer_size = BitstreamOpen(stream, idx)) < 0)
221 video->vol[idx]->bitstream = stream;
222 video->vol[idx]->volID = idx;
223 video->vol[idx]->timeInc_offset = 0; /* 11/12/01 */
229 BitstreamReset(stream, decCtrl->volbuf[idx], decCtrl->volbuf_size[idx]);
231 switch (DecodeVOLHeader(video, idx))
263 video->vol[idx]->quantType = 0;
264 video->vol[idx]->quantPrecision = 5;
265 video->vol[idx]->errorResDisable = 1;
266 video->vol[idx]->dataPartitioning = 0;
267 video->vol[idx]->useReverseVLC = 0;
269 video->vol[idx]->scalability = 0;
583 int idx;
585 for (idx = 0; idx < decCtrl->nLayers; idx++)
587 video->vopHeader[idx]->timeStamp = 0;
609 int idx;
659 for (idx = 0; idx < video->numberOfLayers; idx++)
661 if (video->vol[idx])
663 BitstreamClose(video->vol[idx]->bitstream);
664 video->vol[idx]->bitstream = NULL;
665 video->vol[idx] = NULL;
667 video->vopHeader[idx] = NULL;
732 for (idx = 0; idx < video->numberOfLayers; idx++)
734 if (video->vol[idx])
736 if (video->vol[idx]->bitstream)
738 BitstreamClose(video->vol[idx]->bitstream);
739 oscl_free(video->vol[idx]->bitstream);
741 oscl_free(video->vol[idx]);
748 for (idx = 0; idx < video->numberOfLayers; idx++)
750 if (video->vopHeader[idx]) oscl_free(video->vopHeader[idx]);
829 int idx;
832 for (idx = 0; idx < BITRATE_AVERAGE_WINDOW; idx++)
834 sum += video->nBitsPerVop[idx];
936 int idx = -1;
953 idx++;
954 while (oscl_memcmp(start_code_prefix, video_buffer + idx, 3))
956 idx++;
957 if (idx + 3 >= *vol_header_size) goto quit;
960 while (video_buffer[idx+3] != 0xb3 && video_buffer[idx+3] != 0xb6);
962 oscl_memcpy(vol_header, video_buffer, idx);
963 *vol_header_size = idx;
1096 int idx;
1103 for (idx = 0; idx < decCtrl->nLayers; idx++)
1106 if (buffer_size[idx] <= 0)
1108 timestamp[idx] = -1;
1113 if (timestamp[idx] < 0)
1115 if (vopHeader[idx]->timeStamp < 0)
1118 video->currLayer = idx;
1119 stream = video->vol[idx]->bitstream;
1120 BitstreamReset(stream, buffer[idx], buffer_size[idx]);
1122 while ((status = DecodeVOPHeader(video, vopHeader[idx], FALSE)) != PV_SUCCESS)
1129 buffer_size[idx] = 0;
1135 vopHeader[idx]->timeStamp =
1136 timestamp[idx] = CalcVopDisplayTime(video->vol[idx], vopHeader[idx], video->shortVideoHeader);
1137 if (idx == 0) vopHeader[idx]->refSelectCode = 1;
1143 timestamp[idx] = vopHeader[idx]->timeStamp;
1148 if (timestamp[idx] >= 0 && (display_time < 0 || display_time > timestamp[idx]))
1150 display_time = timestamp[idx];
1151 target_layer = idx;
1153 else if (display_time == timestamp[idx])
1305 int idx;
1432 idx = ++video->frame_idx % BITRATE_AVERAGE_WINDOW;
1436 video->nBitsPerVop[idx] = getPointer(currVol->bitstream);
1437 video->prevTimestamp[idx] = currVop->timeStamp;
1444 video->duration = video->prevTimestamp[idx];
1445 video->duration -= video->prevTimestamp[(++idx)%BITRATE_AVERAGE_WINDOW];