⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umc_h264_to_ipp.h

📁 audio-video-codecs.rar语音编解码器
💻 H
📖 第 1 页 / 共 3 页
字号:
{
    return(ippiInterpolateChromaTop_H264_8u_C1R(src, src_pitch, dst, dst_pitch, xh, yh, outPixels, sz));
}

#if defined BITDEPTH_9_12
inline IppStatus ippiInterpolateChromaTop_H264(const Ipp16u* src,
                                               Ipp32s    src_pitch, // in bytes
                                               Ipp16u*   dst,
                                               Ipp32s    dst_pitch, // in bytes
                                               Ipp32s    xh,
                                               Ipp32s    yh,
                                               Ipp32s    outPixels,
                                               IppiSize  sz,
                                               Ipp32s    bit_depth)
{
//    IppVCInterpolate_16u info = { (Ipp16u*)src, src_pitch/sizeof(Ipp16u), dst, dst_pitch/sizeof(Ipp16u), xh, yh, sz, bit_depth };
    IppVCInterpolate_16u info;
    info.pSrc = (Ipp16u*)src;
    info.srcStep = src_pitch/sizeof(Ipp16u);
    info.pDst = dst;
    info.dstStep = dst_pitch/sizeof(Ipp16u);
    info.dx = xh;
    info.dy = yh;
    info.roiSize.width = sz.width;
    info.roiSize.height = sz.height;
    info.bitDepth = bit_depth;
    return ippiInterpolateChromaTop_H264_16u_C1R( &info, outPixels );
}

#endif // BITDEPTH_9_12


inline IppStatus ippiInterpolateChromaBottom_H264(const Ipp8u* src,
                                                  Ipp32s   src_pitch, // in bytes
                                                  Ipp8u*   dst,
                                                  Ipp32s   dst_pitch, // in bytes
                                                  Ipp32s   xh,
                                                  Ipp32s   yh,
                                                  Ipp32s   outPixels,
                                                  IppiSize sz,
                                                  Ipp32s   bit_depth)
{
    return(ippiInterpolateChromaBottom_H264_8u_C1R(src, src_pitch, dst, dst_pitch, xh, yh, outPixels, sz));
}

#if defined BITDEPTH_9_12
inline IppStatus ippiInterpolateChromaBottom_H264(const Ipp16u* src,
                                                  Ipp32s    src_pitch, // in bytes
                                                  Ipp16u*   dst,
                                                  Ipp32s    dst_pitch, // in bytes
                                                  Ipp32s    xh,
                                                  Ipp32s    yh,
                                                  Ipp32s    outPixels,
                                                  IppiSize  sz,
                                                  Ipp32s    bit_depth)
{
//    IppVCInterpolate_16u info = { (Ipp16u*)src, src_pitch/sizeof(Ipp16u), dst, dst_pitch/sizeof(Ipp16u), xh, yh, sz, bit_depth };
    IppVCInterpolate_16u info;
    info.pSrc = (Ipp16u*)src;
    info.srcStep = src_pitch/sizeof(Ipp16u);
    info.pDst = dst;
    info.dstStep = dst_pitch/sizeof(Ipp16u);
    info.dx = xh;
    info.dy = yh;
    info.roiSize.width = sz.width;
    info.roiSize.height = sz.height;
    info.bitDepth = bit_depth;
    return ippiInterpolateChromaBottom_H264_16u_C1R( &info, outPixels );
}
#endif // BITDEPTH_9_12

inline IppStatus ippiInterpolateBlock_H264(const Ipp8u* pSrc1,
                                           const Ipp8u* pSrc2,
                                                 Ipp8u* pDst,
                                                 Ipp32s width,
                                                 Ipp32s height,
                                                 Ipp32s pitchBytes)
{
    return(ippiInterpolateBlock_H264_8u_P2P1R(const_cast<Ipp8u*>(pSrc1),
                                              const_cast<Ipp8u*>(pSrc2),
                                              pDst, width, height, pitchBytes));
}

#if defined BITDEPTH_9_12
inline IppStatus ippiInterpolateBlock_H264(const Ipp16u* pSrc1,
                                           const Ipp16u* pSrc2,
                                                 Ipp16u* pDst,
                                                 Ipp32s  width,
                                                 Ipp32s  height,
                                                 Ipp32s  pitchBytes)
{
    IppVCBidir_16u info;
    info.pSrc1 = (Ipp16u*)pSrc1;
    info.pSrc2 = (Ipp16u*)pSrc2;
    info.pDst = pDst;
    info.dstStep = info.srcStep2 = info.srcStep1 = pitchBytes/sizeof(Ipp16u);
    info.roiSize.width = width;
    info.roiSize.height = height;
    return ippiBidir_H264_16u_P2P1R( &info );
}
#endif //BITDEPTH_9_12

inline IppStatus ippiInterpolateBlock_H264_A(const Ipp8u* pSrc1,
                                           const Ipp8u* pSrc2,
                                                 Ipp8u* pDst,
                                                 Ipp32s width,
                                                 Ipp32s height,
                                                 Ipp32s pitchPix1,
                                                 Ipp32s pitchPix2,
                                                 Ipp32s pitchPix3)
{
    return ippiInterpolateBlock_H264_8u_P3P1R(pSrc1, pSrc2, pDst, width, height, pitchPix1, pitchPix2, pitchPix3);
}

