1 /*****************************************************************************
2 * Copyright (C) 2013 x265 project
4 * Author: Gopu Govindaswamy <gopu@multicorewareinc.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
20 * This program is also available under a commercial proprietary license.
21 * For more information, contact us at license @ x265.com.
22 *****************************************************************************/
24 #ifndef X265_DEBLOCK_H
25 #define X265_DEBLOCK_H
37 enum { EDGE_VER
, EDGE_HOR
};
39 uint32_t m_numPartitions
;
41 Deblock() : m_numPartitions(0) {}
43 void init() { m_numPartitions
= 1 << (g_maxFullDepth
* 2); }
45 void deblockCTU(CUData
* cu
, int32_t dir
);
49 // CU-level deblocking function
50 void deblockCU(CUData
* cu
, uint32_t absZOrderIdx
, uint32_t depth
, const int32_t Edge
, uint8_t blockingStrength
[]);
58 // set filtering functions
59 void setLoopfilterParam(CUData
* cu
, uint32_t absZOrderIdx
, Param
*params
);
60 void setEdgefilterTU(CUData
* cu
, uint32_t absZOrderIdx
, uint32_t depth
, int32_t dir
, uint8_t blockingStrength
[]);
61 void setEdgefilterPU(CUData
* cu
, uint32_t absZOrderIdx
, int32_t dir
, uint8_t blockingStrength
[], uint32_t widthInBaseUnits
);
62 void setEdgefilterMultiple(CUData
* cu
, uint32_t absZOrderIdx
, int32_t dir
, int32_t edgeIdx
, uint8_t value
, uint8_t blockingStrength
[], uint32_t widthInBaseUnits
);
64 // get filtering functions
65 void getBoundaryStrengthSingle(CUData
* cu
, int32_t dir
, uint32_t partIdx
, uint8_t blockingStrength
[]);
67 // filter luma/chroma functions
68 void edgeFilterLuma(CUData
* cu
, uint32_t absZOrderIdx
, uint32_t depth
, int32_t dir
, int32_t edge
, const uint8_t blockingStrength
[]);
69 void edgeFilterChroma(CUData
* cu
, uint32_t absZOrderIdx
, uint32_t depth
, int32_t dir
, int32_t edge
, const uint8_t blockingStrength
[]);
71 static const uint8_t s_tcTable
[54];
72 static const uint8_t s_betaTable
[52];
75 #endif // ifndef X265_DEBLOCK_H