#include "global.h"
#include "image.h"
#include "mb_access.h"
#include "loopfilter.h"

Go to the source code of this file.
Defines | |
| #define | ANY_INTRA (MbP->mb_type==I4MB||MbP->mb_type==I8MB||MbP->mb_type==I16MB||MbP->mb_type==IPCM||MbQ->mb_type==I4MB||MbQ->mb_type==I8MB||MbQ->mb_type==I16MB||MbQ->mb_type==IPCM) |
Functions | |
| void | GetStrengthNormal (byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int mvlimit, StorablePicture *p) |
| void | GetStrengthMBAff (byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int mvlimit, StorablePicture *p) |
| void | EdgeLoopLumaNormal (ColorPlane pl, imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, StorablePicture *p) |
| void | EdgeLoopLumaMBAff (ColorPlane pl, imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, StorablePicture *p) |
| void | EdgeLoopChromaNormal (imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int uv, StorablePicture *p) |
| void | EdgeLoopChromaMBAff (imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int uv, StorablePicture *p) |
| void | DeblockMb (ImageParameters *img, StorablePicture *p, int MbQAddr) |
| int | compute_deblock_strength (char **list0_refIdxArr, char **list1_refIdxArr, int64 **list0_refPicIdArr, int64 **list1_refPicIdArr, short ***list0_mv, short ***list1_mv, int blk_y, int blk_x, int blk_y2, int blk_x2, int mvlimit) |
| void | DeblockPicture (ImageParameters *img, StorablePicture *p) |
| void | GetStrengthNormal (byte Strength[MB_BLOCK_SIZE], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int mvlimit, StorablePicture *p) |
Variables | |
| byte | mixedModeEdgeFlag |
| byte | fieldModeFilteringFlag |
| static int64 ** | list0_refPicIdArr |
| static int64 ** | list1_refPicIdArr |
| static short *** | list0_mv |
| static short *** | list1_mv |
| static char ** | list0_refIdxArr |
| static char ** | list1_refIdxArr |
| static Macroblock * | MbP |
| static imgpel * | SrcPtrP |
| static imgpel * | SrcPtrQ |
| static const byte | ALPHA_TABLE [52] = {0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,4,4,5,6, 7,8,9,10,12,13,15,17, 20,22,25,28,32,36,40,45, 50,56,63,71,80,90,101,113, 127,144,162,182,203,226,255,255} |
| static const byte | BETA_TABLE [52] = {0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,2,2,2,3, 3,3,3, 4, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9,10,10, 11,11,12,12,13,13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18} |
| static const byte | CLIP_TAB [52][5] |
| static const char | chroma_edge [2][4][4] |
| static const int | pelnum_cr [2][4] = {{0,8,16,16}, {0,8, 8,16}} |
| void(* | GetStrength )(byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int mvlimit, StorablePicture *p) |
| void(* | EdgeLoopLuma )(ColorPlane pl, imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, StorablePicture *p) |
| void(* | EdgeLoopChroma )(imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int uv, StorablePicture *p) |
Definition in file loopFilter.c.
| #define ANY_INTRA (MbP->mb_type==I4MB||MbP->mb_type==I8MB||MbP->mb_type==I16MB||MbP->mb_type==IPCM||MbQ->mb_type==I4MB||MbQ->mb_type==I8MB||MbQ->mb_type==I16MB||MbQ->mb_type==IPCM) |
returns a buffer of 16 Strength values for one stripe in a mb (for different Frame or Field types)
Definition at line 255 of file loopFilter.c.
| void DeblockMb | ( | ImageParameters * | img, | |
| StorablePicture * | p, | |||
| int | MbQAddr | |||
| ) |
Deblocking filter for one macroblock.
Definition at line 122 of file loopFilter.c.
References CheckAvailabilityOfNeighbors(), storable_picture::chroma_format_idc, macroblock::DFDisableIdc, get_mb_pos(), storable_picture::imgUV, storable_picture::imgY, macroblock::luma_transform_size_8x8_flag, macroblock::mb_field, macroblock::mb_type, storable_picture::MbaffFrameFlag, macroblock::mbAvailA, macroblock::mbAvailB, storable_picture::structure, YUV420, YUV422, and YUV444.
Referenced by DeblockPicture().

| void DeblockPicture | ( | ImageParameters * | img, | |
| StorablePicture * | p | |||
| ) |
Filter all macroblocks in order of increasing macroblock address.
Definition at line 91 of file loopFilter.c.
References DeblockMb(), EdgeLoopChromaMBAff(), EdgeLoopChromaNormal(), EdgeLoopLumaMBAff(), EdgeLoopLumaNormal(), GetStrengthMBAff(), storable_picture::MbaffFrameFlag, and storable_picture::PicSizeInMbs.
Referenced by exit_picture().

