own CVOPU8YUVBA* CVOPU8YUVBA::downsampleForSpatialScalability () const { //only handle CIF->QCIF for RECTANGULAR VOP assert (m_fAUsage == RECTANGLE); /* CRct rctDown = */ whereY (); assert (whereY().left == 0 && whereY().top == 0); CVOPU8YUVBA* pvopfRet = new CVOPU8YUVBA (m_fAUsage); assert (pvopfRet != NULL); pvopfRet -> m_puciY = m_puciY->downsampleForSpatialScalability (); pvopfRet -> m_puciU = m_puciU->downsampleForSpatialScalability (); pvopfRet -> m_puciV = m_puciV->downsampleForSpatialScalability (); pvopfRet -> m_puciBY = new CU8Image (pvopfRet->whereY (), opaqueValue); pvopfRet -> m_puciBUV = new CU8Image (pvopfRet->whereUV (), opaqueValue); return pvopfRet; }
void SnakeAPI::putChar(char ch, int left, int top) { if (top == CURRENT_CURSOR) { left = whereX(); top = whereY(); } COORD coord = {left, top}; DWORD cCharsWritten; FillConsoleOutputCharacterA(hSnakeAPI, ch, 1, coord, &cCharsWritten); }
own Double* CVOPU8YUVBA::snr (const CVOPU8YUVBA& vopf) const { assert (whereY () == vopf.whereY () && whereUV () == vopf.whereUV ()); Double* psnr = new Double [3+m_iAuxCompCount]; // mean square CU8Image* puciBOr = new CU8Image (*m_puciBY); puciBOr ->CU8Image_or (*vopf.getPlane (BY_PLANE)); CU8Image* puciExp0 = new CU8Image (*m_puciY, puciBOr -> where ()); CU8Image* puciExp1 = new CU8Image (*vopf.getPlane (Y_PLANE), puciBOr -> where ()); psnr [0] = puciExp1 -> snr (*puciExp0, *puciBOr); delete puciExp0; delete puciExp1; if (fAUsage () == EIGHT_BIT) { assert( m_iAuxCompCount==vopf.m_iAuxCompCount ); for(Int iAuxComp=0;iAuxComp<m_iAuxCompCount;iAuxComp++) { // MAC (SB) 26-Nov-99 puciExp0 = new CU8Image (*m_ppuciA[iAuxComp], puciBOr -> where ()); puciExp1 = new CU8Image (*vopf.getPlaneA (iAuxComp), puciBOr -> where ()); psnr [3+iAuxComp] = puciExp1 -> snr (*puciExp0, *puciBOr); delete puciExp0; delete puciExp1; } } delete puciBOr; puciBOr = new CU8Image (*m_puciBUV); puciBOr ->CU8Image_or (*vopf.getPlane (BUV_PLANE)); puciExp0 = new CU8Image (*m_puciU, puciBOr -> where ()); puciExp1 = new CU8Image (*vopf.getPlane (U_PLANE), puciBOr -> where ()); psnr [1] = puciExp1 -> snr (*puciExp0, *puciBOr); delete puciExp0; delete puciExp1; puciExp0 = new CU8Image (*m_puciV, puciBOr -> where ()); puciExp1 = new CU8Image (*vopf.getPlane (V_PLANE), puciBOr -> where ()); psnr [2] = puciExp1 -> snr (*puciExp0, *puciBOr); delete puciExp0; delete puciExp1; delete puciBOr; return psnr; }