119 const Pel* pSrc =
getAddr(compID, uiPartIdx, iWidth);
120 Pel* pDst = pcPicYuvDst->
getAddr ( compID, ctuRsAddr, uiAbsZorderIdx );
125 for (
Int y = iHeight; y != 0; y-- )
127 ::memcpy( pDst, pSrc,
sizeof(
Pel)*iWidth);
147 const Pel* pSrc = pcPicYuvSrc->
getAddr ( compID, ctuRsAddr, uiAbsZorderIdx );
154 for (
Int y = iHeight; y != 0; y-- )
156 ::memcpy( pDst, pSrc,
sizeof(
Pel)*iWidth);
176 Pel* pDst = pcYuvDst->
getAddr( compID, uiDstPartIdx );
183 for (
Int y = iHeight; y != 0; y-- )
185 ::memcpy( pDst, pSrc,
sizeof(
Pel)*iWidth);
204 const Pel* pSrc =
getAddr(compID, uiSrcPartIdx);
213 for (
UInt y = uiHeight; y != 0; y-- )
215 ::memcpy( pDst, pSrc,
sizeof(
Pel)*uiWidth);
235 Pel* pDst = pcYuvDst->
getAddr(compID, uiPartIdx);
245 for (
UInt y = iHeightComponent; y != 0; y-- )
247 ::memcpy( pDst, pSrc, iWidthComponent *
sizeof(
Pel) );
271 for (
UInt y = uiHeightComponent; y != 0; y-- )
273 ::memcpy( pDst, pSrc, uiWidthComponent *
sizeof(
Pel ) );
290 const Pel* pSrc0 = pcYuvSrc0->
getAddr(compID, uiTrUnitIdx, uiPartWidth );
291 const Pel* pSrc1 = pcYuvSrc1->
getAddr(compID, uiTrUnitIdx, uiPartWidth );
292 Pel* pDst =
getAddr(compID, uiTrUnitIdx, uiPartWidth );
298 #if O0043_BEST_EFFORT_DECODING
299 const Int bitDepthDelta = clipBitDepths.stream[
toChannelType(compID)] - clipbd;
302 for (
Int y = uiPartHeight-1; y >= 0; y-- )
304 for (
Int x = uiPartWidth-1; x >= 0; x-- )
306 #if O0043_BEST_EFFORT_DECODING
307 pDst[x] =
Pel(ClipBD<Int>(
Int(pSrc0[x]) + rightShiftEvenRounding<Pel>(pSrc1[x], bitDepthDelta), clipbd));
309 pDst[x] =
Pel(ClipBD<Int>(
Int(pSrc0[x]) +
Int(pSrc1[x]), clipbd));
312 pSrc0 += iSrc0Stride;
313 pSrc1 += iSrc1Stride;
330 const Pel* pSrc0 = pcYuvSrc0->
getAddr( compID, uiTrUnitIdx, uiPartWidth );
331 const Pel* pSrc1 = pcYuvSrc1->
getAddr( compID, uiTrUnitIdx, uiPartWidth );
332 Pel* pDst =
getAddr( compID, uiTrUnitIdx, uiPartWidth );
338 for (
Int y = uiPartHeight-1; y >= 0; y-- )
340 for (
Int x = uiPartWidth-1; x >= 0; x-- )
342 pDst[x] = pSrc0[x] - pSrc1[x];
344 pSrc0 += iSrc0Stride;
345 pSrc1 += iSrc1Stride;
359 const Pel* pSrc0 = pcYuvSrc0->
getAddr( compID, iPartUnitIdx );
360 const Pel* pSrc1 = pcYuvSrc1->
getAddr( compID, iPartUnitIdx );
380 for (
Int y = 0; y < iHeight; y++ )
382 for (
Int x=0 ; x < iWidth; x+=2 )
384 pDst[ x + 0 ] =
ClipBD(
rightShift(( pSrc0[ x + 0 ] + pSrc1[ x + 0 ] + offset ), shiftNum), clipbd );
385 pDst[ x + 1 ] =
ClipBD(
rightShift(( pSrc0[ x + 1 ] + pSrc1[ x + 1 ] + offset ), shiftNum), clipbd );
387 pSrc0 += iSrc0Stride;
388 pSrc1 += iSrc1Stride;
394 for (
Int y = 0; y < iHeight; y++ )
396 for (
Int x=0 ; x < iWidth; x+=4 )
398 pDst[ x + 0 ] =
ClipBD(
rightShift(( pSrc0[ x + 0 ] + pSrc1[ x + 0 ] + offset ), shiftNum), clipbd );
399 pDst[ x + 1 ] =
ClipBD(
rightShift(( pSrc0[ x + 1 ] + pSrc1[ x + 1 ] + offset ), shiftNum), clipbd );
400 pDst[ x + 2 ] =
ClipBD(
rightShift(( pSrc0[ x + 2 ] + pSrc1[ x + 2 ] + offset ), shiftNum), clipbd );
401 pDst[ x + 3 ] =
ClipBD(
rightShift(( pSrc0[ x + 3 ] + pSrc1[ x + 3 ] + offset ), shiftNum), clipbd );
403 pSrc0 += iSrc0Stride;
404 pSrc1 += iSrc1Stride;
412 const UInt uiPartIdx,
416 const Bool bClipToBitDepths
422 const Pel* pSrc = pcYuvSrc->
getAddr(compID, uiPartIdx);
429 if (bClipToBitDepths)
432 for (
Int y = iHeight-1; y >= 0; y-- )
434 for (
Int x = iWidth-1; x >= 0; x-- )
436 pDst[x ] =
ClipBD((2 * pDst[x]) - pSrc[x], clipBd);
444 for (
Int y = iHeight-1; y >= 0; y-- )
446 for (
Int x = iWidth-1; x >= 0; x-- )
448 pDst[x ] = (2 * pDst[x]) - pSrc[x];
Void destroy()
Destroy YUV buffer.
ChromaFormat m_chromaFormatIDC
Void copyToPartComponent(const ComponentID id, TComYuv *pcYuvDst, const UInt uiDstPartIdx) const
Defines version information, constants and small in-line functions.
Int getStride(const ComponentID id) const
Declaration of TComInterpolationFilter class.
general YUV buffer class (header)
Void copyPartToYuv(TComYuv *pcYuvDst, const UInt uiSrcPartIdx) const
#define IF_INTERNAL_OFFS
Offset used internally.
Void copyPartToPartComponent(const ComponentID id, TComYuv *pcYuvDst, const UInt uiPartIdx, const UInt uiWidthComponent, const UInt uiHeightComponent) const
UInt getStride(const ComponentID id) const
Void copyToPicYuv(TComPicYuv *pcPicYuvDst, const UInt ctuRsAddr, const UInt uiAbsZorderIdx, const UInt uiPartDepth=0, const UInt uiPartIdx=0) const
T ClipBD(const T x, const Int bitDepth)
UInt getHeight(const ComponentID id) const
Int recon[MAX_NUM_CHANNEL_TYPE]
the bit depth as indicated in the SPS
Void copyPartToPartComponentMxN(const ComponentID id, TComYuv *pcYuvDst, const TComRectangle &rect) const
#define IF_INTERNAL_PREC
Number of bits for internal precision.
UInt getWidth(const ComponentID id) const
UInt getComponentScaleX(const ComponentID id) const
Void copyToPicComponent(const ComponentID id, TComPicYuv *pcPicYuvDst, const UInt iCtuRsAddr, const UInt uiAbsZorderIdx, const UInt uiPartDepth=0, const UInt uiPartIdx=0) const
Void addClip(const TComYuv *pcYuvSrc0, const TComYuv *pcYuvSrc1, const UInt uiTrUnitIdx, const UInt uiPartSize, const BitDepths &clipBitDepths)
Void copyToPartYuv(TComYuv *pcYuvDst, const UInt uiDstPartIdx) const
UInt getComponentScaleY(const ComponentID id) const
Void create(const UInt iWidth, const UInt iHeight, const ChromaFormat chromaFormatIDC)
Create YUV buffer.
Void subtract(const TComYuv *pcYuvSrc0, const TComYuv *pcYuvSrc1, const UInt uiTrUnitIdx, const UInt uiPartSize)
ValueType rightShift(const ValueType value, const Int shift)
Pel * getAddr(const ComponentID id)
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
Void removeHighFreq(const TComYuv *pcYuvSrc, const UInt uiPartIdx, const UInt uiWidth, const UInt uiHeight, const Int bitDepths[MAX_NUM_CHANNEL_TYPE], const Bool bClipToBitDepths)
#define xMalloc(type, len)
Pel * m_apiBuf[MAX_NUM_COMPONENT]
Pel * getAddr(const ComponentID ch)
Void copyFromPicComponent(const ComponentID id, const TComPicYuv *pcPicYuvSrc, const UInt iCtuRsAddr, const UInt uiAbsZorderIdx)
Void addAvg(const TComYuv *pcYuvSrc0, const TComYuv *pcYuvSrc1, const UInt iPartUnitIdx, const UInt iWidth, const UInt iHeight, const BitDepths &clipBitDepths)
Void copyPartToComponent(const ComponentID id, TComYuv *pcYuvDst, const UInt uiSrcPartIdx) const
UInt getNumberValidComponents() const
Pel * getAddrPix(const ComponentID id, const UInt iPixX, const UInt iPixY)
Void copyPartToPartYuv(TComYuv *pcYuvDst, const UInt uiPartIdx, const UInt uiWidth, const UInt uiHeight) const
Void clear()
clear YUV buffer
Void copyFromPicYuv(const TComPicYuv *pcPicYuvSrc, const UInt ctuRsAddr, const UInt uiAbsZorderIdx)