| void EdgeLoopChromaMBAff | ( | imgpel ** | Img, | |
| byte | Strength[16], | |||
| ImageParameters * | img, | |||
| Macroblock * | MbQ, | |||
| int | dir, | |||
| int | edge, | |||
| int | uv, | |||
| StorablePicture * | p | |||
| ) |
Filters chroma block edge for MBAFF types.
Definition at line 889 of file loopFilter.c.
References storable_picture::chroma_format_idc, macroblock::DFAlphaC0Offset, macroblock::DFBetaOffset, macroblock::DFDisableIdc, macroblock::mb_field, macroblock::qpc, and storable_picture::size_x_cr.
Referenced by DeblockPicture().
| void EdgeLoopChromaNormal | ( | imgpel ** | Img, | |
| byte | Strength[16], | |||
| ImageParameters * | img, | |||
| Macroblock * | MbQ, | |||
| int | dir, | |||
| int | edge, | |||
| int | uv, | |||
| StorablePicture * | p | |||
| ) |
Filters chroma block edge for Frame or Field coded pictures.
Definition at line 797 of file loopFilter.c.
References storable_picture::chroma_format_idc, macroblock::DFAlphaC0Offset, macroblock::DFBetaOffset, macroblock::DFDisableIdc, macroblock::qpc, and storable_picture::size_x_cr.
Referenced by DeblockPicture().
| void EdgeLoopLumaMBAff | ( | ColorPlane | pl, | |
| imgpel ** | Img, | |||
| byte | Strength[16], | |||
| ImageParameters * | img, | |||
| Macroblock * | MbQ, | |||
| int | dir, | |||
| int | edge, | |||
| StorablePicture * | p | |||
| ) |
Filters 16 pel block edge of Super MB Frame coded MBs.
Definition at line 666 of file loopFilter.c.
References storable_picture::chroma_format_idc, macroblock::DFAlphaC0Offset, macroblock::DFBetaOffset, macroblock::DFDisableIdc, macroblock::mb_field, macroblock::qp, macroblock::qpc, and storable_picture::size_x.
Referenced by DeblockPicture().
| void EdgeLoopLumaNormal | ( | ColorPlane | pl, | |
| imgpel ** | Img, | |||
| byte | Strength[16], | |||
| ImageParameters * | img, | |||
| Macroblock * | MbQ, | |||
| int | dir, | |||
| int | edge, | |||
| StorablePicture * | p | |||
| ) |
Filters 16 pel block edge of Frame or Field coded MBs.
Definition at line 536 of file loopFilter.c.
References macroblock::DFAlphaC0Offset, macroblock::DFBetaOffset, macroblock::DFDisableIdc, macroblock::qp, macroblock::qpc, and storable_picture::size_x.
Referenced by DeblockPicture().
| void GetStrengthMBAff | ( | byte | Strength[16], | |
| ImageParameters * | img, | |||
| Macroblock * | MbQ, | |||
| int | dir, | |||
| int | edge, | |||
| int | mvlimit, | |||
| StorablePicture * | p | |||
| ) |
returns a buffer of 16 Strength values for one stripe in a mb (for MBAFF)
Definition at line 408 of file loopFilter.c.
References macroblock::cbp_blk, macroblock::mb_field, macroblock::mb_type, macroblock::mbAddrX, storable_picture::MbaffFrameFlag, storable_picture::motion, pic_motion_params::mv, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, storable_picture::slice_type, and storable_picture::structure.
Referenced by DeblockPicture().
const char chroma_edge[2][4][4] [static] |
Initial value:
{ { {-4, 0, 0, 0},
{-4,-4,-4, 4},
{-4, 4, 4, 8},
{-4,-4,-4, 12}},
{ {-4, 0, 0, 0},
{-4,-4, 4, 4},
{-4, 4, 8, 8},
{-4,-4, 12, 12}}}
Definition at line 59 of file loopFilter.c.
const byte CLIP_TAB[52][5] [static] |
Initial value:
{
{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},{ 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0},{ 0, 0, 0, 1, 1},{ 0, 0, 0, 1, 1},{ 0, 0, 0, 1, 1},{ 0, 0, 0, 1, 1},{ 0, 0, 1, 1, 1},{ 0, 0, 1, 1, 1},{ 0, 1, 1, 1, 1},
{ 0, 1, 1, 1, 1},{ 0, 1, 1, 1, 1},{ 0, 1, 1, 1, 1},{ 0, 1, 1, 2, 2},{ 0, 1, 1, 2, 2},{ 0, 1, 1, 2, 2},{ 0, 1, 1, 2, 2},{ 0, 1, 2, 3, 3},
{ 0, 1, 2, 3, 3},{ 0, 2, 2, 3, 3},{ 0, 2, 2, 4, 4},{ 0, 2, 3, 4, 4},{ 0, 2, 3, 4, 4},{ 0, 3, 3, 5, 5},{ 0, 3, 4, 6, 6},{ 0, 3, 4, 6, 6},
{ 0, 4, 5, 7, 7},{ 0, 4, 5, 8, 8},{ 0, 4, 6, 9, 9},{ 0, 5, 7,10,10},{ 0, 6, 8,11,11},{ 0, 6, 8,13,13},{ 0, 7,10,14,14},{ 0, 8,11,16,16},
{ 0, 9,12,18,18},{ 0,10,13,20,20},{ 0,11,15,23,23},{ 0,13,17,25,25}
}
Definition at line 48 of file loopFilter.c.