Lines Matching refs:buffer

287         if (index < 0 || !IS_EXISTING(dpb->buffer[index]))
294 dpb->list[refIdx++] = &dpb->buffer[index];
297 if(dpb->list[j] != &dpb->buffer[index])
317 HANTRO_NOK failure, picture does not exist in the buffer
338 SET_UNUSED(dpb->buffer[index]);
340 if (!dpb->buffer[index].toBeDisplayed)
357 HANTRO_NOK failure, picture does not exist in the buffer
374 SET_UNUSED(dpb->buffer[index]);
376 if (!dpb->buffer[index].toBeDisplayed)
395 buffer or is a non-existing picture, or invalid
421 if (IS_LONG_TERM(dpb->buffer[i]) &&
422 (u32)dpb->buffer[i].picNum == longTermFrameIdx)
424 SET_UNUSED(dpb->buffer[i]);
426 if (!dpb->buffer[i].toBeDisplayed)
436 if (!IS_EXISTING(dpb->buffer[index]))
439 dpb->buffer[index].status = LONG_TERM;
440 dpb->buffer[index].picNum = (i32)longTermFrameIdx;
471 if (IS_LONG_TERM(dpb->buffer[i]) &&
472 ( ((u32)dpb->buffer[i].picNum > maxLongTermFrameIdx) ||
475 SET_UNUSED(dpb->buffer[i]);
477 if (!dpb->buffer[i].toBeDisplayed)
493 the buffer and places all pictures that are needed for display into
494 the output buffer.
512 if (IS_REFERENCE(dpb->buffer[i]))
514 SET_UNUSED(dpb->buffer[i]);
515 if (!dpb->buffer[i].toBeDisplayed)
542 picture in the buffer
565 if (IS_LONG_TERM(dpb->buffer[i]) &&
566 (u32)dpb->buffer[i].picNum == longTermFrameIdx)
568 SET_UNUSED(dpb->buffer[i]);
570 if (!dpb->buffer[i].toBeDisplayed)
608 image pointer to current picture to be placed in the buffer
619 dpb 'buffer' modified, possible output frames placed into
682 /* flush the buffer */
685 * IDR picture shall not be output -> set output buffer empty */
817 /* output pictures if buffer full */
826 ShellSort(dpb->buffer, dpb->dpbSize+1);
868 really allocate any memory but reserves one of the buffer
884 ASSERT( !dpb->buffer[dpb->dpbSize].toBeDisplayed &&
885 !IS_REFERENCE(dpb->buffer[dpb->dpbSize]) );
888 dpb->currentOut = dpb->buffer + dpb->dpbSize;
929 if (IS_SHORT_TERM(dpb->buffer[i]))
930 if (dpb->buffer[i].picNum < picNum || index == -1)
933 picNum = dpb->buffer[i].picNum;
937 SET_UNUSED(dpb->buffer[index]);
939 if (!dpb->buffer[index].toBeDisplayed)
955 Function to initialize DPB. Reserves memories for the buffer,
956 reference picture list and output buffer. dpbSize indicates
1013 ALLOCATE(dpb->buffer, MAX_NUM_REF_IDX_L0_ACTIVE + 1, dpbPicture_t);
1014 if (dpb->buffer == NULL)
1016 H264SwDecMemset(dpb->buffer, 0,
1025 ALLOCATE(dpb->buffer[i].pAllocatedData, (picSizeInMbs*384 + 32+15), u8);
1026 if (dpb->buffer[i].pAllocatedData == NULL)
1029 dpb->buffer[i].data = ALIGN(dpb->buffer[i].pAllocatedData, 16);
1089 sets pointers in the list according to pictures in the buffer.
1090 The buffer is assumed to contain pictures sorted according to
1114 dpb->list[i] = &dpb->buffer[i];
1123 Function to find a reference picture from the buffer. The picture
1127 index of the picture in the buffer
1128 -1 if the specified picture was not found in the buffer
1146 if (IS_SHORT_TERM(dpb->buffer[i]) &&
1147 dpb->buffer[i].picNum == picNum)
1158 if (IS_LONG_TERM(dpb->buffer[i]) &&
1159 dpb->buffer[i].picNum == picNum)
1179 buffer. Numbering of pictures is based on frame numbers and as
1181 pictures in the buffer may be bigger than the currFrameNum.
1183 and all the short-term frames in the buffer will get smaller picNum
1203 if (IS_SHORT_TERM(dpb->buffer[i]))
1205 if (dpb->buffer[i].frameNum > currFrameNum)
1207 (i32)dpb->buffer[i].frameNum - (i32)dpb->maxFrameNum;
1209 frameNumWrap = (i32)dpb->buffer[i].frameNum;
1210 dpb->buffer[i].picNum = frameNumWrap;
1233 dpb 'buffer' possibly modified by inserting non-existing
1271 /* store data pointer of last buffer position to be used as next
1272 * "allocated" data pointer if last buffer position after this process
1273 * contains data pointer located in outBuf (buffer placed in the output
1275 tmp = dpb->buffer[dpb->dpbSize].data;
1285 /* output pictures if buffer full */
1297 ASSERT( !dpb->buffer[dpb->dpbSize].toBeDisplayed &&
1298 !IS_REFERENCE(dpb->buffer[dpb->dpbSize]) );
1299 dpb->buffer[dpb->dpbSize].status = NON_EXISTING;
1300 dpb->buffer[dpb->dpbSize].frameNum = unUsedShortTermFrameNum;
1301 dpb->buffer[dpb->dpbSize].picNum = (i32)unUsedShortTermFrameNum;
1302 dpb->buffer[dpb->dpbSize].picOrderCnt = 0;
1303 dpb->buffer[dpb->dpbSize].toBeDisplayed = HANTRO_FALSE;
1307 /* sort the buffer */
1308 ShellSort(dpb->buffer, dpb->dpbSize+1);
1315 /* pictures placed in output buffer -> check that 'data' in
1316 * buffer position dpbSize is not in the output buffer (this will be
1325 if (dpb->outBuf[i].data == dpb->buffer[dpb->dpbSize].data)
1327 /* find buffer position containing data pointer stored in
1331 if (dpb->buffer[i].data == tmp)
1333 dpb->buffer[i].data =
1334 dpb->buffer[dpb->dpbSize].data;
1335 dpb->buffer[dpb->dpbSize].data = tmp;
1346 * reference picture, otherwise accesses to pictures in the buffer cannot
1398 if (dpb->buffer[i].toBeDisplayed &&
1399 (dpb->buffer[i].picOrderCnt < picOrderCnt))
1401 tmp = dpb->buffer + i;
1402 picOrderCnt = dpb->buffer[i].picOrderCnt;
1415 Function to put next display order picture into the output buffer.
1464 Function to get next display order picture from the output buffer.
1494 display into the output buffer. This function shall be called in
1503 /* don't do anything if buffer not reserved */
1504 if (dpb->buffer)
1534 if (dpb->buffer)
1538 FREE(dpb->buffer[i].pAllocatedData);
1541 FREE(dpb->buffer);
1552 Sort pictures in the buffer. Function implements Shell's method,