f8726254fd0375e12835676bcab3be0516571d49
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(const CUData
* ctu
, int32_t dir
);
49 // CU-level deblocking function
50 void deblockCU(const CUData
* cu
, uint32_t absPartIdx
, uint32_t depth
, const int32_t dir
, uint8_t blockStrength
[]);
52 // set filtering functions
53 void setEdgefilterTU(const CUData
* cu
, uint32_t absPartIdx
, uint32_t depth
, int32_t dir
, uint8_t blockStrength
[]);
54 void setEdgefilterPU(const CUData
* cu
, uint32_t absPartIdx
, int32_t dir
, uint8_t blockStrength
[], uint32_t numUnits
);
55 void setEdgefilterMultiple(const CUData
* cu
, uint32_t absPartIdx
, int32_t dir
, int32_t edgeIdx
, uint8_t value
, uint8_t blockStrength
[], uint32_t numUnits
);
57 // get filtering functions
58 uint8_t getBoundaryStrength(const CUData
* cuQ
, int32_t dir
, uint32_t partQ
, const uint8_t blockStrength
[]);
60 // filter luma/chroma functions
61 void edgeFilterLuma(const CUData
* cuQ
, uint32_t absPartIdx
, uint32_t depth
, int32_t dir
, int32_t edge
, const uint8_t blockStrength
[]);
62 void edgeFilterChroma(const CUData
* cuQ
, uint32_t absPartIdx
, uint32_t depth
, int32_t dir
, int32_t edge
, const uint8_t blockStrength
[]);
64 static const uint8_t s_tcTable
[54];
65 static const uint8_t s_betaTable
[52];
68 #endif // ifndef X265_DEBLOCK_H