#include "global.h"
#include "image.h"
#include "mb_access.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) |
void | GetStrengthMBAff (byte Strength[MB_BLOCK_SIZE], Macroblock *MbQ, int dir, int edge, int mvlimit) |
void | EdgeLoopLumaNormal (ColorPlane pl, imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, int width) |
void | EdgeLoopLumaMBAff (ColorPlane pl, imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, int width) |
void | EdgeLoopChromaNormal (imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, int width, int uv) |
void | EdgeLoopChromaMBAff (imgpel **Img, byte Strength[16], Macroblock *MbQ, int dir, int edge, int width, int uv) |
void | DeblockMb (ImageParameters *p_Img, imgpel **imgY, imgpel ***imgUV, int MbQAddr) |
void | DeblockFrame (ImageParameters *p_Img, imgpel **imgY, imgpel ***imgUV) |
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 DeblockFrame | ( | ImageParameters * | p_Img, | |
imgpel ** | imgY, | |||
imgpel *** | imgUV | |||
) |
Filter all macroblocks in order of increasing macroblock address.
Definition at line 81 of file loopFilter.c.
References DeblockMb(), EdgeLoopChromaMBAff(), EdgeLoopChromaNormal(), EdgeLoopLumaMBAff(), EdgeLoopLumaNormal(), GetStrengthMBAff(), GetStrengthNormal(), img_par::mb_data, macroblock::mb_type, img_par::MbaffFrameFlag, macroblock::qp, and macroblock::qpc.
Referenced by code_a_plane(), and UpdateDecoders().
void DeblockMb | ( | ImageParameters * | p_Img, | |
imgpel ** | imgY, | |||
imgpel *** | imgUV, | |||
int | MbQAddr | |||
) |
Deblocking filter for one macroblock.
Definition at line 122 of file loopFilter.c.
References CheckAvailabilityOfNeighbors(), get_mb_pos(), img_par::mb_data, macroblock::mb_type, img_par::MbaffFrameFlag, img_par::structure, img_par::width, img_par::width_cr, YUV420, and YUV422.
Referenced by DeblockFrame().
void EdgeLoopChromaMBAff | ( | imgpel ** | Img, | |
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | width, | |||
int | uv | |||
) |
Filters chroma block edge for MBAFF types.
Definition at line 888 of file loopFilter.c.
References img_par::max_pel_value_comp, img_par::mb_data, macroblock::p_Img, and macroblock::qpc.
Referenced by DeblockFrame().
void EdgeLoopChromaNormal | ( | imgpel ** | Img, | |
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | width, | |||
int | uv | |||
) |
Filters chroma block edge for Frame or Field coded pictures.
Definition at line 795 of file loopFilter.c.
References img_par::max_pel_value_comp, img_par::mb_data, macroblock::p_Img, and macroblock::qpc.
Referenced by DeblockFrame().
void EdgeLoopLumaMBAff | ( | ColorPlane | pl, | |
imgpel ** | Img, | |||
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | width | |||
) |
Filters 16 pel block edge of Super MB Frame coded MBs.
Definition at line 661 of file loopFilter.c.
References img_par::max_pel_value_comp, img_par::mb_data, macroblock::p_Img, macroblock::qp, and macroblock::qpc.
Referenced by DeblockFrame().
void EdgeLoopLumaNormal | ( | ColorPlane | pl, | |
imgpel ** | Img, | |||
byte | Strength[16], | |||
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | width | |||
) |
Filters 16 pel block edge of Frame or Field coded MBs.
Definition at line 529 of file loopFilter.c.
References img_par::max_pel_value_comp, img_par::mb_data, macroblock::p_Img, macroblock::qp, and macroblock::qpc.
Referenced by DeblockFrame().
void GetStrengthMBAff | ( | byte | Strength[MB_BLOCK_SIZE], | |
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | mvlimit | |||
) |
returns a buffer of 16 Strength values for one stripe in a mb (for MBAFF)
Definition at line 397 of file loopFilter.c.
References macroblock::cbp_blk, img_par::mb_data, macroblock::mb_type, macroblock::mbAddrX, img_par::MbaffFrameFlag, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, and img_par::structure.
Referenced by DeblockFrame().
void GetStrengthNormal | ( | byte | Strength[MB_BLOCK_SIZE], | |
Macroblock * | MbQ, | |||
int | dir, | |||
int | edge, | |||
int | mvlimit | |||
) |
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.
References macroblock::cbp_blk, img_par::mb_data, macroblock::mbAddrX, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, and img_par::structure.
Referenced by DeblockFrame().
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.