Ignore:
Timestamp:
22 Dec 2013, 20:21:39 (10 years ago)
Author:
rwth
Message:
  • finalize H_3D_DELTA_DLT implementation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-9.1-dev0-RWTH/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r749 r753  
    412412          if ( pcDLT->getUseDLTFlag( i ) )
    413413          {
    414             UInt uiNumDepthValues     = 0;
    415414            Bool bDltBitMapRepFlag    = false;
    416415            UInt uiMaxDiff            = 0xffffffff;
     
    430429              bDltBitMapRepFlag = false;
    431430            }
     431           
     432            UInt uiNumDepthValues = 0;
     433            Int  aiIdx2DepthValue[256];
    432434
    433435            // Bit map
    434436            if ( bDltBitMapRepFlag )
    435437            {
    436               UInt uiNumDepthValues = 0;
    437               Int  aiIdx2DepthValue[256];
    438 
    439438              for (UInt d=0; d<256; d++)
    440439              {
     
    446445                }
    447446              }
    448 
    449               pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    450447            }
    451448            // Diff Coding
     
    454451              READ_CODE(8, uiNumDepthValues, "num_depth_values_in_dlt[i]");   // num_entry
    455452
     453#if !H_3D_DELTA_DLT
    456454              if ( pcDLT->getInterViewDltPredEnableFlag( i ) == false )       // Single-view DLT Diff Coding
     455#endif
    457456              {
    458457                // The condition if( pcVPS->getNumDepthValues(i) > 0 ) is always true since for Single-view Diff Coding, there is at least one depth value in depth component.
    459 
    460                 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int));
    461458
    462459                if (uiNumDepthValues > 1)
     
    501498                }
    502499
    503                 pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
    504 
    505                 free(aiIdx2DepthValue);
    506               }             
     500              }
    507501            }
     502           
     503#if H_3D_DELTA_DLT
     504            if( pcDLT->getInterViewDltPredEnableFlag( i ) )
     505            {
     506              // interpret decoded values as delta DLT
     507              AOF( pcVPS->getDepthId( 1 ) == 1 );
     508              AOF( i > 1 );
     509              // assumes ref layer id to be 1
     510              Int* piRefDLT = pcDLT->idx2DepthValue( 1 );
     511              UInt uiRefNum = pcDLT->getNumDepthValues( 1 );
     512              pcDLT->setDeltaDLT(i, piRefDLT, uiRefNum, aiIdx2DepthValue, uiNumDepthValues);
     513            }
     514            else
     515            {
     516              // store final DLT
     517              pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
     518            }
     519#else
     520            // store final DLT
     521            pcDLT->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues);
     522#endif
    508523          }
    509524        }
Note: See TracChangeset for help on using the changeset viewer.