1 /*! 2 * \copy 3 * Copyright (c) 2009-2013, Cisco Systems 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * * Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 * 31 * 32 * \file deblocking.h 33 * 34 * \brief Interfaces introduced in frame deblocking filtering 35 * 36 * \date 08/03/2009 Created 37 * 38 ************************************************************************************* 39 */ 40 41 #ifndef WELS_DEBLOCKING_H_ 42 #define WELS_DEBLOCKING_H_ 43 44 #include "encoder_context.h" 45 #include "wels_func_ptr_def.h" 46 #include "deblocking_common.h" 47 namespace WelsEnc { 48 49 50 //struct tagDeblockingFunc; 51 52 typedef struct TagDeblockingFilter { 53 uint8_t* pCsData[3]; // pointer to reconstructed picture pData 54 int32_t iCsStride[3]; // Cs iStride 55 int16_t iMbStride; 56 int8_t iSliceAlphaC0Offset; 57 int8_t iSliceBetaOffset; 58 uint8_t uiLumaQP; 59 uint8_t uiChromaQP; 60 uint8_t uiFilterIdc; 61 uint8_t uiReserved; 62 } SDeblockingFilter; 63 64 #if defined(__cplusplus) 65 extern "C" { 66 #endif//__cplusplus 67 #if defined(HAVE_NEON) 68 void DeblockingBSCalcEnc_neon (int8_t* pNzc, SMVUnitXY* pMv, int32_t iBoundryFlag, int32_t iMbStride, 69 uint8_t (*pBS)[4][4]); 70 #endif 71 #if defined(HAVE_NEON_AARCH64) 72 void DeblockingBSCalcEnc_AArch64_neon (int8_t* pNzc, SMVUnitXY* pMv, int32_t iBoundryFlag, int32_t iMbStride, 73 uint8_t (*pBS)[4][4]); 74 #endif 75 #if defined(__cplusplus) 76 } 77 #endif//__cplusplus 78 void DeblockingInit (DeblockingFunc* pFunc, int32_t iCpu); 79 80 void WelsBlockFuncInit (PSetNoneZeroCountZeroFunc* pfSetNZCZero, int32_t iCpu); 81 82 void PerformDeblockingFilter (sWelsEncCtx* pEnc); 83 84 void DeblockingFilterFrameAvcbase (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc); 85 86 void DeblockingFilterSliceAvcbase (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SSlice* pSlice); 87 void DeblockingFilterSliceAvcbaseNull (SDqLayer* pCurDq, SWelsFuncPtrList* pFunc, SSlice* pSlice); 88 } 89 90 #endif 91 92 93