Ignore:
Timestamp:
26 May 2013, 16:22:23 (11 years ago)
Author:
tech
Message:

Added missing parts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.2-dev/source/Lib/TLibRenderer/TRenTop.cpp

    r438 r446  
    3232 */
    3333
     34
    3435#include "TRenImage.h"
    3536#include "TRenTop.h"
     
    3940#include <math.h>
    4041#include "../TLibCommon/CommonDef.h"
     42#if H_3D
     43
    4144
    4245Void TRenTop::xGetDataPointers( PelImage*& rpcInputImage, PelImage*& rpcOutputImage, PelImage*& rpcInputDepth, PelImage*& rpcOutputDepth, PelImage*& rpcFilled, Bool bRenderDepth )
     
    15881591Void TRenTop::xEnhSimilarityPlane       ( PelImagePlane** apcLeftPlane, PelImagePlane** apcRightPlane, PelImagePlane* pcFilledLeftPlane, PelImagePlane* pcFilledRightPlane, UInt uiNumberOfPlanes )
    15891592{
     1593  AOF( g_bitDepthC == g_bitDepthY );
    15901594  AOT( m_iSimEnhBaseView != 1 && m_iSimEnhBaseView != 2 );
    15911595  Int iWidth  = (*apcRightPlane)->getWidth ();
    15921596  Int iHeight = (*apcRightPlane)->getHeight();
    15931597
    1594   Int* aiHistLeft  = new Int[ g_uiIBDI_MAX + 1 ];
    1595   Int* aiHistRight = new Int[ g_uiIBDI_MAX + 1 ];
    1596   Pel* aiConvLUT   = new Pel[ g_uiIBDI_MAX + 1 ];
     1598  Int* aiHistLeft  = new Int[ ((Int64)1 ) << g_bitDepthY ];
     1599  Int* aiHistRight = new Int[ ((Int64)1 ) << g_bitDepthY ];
     1600  Pel* aiConvLUT   = new Pel[ ((Int64)1 ) << g_bitDepthY ];
    15971601
    15981602  for (UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++ )
    15991603  {
    1600     for (Int iCurVal = 0 ; iCurVal <= g_uiIBDI_MAX; iCurVal++)
     1604    for (Int iCurVal = 0 ; iCurVal < ( 1 << g_bitDepthY ); iCurVal++)
    16011605    {
    16021606      aiHistLeft [iCurVal] = 0;
     
    16451649    Int iCheckSumRight = 0;
    16461650
    1647     for (Int iCurVal = 0 ; iCurVal <= g_uiIBDI_MAX; iCurVal++)
     1651    for (Int iCurVal = 0 ; iCurVal < ( 1 << g_bitDepthY ); iCurVal++)
    16481652    {
    16491653      iCheckSumLeft  += aiHistLeft [iCurVal];
     
    16521656
    16531657
    1654     while( iCurChangeVal <= g_uiIBDI_MAX )
     1658    while( iCurChangeVal < ( 1 << g_bitDepthY ) )
    16551659    {
    16561660      if ( iCumSumBase == iCumSumChange )
    16571661      {
    1658         aiConvLUT[iCurChangeVal] = Min(iCurBaseVal, g_uiIBDI_MAX);
     1662        aiConvLUT[iCurChangeVal] = std::min( iCurBaseVal,  ( 1 << g_bitDepthY ) - 1 );
    16591663        iCurBaseVal  ++;
    16601664        iCurChangeVal++;
    16611665        iCumSumChange += aiHistChange[iCurChangeVal];
    1662         if (iCurBaseVal <= g_uiIBDI_MAX )
     1666        if (iCurBaseVal <  ( 1 << g_bitDepthY ) )
    16631667        {
    16641668          iCumSumBase   += aiHistBase  [iCurBaseVal]  ;
     
    16681672      {
    16691673        iCurBaseVal++;
    1670         if (iCurBaseVal <= g_uiIBDI_MAX )
     1674        if (iCurBaseVal < ( 1 << g_bitDepthY ) )
    16711675        {
    16721676          iCumSumBase   += aiHistBase  [iCurBaseVal]  ;
     
    16751679      else if ( iCumSumBase > iCumSumChange)
    16761680      {
    1677         aiConvLUT[iCurChangeVal] = Min(iCurBaseVal, g_uiIBDI_MAX);
     1681        aiConvLUT[iCurChangeVal] = std::min(iCurBaseVal, ( 1 << g_bitDepthY )-1);
    16781682        iCurChangeVal++;
    16791683        iCumSumChange += aiHistChange  [iCurChangeVal]  ;
     
    18841888Void TRenTop::temporalFilterVSRS( TComPicYuv* pcPicYuvVideoCur, TComPicYuv* pcPicYuvDepthCur, TComPicYuv* pcPicYuvVideoLast, TComPicYuv* pcPicYuvDepthLast, Bool bFirstFrame )
    18851889{
     1890  AOF( g_bitDepthY == g_bitDepthC );
    18861891  Int iSADThres  = 100 ;  //threshold of sad in 4*4 block motion detection
    18871892
     
    19501955            { //Weight: 0.75
    19511956              Int iFilt = (( (pcDepthLastDataBlk[iCurPosX] << 1 ) + pcDepthLastDataBlk[iCurPosX] + pcDepthCurDataBlk[iCurPosX] + 2 ) >> 2 );
    1952               assert( (iFilt >= 0) && (iFilt <=  g_uiIBDI_MAX) );
     1957              assert( (iFilt >= 0) && (iFilt <  ( 1 << g_bitDepthY ) ) );
    19531958              pcDepthCurDataBlk[iCurPosX] = pcDepthLastDataBlk[iCurPosX];
    19541959              pcDepthCurDataBlk[iCurPosX] = iFilt;
     
    22212226  if(m_aiBlkMoving         != NULL ) delete[] m_aiBlkMoving;
    22222227}
     2228#endif // H_3D
Note: See TracChangeset for help on using the changeset viewer.