Ignore:
Timestamp:
12 Dec 2011, 18:35:44 (13 years ago)
Author:
hhi
Message:

Clean version with cfg-files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibRenderer/TRenSingleModel.cpp

    r2 r5  
     1/* The copyright in this software is being made available under the BSD
     2 * License, included below. This software may be subject to other third party
     3 * and contributor rights, including patent rights, and no such rights are
     4 * granted under this license.
     5 *
     6 * Copyright (c) 2010-2011, ISO/IEC
     7 * All rights reserved.
     8 *
     9 * Redistribution and use in source and binary forms, with or without
     10 * modification, are permitted provided that the following conditions are met:
     11 *
     12 *  * Redistributions of source code must retain the above copyright notice,
     13 *    this list of conditions and the following disclaimer.
     14 *  * Redistributions in binary form must reproduce the above copyright notice,
     15 *    this list of conditions and the following disclaimer in the documentation
     16 *    and/or other materials provided with the distribution.
     17 *  * Neither the name of the ISO/IEC nor the names of its contributors may
     18 *    be used to endorse or promote products derived from this software without
     19 *    specific prior written permission.
     20 *
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
     25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     31 * THE POSSIBILITY OF SUCH DAMAGE.
     32 */
     33
    134
    235#include "TRenImage.h"
     
    451484      if ( iCurSPos < iMinChangedSPos )
    452485      {
    453 #if GERHARD_RM_HOLE_EXT
    454         if ( (iCurSPos > 0) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-1 ] != REN_IS_FILLED) || (iCurSPos > 1) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-2 ] != REN_IS_FILLED) )
    455         {
    456           iMinChangedSPos = iMinChangedSPos - m_iHoleMargin - 2;
    457         }
    458         else
    459         {
    460486          break;
    461487        }
    462 #else
    463         break;
    464 #endif
    465       }
     488
    466489      iCurPosX--;
    467490      iLastSPos    = iCurSPos;
     
    554577      if ( iCurSPos > iMaxChangedSPos )
    555578      {
    556 #if GERHARD_RM_HOLE_EXT
    557         if ( (iCurSPos > 0) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-1 ] != REN_IS_FILLED) || (iCurSPos > 1) && (m_apiFilledRow[m_iCurViewPos][ iCurSPos-2 ] != REN_IS_FILLED) )
    558         {
    559           iMaxChangedSPos = iMaxChangedSPos - m_iHoleMargin - 2;
    560         }
    561         else
    562         {
    563579          break;
    564580        }
    565 #else
    566         break;
    567 #endif
    568       }
    569581      iCurPosX++;
    570582      iLastSPos    = iCurSPos;
     
    584596  Int iCurPosX           = iEndChangePos;
    585597
    586 #if GERHARD_RM_HOLE_EXT
    587   Int iEndFillSPos = iLastSPos + m_iHoleMargin;
    588   while ( (iCurPosX + 1 < m_iWidth) &&  ( xShift(iCurPosX + 1) <= iEndFillSPos) && !(m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )
    589     iCurPosX++;
    590 #endif
    591 
    592598  if ( ( iCurPosX + 1 < m_iWidth ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )
    593599  {
     
    615621
    616622  m_bInOcclusion = iLastSPos >= m_iLastOccludedSPos;
    617 
    618 #if GERHARD_RM_HOLE_EXT
    619   // RE-RENDER if not filled
    620   if (  (     ( ( iLastSPos < m_iLastOccludedSPos) && ( m_apiFilledRow[m_iCurViewPos][ iLastSPos ] != REN_IS_FILLED ) )))
    621   {
    622     xRemoveHoleExtL(iLastSPos, iEndChangePos+1, iError );
    623   }
    624 #endif
    625623};
    626624
     
    630628  // GET MINIMAL OCCLUDED SAMPLE POSITION
    631629  Int iCurPosX           = iStartChangePos;
    632 
    633 #if GERHARD_RM_HOLE_EXT
    634   Int iEndFillSPos = iLastSPos + m_iHoleMargin;
    635   while ( (iCurPosX + 1 < m_iWidth) &&  ( xShift(iCurPosX + 1) <= iEndFillSPos) && !(m_apbOccludedRow[m_iCurViewPos][ iCurPosX + 1] ) )
    636     iCurPosX++;
    637 #endif
    638630
    639631  if ( ( iCurPosX - 1 > -1 ) && (m_apbOccludedRow[m_iCurViewPos][ iCurPosX - 1] ) )
     
    652644      m_iLastOccludedSPos = xShift(iCurPosX) - 1;
    653645    }
    654 #if GERHARD_RM_SPLAT
    655646    m_iLastOccludedSPosFP = xRoundR( m_iLastOccludedSPos );
    656 #else
    657     m_iLastOccludedSPosFP = xRangeLeftR( m_iLastOccludedSPos );
    658 #endif
    659647  }
    660648  else
     
    665653
    666654  m_bInOcclusion = iLastSPos <= m_iLastOccludedSPos;
    667 
    668 #if GERHARD_RM_HOLE_EXT
    669   // RE-RENDER if not filled
    670   if (  (     ( ( iLastSPos < m_iLastOccludedSPos) && ( m_apiFilledRow[m_iCurViewPos][ iLastSPos ] != REN_IS_FILLED ) )))
    671   {
    672     xRemoveHoleExtL(iLastSPos, iStartChangePos+1, iError );
    673   }
    674 #endif
    675655};
    676656
     
    752732    {
    753733      m_iLastOccludedSPos = iLastSPos;
    754 #if GERHARD_RM_SPLAT
     734
    755735      Int iRightSPosFP = xRoundL( iLastSPos );
    756736      if ( ( iRightSPosFP == xRangeRightL(iLastSPos)) && (iRightSPosFP >= 0) )
     
    760740      }
    761741      m_iLastOccludedSPosFP = iRightSPosFP;
    762 #else
    763       m_iLastOccludedSPosFP = xRangeLeftL( m_iLastOccludedSPos );
    764 #endif
    765742
    766743      m_bInOcclusion = true;
     
    813790      m_iLastOccludedSPos = iLastSPos;
    814791
    815 #if GERHARD_RM_SPLAT
    816792      Int iLeftSPosFP = xRoundR( iLastSPos );
    817793      if ( ( iLeftSPosFP == xRangeLeftR(iLastSPos)) && (iLeftSPosFP <= m_iWidth - 1) )
     
    821797      }
    822798      m_iLastOccludedSPosFP = iLeftSPosFP;
    823 #endif
    824799
    825800      m_bInOcclusion = true;
     
    862837}
    863838
    864 
    865 
    866839__inline Void
    867840TRenSingleModel::xFillHoleL( Int iCurSPos, Int iLastSPos, Int iCurPos, RMDist& riError )
     
    874847  Int iLastPos      = iCurPos + 1;
    875848
    876 #if GERHARD_RM_HOLE_EXT
    877   Int iErrorCorrection = 0;
    878   Int iLastPosInNewData = iLastPos - m_iStartChangePosX;
    879   Int iEndFillSPos   = iLastSPos + m_iHoleMargin;
    880   ////////// Go back hole margin width and correct error  ///////
    881   while( ( (iLastPos+1) < m_iWidth) && (iLastSPos > iEndFillSPos) )
    882   {
    883     iCurPos++;
    884     iLastPos++;
    885     iLastPosInNewData++;
    886     iCurSPos = iLastSPos;
    887 
    888     iLastSPos = xShift( iLastPos, iLastPosInNewData);
    889 
    890     if ( iLastSPos < 0        ) iLastSPos = 0;
    891     if ( iLastSPos >= m_iWidth ) iLastSPos = m_iWidth-1;
    892 
    893     Int iDiff = iLastSPos - iCurSPos;
    894 
    895     // Stop if other hole begins, or if position is occluded
    896     if (iDiff > 2  || iLastSPos >= Min( iEndFillSPos, m_iLastOccludedSPos ) || iCurSPos == 0)
    897     {
    898       iCurPos--;
    899       iLastPos--;
    900       iLastPosInNewData--;
    901       iLastSPos = iCurSPos;
    902       iCurSPos = xShift( iCurPos, iLastPosInNewData-1);
    903       break;
    904     }
    905 
    906     if ( !m_bSet )
    907     {
    908       xRenderShiftedRangeL(iCurSPos, iLastSPos, iCurPos, iLastPos, iErrorCorrection );
    909     }
    910   }
    911 
    912   riError -= iErrorCorrection;
    913 
    914   ////////// Fill enlarged hole  ///////
    915 #endif
    916 
    917849  Int iStartFillSPosFP = xRangeLeftL(iStartFillSPos);
    918850
    919 #if GERHARD_RM_SPLAT
    920851  if (iStartFillSPosFP == xRoundL(iStartFillSPos))
    921852  {
    922 #endif
    923853    if ((iStartFillSPosFP >= 0) && (iStartFillSPosFP < m_iLastOccludedSPosFP) )
    924854    {
     
    926856      xSetShiftedPel     ( iStartFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError );
    927857    }
    928 #if GERHARD_RM_SPLAT
    929858  }
    930859  else
     
    932861    iStartFillSPosFP--;
    933862  }
    934 #endif
    935863
    936864  m_iThisDepth = m_iLastDepth;
     
    951879  Int iLastPos       = iCurPos - 1;
    952880
    953 
    954 #if GERHARD_RM_HOLE_EXT
    955   Int iErrorCorrection = 0;
    956   Int iLPosInNewData = iLastPos - m_iStartChangePosX;
    957   Int iEndFillSPos   = iLastSPos + m_iHoleMargin;
    958   ////////// Go back hole margin width and correct error  ///////
    959   while( ( (iLastPos+1) < m_iWidth) && (iLastSPos > iEndFillSPos) )
    960   {
    961     iCurPos++;
    962     iLastPos++;
    963     iLPosInNewData++;
    964     iCurSPos = iLastSPos;
    965 
    966     iLastSPos = xShift( iLastPos, iLPosInNewData);
    967 
    968     if ( iLastSPos < 0        ) iLastSPos = 0;
    969     if ( iLastSPos >= m_iWidth ) iLastSPos = m_iWidth-1;
    970 
    971     Int iDiff = iLastSPos - iCurSPos;
    972 
    973     // Stop if other hole begins, or if position is occluded
    974     if (iDiff > 2  || iLastSPos >= Min( iEndFillSPos, m_iLastOccludedSPos ) || iCurSPos == 0)
    975     {
    976       iCurPos--;
    977       iLastPos--;
    978       iLPosInNewData--;
    979       iLastSPos = iCurSPos;
    980       iCurSPos = xShift( iCurPos, iLPosInNewData-1);
    981       break;
    982     }
    983 
    984     if ( !m_bSet )
    985     {
    986       xRenderShiftedRangeL(iCurSPos, iLastSPos, iCurPos, iLastPos, iErrorCorrection );
    987     }
    988   }
    989 
    990   riError -= iErrorCorrection;
    991 
    992   ////////// Fill enlarged hole  ///////
    993 #endif
    994 
    995881  Int iStartFillSPosFP = xRangeRightR(iStartFillSPos);
    996882
    997 #if GERHARD_RM_SPLAT
    998883  if (iStartFillSPosFP == xRoundR(iStartFillSPos))
    999884  {
    1000 #endif
    1001885    if ((iStartFillSPosFP < m_iWidth) && (iStartFillSPosFP > m_iLastOccludedSPosFP) )
    1002886    {
     
    1004888      xSetShiftedPel( iEndFillPos << m_iShiftPrec, iStartFillSPosFP, REN_IS_FILLED, riError );
    1005889    }
    1006 #if GERHARD_RM_SPLAT
    1007890  }
    1008891  else
     
    1010893    iStartFillSPosFP++;
    1011894  }
    1012 #endif
    1013895
    1014896  m_iThisDepth = m_iLastDepth;
     
    1018900  }
    1019901}
    1020 
    1021 #if GERHARD_RM_HOLE_EXT
    1022 Void TRenSingleModel::xRemoveHoleExtL( Int iShiftedLeftPos,  Int iLeftPos, Int& riError )
    1023 {
    1024   if (iShiftedLeftPos < 0 || iShiftedLeftPos == (m_iWidth - 1) )
    1025     return;
    1026 
    1027   Int iStartRemovePos      = iLeftPos;
    1028   Int iEndRemoveSPos = iShiftedLeftPos + m_iHoleMargin;
    1029   Int iRightPos            = iLeftPos + 1;
    1030 
    1031   Int iShiftedRightPos;
    1032 
    1033   ////////// Go back hole margin width ///////
    1034   while(  iRightPos  < m_iWidth )
    1035   {
    1036     iShiftedRightPos = xShift(iRightPos);
    1037 
    1038     if ( iShiftedRightPos < 0         ) iShiftedRightPos = 0;
    1039     if ( iShiftedRightPos >= m_iWidth ) iShiftedRightPos = m_iWidth-1;
    1040 
    1041     Int iDiff = iShiftedRightPos - iShiftedLeftPos;
    1042 
    1043     // Stop if other hole begins, or if position is occluded
    1044     if ( iDiff > 2 || iShiftedRightPos >= m_iLastOccludedSPos )
    1045     {
    1046       // Go back one
    1047       iShiftedRightPos = iShiftedLeftPos;
    1048       iRightPos--;
    1049       iLeftPos--;
    1050       iShiftedLeftPos = xShift(iLeftPos);
    1051       break;
    1052     }
    1053 
    1054     if  ( (iShiftedRightPos > iEndRemoveSPos)  )
    1055     {
    1056       break;
    1057     }
    1058 
    1059     iShiftedLeftPos = iShiftedRightPos;
    1060     iLeftPos++;
    1061     iRightPos++;
    1062   }
    1063 
    1064   ////////// Remove Hole margin  ///////
    1065   while( iLeftPos >= iStartRemovePos )
    1066   {
    1067     xRenderShiftedRangeL(iShiftedLeftPos, iShiftedRightPos, iLeftPos, iRightPos, riError );
    1068     iLeftPos--;
    1069     iRightPos--;
    1070     iShiftedRightPos = iShiftedLeftPos;
    1071     iShiftedLeftPos  = xShift(iLeftPos);
    1072   }
    1073 }
    1074 #endif
    1075902
    1076903__inline Void
     
    12661093  {
    12671094    m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos];
    1268 #if GERHARD_RM_COLOR_PLANES
     1095#if HHI_VSO_COLOR_PLANES
    12691096    m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos];
    12701097    m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][2][iSourcePos];
     
    12721099    m_apiFilledRow        [m_iCurViewPos]   [iTargetSPos] = iFilled;
    12731100    Int iDiffY = m_aapiRefVideoPelRow    [0][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos];
    1274 #if GERHARD_RM_COLOR_PLANES
     1101#if HHI_VSO_COLOR_PLANES
    12751102    Int iDiffU = m_aapiRefVideoPelRow    [1][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos];
    12761103    Int iDiffV = m_aapiRefVideoPelRow    [2][iTargetSPos] - m_aapiSynthVideoPelRow[m_iCurViewPos][2][iTargetSPos];
     
    12841111    Int iSDOld   = m_apiErrorRow            [iTargetSPos];
    12851112    Int iDiffY   = m_aapiRefVideoPelRow  [0][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][0][iSourcePos];
    1286 #if GERHARD_RM_COLOR_PLANES
     1113#if HHI_VSO_COLOR_PLANES
    12871114    Int iDiffU   = m_aapiRefVideoPelRow  [1][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][1][iSourcePos];
    12881115    Int iDiffV   = m_aapiRefVideoPelRow  [2][iTargetSPos] - m_aapiBaseVideoPelRow [m_iCurViewPos][2][iSourcePos];
     
    13051132
    13061133  Pel piBlendedValueY;
    1307 #if GERHARD_RM_COLOR_PLANES
     1134#if HHI_VSO_COLOR_PLANES
    13081135  Pel piBlendedValueU;
    13091136  Pel piBlendedValueV;
     
    13161143      m_aapiBaseVideoPelRow                                    [0][0][iSourcePos ]  ,
    13171144      m_aapiSynthVideoPelRow                                   [1][0][iTargetSPos]  ,
    1318 #if GERHARD_RM_COLOR_PLANES
     1145#if HHI_VSO_COLOR_PLANES
    13191146      m_aapiBaseVideoPelRow                                    [0][1][iSourcePos ]  ,
    13201147      m_aapiSynthVideoPelRow                                   [1][1][iTargetSPos]  ,
     
    13271154      m_apiFilledRow                                           [1]   [iTargetSPos]  ,
    13281155      piBlendedValueY
    1329 #if GERHARD_RM_COLOR_PLANES
     1156#if HHI_VSO_COLOR_PLANES
    13301157    , piBlendedValueU,
    13311158      piBlendedValueV
     
    13381165      m_aapiSynthVideoPelRow                                   [0][0][iTargetSPos],
    13391166      m_aapiBaseVideoPelRow                                    [1][0][iSourcePos ],
    1340 #if GERHARD_RM_COLOR_PLANES
     1167#if HHI_VSO_COLOR_PLANES
    13411168      m_aapiSynthVideoPelRow                                   [0][1][iTargetSPos],
    13421169      m_aapiBaseVideoPelRow                                    [1][1][iSourcePos ],
     
    13491176      iFilled                                                                     ,
    13501177      piBlendedValueY
    1351 #if GERHARD_RM_COLOR_PLANES
     1178#if HHI_VSO_COLOR_PLANES
    13521179    , piBlendedValueU,
    13531180      piBlendedValueV
     
    13611188    m_aapiSynthVideoPelRow[m_iCurViewPos][0][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][0][iSourcePos];
    13621189    m_aapiSynthVideoPelRow[2            ][0][iTargetSPos] = piBlendedValueY;
    1363 #if GERHARD_RM_COLOR_PLANES
     1190#if HHI_VSO_COLOR_PLANES
    13641191    m_aapiSynthVideoPelRow[m_iCurViewPos][1][iTargetSPos] = m_aapiBaseVideoPelRow[m_iCurViewPos][1][iSourcePos];
    13651192    m_aapiSynthVideoPelRow[2            ][1][iTargetSPos] = piBlendedValueU;
     
    13701197
    13711198    Int iDiffY = m_aapiRefVideoPelRow    [0][iTargetSPos] - piBlendedValueY;
    1372 #if GERHARD_RM_COLOR_PLANES
     1199#if HHI_VSO_COLOR_PLANES
    13731200    Int iDiffU = m_aapiRefVideoPelRow    [1][iTargetSPos] - piBlendedValueU;
    13741201    Int iDiffV = m_aapiRefVideoPelRow    [2][iTargetSPos] - piBlendedValueV;
     
    13821209    Int iSDOld   = m_apiErrorRow            [iTargetSPos];
    13831210    Int iDiffY = m_aapiRefVideoPelRow    [0][iTargetSPos] - piBlendedValueY;
    1384 #if GERHARD_RM_COLOR_PLANES
     1211#if HHI_VSO_COLOR_PLANES
    13851212    Int iDiffU = m_aapiRefVideoPelRow    [1][iTargetSPos] - piBlendedValueU;
    13861213    Int iDiffV = m_aapiRefVideoPelRow    [2][iTargetSPos] - piBlendedValueV;
     
    14111238}
    14121239
    1413 #if GERHARD_RM_COLOR_PLANES
     1240#if HHI_VSO_COLOR_PLANES
    14141241__inline Void
    14151242TRenSingleModel::xGetBlendedValue( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV )
     
    14231250    if (m_iBlendMode == 1 )
    14241251    {
     1252#if HHI_VSO_COLOR_PLANES
    14251253      xGetBlendedValueBM1(  iYL,  iYR,  iUL,  iUR,  iVL,  iVR,  iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY,  riU, riV );
     1254#else
     1255      xGetBlendedValueBM1(  iYL,  iYR,  iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY );
     1256#endif
    14261257    }
    14271258    else
    14281259    {
     1260#if HHI_VSO_COLOR_PLANES
    14291261      xGetBlendedValueBM2(  iYL,  iYR,  iUL,  iUR,  iVL,  iVR,  iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY,  riU, riV );
     1262#else
     1263      xGetBlendedValueBM2(  iYL,  iYR, iDepthL,  iDepthR,  iFilledL,  iFilledR,  riY );
     1264#endif
    14301265    }
    14311266    return;
     
    14411276      {
    14421277        riY = xBlend( iYL, iYR, iFilledR >> 1 );
    1443 #if GERHARD_RM_COLOR_PLANES
     1278#if HHI_VSO_COLOR_PLANES
    14441279        riU = xBlend( iUL, iUR, iFilledR >> 1 );
    14451280        riV = xBlend( iVL, iVR, iFilledR >> 1 );
     
    14501285      {
    14511286        riY = xBlend( iYR, iYL, (iFilledL >> 1) );
    1452 #if GERHARD_RM_COLOR_PLANES
     1287#if HHI_VSO_COLOR_PLANES
    14531288        riU = xBlend( iUR, iUL, (iFilledL >> 1) );
    14541289        riV = xBlend( iVR, iVL, (iFilledL >> 1) );
     
    14581293      {
    14591294        riY = xBlend( iYR, iYL, m_iBlendDistWeight );
    1460 #if GERHARD_RM_COLOR_PLANES
     1295#if HHI_VSO_COLOR_PLANES
    14611296        riU = xBlend( iUR, iUL, m_iBlendDistWeight );
    14621297        riV = xBlend( iVR, iVL, m_iBlendDistWeight );
     
    14671302    {
    14681303      riY = iYL;
    1469 #if GERHARD_RM_COLOR_PLANES
     1304#if HHI_VSO_COLOR_PLANES
    14701305      riU = iUL;
    14711306      riV = iVL;
     
    14751310    {
    14761311      riY = iYR;
    1477 #if GERHARD_RM_COLOR_PLANES
     1312#if HHI_VSO_COLOR_PLANES
    14781313      riU = iUR;
    14791314      riV = iVR;
     
    14861321    {
    14871322        riY =  iYR;
    1488 #if GERHARD_RM_COLOR_PLANES
     1323#if HHI_VSO_COLOR_PLANES
    14891324        riU =  iUR;
    14901325        riV =  iVR;
     
    14941329    {
    14951330        riY =  iYL;
    1496 #if GERHARD_RM_COLOR_PLANES
     1331#if HHI_VSO_COLOR_PLANES
    14971332        riU =  iUL;
    14981333        riV =  iVL;
     
    15051340    {
    15061341        riY = iYL;
    1507 #if GERHARD_RM_COLOR_PLANES
     1342#if HHI_VSO_COLOR_PLANES
    15081343        riU = iUL;
    15091344        riV = iVL;
     
    15131348    {
    15141349      riY = iYR;
    1515 #if GERHARD_RM_COLOR_PLANES
     1350#if HHI_VSO_COLOR_PLANES
    15161351      riU = iUR;
    15171352      riV = iVR;
     
    15231358
    15241359__inline Void
     1360#if HHI_VSO_COLOR_PLANES
    15251361TRenSingleModel::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV )
     1362#else
     1363TRenSingleModel::xGetBlendedValueBM1( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY )
     1364#endif
    15261365{
    15271366  if      ( iFilledL == REN_IS_FILLED ||  iFilledR == REN_IS_HOLE )
    15281367  {
    15291368    riY = iYL;
    1530 #if GERHARD_RM_COLOR_PLANES
     1369#if HHI_VSO_COLOR_PLANES
    15311370    riU = iUL;
    15321371    riV = iVL;
     
    15361375  {
    15371376    riY = iYR;
    1538 #if GERHARD_RM_COLOR_PLANES
     1377#if HHI_VSO_COLOR_PLANES
    15391378    riU = iUR;
    15401379    riV = iVR;
     
    15441383  {
    15451384    riY = xBlend( iYR, iYL, iFilledL );
    1546 #if GERHARD_RM_COLOR_PLANES
     1385#if HHI_VSO_COLOR_PLANES
    15471386    riU = xBlend( iUR, iUL, iFilledL );
    15481387    riV = xBlend( iVR, iUL, iFilledL );
     
    15521391
    15531392__inline Void
     1393#if HHI_VSO_COLOR_PLANES
    15541394TRenSingleModel::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV )
     1395#else
     1396TRenSingleModel::xGetBlendedValueBM2( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY )
     1397#endif
    15551398{
    15561399  if      ( iFilledR == REN_IS_FILLED ||  iFilledL == REN_IS_HOLE )
    15571400  {
    15581401    riY = iYR;
    1559 #if GERHARD_RM_COLOR_PLANES
     1402#if HHI_VSO_COLOR_PLANES
    15601403    riU = iUR;
    15611404    riV = iVR;
     
    15651408  {
    15661409    riY = iYL;
    1567 #if GERHARD_RM_COLOR_PLANES
     1410#if HHI_VSO_COLOR_PLANES
    15681411    riU = iUL;
    15691412    riV = iVL;
     
    15731416  {
    15741417    riY = xBlend( iYL, iYR, iFilledR );
    1575 #if GERHARD_RM_COLOR_PLANES
     1418#if HHI_VSO_COLOR_PLANES
    15761419    riU = xBlend( iUL, iUR, iFilledR );
    15771420    riV = xBlend( iVL, iUR, iFilledR );
     
    15801423}
    15811424
    1582 
    1583 
    15841425__inline Pel
    15851426TRenSingleModel::xBlend( Pel pVal1, Pel pVal2, Int iWeightVal2 )
     
    15871428  return pVal1  +  (Pel) (  ( (Int) ( pVal2 - pVal1) * iWeightVal2 + (1 << (REN_VDWEIGHT_PREC - 1)) ) >> REN_VDWEIGHT_PREC );
    15881429}
    1589 
    1590 #if GERHARD_RM_DEBUG_MM
    1591 Bool
    1592 TRenSingleModel::compare( TRenSingleModel* pcRefModel )
    1593 {
    1594   Bool bNoDirectStop = true;
    1595   Bool bEqual = true;
    1596 
    1597   for (Int iBaseView = 0; iBaseView < 2; iBaseView++ )
    1598   {
    1599     for (Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) //GT: change to 1 !!! for small tests
    1600     {
    1601       for (Int iPosX = 0; iPosX < m_iWidth; iPosX++ )
    1602       {
    1603         if (( iBaseView == m_iMode ) || ( m_iMode == 2 ))
    1604         {
    1605  //         MEV_RF( "imswitch", &mxAW(m_iWidth, m_iHeight, m_aiBaseDepthStrides[iBaseView], m_apiBaseDepthPel  [iBaseView] ), &mxAW(m_iWidth, m_iHeight, pcRefModel->m_aiBaseDepthStrides[iBaseView], pcRefModel->m_apiBaseDepthPel  [iBaseView] ), &mxAW("u" ), 0);
    1606           bEqual = bEqual && ( m_apiBaseDepthPel  [iBaseView]   [iPosX+iPosY* m_aiBaseDepthStrides[iBaseView]] == pcRefModel->m_apiBaseDepthPel  [iBaseView]   [iPosX+iPosY* pcRefModel->m_aiBaseDepthStrides[iBaseView] ] );AOF( bNoDirectStop || bEqual );
    1607           bEqual = bEqual && ( m_apiFilled        [iBaseView]   [iPosX+iPosY*                       m_iStride] == pcRefModel->m_apiFilled        [iBaseView]   [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1608           bEqual = bEqual && ( m_piError                        [iPosX+iPosY*                       m_iStride] == pcRefModel->m_piError                        [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1609           bEqual = bEqual && ( m_apbOccluded      [iBaseView]   [iPosX+iPosY*                       m_iStride] == pcRefModel->m_apbOccluded      [iBaseView]   [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1610           bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY*                       m_iStride] == pcRefModel->m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1611           bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY*                       m_iStride] >= 0 );                                                                                                       AOF( bNoDirectStop || bEqual );
    1612           bEqual = bEqual && ( m_aapiSynthVideoPel[iBaseView][0][iPosX+iPosY*                       m_iStride] <= g_uiIBDI_MAX );                                                                                                      AOF( bNoDirectStop || bEqual );
    1613           if (m_iMode == 2 )
    1614           {
    1615             bEqual = bEqual && ( m_apiSynthDepthPel [iBaseView]   [iPosX+iPosY*                       m_iStride] == pcRefModel->m_apiSynthDepthPel [iBaseView]   [iPosX+iPosY* m_iStride] );                                   AOF( bNoDirectStop || bEqual );
    1616           }
    1617           //if (!bEqual)
    1618           //{
    1619           //  std::cout << "Mismatch in PosX: " << iPosX << " PosY: " << iPosY << std::endl;
    1620           //  AOF(false);
    1621           //  exit(55);
    1622           //}
    1623         }
    1624       }
    1625     }
    1626   }
    1627   return bEqual;
    1628 }
    1629 
    1630 #endif
Note: See TracChangeset for help on using the changeset viewer.