📄 vopseenc.hpp
字号:
CMotionVector* pmv, CMBMode* pmbmd); //for spatial scalablity only
Int motionEstMB_PVOP (
CoordI x, CoordI y,
CMotionVector* pmv, CMBMode* pmbmd,
const PixelC* ppxliRefMBY
);
Int motionEstMB_PVOP_WithShape (
CoordI x, CoordI y,
CMotionVector* pmv, CMBMode* pmbmd,
const PixelC* ppxliRefMBY
);
Int motionEstMB_BVOP_Interlaced (
CoordI x, CoordI y,
CMotionVector* pmvForward, CMotionVector* pmvBackward,
CMBMode* pmbmd,
const CMBMode* pmbmdRef, const CMotionVector* pmvRef,
const PixelC* ppxlcRef0MBY, const PixelC* ppxlcRef1MBY,
Bool bColocatedMBExist
);
Int motionEstMB_BVOP (
CoordI x, CoordI y,
CMotionVector* pmvForward, CMotionVector* pmvBackward,
CMBMode* pmbmd,
const CMBMode* pmbmdRef, const CMotionVector* pmvRef,
const PixelC* ppxlcRef0MBY, const PixelC* ppxlcRef1MBY,
Bool bColocatedMBExist
);
// for spatial scalability only
Int CVideoObjectEncoder::motionEstMB_BVOP(
CoordI x, CoordI y,
CMotionVector* pmvForward, CMotionVector* pmvBackward,
CMBMode* pmbmd,
const PixelC* ppxlcRef0MBY, const PixelC* ppxlcRef1MBY
);
Int motionEstMB_BVOP_WithShape (
CoordI x, CoordI y,
CMotionVector* pmvForward, CMotionVector* pmvBackward,
CMBMode* pmbmd,
const CMBMode* pmbmdRef, const CMotionVector* pmvRef,
const PixelC* ppxlcRef0MBY, const PixelC* ppxlcRef1MBY,
Bool bColocatedMBExist
);
// new changes
Int motionEstMB_BVOP_InterlacedWithShape (
CoordI x, CoordI y,
CMotionVector* pmvForward, CMotionVector* pmvBackward,
CMBMode* pmbmd,
const CMBMode* pmbmdRef, const CMotionVector* pmvRef,
const PixelC* ppxlcRef0MBY, const PixelC* ppxlcRef1MBY,
Bool bColocatedMBExist
);
Int blkmatch16 (
CMotionVector* pmv,
CoordI iXRef, CoordI iYRef,
CoordI iXCurr, CoordI iYCurr,
Int iMinSAD,
const PixelC* ppxlcRefMBY,
const CU8Image* puciRefQZoomY,
Int iSearchRange,
Bool bQuarterSample // added by mwi
);
Int blkmatch16WithShape (
CMotionVector* pmv,
CoordI iXRef, CoordI iYRef,
CoordI iXCurr, CoordI iYCurr,
Int iMinSAD,
const PixelC* ppxlcRefMBY,
const CU8Image* puciRefQZoomY,
const CMBMode* pmbmd,
Int iSearchRange,
Bool bQuarterSample, // added by mwi
Int iDirection
);
Int blockmatch8 (
const PixelC* ppxlcCodedBlkY,
CMotionVector* pmv8,
CoordI x, CoordI y,
const CMotionVector* pmvPred,
Int iSearchRange,
Bool bQuarterSample // added by mwi
);
Int blockmatch8WithShape (
const PixelC* ppxlcCodedBlkY,
const PixelC* ppxlcCodedBlkBY,
CMotionVector* pmv8,
CoordI x, CoordI y,
const CMotionVector* pmvPred,
Int iSearchRange,
Bool bQuarterSample, // added by mwi
Int iDirection
);
Int blkmatch16x8 (
CMotionVector* pmv,
CoordI iXMB, CoordI iYMB,
Int iFeildSelect,
const PixelC* ppxlcRefMBY,
const PixelC* ppxlcRefHalfPel,
Int iSearchRange,
Bool bQuarterSample // added by mwi
);
// new chnages
Int blkmatch16x8WithShape (
CMotionVector* pmv,
CoordI iXMB, CoordI iYMB,
Int iFeildSelect,
const PixelC* ppxlcRefMBY,
const PixelC* ppxlcRefHalfPel,
Int iSearchRange,
Bool bQuarterSample, // added by mwi
Int iDirection
);
Int sumDev () const; // compute sum of deviation of an MB
Int sumDevWithShape (UInt uiNumTranspPels) const; // compute sum of deviation of an MB
Int sad16x16At0 (const PixelC* ppxliRef0Y) const;
Int sad16x16At0WithShape (const PixelC* ppxliRefY, const CMBMode* pmbmd) const;
Int sad8x8At0 (const PixelC* ppxlcCurrY, const PixelC* ppxliRef0Y) const; // 0: predictor
Int sad8x8At0WithShape (const PixelC* ppxlcCurrY, const PixelC* ppxlcCurrBY, const PixelC* ppxlcRefY) const;
// motion compensation
Void motionCompMBYEnc (
const CMotionVector* pmv, const CMBMode* pmbmd,
Int imbX, Int imbY,
CoordI x, CoordI y,
CRct *prctMVLimit
);
Void motionCompMBAEnc (
const CMotionVector* pmv, const CMBMode* pmbmd,
PixelC ** pppxlcPredMBA,
CVOPU8YUVBA* pvopcRefQ,
CoordI x, CoordI y,
Int iRoundingControl,
CRct *prctMVLimit,
Int direction, //12.22.98
Int iAuxComp
);
Void motionCompMBAEncDirect ( // added by mwi
const CMotionVector* pmv, const CMBMode* pmbmd,
PixelC ** pppxlcPredMBA,
CVOPU8YUVBA* pvopcRefQ,
CoordI x, CoordI y,
Int iRoundingControl,
CRct *prctMVLimit,
Int iAuxComp
);
Void motionCompEncY (
const PixelC* ppxlcRef, const PixelC* ppxlcRefZoom,
PixelC* ppxlcPred, // can be either Y or A
Int iSize, // either MB or BLOCK size
const CMotionVector* pmv, // motion vector
CoordI x, CoordI y, // current coordinate system
CRct *prctMVLimit
);
Void motionCompOverLapEncY (
const CMotionVector* pmv, // motion vector
const CMBMode* pmbmd, // macroblk mode
Bool bLeftBndry, Bool bRightBndry, Bool bTopBndry,
CoordI x, // current coordinate system
CoordI y, // current coordinate system
CRct *prctMVLimit
);
Void motionComp8Y (PixelC* ppxlcPredBlk, const CMotionVector* pmv, CoordI x, CoordI y);
Void motionComp8A (PixelC* ppxlcPredBlk, const CMotionVector* pmv, CoordI x, CoordI y);
// B-VOP MC
Void motionCompAndDiff_BVOP_MB (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CMBMode* pmbmd,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
Void motionCompAndDiff_BVOP_MB_WithShape (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CMBMode* pmbmd,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
Void motionCompAndDiffAlpha_BVOP_MB (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
const CMBMode* pmbmd,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
Void motionCompInterpAndError (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
// for QuarterPel mwi
Void motionCompInterpAndErrorDirect (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
// ~for QuarterPel mwi
Void motionCompInterpAndError_WithShape (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
// for QuarterPel mwi
Void motionCompInterpAndError_WithShapeDirect (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y,
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
// ~for QuarterPel mwi
// error signal
Void computeTextureErrorWithShape ();
Void computeTextureError ();
Void computeAlphaError ();
// B-VOP stuff
Int interpolateAndDiffY (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y, // the coordinate of the MB
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
Int interpolateAndDiffY_WithShape (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y, // the coordinate of the MB
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
// for QuarterPel mwi
Int interpolateAndDiffY8 (
const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
CoordI x, CoordI y, // the coordinate of the 8x8 Block
Int iBlkNo, // number of the 8x8 block in the current MB [1,2 / 3,4]
CRct *prctMVLimitForward,CRct *prctMVLimitBackward
);
// ~for QuarterPel mwi
Void averagePredAndComputeErrorUV ();
Void averagePredAndComputeErrorUV_WithShape ();
// MV
UInt encodeMV (
const CMotionVector* pmv,
const CMBMode* pmbmd,
Bool bLeftMB, Bool bRightMB, Bool bTopMB,Int iMBX, Int iMBY); //revision 980901, mwi
UInt encodeMVWithShape (const CMotionVector* pmv, const CMBMode* pmbmd, Int iXMB, Int iYMB);
UInt encodeMVofBVOP (const CMotionVector* pmvForward, const CMotionVector* pmvBackward,
const CMBMode* pmbmd, Int iMBX, Int iMBY, const CMotionVector* pmvRef,
const CMBMode* pmbmdRef); // encode motion vectors for b-vop
UInt sendDiffMV (const CVector& vctDiffMVHalfPel, const MVInfo *pmviDir);
Void scaleMV (Int& iVLC, UInt& uiResidual, Int iDiffMVcomponent, const MVInfo *pmviDir);
// direct mode
Void computeDirectDeltaMV (CVector& vctDiff, const CMotionVector* pmv, const CMotionVector* pmvRef,
const CMBMode* pmbmdRef); //for (progressive) B-VOP only
// Statistics routines
Void computeSNRs (const CVOPU8YUVBA* pvopcCurrQ);
Void SNRYorA (
const PixelC* ppxlcOrig, const PixelC* ppxlcRef1, // these two should point to the left-top of the rctOrig's bounding box
Double& dSNR
);
Void SNRUV (const CVOPU8YUVBA* pvopcCurrQ);
Void SNRYorAWithShape (
const PixelC* ppxlcOrig, const PixelC* ppxlcRef1, // these two should point to the left-top of the rctOrig's bounding box
Double& dSNR
);
Void SNRUVWithShape (const CVOPU8YUVBA* pvopcCurrQ);
// Motion Vector I/O
Int m_iMVLineNo, m_iMVFileUsage;
FILE *m_fMVFile;
Char *m_pchMVFileName;
Void readPVOPMVs(), writePVOPMVs(), readBVOPMVs(), writeBVOPMVs();
Void decideMVInfo ();
// Complexity Estimation syntax support - Marc Mongenet (EPFL) - 16 Jun 1998
Int codedDCECS (Int, // complexity estimation data to code before writing it into bitstream
UInt); // number of bitstream bits for this data
// error resilient tools added by Toshiba
// Modified for error resilient mode by Toshiba(1997-11-14)
// Bool bVPNoLeft(Int iMBnum, Int iMBX);
// Bool bVPNoRightTop(Int iMBnum, Int iMBX);
// Bool bVPNoTop(Int iMBnum);
// Bool bVPNoLeftTop(Int iMBnum, Int iMBX);
// End Toshiba(1997-11-14)
Void codeVideoPacketHeader (Int iMBX, Int iMBY, Int iQuantScale);
Int codeVideoPacketHeader (Int iQuantScale); // Added by Toshiba(1998-1-16)
Void VideoPacketResetVOP ();//UInt nBitsModuloBase, Int iVopTimeIncr);
UInt encodeMVVP (const CMotionVector* pmv, const CMBMode* pmbmd, Int iMBX, Int iMBY);
// Added for Data partitioning mode by Toshiba(1998-1-16)
Void encodeNSForPVOP_DP ();
Void encodeNSForIVOP_DP ();
Void encodeNSForIVOP_WithShape_DP ();
Void encodeNSForPVOP_WithShape_DP ();
Void DataPartitioningMotionCoding(Int iVPMBnum, Int iVPlastMBnum, CStatistics* m_statsVP, Int*** iCoefQ_DP);
// 09/19/99 HHI Schueuer: added Int*** iRowLength_DP
Void DataPartitioningTextureCoding(Int iVPMBnum, Int iVPlastMBnum, CStatistics* m_statsVP, Int*** iCoefQ_DP, Int*** iRowLength_DP = NULL);
// Added for RVLC by Toshiba
UInt sendTCOEFIntraRVLC (const Int* rgiCoefQ, Int iStart, Int* rgiZigzag, Bool bDontSendBits);
UInt putBitsOfTCOEFIntraRVLC (UInt uiRun, Int iLevel, Bool bIsLastRun, Bool bDontSendBits);
Int findVLCtableIndexOfNonLastEventIntraRVLC (Bool bIsLastRun, UInt uiRun, UInt uiLevel);
Int findVLCtableIndexOfLastEventIntraRVLC (Bool bIsLastRun, UInt uiRun, UInt uiLevel);
UInt sendTCOEFInterRVLC (const Int* rgiCoefQ, Int iStart, Int* rgiZigzag, Bool bDontSendBits);
UInt putBitsOfTCOEFInterRVLC (UInt uiRun, Int iLevel, Bool bIsLastRun, Bool bDontSendBits);
Int findVLCtableIndexOfNonLastEventInterRVLC (Bool bIsLastRun, UInt uiRun, UInt uiLevel);
Int findVLCtableIndexOfLastEventInterRVLC (Bool bIsLastRun, UInt uiRun, UInt uiLevel);
UInt escapeEncodeRVLC (UInt uiRun, Int iLevel, Bool bIsLastRun, Bool bDontSendBits);
// End Toshiba(1998-1-16)
// begin: added by Sharp (98/2/10)
Void setPredType(VOPpredType vopPredType);
Void setRefSelectCode(Int refSelectCode);
// end: added by Sharp (98/2/10)
// RRV insertion
Void redefineVOLMembersRRV();
Void resetAndCalcRRV();
Void cutoffDCTcoef();
// ~RRV
};
#endif // __VOPSEENC_HPP_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -