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 (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static void FmoGenerateType1MapUnitMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static void FmoGenerateType2MapUnitMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static void FmoGenerateType3MapUnitMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static void FmoGenerateType4MapUnitMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static void FmoGenerateType5MapUnitMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static void FmoGenerateType6MapUnitMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps, unsigned PicSizeInMapUnits)
static int FmoGenerateMapUnitToSliceGroupMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps)
static int FmoGenerateMbToSliceGroupMap (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps)
int FmoInit (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps)
int FmoFinit ()
int FmoGetNumberOfSliceGroup ()
int FmoGetLastMBOfPicture ()
int FmoGetLastMBInSliceGroup (int SliceGroup)
int FmoGetSliceGroupId (int mb)
int FmoGetNextMBNr (int CurrentMbNr)

Variables

int * MbToSliceGroupMap = NULL
int * MapUnitToSliceGroupMap = NULL
static int NumberOfSliceGroups


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 FmoFinit ( void   ) 

Free memory allocated by FMO functions.

Definition at line 224 of file fmo.c.

Referenced by main().

static int FmoGenerateMapUnitToSliceGroupMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps 
) [static]

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

Parameters:
pps Picture Parameter set to be used for map generation
sps Sequence Parameter set to be used for map generation

Definition at line 52 of file fmo.c.

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

Referenced by FmoInit().

Here is the call graph for this function:

static int FmoGenerateMbToSliceGroupMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps 
) [static]

Generates MbToSliceGroupMap from MapUnitToSliceGroupMap.

Parameters:
pps Picture Parameter set to be used for map generation
sps Sequence Parameter set to be used for map generation

Definition at line 124 of file fmo.c.

References img.

Referenced by FmoInit().

static void FmoGenerateType0MapUnitMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
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 ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
unsigned  PicSizeInMapUnits 
) [static]

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

Definition at line 368 of file fmo.c.

References img.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType2MapUnitMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
unsigned  PicSizeInMapUnits 
) [static]

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

Definition at line 385 of file fmo.c.

References img.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType3MapUnitMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
unsigned  PicSizeInMapUnits 
) [static]

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

Definition at line 414 of file fmo.c.

References img.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType4MapUnitMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
unsigned  PicSizeInMapUnits 
) [static]

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

Definition at line 490 of file fmo.c.

References img.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType5MapUnitMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
unsigned  PicSizeInMapUnits 
) [static]

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

Definition at line 513 of file fmo.c.

References img.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

static void FmoGenerateType6MapUnitMap ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps,
unsigned  PicSizeInMapUnits 
) [static]

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

Definition at line 537 of file fmo.c.

Referenced by FmoGenerateMapUnitToSliceGroupMap().

int FmoGetLastMBInSliceGroup ( int  SliceGroup  ) 

FmoGetLastMBInSliceGroup: Returns MB number of last MB in SG.

Input:
SliceGroupID (0 to 7)

Definition at line 283 of file fmo.c.

References FmoGetSliceGroupId(), and img.

Referenced by FmoGetLastMBOfPicture().

Here is the call graph for this function:

int FmoGetLastMBOfPicture ( void   ) 

FmoGetLastMBOfPicture() 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 267 of file fmo.c.

References FmoGetLastMBInSliceGroup(), and FmoGetNumberOfSliceGroup().

Here is the call graph for this function:

int FmoGetNextMBNr ( 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:
CurrentMbNr number of the current macroblock

Definition at line 322 of file fmo.c.

References FmoGetSliceGroupId(), and img.

Referenced by exit_macroblock().

Here is the call graph for this function:

int FmoGetNumberOfSliceGroup ( void   ) 

FmoGetNumberOfSliceGroup().

Input:
None

Definition at line 249 of file fmo.c.

Referenced by FmoGetLastMBOfPicture().

int FmoGetSliceGroupId ( int  mb  ) 

Returns SliceGroupID for a given MB.

Parameters:
mb Macroblock number (in scan order)

Definition at line 304 of file fmo.c.

References img.

Referenced by FmoGetLastMBInSliceGroup(), and FmoGetNextMBNr().

int FmoInit ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps 
)

FMO initialization: Generates MapUnitToSliceGroupMap and MbToSliceGroupMap.

Parameters:
pps Picture Parameter set to be used for map generation
sps Sequence Parameter set to be used for map generation

Definition at line 176 of file fmo.c.

References FmoGenerateMapUnitToSliceGroupMap(), FmoGenerateMbToSliceGroupMap(), and img.

Referenced by read_new_slice().

Here is the call graph for this function:


Documentation generated with DoxyGen