fmo.c File Reference

Support for Flexible Macroblock Ordering (FMO). More...

#include "global.h"
#include "elements.h"
#include "defines.h"
#include "header.h"
#include "fmo.h"

Include dependency graph for fmo.c:

Go to the source code of this file.

Functions

static void FmoGenerateType0MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static void FmoGenerateType1MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static void FmoGenerateType2MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static void FmoGenerateType3MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static void FmoGenerateType4MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static void FmoGenerateType5MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static void FmoGenerateType6MapUnitMap (ImageParameters *p_Img, unsigned PicSizeInMapUnits)
static int FmoGenerateMapUnitToSliceGroupMap (ImageParameters *p_Img)
static int FmoGenerateMbToSliceGroupMap (ImageParameters *p_Img)
int fmo_init (ImageParameters *p_Img)
int FmoFinit (ImageParameters *p_Img)
int FmoGetNumberOfSliceGroup (ImageParameters *p_Img)
int FmoGetLastMBOfPicture (ImageParameters *p_Img)
int FmoGetLastMBInSliceGroup (ImageParameters *p_Img, int SliceGroup)
int FmoGetSliceGroupId (ImageParameters *p_Img, int mb)
int FmoGetNextMBNr (ImageParameters *p_Img, int CurrentMbNr)


Detailed Description

Support for Flexible Macroblock Ordering (FMO).

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file fmo.c.


Function Documentation

int fmo_init ( ImageParameters *  p_Img  ) 

FMO initialization: Generates p_Img->MapUnitToSliceGroupMap and p_Img->MbToSliceGroupMap.

Parameters:
p_Img image encoding parameters for current picture

Definition at line 170 of file fmo.c.

References FmoGenerateMapUnitToSliceGroupMap(), and FmoGenerateMbToSliceGroupMap().

Referenced by read_new_slice().

Here is the call graph for this function:

int FmoFinit ( ImageParameters *  p_Img  ) 

Free memory allocated by FMO functions.

Definition at line 220 of file fmo.c.

Referenced by main().

static int FmoGenerateMapUnitToSliceGroupMap ( ImageParameters *  p_Img  )  [static]

Generates p_Img->MapUnitToSliceGroupMap Has to be called every time a new Picture Parameter Set is used.

Parameters:
p_Img image encoding parameters for current picture

Definition at line 45 of file fmo.c.

References error(), FmoGenerateType0MapUnitMap(), FmoGenerateType1MapUnitMap(), FmoGenerateType2MapUnitMap(), FmoGenerateType3MapUnitMap(), FmoGenerateType4MapUnitMap(), FmoGenerateType5MapUnitMap(), and FmoGenerateType6MapUnitMap().

Referenced by fmo_init().

Here is the call graph for this function:

static int FmoGenerateMbToSliceGroupMap ( ImageParameters *  p_Img  )  [static]

Generates p_Img->MbToSliceGroupMap from p_Img->MapUnitToSliceGroupMap.

Parameters:
p_Img image encoding parameters for current picture

Definition at line 118 of file fmo.c.

Referenced by fmo_init().

static void FmoGenerateType0MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate interleaved slice group map type MapUnit map (type 0).

Definition at line 343 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType1MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate dispersed slice group map type MapUnit map (type 1).

Definition at line 369 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType2MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate foreground with left-over slice group map type MapUnit map (type 2).

Definition at line 387 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType3MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate box-out slice group map type MapUnit map (type 3).

Definition at line 417 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType4MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate raster scan slice group map type MapUnit map (type 4).

Definition at line 494 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType5MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate wipe slice group map type MapUnit map (type 5).

Definition at line 518 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType6MapUnitMap ( ImageParameters *  p_Img,
unsigned  PicSizeInMapUnits 
) [static]

Generate explicit slice group map type MapUnit map (type 6).

Definition at line 543 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

int FmoGetLastMBInSliceGroup ( ImageParameters *  p_Img,
int  SliceGroup 
)

FmoGetLastMBInSliceGroup: Returns MB number of last MB in SG.

Input:
SliceGroupID (0 to 7)

Definition at line 279 of file fmo.c.

References FmoGetSliceGroupId().

Referenced by FmoGetLastMBOfPicture().

Here is the call graph for this function:

int FmoGetLastMBOfPicture ( ImageParameters *  p_Img  ) 

FmoGetLastMBOfPicture(p_Img) returns the macroblock number of the last MB in a picture. This mb happens to be the last macroblock of the picture if there is only one slice group.

Input:
None

Definition at line 263 of file fmo.c.

References FmoGetLastMBInSliceGroup(), and FmoGetNumberOfSliceGroup().

Here is the call graph for this function:

int FmoGetNextMBNr ( ImageParameters *  p_Img,
int  CurrentMbNr 
)

FmoGetNextMBBr: Returns the MB-Nr (in scan order) of the next MB in the (scattered) Slice, -1 if the slice is finished.

Parameters:
p_Img image encoding parameters for current picture
CurrentMbNr number of the current macroblock

Definition at line 322 of file fmo.c.

References FmoGetSliceGroupId().

Referenced by exit_macroblock().

Here is the call graph for this function:

int FmoGetNumberOfSliceGroup ( ImageParameters *  p_Img  ) 

FmoGetNumberOfSliceGroup(p_Img).

p_Img:
ImageParameters

Definition at line 245 of file fmo.c.

Referenced by FmoGetLastMBOfPicture().

int FmoGetSliceGroupId ( ImageParameters *  p_Img,
int  mb 
)

Returns SliceGroupID for a given MB.

Parameters:
p_Img image encoding parameters for current picture
mb Macroblock number (in scan order)

Definition at line 302 of file fmo.c.

Referenced by FmoGetLastMBInSliceGroup(), and FmoGetNextMBNr().


Documentation generated with DoxyGen