loopFilter.c File Reference

Filter to reduce blocking artifacts on a macroblock level. The filter strength is QP dependent. More...

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

Include dependency graph for loopFilter.c:

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)
void GetStrengthMBAff (byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int mvlimit)
void EdgeLoopLumaNormal (ColorPlane pl, imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int width)
void EdgeLoopLumaMBAff (ColorPlane pl, imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int width)
void EdgeLoopChromaNormal (imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int width, int uv)
void EdgeLoopChromaMBAff (imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int width, int uv)
void DeblockMb (ImageParameters *img, imgpel **imgY, imgpel ***imgUV, int MbQAddr)
void DeblockFrame (ImageParameters *img, imgpel **imgY, imgpel ***imgUV)
void GetStrengthNormal (byte Strength[MB_BLOCK_SIZE], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int mvlimit)
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)

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)
void(* EdgeLoopLuma )(ColorPlane pl, imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int width)
void(* EdgeLoopChroma )(imgpel **Img, byte Strength[16], ImageParameters *img, Macroblock *MbQ, int dir, int edge, int width, int uv)


Detailed Description

Filter to reduce blocking artifacts on a macroblock level. The filter strength is QP dependent.

Author:
Contributors:

Definition in file loopFilter.c.


Define Documentation

#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 262 of file loopFilter.c.


Function Documentation

void DeblockFrame ( ImageParameters *  img,
imgpel **  imgY,
imgpel ***  imgUV 
)

void DeblockMb ( ImageParameters *  img,
imgpel **  imgY,
imgpel ***  imgUV,
int  MbQAddr 
)

void EdgeLoopChromaMBAff ( imgpel **  Img,
byte  Strength[16],
ImageParameters *  img,
Macroblock *  MbQ,
int  dir,
int  edge,
int  width,
int  uv 
)

void EdgeLoopChromaNormal ( imgpel **  Img,
byte  Strength[16],
ImageParameters *  img,
Macroblock *  MbQ,
int  dir,
int  edge,
int  width,
int  uv 
)

void EdgeLoopLumaMBAff ( ColorPlane  pl,
imgpel **  Img,
byte  Strength[16],
ImageParameters *  img,
Macroblock *  MbQ,
int  dir,
int  edge,
int  width 
)

void EdgeLoopLumaNormal ( ColorPlane  pl,
imgpel **  Img,
byte  Strength[16],
ImageParameters *  img,
Macroblock *  MbQ,
int  dir,
int  edge,
int  width 
)

void GetStrengthMBAff ( byte  Strength[16],
ImageParameters *  img,
Macroblock *  MbQ,
int  dir,
int  edge,
int  mvlimit 
)


Variable Documentation

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 58 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 47 of file loopFilter.c.


Documentation generated with DoxyGen