Home | History | Annotate | Download | only in src

Lines Matching refs:idx

72     int idx;
78 for (idx = 0; idx < nLayers; idx++)
80 decCtrl->volbuf[idx] = volbuf[idx];
81 decCtrl->volbuf_size[idx] = volbuf_size[idx];
145 for (idx = 0; idx < nLayers; idx++)
149 video->vopHeader[idx] = IMEM_vopHeader[idx];
151 video->vopHeader[idx] = (Vop *) oscl_malloc(sizeof(Vop));
153 if (video->vopHeader[idx] == NULL)
160 oscl_memset(video->vopHeader[idx], 0, sizeof(Vop));
161 video->vopHeader[idx]->timeStamp = 0;
165 video->vol[idx] = IMEM_vol[idx];
167 oscl_memset(video->vol[idx], 0, sizeof(Vol));
168 if (video->vol[idx] == NULL) status = PV_FALSE;
171 video->vol[idx] = (Vol *) oscl_malloc(sizeof(Vol));
172 if (video->vol[idx] == NULL)
180 oscl_memset(video->vol[idx], 0, sizeof(Vol));
194 if ((buffer_size = BitstreamOpen(stream, idx)) < 0)
201 video->vol[idx]->bitstream = stream;
202 video->vol[idx]->volID = idx;
203 video->vol[idx]->timeInc_offset = 0; /* 11/12/01 */
209 BitstreamReset(stream, decCtrl->volbuf[idx], decCtrl->volbuf_size[idx]);
211 switch (DecodeVOLHeader(video, idx))
243 video->vol[idx]->quantType = 0;
244 video->vol[idx]->quantPrecision = 5;
245 video->vol[idx]->errorResDisable = 1;
246 video->vol[idx]->dataPartitioning = 0;
247 video->vol[idx]->useReverseVLC = 0;
249 video->vol[idx]->scalability = 0;
529 int idx;
531 for (idx = 0; idx < decCtrl->nLayers; idx++)
533 video->vopHeader[idx]->timeStamp = 0;
555 int idx;
605 for (idx = 0; idx < video->numberOfLayers; idx++)
607 if (video->vol[idx])
609 BitstreamClose(video->vol[idx]->bitstream);
610 video->vol[idx]->bitstream = NULL;
611 video->vol[idx] = NULL;
613 video->vopHeader[idx] = NULL;
678 for (idx = 0; idx < video->numberOfLayers; idx++)
680 if (video->vol[idx])
682 if (video->vol[idx]->bitstream)
684 BitstreamClose(video->vol[idx]->bitstream);
685 oscl_free(video->vol[idx]->bitstream);
687 oscl_free(video->vol[idx]);
694 for (idx = 0; idx < video->numberOfLayers; idx++)
696 if (video->vopHeader[idx]) oscl_free(video->vopHeader[idx]);
769 int idx;
772 for (idx = 0; idx < BITRATE_AVERAGE_WINDOW; idx++)
774 sum += video->nBitsPerVop[idx];
876 int idx = -1;
893 idx++;
894 while (oscl_memcmp(start_code_prefix, video_buffer + idx, 3))
896 idx++;
897 if (idx + 3 >= *vol_header_size) goto quit;
900 while (video_buffer[idx+3] != 0xb3 && video_buffer[idx+3] != 0xb6);
902 oscl_memcpy(vol_header, video_buffer, idx);
903 *vol_header_size = idx;
1036 int idx;
1043 for (idx = 0; idx < decCtrl->nLayers; idx++)
1046 if (buffer_size[idx] <= 0)
1048 timestamp[idx] = -1;
1053 if (timestamp[idx] < 0)
1055 if (vopHeader[idx]->timeStamp < 0)
1058 video->currLayer = idx;
1059 stream = video->vol[idx]->bitstream;
1060 BitstreamReset(stream, buffer[idx], buffer_size[idx]);
1062 while ((status = DecodeVOPHeader(video, vopHeader[idx], FALSE)) != PV_SUCCESS)
1069 buffer_size[idx] = 0;
1075 vopHeader[idx]->timeStamp =
1076 timestamp[idx] = CalcVopDisplayTime(video->vol[idx], vopHeader[idx], video->shortVideoHeader);
1077 if (idx == 0) vopHeader[idx]->refSelectCode = 1;
1083 timestamp[idx] = vopHeader[idx]->timeStamp;
1088 if (timestamp[idx] >= 0 && (display_time < 0 || display_time > timestamp[idx]))
1090 display_time = timestamp[idx];
1091 target_layer = idx;
1093 else if (display_time == timestamp[idx])
1245 int idx;
1367 idx = ++video->frame_idx % BITRATE_AVERAGE_WINDOW;
1371 video->nBitsPerVop[idx] = getPointer(currVol->bitstream);
1372 video->prevTimestamp[idx] = currVop->timeStamp;
1379 video->duration = video->prevTimestamp[idx];
1380 video->duration -= video->prevTimestamp[(++idx)%BITRATE_AVERAGE_WINDOW];