#include "global.h"
#include "fmo.h"
Go to the source code of this file.
Functions | |
static void | FmoGenerateType0MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static void | FmoGenerateType1MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static void | FmoGenerateType2MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static void | FmoGenerateType3MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static void | FmoGenerateType4MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static void | FmoGenerateType5MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static void | FmoGenerateType6MapUnitMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static int | FmoGenerateMapUnitToSliceGroupMap (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps) |
static int | FmoGenerateMBAmap (ImageParameters *p_Img, seq_parameter_set_rbsp_t *sps) |
int | FmoInit (ImageParameters *p_Img, pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps) |
void | FmoUninit (ImageParameters *p_Img) |
int | FmoStartPicture (ImageParameters *p_Img) |
int | FmoEndPicture () |
int | FmoMB2SliceGroup (ImageParameters *p_Img, int mb) |
int | FmoGetNextMBNr (ImageParameters *p_Img, int CurrentMbNr) |
int | FmoGetPreviousMBNr (ImageParameters *p_Img, int CurrentMbNr) |
int | FmoGetFirstMBOfSliceGroup (ImageParameters *p_Img, int SliceGroupID) |
int | FmoGetLastCodedMBOfSliceGroup (ImageParameters *p_Img, int SliceGroupID) |
void | FmoSetLastMacroblockInSlice (ImageParameters *p_Img, int mb) |
int | FmoGetFirstMacroblockInSlice (ImageParameters *p_Img, int SliceGroup) |
int | FmoSliceGroupCompletelyCoded (ImageParameters *p_Img, int SliceGroupID) |
Definition in file fmo.c.
int FmoEndPicture | ( | void | ) |
FmoEndPicture: Ends the Scattered Slices Module (called once per picture).
Definition at line 566 of file fmo.c.
Referenced by code_a_plane().
static int FmoGenerateMapUnitToSliceGroupMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generates p_Img->MapUnitToSliceGroupMap.
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 83 of file fmo.c.
References error(), FmoGenerateType0MapUnitMap(), FmoGenerateType1MapUnitMap(), FmoGenerateType2MapUnitMap(), FmoGenerateType3MapUnitMap(), FmoGenerateType4MapUnitMap(), FmoGenerateType5MapUnitMap(), and FmoGenerateType6MapUnitMap().
Referenced by FmoInit().
static int FmoGenerateMBAmap | ( | ImageParameters * | p_Img, | |
seq_parameter_set_rbsp_t * | sps | |||
) | [static] |
static void FmoGenerateType0MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate interleaved slice group map type MapUnit map (type 0).
Notes by Dong Wang (April 25 2004)
Source codes are modified to support 7 slice group types (fmo modes). The functions for generating map are very similar to that in decoder, but have a little difference.
The MB map is calculated at the beginning of coding of each picture (frame or field).
'slice_group_change_cycle' in structure 'ImageParameters' is the syntax in the slice header. It's set to be 1 before the initialization of FMO in function code_a_picture(). It can be changed every time if needed.
How does a MBAmap look like?
An MBAmap is a one-diemnsional array of ints. Each int represents an MB in scan order. A zero or positive value represents a slice group ID. Negative values are reserved for future extensions. The numbering range for the SliceGroupIDs is 0..7 as per JVT-C167.
This module contains a static variable MBAmap. This is the MBAmap of the picture currently coded. It can be accessed only through the access functions.
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 307 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
static void FmoGenerateType1MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate dispersed slice group map type MapUnit map (type 1).
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 336 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
static void FmoGenerateType2MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate foreground with left-over slice group map type MapUnit map (type 2).
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 357 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
static void FmoGenerateType3MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate box-out slice group map type MapUnit map (type 3).
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 390 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
static void FmoGenerateType4MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate raster scan slice group map type MapUnit map (type 4).
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 470 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
static void FmoGenerateType5MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate wipe slice group map type MapUnit map (type 5).
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 497 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
static void FmoGenerateType6MapUnitMap | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps | |||
) | [static] |
Generate explicit slice group map type MapUnit map (type 6).
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation |
Definition at line 525 of file fmo.c.
Referenced by FmoGenerateMapUnitToSliceGroupMap().
int FmoGetFirstMBOfSliceGroup | ( | ImageParameters * | p_Img, | |
int | SliceGroupID | |||
) |
FmoGetFirstMBOfSliceGroup: Returns the MB-Nr (in scan order) of the next first MB of the Slice group, -1 if no such MB exists.
Definition at line 649 of file fmo.c.
References FmoMB2SliceGroup().
Referenced by FmoStartPicture().
int FmoGetLastCodedMBOfSliceGroup | ( | ImageParameters * | p_Img, | |
int | SliceGroupID | |||
) |
FmoGetLastCodedMBOfSlice: Returns the MB-Nr (in scan order) of the last MB of the slice group.
Definition at line 675 of file fmo.c.
References FmoMB2SliceGroup().
Referenced by encode_one_slice_MBAFF(), and end_macroblock().
int FmoGetNextMBNr | ( | ImageParameters * | p_Img, | |
int | CurrentMbNr | |||
) |
FmoGetNextMBBr: Returns the MB-Nr (in scan order) of the next MB in the (FMO) Slice, -1 if the SliceGroup is finished.
Definition at line 599 of file fmo.c.
References FmoMB2SliceGroup().
Referenced by encode_one_slice(), encode_one_slice_MBAFF(), writeMBLayerBSlice(), and writeMBLayerPSlice().
int FmoGetPreviousMBNr | ( | ImageParameters * | p_Img, | |
int | CurrentMbNr | |||
) |
FmoGetNextMBBr: Returns the MB-Nr (in scan order) of the next MB in the (FMO) Slice, -1 if the SliceGroup is finished.
Definition at line 624 of file fmo.c.
References FmoMB2SliceGroup().
Referenced by encode_one_slice(), encode_one_slice_MBAFF(), and start_macroblock().
int FmoInit | ( | ImageParameters * | p_Img, | |
pic_parameter_set_rbsp_t * | pps, | |||
seq_parameter_set_rbsp_t * | sps | |||
) |
FMO initialization: Generates p_Img->MapUnitToSliceGroupMap and p_Img->MBAmap.
p_Img | Image Parameter to be used for map generation | |
pps | Picture Parameter set to be used for map generation | |
sps | Sequence Parameter set to be used for map generation |
Definition at line 209 of file fmo.c.
References FmoGenerateMapUnitToSliceGroupMap(), and FmoGenerateMBAmap().
Referenced by code_a_plane().
int FmoMB2SliceGroup | ( | ImageParameters * | p_Img, | |
int | mb | |||
) |
FmoMB2Slice: Returns SliceID for a given MB.
Definition at line 582 of file fmo.c.
Referenced by encode_one_slice_MBAFF(), end_macroblock(), FmoGetFirstMBOfSliceGroup(), FmoGetLastCodedMBOfSliceGroup(), FmoGetNextMBNr(), and FmoGetPreviousMBNr().
int FmoStartPicture | ( | ImageParameters * | p_Img | ) |
FmoStartPicture: initializes FMO at the begin of each new picture.
Definition at line 543 of file fmo.c.
References FmoGetFirstMBOfSliceGroup().
Referenced by code_a_plane().
void FmoUninit | ( | ImageParameters * | p_Img | ) |
Free memory if allocated by FMO functions.
Definition at line 280 of file fmo.c.
Referenced by free_encoder_memory().