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

📄 umc_h264_core_enc.h

📁 audio-video-codecs.rar语音编解码器
💻 H
📖 第 1 页 / 共 4 页
字号:
        Ipp32u  AIModeSelectOneBlock(
            H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            PixType* pSrcBlock,          // pointer to upper left pel of source block
            PixType* pReconBlock,          // pointer to same block in reconstructed picture
            Ipp32u uBlock,             // which 4x4 of the MB (0..15)
            T_AIMode *intra_types,       // selected mode goes here
            PixType *pPred               // predictor pels for selected mode goes here
            // if not NULL
            );

        Ipp32u  AIModeSelectOneMB_16x16(
            H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            PixType* pSrc,            // pointer to upper left pel of source MB
            PixType* pRef,            // pointer to same MB in reference picture
            Ipp32s   pitchPixels,          // of source and ref data in pixels
            T_AIMode *pMode,        // selected mode goes here
            PixType *pPredBuf         // predictor pels for selected mode goes here
            );

        Ipp32u  AIModeSelectChromaMBs_8x8(
            H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            PixType* pUSrc,             // pointer to upper left pel of U source MB
            PixType* pURef,             // pointer to same MB in U reference picture
            PixType* pVSrc,             // pointer to upper left pel of V source MB
            PixType* pVRef,             // pointer to same MB in V reference picture
            Ipp32u uPitch,                // of source and ref data
            Ipp8u *pMode,             // selected mode goes here
            PixType *pUPredBuf,         // U predictor pels for selected mode go here
            PixType *pVPredBuf          // V predictor pels for selected mode go here
            );

        void GetPredBlock(
            Ipp32u uMode,      // advanced intra mode of the block
            PixType *pPredBuf,
            PixType* PredPel     // predictor pels
            );

        void GetBlockPredPels(
            H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            PixType* pLeftRefBlock,          // pointer to block in reference picture
            Ipp32u uLeftPitch,             // of source data. Pitch in pixels.
            PixType* pAboveRefBlock,         // pointer to block in reference picture
            Ipp32u uAbovePitch,            // of source data. Pitch in pixels.
            PixType* pAboveLeftRefBlock,     // pointer to block in reference picture
            Ipp32u uAboveLeftPitch,        // of source data. Pitch in pixels.
            Ipp32u uBlock,             // 0..15 for luma blocks only
            PixType* PredPel             // result here
            );

        void AdvancedIntraModeSelectOneMacroblock8x8(
            H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            Ipp32u uMB,         // which MB
            Ipp32u uBestSAD,    //Best previous SAD
            Ipp32u *puAIMBSAD       // return total MB SAD here
            );

        void Filter8x8Pels(PixType* pred_pels, Ipp32u pred_pels_mask);

        void GetPrediction8x8(T_AIMode mode, PixType* pred_pels, Ipp32u pred_pels_mask, PixType* pels);

        Ipp32u  AIModeSelectOneMB_8x8(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                      PixType*  pSrc,            // pointer to upper left pel of source MB
                                      PixType*  pRef,            // pointer to same MB in reference picture
                                      Ipp32s    uBlock,
                                      T_AIMode* pMode,           // selected mode goes here
                                      PixType*  pPredBuf);       // predictor pels for selected mode goes here

        void PlanarPredictLuma(PixType* pBlock,        // pointer to upper left pel of block
                               Ipp32u uPitch,        // of reference plane
                               PixType *pPredBuf);

        void PlanarPredictChroma(PixType* pBlock,      // pointer to upper left pel of block
                                 Ipp32u uPitch,      // of reference plane
                                 PixType *pPredBuf);

        void Intra16x16SelectAndPredict(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                        Ipp32u uMB,         // which MB
                                        Ipp32u *puAIMBSAD,  // return total MB SAD here
                                        PixType *pPredBuf); // return predictor pels here
        Ipp32u Intra4x4SelectRD( H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                             PixType*  pSrcBlock,         // pointer to upper left pel of source block
                             PixType*  pReconBlock,         // pointer to same block in reconstructed picture
                             Ipp32u    uBlock,            // which 4x4 of the MB (0..15)
                             T_AIMode* intra_types,       // selected mode goes here
                             PixType*  pPred);
        Ipp32u Intra8x8SelectRD( H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            PixType* pSrc,            // pointer to upper left pel of source MB
            PixType* pRef,            // pointer to same MB in reference picture
            Ipp32s   uBlock,          // 8x8 block number
            T_AIMode* pMode,          // selected mode goes here
            PixType* pPredBuf);
        Ipp32u Intra16x16SelectRD(
            H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
            PixType  *pSrc,            // pointer to upper left pel of source MB
            PixType  *pRef,            // pointer to same MB in reference picture
            Ipp32s    pitchPixels,     // of source and ref data
            T_AIMode *pMode,           // selected mode goes here
            PixType  *pPredBuf);        // predictor pels for selected mode goes here

        void Init_VLC_LUTs();

        void ReconstuctCBP(H264CurrentMacroblockDescriptor<PixType, CoeffsType> *cur_mb);
        Status Put_MB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice );
        Status Put_MBHeader(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice );
        Status Put_MBLuma( H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice );
        Status Put_MBChroma( H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice );
        Status PackDC(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32u uPlane);
        Status PackSubBlockLuma(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32u uBlock);
        Status PackSubBlockChroma(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32u uBlock);

        Ipp32u GetBlocksLumaContext(H264CurrentMacroblockDescriptor<PixType, CoeffsType> &cur_mb, Ipp32s x, Ipp32s y);
        Ipp32u GetBlocksChromaContext(H264CurrentMacroblockDescriptor<PixType, CoeffsType> &cur_mb, Ipp32s blockLeft, Ipp32s blockTop, bool component);

        void Encode_PCM_MB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        void Encode_AIC_Type_16x16(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice );
        void Encode_AIC_Type(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        void Encode_CBP(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        void Encode_MB_Vectors(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        bool Encode_Inter_Type(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        bool Encode_BiPred_Type(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);

        void Encode_ref_idx(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32s block_idx, Ipp32s listNum);
        void Encode_transform_size_8x8_flag(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        void Set_MVLimits();
        void ScanSignificant_CABAC(CoeffsType coeff[], Ipp32s ctxBlockCat,Ipp32s numcoeff, const Ipp32s *dec_single_scan,
                                   T_Block_CABAC_Data<CoeffsType>* c_data);
        Ipp32s Derive_ctxIdxInc_CABAC(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32s listNum, Ipp32s block_idx);

        // Encode and reconstruct macroblock
        void CEncAndRecMB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        Ipp32u CEncAndRec16x16IntraMB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        Ipp32u CEncAndRec4x4IntraMB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
        Ipp32u CEncAndRecInterMB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);

        // luma MB motion comp
        void MCOneMBLuma(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                         Ipp32u uMB,
                         Ipp32s pitchPixels,               // pitch of source data in pixels.
                         const H264MotionVector *pMVFwd,   // motion vectors in subpel units
                         const H264MotionVector *pMVBwd,   // motion vectors in subpel units
                         PixType* pDst);                   // put the resulting block here

        // chroma MB motion comp
        void MCOneMBChroma(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                           const Ipp32u uMB,               // macroblock number
                           Ipp32s pitchPixels,             // pitch of source data in pixels
                           const H264MotionVector *pMVFwd, // motion vectors in subpel units
                           const H264MotionVector *pMVBwd, // motion vectors in subpel units
                           PixType* pDst,                  // put the resulting block here
                           bool  is_v_plane);

        bool IsCouldSkip(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32u *puMBSAD, H264MotionVector &cmp_vec);

        void CMEOneMB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                      Ipp32u uMB,
                      Ipp32u *puMBSAD);  // return best total MB SAD here

        void  CMEOneMB_worker(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                              Ipp32u uMB,
                              T_RefIdx ref_idx,
                              const H264EncoderFrame<PixType> *pRefFrame,
                              const Ipp8s Field,
                              Ipp32s iSearchHor,
                              Ipp32s iSearchVer,
                              bool bBSlice,
                              ME_Info me_info[41]);

            void CMEOneMB_Finder(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                 Ipp32u uMB,
                                 T_RefIdx ref_idx,
                                 const H264EncoderFrame<PixType> *pRefFrame,
                                 const Ipp8s Field,
                                 bool bBSlice,
                                 H264MotionVector tempPredictedMV[41],
                                 ME_Info me_info[41],
                                 Ipp32s left,
                                 Ipp32s right,
                                 Ipp32s up,
                                 Ipp32s down,
                                 Ipp32s startX,
                                 Ipp32s startY);
#ifdef H264_NEW_ME
            void   CalcMVPredictor(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32u block_idx, Ipp32u uList, Ipp32u uBlocksWide, Ipp32u uBlocksHigh, H264MotionVector *pMVPred);
            void   ME_CandList16x16(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, Ipp32s list_id, ME_Inf<PixType> *meInfo);
            bool   CheckSkip(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, H264MotionVector &cmp_vec);
            bool   CheckSkipB(H264EncoderThreadPrivateSlice<PixType, CoeffsType>* curr_slice);
            Ipp32s ME_P(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
            Ipp32s ME_B(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
            Ipp32s ME_EstimateMBCostP(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
            Ipp32s ME_EstimateMBCostB(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice);
            Ipp32s ME_EstimateSliceTypeCost(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, bool is_first_mb);
            Ipp32s ME_EstimateFrame(EnumPicCodType& ePictureType, EnumPicClass pic_class, H264EncoderFrame<PixType> *pRefFrame0, H264EncoderFrame<PixType> *pRefFrame1 );
            Status ME_SetRefPicList( H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice, EncoderRefPicList<PixType> * ref_pic_list, H264SliceHeader &SHdr, H264EncoderFrame<PixType> *pRefFrame0, H264EncoderFrame<PixType> *pRefFrame1 );
#endif

            void  CMESplitOneMB_P_Slice(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                        Ipp32u uMB,
                                        Ipp32u *puMBSAD,    // return best total MB SAD here
                                        ME_Info me_info[41]);

            void  CMESplitOneMB_B_Slice(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                        Ipp32u uMB,
                                        Ipp32u *puMBSAD,    // return best total MB SAD here
                                        H264MacroblockRefIdxs ref_direct[2],
                                        H264MacroblockMVs     mvs[2],
                                        Ipp32u                SADDirect[4],
                                        ME_Info prev_me_info[41],
                                        ME_Info futr_me_info[41]);

            void Calc_One_MV_Predictor(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                       Ipp32u uMB,                 // which MB
                                       Ipp32u uBlock,              // which 4x4 Block (UL Corner, Raster Order)
                                       Ipp32u uList,               // 0 or 1 for L0 or L1
                                       Ipp32u uBlocksWide,         // 1, 2, or 4
                                       Ipp32u uBlocksHigh,         // 1, 2, or 4 (4x16 and 16x4 not permitted)
                                       H264MotionVector *pMVPred,  // resulting MV predictor
                                       H264MotionVector *pMVDelta, // resulting MV delta
                                       bool   updateDMV = true);

            bool  Skip_MV_Predicted(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                    Ipp32u uMB,                 // which MB
                                    H264MotionVector *pMVOut);  // Returns Skip MV if not NULL

            bool  FindBestInitialMV(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                    const PixType* pCurrent,
                                    const PixType* pPrev,
                                    const Ipp32u   uMB,               // MB number
                                    bool           bBSlice,
                                    H264MotionVector& BestMV16x16,    // resulting Best MV
                                    Ipp32s&        uBestSAD16x16e,    // resulting Best RD-Opt Distortion
                                    Ipp32s&        uBestSAD16x16NoRD, // resulting Distortion
                                    H264MotionVector& PredictedMV,    // return the 16x16 predicted vector
                                    const Ipp32s   xMin,
                                    const Ipp32s   xMax,
                                    const Ipp32s   yMin,
                                    const Ipp32s   yMax);

            void  CSubPelSearchOneBlock(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                        Ipp32u uMB,
                                        const H264EncoderFrame<PixType> *pRefFrame,
                                        Ipp8s  RefField,
                                        Ipp32u block_idx,
                                        Ipp32u uWidth,
                                        Ipp32u uHeight,
                                        Ipp32u uOffset,
                                        H264MotionVector *pBestMV,
                                        H264MotionVector *pPredictedMV,
                                        Ipp32u *puBestSAD);

            void ComputeDirectSpatialRefIdx(H264EncoderThreadPrivateSlice<PixType, CoeffsType> *curr_slice,
                                            Ipp32u   uMB,
                                            T_RefIdx &pRefIndexL0,
                                            T_RefIdx &pRefIndexL1);

⌨️ 快捷键说明

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