#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[MB_BLOCK_SIZE], Macroblock *MbQ, int dir, int edge, int mvlimit, StorablePicture *p) |
void | GetStrengthMBAff (byte Strength[MB_BLOCK_SIZE], Macroblock *MbQ, int dir, int edge, int mvlimit, StorablePicture *p) |
void | EdgeLoopLumaNormal (ColorPlane pl, imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, StorablePicture *p) |
void | EdgeLoopLumaMBAff (ColorPlane pl, imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, StorablePicture *p) |
void | EdgeLoopChromaNormal (imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, int uv, StorablePicture *p) |
void | EdgeLoopChromaMBAff (imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, int uv, StorablePicture *p) |
void | DeblockMb (ImageParameters *p_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 *p_Img, StorablePicture *p) |
Variables | |
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}} |
Definition in file loopFilter.c.
void DeblockMb | ( | ImageParameters * | p_Img, | |
StorablePicture * | p, | |||
int | MbQAddr | |||
) |
Deblocking filter for one macroblock.
Definition at line 112 of file loopFilter.c.
References CheckAvailabilityOfNeighbors(), get_mb_pos(), storable_picture::imgUV, storable_picture::imgY, YUV420, YUV422, and YUV444.
Referenced by DeblockPicture().
void DeblockPicture | ( | ImageParameters * | p_Img, | |
StorablePicture * | p | |||
) |
Filter all macroblocks in order of increasing macroblock address.
Definition at line 81 of file loopFilter.c.
References DeblockMb(), EdgeLoopChromaMBAff(), EdgeLoopChromaNormal(), EdgeLoopLumaMBAff(), EdgeLoopLumaNormal(), GetStrengthMBAff(), and GetStrengthNormal().
Referenced by exit_picture().
void EdgeLoopChromaMBAff | ( | imgpel ** | Img, | |
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | uv, | |||
StorablePicture * | p | |||
) |
Filters chroma block edge for MBAFF types.
Definition at line 895 of file loopFilter.c.
References macroblock::p_Img, and macroblock::qpc.
Referenced by DeblockPicture().
void EdgeLoopChromaNormal | ( | imgpel ** | Img, | |
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | uv, | |||
StorablePicture * | p | |||
) |
Filters chroma block edge for Frame or Field coded pictures.
Definition at line 801 of file loopFilter.c.
References macroblock::p_Img, and macroblock::qpc.
Referenced by DeblockPicture().
void EdgeLoopLumaMBAff | ( | ColorPlane | pl, | |
imgpel ** | Img, | |||
byte | Strength[16], | |||
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 macroblock::p_Img, macroblock::qp, and macroblock::qpc.
Referenced by DeblockPicture().
void EdgeLoopLumaNormal | ( | ColorPlane | pl, | |
imgpel ** | Img, | |||
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
StorablePicture * | p | |||
) |
Filters 16 pel block edge of Frame or Field coded MBs.
Definition at line 531 of file loopFilter.c.
References macroblock::p_Img, macroblock::qp, and macroblock::qpc.
Referenced by DeblockPicture().
void GetStrengthMBAff | ( | byte | Strength[MB_BLOCK_SIZE], | |
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 399 of file loopFilter.c.
References macroblock::mbAddrX, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, pic_motion_params::ref_idx, and pic_motion_params::ref_pic_id.
Referenced by DeblockPicture().
void GetStrengthNormal | ( | byte | Strength[MB_BLOCK_SIZE], | |
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | mvlimit, | |||
StorablePicture * | p | |||
) |
returns a buffer of 16 Strength values for one stripe in a mb (for different Frame or Field types)
Definition at line 246 of file loopFilter.c.
References macroblock::mbAddrX, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, pic_motion_params::ref_idx, and pic_motion_params::ref_pic_id.
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 51 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 40 of file loopFilter.c.