Changeset 595 in SHVCSoftware for trunk/source/Lib/TLibDecoder


Ignore:
Timestamp:
2 Feb 2014, 06:01:53 (11 years ago)
Author:
seregin
Message:

merge with SHM-5.0-dev branch

Location:
trunk
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/source

  • TabularUnified trunk/source/Lib/TLibDecoder/AnnexBread.cpp

    r313 r595  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/AnnexBread.h

    r313 r595  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/NALread.cpp

    r540 r595  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    7070        break;
    7171      }
     72      assert(*it_read <= 0x03);
    7273    }
    7374    zeroCount = (*it_read == 0x00) ? zeroCount+1 : 0;
  • TabularUnified trunk/source/Lib/TLibDecoder/NALread.h

    r313 r595  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/SEIread.cpp

    r588 r595  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    9393    fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n");
    9494    break;
     95  case SEI::SOP_DESCRIPTION:
     96    fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
     97    break;
     98  case SEI::SCALABLE_NESTING:
     99    fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
     100    break;
     101#if SVC_EXTENSION
    95102#if LAYERS_NOT_PRESENT_SEI
    96103  case SEI::LAYERS_NOT_PRESENT:
     
    98105    break;
    99106#endif
    100   case SEI::SOP_DESCRIPTION:
    101     fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");
    102     break;
    103107#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    104108  case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:
     
    111115      break;
    112116#endif
    113   case SEI::SCALABLE_NESTING:
    114     fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n");
    115     break;
     117#endif //SVC_EXTENSION
    116118  default:
    117119    fprintf( g_hTrace, "=========== Unknown SEI message ===========\n");
     
    259261      xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize);
    260262      break;
    261 #if LAYERS_NOT_PRESENT_SEI
    262     case SEI::LAYERS_NOT_PRESENT:
    263       if (!vps)
    264       {
    265         printf ("Warning: Found Layers not present SEI message, but no active VPS is available. Ignoring.");
    266       }
    267       else
    268       {
    269         sei = new SEILayersNotPresent;
    270         xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, vps);
    271       }
    272       break;
    273 #endif
    274263    case SEI::SOP_DESCRIPTION:
    275264      sei = new SEISOPDescription;
    276265      xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize);
    277266      break;
    278 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    279     case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:
    280       sei = new SEIInterLayerConstrainedTileSets;
    281       xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize);
    282       break;
    283 #endif
    284 #if SUB_BITSTREAM_PROPERTY_SEI
    285    case SEI::SUB_BITSTREAM_PROPERTY:
    286      sei = new SEISubBitstreamProperty;
    287      xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei);
    288      break;
    289 #endif
    290267    case SEI::SCALABLE_NESTING:
    291268      sei = new SEIScalableNesting;
     
    295272      xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps);
    296273#endif
     274#if SVC_EXTENSION
     275#if LAYERS_NOT_PRESENT_SEI
     276    case SEI::LAYERS_NOT_PRESENT:
     277      if (!vps)
     278      {
     279        printf ("Warning: Found Layers not present SEI message, but no active VPS is available. Ignoring.");
     280      }
     281      else
     282      {
     283        sei = new SEILayersNotPresent;
     284        xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, vps);
     285      }
     286      break;
     287#endif
     288#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     289    case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:
     290      sei = new SEIInterLayerConstrainedTileSets;
     291      xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize);
     292      break;
     293#endif
     294#if SUB_BITSTREAM_PROPERTY_SEI
     295   case SEI::SUB_BITSTREAM_PROPERTY:
     296     sei = new SEISubBitstreamProperty;
     297     xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei);
     298     break;
     299#endif
     300#endif //SVC_EXTENSION
    297301      break;
    298302    default:
     
    499503  if( !pHRD->getSubPicCpbParamsPresentFlag() )
    500504  {
    501     READ_FLAG( code, "rap_cpb_params_present_flag" );                   sei.m_rapCpbParamsPresentFlag = code;
     505    READ_FLAG( code, "irap_cpb_params_present_flag" );                   sei.m_rapCpbParamsPresentFlag = code;
     506  }
     507  if( sei.m_rapCpbParamsPresentFlag )
     508  {
     509    READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" );      sei.m_cpbDelayOffset = code;
     510    READ_CODE( pHRD->getDpbOutputDelayLengthMinus1()  + 1, code, "dpb_delay_offset" );      sei.m_dpbDelayOffset = code;
    502511  }
    503512  //read splicing flag and cpb_removal_delay_delta
     
    506515  READ_CODE( ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" );
    507516  sei.m_auCpbRemovalDelayDelta = code + 1;
    508   if( sei.m_rapCpbParamsPresentFlag )
    509   {
    510     READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" );      sei.m_cpbDelayOffset = code;
    511     READ_CODE( pHRD->getDpbOutputDelayLengthMinus1()  + 1, code, "dpb_delay_offset" );      sei.m_dpbDelayOffset = code;
    512   }
    513517  for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ )
    514518  {
     
    752756}
    753757
    754 #if LAYERS_NOT_PRESENT_SEI
    755 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps)
    756 {
    757   UInt uiCode;
    758   UInt i = 0;
    759 
    760   READ_UVLC( uiCode,           "lp_sei_active_vps_id" ); sei.m_activeVpsId = uiCode;
    761   assert(vps->getVPSId() == sei.m_activeVpsId);
    762   sei.m_vpsMaxLayers = vps->getMaxLayers();
    763   for (; i < sei.m_vpsMaxLayers; i++)
    764   {
    765     READ_FLAG( uiCode,         "layer_not_present_flag"   ); sei.m_layerNotPresentFlag[i] = uiCode ? true : false;
    766   }
    767   for (; i < MAX_LAYERS; i++)
    768   {
    769     sei.m_layerNotPresentFlag[i] = false;
    770   }
    771   xParseByteAlign();
    772 }
    773 #endif
    774 
    775758Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize)
    776759{
     
    797780}
    798781
    799 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI
    800 Void SEIReader::xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize)
    801 {
    802   UInt uiCode;
    803 
    804   READ_FLAG( uiCode, "il_all_tiles_exact_sample_value_match_flag"   ); sei.m_ilAllTilesExactSampleValueMatchFlag = uiCode;
    805   READ_FLAG( uiCode, "il_one_tile_per_tile_set_flag"                ); sei.m_ilOneTilePerTileSetFlag = uiCode;
    806   if( !sei.m_ilOneTilePerTileSetFlag )
    807   {
    808     READ_UVLC( uiCode, "il_num_sets_in_message_minus1"                ); sei.m_ilNumSetsInMessageMinus1 = uiCode;
    809     if( sei.m_ilNumSetsInMessageMinus1 )
    810     {
    811       READ_FLAG( uiCode, "skipped_tile_set_present_flag"                ); sei.m_skippedTileSetPresentFlag = uiCode;
    812     }
    813     else
    814     {
    815       sei.m_skippedTileSetPresentFlag = false;
    816     }
    817     UInt numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - (sei.m_skippedTileSetPresentFlag ? 1 : 0) + 1;
    818     for( UInt i = 0; i < numSignificantSets; i++ )
    819     {
    820       READ_UVLC( uiCode, "ilcts_id"                                     ); sei.m_ilctsId[i] = uiCode;
    821       READ_UVLC( uiCode, "il_num_tile_rects_in_set_minus1"              ) ;sei.m_ilNumTileRectsInSetMinus1[i] = uiCode;
    822       for( UInt j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[i]; j++ )
    823       {
    824         READ_UVLC( uiCode, "il_top_left_tile_index"                       ); sei.m_ilTopLeftTileIndex[i][j] = uiCode;
    825         READ_UVLC( uiCode, "il_bottom_right_tile_index"                   ); sei.m_ilBottomRightTileIndex[i][j] = uiCode;
    826       }
    827       READ_CODE( 2, uiCode, "ilc_idc"                                   ); sei.m_ilcIdc[i] = uiCode;
    828       if( sei.m_ilAllTilesExactSampleValueMatchFlag )
    829       {
    830         READ_FLAG( uiCode, "il_exact_sample_value_match_flag"             ); sei.m_ilExactSampleValueMatchFlag[i] = uiCode;
    831       }
    832     }
    833   }
    834   else
    835   {
    836     READ_CODE( 2, uiCode, "all_tiles_ilc_idc"                         ); sei.m_allTilesIlcIdc = uiCode;
    837   }
    838 
    839   xParseByteAlign();
    840 }
    841 #endif
    842 #if SUB_BITSTREAM_PROPERTY_SEI
    843 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
    844 {
    845   UInt uiCode;
    846   READ_CODE( 4, uiCode, "active_vps_id" );                      sei.m_activeVpsId = uiCode;
    847   READ_UVLC(    uiCode, "num_additional_sub_streams_minus1" );  sei.m_numAdditionalSubStreams = uiCode + 1;
    848 
    849   for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )
    850   {
    851     READ_CODE(  2, uiCode, "sub_bitstream_mode[i]"           ); sei.m_subBitstreamMode[i] = uiCode;
    852     READ_UVLC(     uiCode, "output_layer_set_idx_to_vps[i]"  ); sei.m_outputLayerSetIdxToVps[i] = uiCode;
    853     READ_CODE(  3, uiCode, "highest_sub_layer_id[i]"         ); sei.m_highestSublayerId[i] = uiCode;
    854     READ_CODE( 16, uiCode, "avg_bit_rate[i]"                 ); sei.m_avgBitRate[i] = uiCode;
    855     READ_CODE( 16, uiCode, "max_bit_rate[i]"                 ); sei.m_maxBitRate[i] = uiCode;
    856   }
    857   xParseByteAlign();
    858 }
    859 #endif
    860782#if LAYERS_NOT_PRESENT_SEI
    861783Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps)
     
    925847  }
    926848}
     849
     850#if SVC_EXTENSION
     851#if LAYERS_NOT_PRESENT_SEI
     852Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps)
     853{
     854  UInt uiCode;
     855  UInt i = 0;
     856
     857  READ_UVLC( uiCode,           "lp_sei_active_vps_id" ); sei.m_activeVpsId = uiCode;
     858  assert(vps->getVPSId() == sei.m_activeVpsId);
     859  sei.m_vpsMaxLayers = vps->getMaxLayers();
     860  for (; i < sei.m_vpsMaxLayers; i++)
     861  {
     862    READ_FLAG( uiCode,         "layer_not_present_flag"   ); sei.m_layerNotPresentFlag[i] = uiCode ? true : false;
     863  }
     864  for (; i < MAX_LAYERS; i++)
     865  {
     866    sei.m_layerNotPresentFlag[i] = false;
     867  }
     868  xParseByteAlign();
     869}
     870#endif
     871#if N0383_IL_CONSTRAINED_TILE_SETS_SEI
     872Void SEIReader::xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize)
     873{
     874  UInt uiCode;
     875
     876  READ_FLAG( uiCode, "il_all_tiles_exact_sample_value_match_flag"   ); sei.m_ilAllTilesExactSampleValueMatchFlag = uiCode;
     877  READ_FLAG( uiCode, "il_one_tile_per_tile_set_flag"                ); sei.m_ilOneTilePerTileSetFlag = uiCode;
     878  if( !sei.m_ilOneTilePerTileSetFlag )
     879  {
     880    READ_UVLC( uiCode, "il_num_sets_in_message_minus1"                ); sei.m_ilNumSetsInMessageMinus1 = uiCode;
     881    if( sei.m_ilNumSetsInMessageMinus1 )
     882    {
     883      READ_FLAG( uiCode, "skipped_tile_set_present_flag"                ); sei.m_skippedTileSetPresentFlag = uiCode;
     884    }
     885    else
     886    {
     887      sei.m_skippedTileSetPresentFlag = false;
     888    }
     889    UInt numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - (sei.m_skippedTileSetPresentFlag ? 1 : 0) + 1;
     890    for( UInt i = 0; i < numSignificantSets; i++ )
     891    {
     892      READ_UVLC( uiCode, "ilcts_id"                                     ); sei.m_ilctsId[i] = uiCode;
     893      READ_UVLC( uiCode, "il_num_tile_rects_in_set_minus1"              ) ;sei.m_ilNumTileRectsInSetMinus1[i] = uiCode;
     894      for( UInt j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[i]; j++ )
     895      {
     896        READ_UVLC( uiCode, "il_top_left_tile_index"                       ); sei.m_ilTopLeftTileIndex[i][j] = uiCode;
     897        READ_UVLC( uiCode, "il_bottom_right_tile_index"                   ); sei.m_ilBottomRightTileIndex[i][j] = uiCode;
     898      }
     899      READ_CODE( 2, uiCode, "ilc_idc"                                   ); sei.m_ilcIdc[i] = uiCode;
     900      if( sei.m_ilAllTilesExactSampleValueMatchFlag )
     901      {
     902        READ_FLAG( uiCode, "il_exact_sample_value_match_flag"             ); sei.m_ilExactSampleValueMatchFlag[i] = uiCode;
     903      }
     904    }
     905  }
     906  else
     907  {
     908    READ_CODE( 2, uiCode, "all_tiles_ilc_idc"                         ); sei.m_allTilesIlcIdc = uiCode;
     909  }
     910
     911  xParseByteAlign();
     912}
     913#endif
     914#if SUB_BITSTREAM_PROPERTY_SEI
     915Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)
     916{
     917  UInt uiCode;
     918  READ_CODE( 4, uiCode, "active_vps_id" );                      sei.m_activeVpsId = uiCode;
     919  READ_UVLC(    uiCode, "num_additional_sub_streams_minus1" );  sei.m_numAdditionalSubStreams = uiCode + 1;
     920
     921  for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )
     922  {
     923    READ_CODE(  2, uiCode, "sub_bitstream_mode[i]"           ); sei.m_subBitstreamMode[i] = uiCode;
     924    READ_UVLC(     uiCode, "output_layer_set_idx_to_vps[i]"  ); sei.m_outputLayerSetIdxToVps[i] = uiCode;
     925    READ_CODE(  3, uiCode, "highest_sub_layer_id[i]"         ); sei.m_highestSublayerId[i] = uiCode;
     926    READ_CODE( 16, uiCode, "avg_bit_rate[i]"                 ); sei.m_avgBitRate[i] = uiCode;
     927    READ_CODE( 16, uiCode, "max_bit_rate[i]"                 ); sei.m_maxBitRate[i] = uiCode;
     928  }
     929  xParseByteAlign();
     930}
     931#endif
     932#endif //SVC_EXTENSION
     933
    927934//! \}
  • TabularUnified trunk/source/Lib/TLibDecoder/SEIread.h

    r588 r595  
    44 * granted under this license.
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp

    r442 r595  
    44* granted under this license. 
    55*
    6 * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77* All rights reserved.
    88*
  • TabularUnified trunk/source/Lib/TLibDecoder/SyntaxElementParser.h

    r313 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecBinCoder.h

    r313 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp

    r313 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h

    r313 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r588 r595  
    44* granted under this license.
    55*
    6 * Copyright (c) 2010-2013, ITU/ISO/IEC
     6* Copyright (c) 2010-2014, ITU/ISO/IEC
    77* All rights reserved.
    88*
     
    673673  READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" );
    674674  pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode);
     675 
     676  if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5)
     677  {
     678    assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5);
     679  }
     680 
    675681  Int maxCUDepthDelta = uiCode;
    676682  pcSPS->setMaxCUWidth  ( 1<<(log2MinCUSize + maxCUDepthDelta) );
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r588 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecCu.cpp

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    532532  m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
    533533 
     534  if ( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth ) )
     535  {
    534536  //===== inverse transform =====
    535537#if REPN_FORMAT_IN_VPS
     
    540542
    541543  Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA];
    542   assert(scalingListType < 6);
     544    assert(scalingListType < SCALING_LIST_NUM);
    543545  m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkip );
    544546
     
    560562    pReco     += uiStride;
    561563    pRecIPred += uiRecIPredStride;
     564  }
     565  }
     566  else
     567  {
     568    //===== reconstruction =====
     569    Pel* pPred      = piPred;
     570    Pel* pReco      = piReco;
     571    Pel* pRecIPred  = piRecIPred;
     572    for ( Int y = 0; y < uiHeight; y++ )
     573    {
     574      for ( Int x = 0; x < uiWidth; x++ )
     575      {
     576        pReco    [ x ] = pPred[ x ];
     577        pRecIPred[ x ] = pReco[ x ];
     578      }
     579      pPred     += uiStride;
     580      pReco     += uiStride;
     581      pRecIPred += uiRecIPredStride;
     582    }
    562583  }
    563584}
     
    624645  m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 
    625646
     647  if ( pcCU->getCbf( uiAbsPartIdx, eText, uiTrDepth ) )
     648  {
    626649  //===== inverse transform =====
    627650  Int curChromaQpOffset;
     
    646669
    647670  Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText];
    648   assert(scalingListType < 6);
     671    assert(scalingListType < SCALING_LIST_NUM);
    649672  m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma );
    650673
     
    665688    pReco     += uiStride;
    666689    pRecIPred += uiRecIPredStride;
     690  }
     691  }
     692  else
     693  {
     694    //===== reconstruction =====
     695    Pel* pPred      = piPred;
     696    Pel* pReco      = piReco;
     697    Pel* pRecIPred  = piRecIPred;
     698    for ( Int y = 0; y < uiHeight; y++ )
     699    {
     700      for ( Int x = 0; x < uiWidth; x++ )
     701      {
     702        pReco    [ x ] = pPred[ x ];
     703        pRecIPred[ x ] = pReco[ x ];
     704      }
     705      pPred     += uiStride;
     706      pReco     += uiStride;
     707      pRecIPred += uiRecIPredStride;
     708    }   
    667709  }
    668710}
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecCu.h

    r345 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecEntropy.cpp

    r345 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    319319}
    320320
    321 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP)
     321Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
    322322{
    323323  UInt uiSubdiv;
     
    343343  else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
    344344  {
    345     uiSubdiv = (uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));
     345    uiSubdiv = (uiLog2TrafoSize > quadtreeTULog2MinSizeInCU);
    346346  }
    347347  else if( uiLog2TrafoSize > pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() )
     
    353353    uiSubdiv = 0;
    354354  }
    355   else if( uiLog2TrafoSize == pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx) )
     355  else if( uiLog2TrafoSize == quadtreeTULog2MinSizeInCU )
    356356  {
    357357    uiSubdiv = 0;
     
    359359  else
    360360  {
    361     assert( uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx) );
     361    assert( uiLog2TrafoSize > quadtreeTULog2MinSizeInCU );
    362362    m_pcEntropyDecoderIf->parseTransformSubdivFlag( uiSubdiv, 5 - uiLog2TrafoSize );
    363363  }
     
    405405    for( Int i = 0; i < 4; i++ )
    406406    {
    407       xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP );
     407      xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, quadtreeTULog2MinSizeInCU );
    408408      uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth+1 );
    409409      uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth+1 );
     
    553553   
    554554  }
    555   xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP );
     555 
     556  Int getQuadtreeTULog2MinSizeInCU = pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx);
     557 
     558  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP, getQuadtreeTULog2MinSizeInCU );
    556559}
    557560
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    167167 
    168168private:
    169   Void xDecodeTransform        ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP );
     169  Void xDecodeTransform        ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int getQuadtreeTULog2MinSizeInCU );
    170170
    171171public:
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecGop.cpp

    r588 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    128128  //-- For time output for each slice
    129129  long iBeforeTime = clock();
    130 #if !HM_CLEANUP_SAO
    131   UInt uiStartCUAddr   = pcSlice->getSliceSegmentCurStartCUAddr();
    132 
    133   UInt uiSliceStartCuAddr = pcSlice->getSliceCurStartCUAddr();
    134   if(uiSliceStartCuAddr == uiStartCUAddr)
    135   {
    136     m_sliceStartCUAddress.push_back(uiSliceStartCuAddr);
    137   }
    138 #endif
    139130  m_pcSbacDecoder->init( (TDecBinIf*)m_pcBinCABAC );
    140131  m_pcEntropyDecoder->setEntropyDecoder (m_pcSbacDecoder);
     
    163154  m_pcEntropyDecoder->setBitstream      ( ppcSubstreams[0] );
    164155  m_pcEntropyDecoder->resetEntropy      (pcSlice);
    165 #if !HM_CLEANUP_SAO
    166   if(uiSliceStartCuAddr == uiStartCUAddr)
    167   {
    168     m_LFCrossSliceBoundaryFlag.push_back( pcSlice->getLFCrossSliceBoundaryFlag());
    169   }
    170 #endif
    171156  m_pcSbacDecoders[0].load(m_pcSbacDecoder);
    172157  m_pcSliceDecoder->decompressSlice( ppcSubstreams, rpcPic, m_pcSbacDecoder, m_pcSbacDecoders);
     
    196181  m_pcLoopFilter->setCfg(bLFCrossTileBoundary);
    197182  m_pcLoopFilter->loopFilterPic( rpcPic );
    198 #if !HM_CLEANUP_SAO
    199   if(pcSlice->getSPS()->getUseSAO())
    200   {
    201     m_sliceStartCUAddress.push_back(rpcPic->getNumCUsInFrame()* rpcPic->getNumPartInCU());
    202     rpcPic->createNonDBFilterInfo(m_sliceStartCUAddress, 0, &m_LFCrossSliceBoundaryFlag, rpcPic->getPicSym()->getNumTiles(), bLFCrossTileBoundary);
    203   }
    204 #endif
    205183  if( pcSlice->getSPS()->getUseSAO() )
    206184  {
    207 #if HM_CLEANUP_SAO
    208185    m_pcSAO->reconstructBlkSAOParams(rpcPic, rpcPic->getPicSym()->getSAOBlkParam());
    209186    m_pcSAO->SAOProcess(rpcPic);
    210187    m_pcSAO->PCMLFDisableProcess(rpcPic);
    211 #else
    212     {
    213       SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();
    214       saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag();
    215       saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma();
    216       m_pcSAO->setSaoLcuBasedOptimization(1);
    217       m_pcSAO->createPicSaoInfo(rpcPic);
    218       m_pcSAO->SAOProcess(saoParam);
    219       m_pcSAO->PCMLFDisableProcess(rpcPic);
    220       m_pcSAO->destroyPicSaoInfo();
    221     }
    222 #endif
    223   }
    224 #if !HM_CLEANUP_SAO
    225   if(pcSlice->getSPS()->getUseSAO())
    226   {
    227     rpcPic->destroyNonDBFilterInfo();
    228   }
    229 #endif
     188  }
    230189  rpcPic->compressMotion();
    231190  Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');
     
    291250  rpcPic->setOutputMark(true);
    292251  rpcPic->setReconMark(true);
    293 #if !HM_CLEANUP_SAO
    294   m_sliceStartCUAddress.clear();
    295   m_LFCrossSliceBoundaryFlag.clear();
    296 #endif
    297252}
    298253
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecGop.h

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    8383  Int                   m_decodedPictureHashSEIEnabled;  ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message
    8484
    85 #if !HM_CLEANUP_SAO
    86   //! list that contains the CU address of each slice plus the end address
    87   std::vector<Int> m_sliceStartCUAddress;
    88   std::vector<Bool> m_LFCrossSliceBoundaryFlag;
    89 #endif
    9085#if SVC_EXTENSION
    9186  UInt                  m_layerId;
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecSbac.cpp

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    7272, m_cCUAbsSCModel             ( 1,             1,               NUM_ABS_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
    7373, m_cMVPIdxSCModel            ( 1,             1,               NUM_MVP_IDX_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
    74 , m_cCUAMPSCModel             ( 1,             1,               NUM_CU_AMP_CTX                , m_contextModels + m_numContextModels, m_numContextModels)
    7574, m_cSaoMergeSCModel      ( 1,             1,               NUM_SAO_MERGE_FLAG_CTX   , m_contextModels + m_numContextModels, m_numContextModels)
    7675, m_cSaoTypeIdxSCModel        ( 1,             1,               NUM_SAO_TYPE_IDX_CTX          , m_contextModels + m_numContextModels, m_numContextModels)
     
    114113  m_cCUMergeIdxExtSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
    115114  m_cCUPartSizeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PART_SIZE );
    116   m_cCUAMPSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );
    117115  m_cCUPredModeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PRED_MODE );
    118116  m_cCUIntraPredSCModel.initBuffer       ( sliceType, qp, (UChar*)INIT_INTRA_PRED_MODE );
     
    160158  m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT );
    161159  m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
    162   m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
    163160  m_cCUPredModeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PRED_MODE );
    164161  m_cCUIntraPredSCModel.initBuffer       ( eSliceType, iQp, (UChar*)INIT_INTRA_PRED_MODE );
     
    579576      if (eMode == SIZE_2NxN)
    580577      {
    581         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
     578        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
    582579        if (uiSymbol == 0)
    583580        {
     
    588585      else if (eMode == SIZE_Nx2N)
    589586      {
    590         m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 ));
     587        m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 ));
    591588        if (uiSymbol == 0)
    592589        {
     
    13821379    if (uiCode == 0)
    13831380    {
    1384 #if HM_CLEANUP_SAO
    13851381      ruiVal = 1;
    1386 #else
    1387       ruiVal = 5;
    1388 #endif
    13891382    }
    13901383    else
    13911384    {
    1392 #if HM_CLEANUP_SAO
    13931385      ruiVal = 2;
    1394 #else
    1395       ruiVal = 1;
    1396 #endif
    1397     }
    1398   }
    1399 }
    1400 
    1401 #if HM_CLEANUP_SAO
     1386    }
     1387  }
     1388}
    14021389
    14031390Void TDecSbac::parseSaoSign(UInt& val)
     
    15311518}
    15321519
    1533 #else
    1534 
    1535 inline Void copySaoOneLcuParam(SaoLcuParam* psDst,  SaoLcuParam* psSrc)
    1536 {
    1537   Int i;
    1538   psDst->partIdx = psSrc->partIdx;
    1539   psDst->typeIdx    = psSrc->typeIdx;
    1540   if (psDst->typeIdx != -1)
    1541   {
    1542     psDst->subTypeIdx = psSrc->subTypeIdx ;
    1543     psDst->length  = psSrc->length;
    1544     for (i=0;i<psDst->length;i++)
    1545     {
    1546       psDst->offset[i] = psSrc->offset[i];
    1547     }
    1548   }
    1549   else
    1550   {
    1551     psDst->length  = 0;
    1552     for (i=0;i<SAO_BO_LEN;i++)
    1553     {
    1554       psDst->offset[i] = 0;
    1555     }
    1556   }
    1557 }
    1558 
    1559 Void TDecSbac::parseSaoOffset(SaoLcuParam* psSaoLcuParam, UInt compIdx)
    1560 {
    1561   UInt uiSymbol;
    1562   static Int iTypeLength[MAX_NUM_SAO_TYPE] =
    1563   {
    1564     SAO_EO_LEN,
    1565     SAO_EO_LEN,
    1566     SAO_EO_LEN,
    1567     SAO_EO_LEN,
    1568     SAO_BO_LEN
    1569   };
    1570 
    1571   if (compIdx==2)
    1572   {
    1573     uiSymbol = (UInt)( psSaoLcuParam->typeIdx + 1);
    1574   }
    1575   else
    1576   {
    1577     parseSaoTypeIdx(uiSymbol);
    1578   }
    1579   psSaoLcuParam->typeIdx = (Int)uiSymbol - 1;
    1580   if (uiSymbol)
    1581   {
    1582     psSaoLcuParam->length = iTypeLength[psSaoLcuParam->typeIdx];
    1583 
    1584     Int bitDepth = compIdx ? g_bitDepthC : g_bitDepthY;
    1585     Int offsetTh = 1 << min(bitDepth - 5,5);
    1586 
    1587     if( psSaoLcuParam->typeIdx == SAO_BO )
    1588     {
    1589       for(Int i=0; i< psSaoLcuParam->length; i++)
    1590       {
    1591         parseSaoMaxUvlc(uiSymbol, offsetTh -1 );
    1592         psSaoLcuParam->offset[i] = uiSymbol;
    1593       }   
    1594       for(Int i=0; i< psSaoLcuParam->length; i++)
    1595       {
    1596         if (psSaoLcuParam->offset[i] != 0)
    1597         {
    1598           m_pcTDecBinIf->decodeBinEP ( uiSymbol);
    1599           if (uiSymbol)
    1600           {
    1601             psSaoLcuParam->offset[i] = -psSaoLcuParam->offset[i] ;
    1602           }
    1603         }
    1604       }
    1605       parseSaoUflc(5, uiSymbol );
    1606       psSaoLcuParam->subTypeIdx = uiSymbol;
    1607     }
    1608     else if( psSaoLcuParam->typeIdx < 4 )
    1609     {
    1610       parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[0] = uiSymbol;
    1611       parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[1] = uiSymbol;
    1612       parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[2] = -(Int)uiSymbol;
    1613       parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[3] = -(Int)uiSymbol;
    1614      if (compIdx != 2)
    1615      {
    1616        parseSaoUflc(2, uiSymbol );
    1617        psSaoLcuParam->subTypeIdx = uiSymbol;
    1618        psSaoLcuParam->typeIdx += psSaoLcuParam->subTypeIdx;
    1619      }
    1620    }
    1621   }
    1622   else
    1623   {
    1624     psSaoLcuParam->length = 0;
    1625   }
    1626 }
    1627 
    1628 Void TDecSbac::parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp)
    1629 {
    1630   Int iAddr = pcCU->getAddr();
    1631   UInt uiSymbol;
    1632   for (Int iCompIdx=0; iCompIdx<3; iCompIdx++)
    1633   {
    1634     pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag    = 0;
    1635     pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag  = 0;
    1636     pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx     = 0;
    1637     pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx        = -1;
    1638     pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[0]     = 0;
    1639     pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[1]     = 0;
    1640     pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[2]     = 0;
    1641     pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[3]     = 0;
    1642 
    1643   }
    1644  if (pSaoParam->bSaoFlag[0] || pSaoParam->bSaoFlag[1] )
    1645   {
    1646     if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft)
    1647     {
    1648       parseSaoMerge(uiSymbol);
    1649       pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag = (Bool)uiSymbol; 
    1650     }
    1651     if (pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag==0)
    1652     {
    1653       if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp)
    1654       {
    1655         parseSaoMerge(uiSymbol);
    1656         pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag = (Bool)uiSymbol;
    1657       }
    1658     }
    1659   }
    1660 
    1661   for (Int iCompIdx=0; iCompIdx<3; iCompIdx++)
    1662   {
    1663     if ((iCompIdx == 0  && pSaoParam->bSaoFlag[0]) || (iCompIdx > 0  && pSaoParam->bSaoFlag[1]) )
    1664     {
    1665       if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft)
    1666       {
    1667         pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag;
    1668       }
    1669       else
    1670       {
    1671         pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0;
    1672       }
    1673 
    1674       if (pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag==0)
    1675       {
    1676         if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp)
    1677         {
    1678           pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag;
    1679         }
    1680         else
    1681         {
    1682           pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0;
    1683         }
    1684         if (!pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag)
    1685         {
    1686           pSaoParam->saoLcuParam[2][iAddr].typeIdx = pSaoParam->saoLcuParam[1][iAddr].typeIdx;
    1687           parseSaoOffset(&(pSaoParam->saoLcuParam[iCompIdx][iAddr]), iCompIdx);
    1688         }
    1689         else
    1690         {
    1691           copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-pSaoParam->numCuInWidth]);
    1692         }
    1693       }
    1694       else
    1695       {
    1696         copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr],  &pSaoParam->saoLcuParam[iCompIdx][iAddr-1]);
    1697       }
    1698     }
    1699     else
    1700     {
    1701       pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx = -1;
    1702       pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0;
    1703     }
    1704   }
    1705 }
    1706 
    1707 #endif
    1708 
    17091520/**
    17101521 - Initialize our contexts from the nominated source.
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecSbac.h

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    9090  Void  parseSaoTypeIdx           ( UInt&  ruiVal  );
    9191  Void  parseSaoUflc              ( UInt uiLength, UInt& ruiVal     );
    92 #if HM_CLEANUP_SAO
    9392  Void parseSAOBlkParam (SAOBlkParam& saoBlkParam, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail);
    9493  Void parseSaoSign(UInt& val);
    95 #else
    96   Void  parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp);
    97   Void  parseSaoOffset            (SaoLcuParam* psSaoLcuParam, UInt compIdx);
    98 #endif
    9994private:
    10095  Void  xReadUnarySymbol    ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset );
     
    171166  ContextModel3DBuffer m_cMVPIdxSCModel;
    172167 
    173   ContextModel3DBuffer m_cCUAMPSCModel;
    174168  ContextModel3DBuffer m_cSaoMergeSCModel;
    175169  ContextModel3DBuffer m_cSaoTypeIdxSCModel;
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecSlice.cpp

    r540 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    323323#endif
    324324
    325 #if HM_CLEANUP_SAO
    326325    if ( pcSlice->getSPS()->getUseSAO() )
    327326    {
     
    358357      }
    359358    }
    360 #else
    361     if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) )
    362     {
    363       SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();
    364       saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag();
    365       if (iCUAddr == iStartCUAddr)
    366       {
    367         saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma();
    368       }
    369       Int numCuInWidth     = saoParam->numCuInWidth;
    370       Int cuAddrInSlice = iCUAddr - rpcPic->getPicSym()->getCUOrderMap(pcSlice->getSliceCurStartCUAddr()/rpcPic->getNumPartInCU());
    371       Int cuAddrUpInSlice  = cuAddrInSlice - numCuInWidth;
    372       Int rx = iCUAddr % numCuInWidth;
    373       Int ry = iCUAddr / numCuInWidth;
    374       Int allowMergeLeft = 1;
    375       Int allowMergeUp   = 1;
    376       if (rx!=0)
    377       {
    378         if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-1) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))
    379         {
    380           allowMergeLeft = 0;
    381         }
    382       }
    383       if (ry!=0)
    384       {
    385         if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-numCuInWidth) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))
    386         {
    387           allowMergeUp = 0;
    388         }
    389       }
    390       pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, saoParam,pcCU, cuAddrInSlice, cuAddrUpInSlice, allowMergeLeft, allowMergeUp);
    391     }
    392     else if ( pcSlice->getSPS()->getUseSAO() )
    393     {
    394       Int addr = pcCU->getAddr();
    395       SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();
    396       for (Int cIdx=0; cIdx<3; cIdx++)
    397       {
    398         SaoLcuParam *saoLcuParam = &(saoParam->saoLcuParam[cIdx][addr]);
    399         if ( ((cIdx == 0) && !pcSlice->getSaoEnabledFlag()) || ((cIdx == 1 || cIdx == 2) && !pcSlice->getSaoEnabledFlagChroma()))
    400         {
    401           saoLcuParam->mergeUpFlag   = 0;
    402           saoLcuParam->mergeLeftFlag = 0;
    403           saoLcuParam->subTypeIdx    = 0;
    404           saoLcuParam->typeIdx       = -1;
    405           saoLcuParam->offset[0]     = 0;
    406           saoLcuParam->offset[1]     = 0;
    407           saoLcuParam->offset[2]     = 0;
    408           saoLcuParam->offset[3]     = 0;
    409         }
    410       }
    411     }
    412 #endif
    413359
    414360    m_pcCuDecoder->decodeCU     ( pcCU, uiIsLast );
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecSlice.h

    r442 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r588 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    404404#endif
    405405#endif
    406 #if !HM_CLEANUP_SAO
    407     rpcPic->getPicSym()->allocSaoParam(&m_cSAO);
    408 #endif
    409406    m_cListPic.pushBack( rpcPic );
    410407   
     
    485482#endif
    486483#endif
    487 #endif
    488 #if !HM_CLEANUP_SAO
    489   rpcPic->getPicSym()->allocSaoParam(&m_cSAO);
    490484#endif
    491485}
     
    784778#if REPN_FORMAT_IN_VPS
    785779#if AUXILIARY_PICTURES
    786 #if HM_CLEANUP_SAO
    787780  m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() );
    788781#else
    789   m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
    790 #endif
    791 #else
    792 #if HM_CLEANUP_SAO
    793782  m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() );
    794 #else
    795   m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
    796 #endif
    797 #endif
    798 #else
    799 #if HM_CLEANUP_SAO
     783#endif
     784#else
    800785  m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() );
    801 #else
    802   m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );
    803 #endif
    804786#endif
    805787  m_cLoopFilter.create( sps->getMaxCUDepth() );
     
    817799{
    818800  TComPic*&   pcPic         = m_pcPic;
     801#if SVC_EXTENSION
    819802#if NO_CLRAS_OUTPUT_FLAG
    820803  Bool bFirstSliceInSeq;
    821804#endif
    822 #if SVC_EXTENSION
    823805  m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getPrefetchedVPS(0) );
    824806#if OUTPUT_LAYER_SET_INDEX
     
    831813#endif
    832814  m_apcSlicePilot->initSlice( nalu.m_layerId );
    833 #else
     815#else //SVC_EXTENSION
    834816  m_apcSlicePilot->initSlice();
    835817#endif
     
    839821    m_uiSliceIdx     = 0;
    840822  }
     823  else
     824  {
     825    m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) );
     826  }
    841827  m_apcSlicePilot->setSliceIdx(m_uiSliceIdx);
    842   if (!m_bFirstSliceInPicture)
    843   {
    844     m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) );
    845   }
    846828
    847829  m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType);
     
    857839
    858840#if SVC_EXTENSION
    859   m_apcSlicePilot->setSliceIdx( m_uiSliceIdx ); // it should be removed if HM will reflect it in above
    860841#if VPS_EXTN_DIRECT_REF_LAYERS
    861842  setRefLayerParams(m_apcSlicePilot->getVPS());
     
    18751856      return false;
    18761857     
     1858     
     1859    case NAL_UNIT_RESERVED_VCL_N10:
     1860    case NAL_UNIT_RESERVED_VCL_R11:
     1861    case NAL_UNIT_RESERVED_VCL_N12:
     1862    case NAL_UNIT_RESERVED_VCL_R13:
     1863    case NAL_UNIT_RESERVED_VCL_N14:
     1864    case NAL_UNIT_RESERVED_VCL_R15:
     1865     
     1866    case NAL_UNIT_RESERVED_IRAP_VCL22:
     1867    case NAL_UNIT_RESERVED_IRAP_VCL23:
     1868     
     1869    case NAL_UNIT_RESERVED_VCL24:
     1870    case NAL_UNIT_RESERVED_VCL25:
     1871    case NAL_UNIT_RESERVED_VCL26:
     1872    case NAL_UNIT_RESERVED_VCL27:
     1873    case NAL_UNIT_RESERVED_VCL28:
     1874    case NAL_UNIT_RESERVED_VCL29:
     1875    case NAL_UNIT_RESERVED_VCL30:
     1876    case NAL_UNIT_RESERVED_VCL31:
     1877     
     1878    case NAL_UNIT_FILLER_DATA:
     1879    case NAL_UNIT_RESERVED_NVCL41:
     1880    case NAL_UNIT_RESERVED_NVCL42:
     1881    case NAL_UNIT_RESERVED_NVCL43:
     1882    case NAL_UNIT_RESERVED_NVCL44:
     1883    case NAL_UNIT_RESERVED_NVCL45:
     1884    case NAL_UNIT_RESERVED_NVCL46:
     1885    case NAL_UNIT_RESERVED_NVCL47:
     1886    case NAL_UNIT_UNSPECIFIED_48:
     1887    case NAL_UNIT_UNSPECIFIED_49:
     1888    case NAL_UNIT_UNSPECIFIED_50:
     1889    case NAL_UNIT_UNSPECIFIED_51:
     1890    case NAL_UNIT_UNSPECIFIED_52:
     1891    case NAL_UNIT_UNSPECIFIED_53:
     1892    case NAL_UNIT_UNSPECIFIED_54:
     1893    case NAL_UNIT_UNSPECIFIED_55:
     1894    case NAL_UNIT_UNSPECIFIED_56:
     1895    case NAL_UNIT_UNSPECIFIED_57:
     1896    case NAL_UNIT_UNSPECIFIED_58:
     1897    case NAL_UNIT_UNSPECIFIED_59:
     1898    case NAL_UNIT_UNSPECIFIED_60:
     1899    case NAL_UNIT_UNSPECIFIED_61:
     1900    case NAL_UNIT_UNSPECIFIED_62:
     1901    case NAL_UNIT_UNSPECIFIED_63:
     1902
    18771903    default:
    18781904      assert (0);
     
    19541980}
    19551981
     1982#if SVC_EXTENSION
    19561983#if VPS_EXTN_DIRECT_REF_LAYERS
    19571984TDecTop* TDecTop::getRefLayerDec( UInt refLayerIdc )
     
    19681995
    19691996#if VPS_EXTN_DIRECT_REF_LAYERS
    1970 
    19711997Void TDecTop::setRefLayerParams( TComVPS* vps )
    19721998{
     
    21372163}
    21382164#endif
     2165#endif //SVC_EXTENSION
    21392166//! \}
  • TabularUnified trunk/source/Lib/TLibDecoder/TDecTop.h

    r588 r595  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2013, ITU/ISO/IEC
     6 * Copyright (c) 2010-2014, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    221221  Void      xInitILRP(TComSPS *pcSPS);
    222222#endif
    223 #endif
     223#if OUTPUT_LAYER_SET_INDEX
     224  CommonDecoderParams*    getCommonDecoderParams() { return m_commonDecoderParams; }
     225  Void                    setCommonDecoderParams(CommonDecoderParams* x) { m_commonDecoderParams = x; }
     226  Void      checkValueOfTargetOutputLayerSetIdx(TComVPS *vps);
     227#endif
     228#if SCALINGLIST_INFERRING
     229  ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; }
     230#endif
     231#if RESOLUTION_BASED_DPB
     232  Void setSubDpbIdx(Int idx)    { m_subDpbIdx = idx; }
     233  Int  getSubDpbIdx()           { return m_subDpbIdx; }
     234  Void assignSubDpbs(TComVPS *vps);
     235#endif
     236#endif //SVC_EXTENSION
    224237#if AVC_SYNTAX || SYNTAX_OUTPUT
    225238  Void      setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; }
     
    256269  Void setNoOutputOfPriorPicsFlags(Bool x)   { m_noOutputOfPriorPicsFlags = x;   }
    257270#endif
    258 public:
    259 #if OUTPUT_LAYER_SET_INDEX
    260   CommonDecoderParams*    getCommonDecoderParams() { return m_commonDecoderParams; }
    261   Void                    setCommonDecoderParams(CommonDecoderParams* x) { m_commonDecoderParams = x; }
    262   Void      checkValueOfTargetOutputLayerSetIdx(TComVPS *vps);
    263 #endif
    264 #if SCALINGLIST_INFERRING
    265   ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; }
    266 #endif
    267 #if RESOLUTION_BASED_DPB
    268   Void setSubDpbIdx(Int idx)    { m_subDpbIdx = idx; }
    269   Int  getSubDpbIdx()           { return m_subDpbIdx; }
    270   Void assignSubDpbs(TComVPS *vps);
    271 #endif
    272271};// END CLASS DEFINITION TDecTop
    273272
Note: See TracChangeset for help on using the changeset viewer.