int FmoGetLastMBInSliceGroup (int SliceGroup)
{
  int i;

  for (i=img->PicSizeInMbs-1; i>=0; i--)
    if (FmoGetSliceGroupId (i) == SliceGroup)
      return i;
  return -1;

}
Example #2
0
int FmoGetLastMBInSliceGroup (VideoParameters *p_Vid, int SliceGroup)
{
    int i;

    for (i=p_Vid->PicSizeInMbs-1; i>=0; i--)
        if (FmoGetSliceGroupId (p_Vid, i) == SliceGroup)
            return i;
    return -1;

}
/*!
 ************************************************************************
 * \brief
 *    FmoGetNextMBBr: Returns the MB-Nr (in scan order) of the next
 *    MB in the (scattered) Slice, -1 if the slice is finished
 *
 * \param CurrentMbNr
 *    number of the current macroblock
 ************************************************************************
 */
int FmoGetNextMBNr (int CurrentMbNr)
{
  int SliceGroup = FmoGetSliceGroupId (CurrentMbNr);

  while (++CurrentMbNr<(int)img->PicSizeInMbs && MbToSliceGroupMap [CurrentMbNr] != SliceGroup)
    ;

  if (CurrentMbNr >= (int)img->PicSizeInMbs)
    return -1;    // No further MB in this slice (could be end of picture)
  else
    return CurrentMbNr;
}
Example #4
0
/*!
 ************************************************************************
 * \brief
 *    FmoGetNextMBBr: Returns the MB-Nr (in scan order) of the next
 *    MB in the (scattered) Slice, -1 if the slice is finished
 * \param p_Vid
 *      video encoding parameters for current picture
 *
 * \param CurrentMbNr
 *    number of the current macroblock
 ************************************************************************
 */
int FmoGetNextMBNr (VideoParameters *p_Vid, int CurrentMbNr)
{
    int SliceGroup = FmoGetSliceGroupId (p_Vid, CurrentMbNr);

    while (++CurrentMbNr<(int)p_Vid->PicSizeInMbs && p_Vid->MbToSliceGroupMap [CurrentMbNr] != SliceGroup)
        ;

    if (CurrentMbNr >= (int)p_Vid->PicSizeInMbs)
        return -1;    // No further MB in this slice (could be end of picture)
    else
        return CurrentMbNr;
}