#if defined BITDEPTH_9_12
inline IppStatus ippiInterpolateBlock_H264_A(const Ipp16u* pSrc1,
                                           const Ipp16u* pSrc2,
                                                 Ipp16u* pDst,
                                                 Ipp32s  width,
                                                 Ipp32s  height,
                                                 Ipp32s pitchPix1,
                                                 Ipp32s pitchPix2,
                                                 Ipp32s pitchPix3)
{
    IppVCBidir_16u info;
    info.pSrc1 = (Ipp16u*)pSrc1;
    info.pSrc2 = (Ipp16u*)pSrc2;
    info.pDst = pDst;
    info.dstStep = pitchPix3;
    info.srcStep2 = pitchPix2;
    info.srcStep1 = pitchPix1;
    info.roiSize.width = width;
    info.roiSize.height = height;
    return ippiBidir_H264_16u_P2P1R( &info );
}
#endif //BITDEPTH_9_12


inline void ippiEncodeCoeffsCAVLC_H264(Ipp16s* pSrc,
                                            Ipp8u   AC,
                                            Ipp32s* pScanMatrix,
                                            Ipp8u   Count,
                                            Ipp8u*  Trailing_Ones,
                                            Ipp8u*  Trailing_One_Signs,
                                            Ipp8u*  NumOutCoeffs,
                                            Ipp8u*  TotalZeroes,
                                            Ipp16s* Levels,
                                            Ipp8u*  Runs)
{
    ippiEncodeCoeffsCAVLC_H264_16s(pSrc, AC, pScanMatrix, Count, Trailing_Ones, Trailing_One_Signs, NumOutCoeffs, TotalZeroes, Levels, Runs);
}

#if defined BITDEPTH_9_12
inline void ippiEncodeCoeffsCAVLC_H264(const Ipp32s* pSrc,
                                                  Ipp8u   AC,
                                            const Ipp32s* pScanMatrix,
                                                  Ipp32s  Count,
                                                  Ipp8u*  Trailing_Ones,
                                                  Ipp8u*  Trailing_One_Signs,
                                                  Ipp8u*    NumOutCoeffs,
                                                  Ipp8u*  TotalZeroes,
                                                  Ipp32s* Levels,
                                                  Ipp8u*  Runs)
{
    ippiEncodeCoeffsCAVLC_H264_32s(pSrc, AC, pScanMatrix, Count, Trailing_Ones, Trailing_One_Signs, NumOutCoeffs, TotalZeroes, Levels, Runs);
}
#endif // BITDEPTH_9_12

inline void ippiSumsDiff16x16Blocks4x4(Ipp8u*  pSrc,
                                            Ipp32s  srcStepPixels,
                                            Ipp8u*  pPred,
                                            Ipp32s  predStepPixels,
                                            Ipp16s* pDC,
                                            Ipp16s* pDiff)
{
    ippiSumsDiff16x16Blocks4x4_8u16s_C1(pSrc, srcStepPixels*sizeof(Ipp8u), pPred, predStepPixels*sizeof(Ipp8u), pDC, pDiff);
}
#if defined BITDEPTH_9_12
inline void ippiSumsDiff16x16Blocks4x4(const Ipp16u* pSrc,
                                                  Ipp32s  srcStepPixels,
                                            const Ipp16u* pPred,
                                                  Ipp32s  predStepPixels,
                                                  Ipp32s* pDC,
                                                  Ipp16s* pDiff)
{
    ippiSumsDiff16x16Blocks4x4_16u32s_C1R(pSrc, srcStepPixels*sizeof(Ipp16s), pPred, predStepPixels*sizeof(Ipp16s), pDC, pDiff);
}
#endif // BITDEPTH_9_12

inline void ippiTransformQuantLumaDC_H264(      Ipp16s* pDCBuf,
                                                     Ipp16s* pQBuf,
                                                     Ipp32s  QP,
                                                     Ipp32s*    iNumCoeffs,
                                                     Ipp32s  intra,
                                               const Ipp16s* scan,
                                                     Ipp32s*    iLastCoeff,
                                               const Ipp16s* pLevelScale = NULL)
{
    ippiTransformQuantFwdLumaDC4x4_H264_16s_C1I( pDCBuf,pQBuf,QP,iNumCoeffs,intra, scan,iLastCoeff, pLevelScale);
}

#if defined BITDEPTH_9_12
inline void ippiTransformQuantLumaDC_H264(Ipp32s* pDCBuf,
                                               Ipp32s* pQBuf,
                                               Ipp32s  QP,
                                               Ipp32s*    iNumCoeffs,
                                               Ipp32s  intra,
                                               const Ipp16s* scan,
                                               Ipp32s*    iLastCoeff,
                                               const Ipp16s* pLevelScale = NULL)
{
    ippiTransformQuantFwdLumaDC4x4_H264_32s_C1I (pDCBuf,pQBuf,QP,iNumCoeffs,intra, scan,iLastCoeff, pLevelScale);
}
#endif // BITDEPTH_9_12

inline void ippiEdgesDetect16x16(const Ipp8u *pSrc, Ipp32s srcStepBytes, Ipp32s EdgePelDifference, Ipp32s EdgePelCount, Ipp32s *pRes)
{
    Ipp8u uRes;
    ippiEdgesDetect16x16_8u_C1R(pSrc, srcStepBytes, (Ipp8u)EdgePelDifference,(Ipp8u)EdgePelCount,&uRes);
    *pRes = uRes;
}

#if defined BITDEPTH_9_12
inline void ippiEdgesDetect16x16(const Ipp16u* pSrc, Ipp32s srcStepBytes, Ipp32s EdgePelDifference, Ipp32s EdgePelCount, Ipp32s* pRes)
{
    ippiEdgesDetect16x16_16u_C1R(pSrc, srcStepBytes, EdgePelDifference, EdgePelCount, pRes);
}
#endif // BITDEPTH_9_12

#endif // UMC_H264_TO_IPP_H


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -