Changeset 872 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 27 Mar 2014, 10:11:29 (11 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/AnnexBread.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/AnnexBread.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/NALread.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 70 70 break; 71 71 } 72 assert(*it_read <= 0x03); 72 73 } 73 74 zeroCount = (*it_read == 0x00) ? zeroCount+1 : 0; … … 126 127 else 127 128 { 128 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_T LA_R129 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 129 130 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 130 131 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R -
trunk/source/Lib/TLibDecoder/NALread.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r655 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 99 99 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 100 100 break; 101 #if H_MV_HLS_7_SEI_P0204_26 102 case SEI::SUB_BITSTREAM_PROPERTY: 103 fprintf( g_hTrace, "=========== Sub-bitstream property SEI message ===========\n"); 104 break; 105 #endif 101 106 default: 102 107 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 240 245 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps); 241 246 break; 247 #if H_MV_HLS_7_SEI_P0204_26 248 case SEI::SUB_BITSTREAM_PROPERTY: 249 sei = new SEISubBitstreamProperty; 250 xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei); 251 break; 252 #endif 242 253 default: 243 254 for (UInt i = 0; i < payloadSize; i++) … … 443 454 if( !pHRD->getSubPicCpbParamsPresentFlag() ) 444 455 { 445 READ_FLAG( code, "rap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code; 456 READ_FLAG( code, "irap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code; 457 } 458 if( sei.m_rapCpbParamsPresentFlag ) 459 { 460 READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code; 461 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code; 446 462 } 447 463 //read splicing flag and cpb_removal_delay_delta … … 450 466 READ_CODE( ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" ); 451 467 sei.m_auCpbRemovalDelayDelta = code + 1; 452 if( sei.m_rapCpbParamsPresentFlag )453 {454 READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code;455 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code;456 }457 468 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 458 469 { … … 766 777 767 778 } 779 #if H_MV_HLS_7_SEI_P0204_26 780 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei) 781 { 782 UInt uiCode; 783 READ_CODE( 4, uiCode, "active_vps_id" ); sei.m_activeVpsId = uiCode; 784 READ_UVLC( uiCode, "num_additional_sub_streams_minus1" ); sei.m_numAdditionalSubStreams = uiCode + 1; 785 786 xResizeSubBitstreamPropertySeiArrays(sei); 787 for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ ) 788 { 789 READ_CODE( 2, uiCode, "sub_bitstream_mode[i]" ); sei.m_subBitstreamMode[i] = uiCode; 790 READ_UVLC( uiCode, "output_layer_set_idx_to_vps[i]" ); sei.m_outputLayerSetIdxToVps[i] = uiCode; 791 READ_CODE( 3, uiCode, "highest_sub_layer_id[i]" ); sei.m_highestSublayerId[i] = uiCode; 792 READ_CODE( 16, uiCode, "avg_bit_rate[i]" ); sei.m_avgBitRate[i] = uiCode; 793 READ_CODE( 16, uiCode, "max_bit_rate[i]" ); sei.m_maxBitRate[i] = uiCode; 794 } 795 xParseByteAlign(); 796 } 797 Void SEIReader::xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei) 798 { 799 sei.m_subBitstreamMode.resize( sei.m_numAdditionalSubStreams ); 800 sei.m_outputLayerSetIdxToVps.resize( sei.m_numAdditionalSubStreams ); 801 sei.m_highestSublayerId.resize( sei.m_numAdditionalSubStreams ); 802 sei.m_avgBitRate.resize( sei.m_numAdditionalSubStreams ); 803 sei.m_maxBitRate.resize( sei.m_numAdditionalSubStreams ); 804 } 805 #endif 768 806 769 807 Void SEIReader::xParseByteAlign() -
trunk/source/Lib/TLibDecoder/SEIread.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 73 73 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize); 74 74 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps); 75 #if H_MV_HLS_7_SEI_P0204_26 76 Void xParseSEISubBitstreamProperty (SEISubBitstreamProperty &sei); 77 Void xResizeSubBitstreamPropertySeiArrays(SEISubBitstreamProperty &sei); 78 #endif 75 79 Void xParseByteAlign(); 76 80 }; -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r655 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoder.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 366 366 367 367 READ_FLAG( uiCode, "pps_extension_flag"); 368 #if H_MV_HLS_7_GEN_P0166_PPS_EXTENSION 369 if (uiCode) 370 { 371 #if H_MV 372 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 373 { 374 READ_FLAG( uiCode, "pps_extension_type_flag" ); pcPPS->setPpsExtensionTypeFlag( i, uiCode == 1 ); 375 #if H_3D 376 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC ); 377 #else 378 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC ); 379 #endif 380 } 381 382 383 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 384 { 385 #if H_MV_HLS_7_POC_P0041 386 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 387 #endif 388 } 389 390 #if H_3D 391 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC 392 { 393 parsePPSExtension( pcPPS, pcVPS ); 394 } 395 #endif 396 397 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_ESC ) ) 398 { 399 #endif 400 while ( xMoreRbspData() ) 401 { 402 READ_FLAG( uiCode, "pps_extension_data_flag"); 403 } 404 #if H_MV 405 } 406 #endif 407 } 408 #else 368 409 if (uiCode) 369 410 { … … 382 423 #endif 383 424 } 425 #endif 384 426 } 385 427 … … 807 849 assert(uiCode <= 12); 808 850 851 #if H_MV_HLS_7_SPS_P0155_16_32 852 if ( pcSPS->getLayerId() == 0 ) 853 { 854 #endif 809 855 UInt subLayerOrderingInfoPresentFlag; 810 856 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); … … 842 888 } 843 889 } 890 #if H_MV_HLS_7_SPS_P0155_16_32 891 } 892 #endif 844 893 845 894 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); … … 848 897 READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" ); 849 898 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 899 900 if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5) 901 { 902 assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5); 903 } 904 850 905 Int maxCUDepthDelta = uiCode; 851 906 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); … … 998 1053 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode ); 999 1054 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode ); 1055 #if H_MV_HLS_7_RESERVED_FLAGS 1056 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" ); 1057 #endif 1000 1058 } 1001 1059 } … … 1033 1091 READ_FLAG( uiCode, "vps_temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1034 1092 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); 1035 #if H_MV 1093 1094 #if H_MV_HLS_7_VPS_P0125_24 1095 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1096 #else 1097 #if H_MV && !H_MV_HLS7_GEN 1036 1098 READ_CODE( 16, uiCode, "vps_extension_offset" ); 1037 1099 #else 1038 1100 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1101 #endif 1039 1102 #endif 1040 1103 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); … … 1148 1211 UInt uiCode; 1149 1212 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1150 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); if ( pcVPS->getVpsVuiPresentFlag() ) 1213 1214 #if !H_MV_HLS_7_VPS_P0307_23 1215 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); 1216 if ( pcVPS->getVpsVuiPresentFlag() ) 1151 1217 { 1152 1218 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode ); 1153 1219 } 1220 #endif 1154 1221 1155 1222 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1227 1294 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) 1228 1295 { 1229 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1296 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1230 1297 { 1231 1298 READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1" ); pcVPS->setSubLayersVpsMaxMinus1( i, uiCode ); … … 1236 1303 else 1237 1304 { 1238 for (Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ )1305 for (Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1239 1306 { 1240 1307 pcVPS->setSubLayersVpsMaxMinus1( i, pcVPS->getMaxTLayers( ) - 1); … … 1258 1325 1259 1326 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1327 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1260 1328 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode ); 1329 #endif 1330 1331 #if !H_MV_HLS_7_VPS_P0306_22 1261 1332 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1262 1333 #else 1334 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1335 #endif 1263 1336 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1264 1337 { 1265 1338 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1339 #if !H_MV_HLS_7_VPS_P0048_14 1266 1340 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1267 1341 { … … 1269 1343 pcVPS->checkProfileRefMinus1( i ); 1270 1344 } 1345 #endif 1271 1346 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1272 1347 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1273 1348 { 1274 1349 TComPTL temp = *pcVPS->getPTL( i ); 1350 #if H_MV_HLS_7_VPS_P0048_14 1351 *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 ); 1352 #else 1275 1353 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 ); 1354 #endif 1276 1355 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1277 1356 } 1278 1357 } 1279 1358 1359 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1360 READ_UVLC( uiCode, "num_add_output_layer_sets" ); pcVPS->setNumAddOutputLayerSets( uiCode ); 1361 pcVPS->initTargetLayerIdLists( ); 1362 if( pcVPS->getNumOutputLayerSets() > 1) 1363 { 1364 READ_CODE( 2, uiCode, "default_target_output_layer_idc" ); pcVPS->setDefaultTargetOutputLayerIdc( std::min( uiCode, (UInt) 2 ) ); 1365 } 1366 1367 #else 1280 1368 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1281 1369 … … 1293 1381 pcVPS->checkDefaultOneTargetOutputLayerIdc(); 1294 1382 } 1383 #endif 1295 1384 1296 1385 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1297 1386 pcVPS->setOutputLayerSetIdxMinus1(0, -1); 1387 1388 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1389 pcVPS->deriveTargetLayerIdList( 0 ); 1390 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1391 { 1392 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1393 #else 1298 1394 for( Int i = 1; i < numOutputLayerSets; i++ ) 1299 1395 { 1300 1396 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1397 #endif 1301 1398 { 1302 1399 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode ); 1400 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1401 } 1402 1403 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultTargetOutputLayerIdc() == 2 ) 1404 { 1405 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ ) 1406 { 1407 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); 1408 } 1409 } 1410 else 1411 { 1412 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->getLayerSetIdxForOutputLayerSet( i ) ); j++ ) 1413 { 1414 pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); 1415 } 1416 } 1417 pcVPS->deriveTargetLayerIdList( i ); 1418 #else 1303 1419 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1304 1420 { … … 1314 1430 } 1315 1431 } 1316 1432 #endif 1317 1433 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1318 1434 { 1319 1435 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1320 1436 } 1437 1438 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1439 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1440 { 1441 READ_FLAG( uiCode, "alt_output_layer_flag[ i ]" ); pcVPS->setAltOutputLayerFlag( i, uiCode == 1 ); 1442 } 1443 } 1444 #else 1321 1445 } 1322 1446 if( pcVPS->getMaxLayersMinus1() > 0 ) … … 1324 1448 READ_FLAG( uiCode, "alt_output_layer_flag" ); pcVPS->setAltOutputLayerFlag( uiCode == 1 ); 1325 1449 } 1450 #endif 1451 1452 #if !H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1326 1453 pcVPS->deriveTargetLayerIdLists(); 1454 #endif 1455 1327 1456 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1328 1457 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1329 1458 { 1459 #if H_MV_HLS_7_VPS_P0306_22 1460 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1461 #else 1330 1462 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1463 #endif 1331 1464 } 1332 1465 … … 1346 1479 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1347 1480 { 1481 #if H_MV_HLS_7_VPS_P0306_22 1482 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1483 #else 1348 1484 READ_CODE( 8, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1485 #endif 1349 1486 } 1350 1487 } … … 1352 1489 1353 1490 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1491 #if H_MV_HLS7_GEN 1492 READ_FLAG( uiCode, "vps_poc_lsb_aligned_flag" ); pcVPS->setVpsPocLsbAlignedFlag( uiCode == 1 ); 1493 #endif 1354 1494 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1355 1495 { … … 1360 1500 } 1361 1501 1502 #if H_MV_HLS_7_RESERVED_FLAGS 1503 READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 1504 #endif 1362 1505 parseDpbSize( pcVPS ); 1363 1506 … … 1388 1531 } 1389 1532 1533 #if H_MV_HLS_7_VPS_P0307_23 1534 READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 1535 for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ ) 1536 { 1537 READ_CODE( 8, uiCode, "vps_non_vui_extension_data_byte" ); 1538 } 1539 READ_FLAG( uiCode, "vps_vui_present_flag" ); pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); 1540 #endif 1541 #if !H_MV_HLS_7_RESERVED_FLAGS 1390 1542 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 1391 1543 #endif 1392 1544 if( pcVPS->getVpsVuiPresentFlag() ) 1393 1545 { … … 1395 1547 parseVPSVUI( pcVPS ); 1396 1548 } 1549 #if H_MV_HLS_7_FIX_INFER_CROSS_LAYER_IRAP_ALIGNED_FLAG 1550 { 1551 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1552 assert( pcVPSVUI ); 1553 pcVPSVUI->inferVpsVui( false ); 1554 } 1555 #endif 1397 1556 1398 1557 pcVPS->checkVPSExtensionSyntax(); … … 1442 1601 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPSVUI->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1443 1602 } 1603 #if H_MV_HLS_7_MISC_P0068_21 1604 if( pcVPSVUI->getCrossLayerIrapAlignedFlag( ) ) 1605 { 1606 READ_FLAG( uiCode, "all_layers_idr_aligned_flag" ); pcVPSVUI->setAllLayersIdrAlignedFlag( uiCode == 1 ); 1607 } 1608 #endif 1444 1609 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1445 1610 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); 1446 1611 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1447 1612 { 1613 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1614 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1615 #else 1448 1616 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1617 #endif 1449 1618 { 1450 1619 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) … … 1471 1640 } 1472 1641 } 1642 1643 #if H_MV_HLS_7_VPS_P0076_15 1644 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1645 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) 1646 { 1647 READ_CODE( 4, uiCode, "vps_num_video_signal_info_minus1" ); pcVPSVUI->setVpsNumVideoSignalInfoMinus1( uiCode ); 1648 } 1649 else 1650 { 1651 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1652 } 1653 1654 for( Int i = 0; i <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1(); i++ ) 1655 { 1656 assert( pcVPSVUI->getVideoSignalInfo( i ) == NULL ); 1657 TComVideoSignalInfo* curVideoSignalInfo = new TComVideoSignalInfo(); 1658 parseVideoSignalInfo( curVideoSignalInfo ); 1659 pcVPSVUI->setVideoSignalInfo(i, curVideoSignalInfo ); 1660 } 1661 1662 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1663 { 1664 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1665 { 1666 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); 1667 assert( pcVPSVUI->getVpsVideoSignalInfoIdx( i ) >= 0 && pcVPSVUI->getVpsVideoSignalInfoIdx( i ) <= pcVPSVUI->getVpsNumVideoSignalInfoMinus1() ); 1668 } 1669 } 1670 else 1671 { 1672 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1673 { 1674 pcVPSVUI->setVpsVideoSignalInfoIdx( i, pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ? 0 : i ); 1675 } 1676 } 1677 #endif 1473 1678 1474 1679 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); … … 1507 1712 } 1508 1713 1714 #if H_MV_HLS_7_RESERVED_FLAGS 1715 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1716 #endif 1717 1509 1718 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1510 1719 … … 1528 1737 } 1529 1738 1739 #if !H_MV_HLS_7_VPS_P0076_15 1530 1740 READ_FLAG( uiCode, "video_signal_info_idx_present_flag" ); pcVPSVUI->setVideoSignalInfoIdxPresentFlag( uiCode == 1 ); 1531 1741 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() ) … … 1561 1771 } 1562 1772 } 1773 #endif 1563 1774 READ_FLAG( uiCode, "vps_vui_bsp_hrd_present_flag" ); pcVPSVUI->setVpsVuiBspHrdPresentFlag( uiCode == 1 ); 1564 1775 if ( pcVPSVUI->getVpsVuiBspHrdPresentFlag( ) ) … … 1566 1777 parseVpsVuiBspHrdParameters( pcVPS ); 1567 1778 } 1779 #if H_MV_HLS_7_MISC_P0182_13 1780 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1781 { 1782 if( pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i )) == 0 ) 1783 { 1784 READ_FLAG( uiCode, "base_layer_parameter_set_compatibility_flag" ); pcVPSVUI->setBaseLayerParameterSetCompatibilityFlag( i, uiCode == 1 ); 1785 } 1786 } 1787 #endif 1568 1788 } 1569 1789 … … 1644 1864 { 1645 1865 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1646 1866 #if H_MV_HLS_7_HRD_P0156_7 1867 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1868 #else 1647 1869 for( Int j = 0; j <= vps->getMaxTLayers() - 1 ; j++ ) 1870 #endif 1648 1871 { 1649 1872 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1653 1876 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1654 1877 { 1878 #if H_MV_HLS_7_OUTPUT_LAYERS_5_10_22_27 1879 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1880 #else 1655 1881 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1882 #endif 1656 1883 { 1657 1884 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1658 1885 } 1659 1886 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); 1887 #if H_MV_HLS7_GEN 1888 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) ) 1889 { 1890 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1891 { 1892 READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1" ); dpbSize->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode ); 1893 } 1894 } 1895 #endif 1660 1896 READ_UVLC( uiCode, "max_vps_latency_increase_plus1" ); dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1661 1897 } … … 1698 1934 #if H_3D_SPIVMP 1699 1935 #if SEC_SPIVMP_MCP_SIZE_G0077 1700 READ_UVLC (uiCode, "log2_sub_PU_size_minus3 "); pcVPS->setSubPULog2Size(i, uiCode+3);1936 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1701 1937 #else 1702 1938 READ_UVLC (uiCode, "log2_sub_PU_size_minus2"); pcVPS->setSubPULog2Size(i, uiCode+2); … … 1755 1991 for (UInt viewIndex=0; viewIndex<pcVPS->getNumViews(); viewIndex++) 1756 1992 { 1993 #if FIX_CAM_PARS_COLLECTOR 1994 pcVPS->setCamParPresent ( viewIndex, false ); 1995 pcVPS->setHasCamParInSliceHeader( viewIndex, false ); 1996 #endif 1757 1997 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1); 1758 1998 if ( bCamParPresentFlag ) … … 1884 2124 rpcSlice->checkCrossLayerBlaFlag( ); 1885 2125 2126 #if !H_MV_HLS7_GEN 1886 2127 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1887 2128 { … … 1889 2130 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 ); 1890 2131 } 2132 #endif 1891 2133 1892 2134 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) … … 2486 2728 if(pps->getSliceHeaderExtensionPresentFlag()) 2487 2729 { 2730 #if !H_MV_HLS_7_POC_P0041 2488 2731 READ_UVLC(uiCode,"slice_header_extension_length"); 2489 2490 2732 for(Int i=0; i<uiCode; i++) 2491 2733 { … … 2494 2736 } 2495 2737 } 2738 #else 2739 #if H_MV 2740 READ_UVLC( uiCode, "slice_segment_header_extension_length" ); rpcSlice->setSliceSegmentHeaderExtensionLength( uiCode ); 2741 UInt posFollSliceSegHeaderExtLen = m_pcBitstream->getNumBitsRead(); 2742 2743 if( rpcSlice->getPPS()->getPocResetInfoPresentFlag() ) 2744 { 2745 READ_CODE( 2, uiCode, "poc_reset_idc" ); rpcSlice->setPocResetIdc( uiCode ); 2746 } 2747 else 2748 { 2749 rpcSlice->setPocResetIdc( 0 ); 2750 } 2751 2752 if( rpcSlice->getPocResetIdc() != 0 ) 2753 { 2754 READ_CODE( 6, uiCode, "poc_reset_period_id" ); rpcSlice->setPocResetPeriodId( uiCode ); 2755 } 2756 else 2757 { 2758 // TODO Copy poc_reset_period from earlier picture 2759 rpcSlice->setPocResetPeriodId( 0 ); 2760 } 2761 2762 if( rpcSlice->getPocResetIdc() == 3 ) 2763 { 2764 READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 ); 2765 READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode ); 2766 } 2767 2768 // Derive the value of PocMsbValRequiredFlag 2769 rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag() 2770 /* || TODO related to vps_poc_lsb_aligned_flag */ 2771 ); 2772 2773 if( !rpcSlice->getPocMsbValRequiredFlag() /* TODO && rpcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2774 { 2775 READ_FLAG( uiCode, "poc_msb_val_present_flag" ); rpcSlice->setPocMsbValPresentFlag( uiCode == 1 ); 2776 } 2777 else 2778 { 2779 if( rpcSlice->getPocMsbValRequiredFlag() ) 2780 { 2781 rpcSlice->setPocMsbValPresentFlag( true ); 2782 } 2783 else 2784 { 2785 rpcSlice->setPocMsbValPresentFlag( false ); 2786 } 2787 } 2788 2789 2790 if( rpcSlice->getPocMsbValPresentFlag() ) 2791 { 2792 READ_UVLC( uiCode, "poc_msb_val" ); rpcSlice->setPocMsbVal( uiCode ); 2793 } 2794 2795 while( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) < rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ) 2796 { 2797 READ_FLAG( uiCode, "slice_segment_header_extension_data_bit" ); 2798 } 2799 assert( ( m_pcBitstream->getNumBitsRead() - posFollSliceSegHeaderExtLen ) == rpcSlice->getSliceSegmentHeaderExtensionLength() * 8 ); 2800 #else 2801 READ_UVLC( uiCode, "slice_header_extension_length" ); 2802 for(Int i=0; i<uiCode; i++) 2803 { 2804 UInt ignore; 2805 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 2806 } 2807 } 2808 #endif 2809 #endif 2810 } 2811 2496 2812 2497 2813 m_pcBitstream->readByteAlignment(); -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 640 640 m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); 641 641 642 #if H_MV_ENC_DEC_TRAC 643 #if ENC_DEC_TRACE 644 stopAtPos ( m_ppcCU[uiDepth]->getSlice()->getPOC(), 645 m_ppcCU[uiDepth]->getSlice()->getLayerId(), 646 m_ppcCU[uiDepth]->getCUPelX(), 647 m_ppcCU[uiDepth]->getCUPelY(), 648 m_ppcCU[uiDepth]->getWidth(0), 649 m_ppcCU[uiDepth]->getHeight(0) ); 650 #endif 651 #endif 652 642 653 switch( m_ppcCU[uiDepth]->getPredictionMode(0) ) 643 654 { … … 918 929 #endif 919 930 931 #if H_3D && UPDATE_HM13 932 Bool useDltFlag = (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()); 933 934 if ( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth ) || useDltFlag ) 935 #else 936 if ( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth ) ) 937 #endif 938 { 920 939 //===== inverse transform ===== 921 940 m_pcTrQuant->setQPforQuant ( pcCU->getQP(0), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 ); 922 941 923 942 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA]; 924 assert(scalingListType < 6);943 assert(scalingListType < SCALING_LIST_NUM); 925 944 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkip ); 926 945 … … 936 955 { 937 956 #if H_3D 957 #if UPDATE_HM13 958 if ( useDltFlag ) 959 #else 938 960 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) ) 961 #endif 939 962 { 940 963 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) ); … … 953 976 pReco += uiStride; 954 977 pRecIPred += uiRecIPredStride; 978 } 979 } 980 else 981 { 982 //===== reconstruction ===== 983 Pel* pPred = piPred; 984 Pel* pReco = piReco; 985 Pel* pRecIPred = piRecIPred; 986 for ( Int y = 0; y < uiHeight; y++ ) 987 { 988 for ( Int x = 0; x < uiWidth; x++ ) 989 { 990 pReco [ x ] = pPred[ x ]; 991 pRecIPred[ x ] = pReco[ x ]; 992 } 993 pPred += uiStride; 994 pReco += uiStride; 995 pRecIPred += uiRecIPredStride; 996 } 955 997 } 956 998 } … … 1022 1064 } 1023 1065 1066 if ( pcCU->getCbf( uiAbsPartIdx, eText, uiTrDepth ) ) 1067 { 1024 1068 //===== inverse transform ===== 1025 1069 Int curChromaQpOffset; … … 1035 1079 1036 1080 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText]; 1037 assert(scalingListType < 6);1081 assert(scalingListType < SCALING_LIST_NUM); 1038 1082 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma ); 1039 1083 … … 1054 1098 pReco += uiStride; 1055 1099 pRecIPred += uiRecIPredStride; 1100 } 1101 } 1102 else 1103 { 1104 //===== reconstruction ===== 1105 Pel* pPred = piPred; 1106 Pel* pReco = piReco; 1107 Pel* pRecIPred = piRecIPred; 1108 for ( Int y = 0; y < uiHeight; y++ ) 1109 { 1110 for ( Int x = 0; x < uiWidth; x++ ) 1111 { 1112 pReco [ x ] = pPred[ x ]; 1113 pRecIPred[ x ] = pReco[ x ]; 1114 } 1115 pPred += uiStride; 1116 pReco += uiStride; 1117 pRecIPred += uiRecIPredStride; 1118 } 1056 1119 } 1057 1120 } -
trunk/source/Lib/TLibDecoder/TDecCu.h
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 580 580 } 581 581 582 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP )582 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 583 583 { 584 584 UInt uiSubdiv; … … 604 604 else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) ) 605 605 { 606 uiSubdiv = (uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));606 uiSubdiv = (uiLog2TrafoSize > quadtreeTULog2MinSizeInCU); 607 607 } 608 608 else if( uiLog2TrafoSize > pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) … … 614 614 uiSubdiv = 0; 615 615 } 616 else if( uiLog2TrafoSize == pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx))616 else if( uiLog2TrafoSize == quadtreeTULog2MinSizeInCU ) 617 617 { 618 618 uiSubdiv = 0; … … 620 620 else 621 621 { 622 assert( uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));622 assert( uiLog2TrafoSize > quadtreeTULog2MinSizeInCU ); 623 623 m_pcEntropyDecoderIf->parseTransformSubdivFlag( uiSubdiv, 5 - uiLog2TrafoSize ); 624 624 } … … 666 666 for( Int i = 0; i < 4; i++ ) 667 667 { 668 xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP );668 xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, quadtreeTULog2MinSizeInCU ); 669 669 uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth+1 ); 670 670 uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth+1 ); … … 886 886 887 887 } 888 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP ); 888 889 Int getQuadtreeTULog2MinSizeInCU = pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx); 890 891 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP, getQuadtreeTULog2MinSizeInCU ); 889 892 } 890 893 -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 210 210 211 211 private: 212 Void xDecodeTransform ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP );212 Void xDecodeTransform ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int getQuadtreeTULog2MinSizeInCU ); 213 213 214 214 public: -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r655 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 112 112 //-- For time output for each slice 113 113 long iBeforeTime = clock(); 114 115 UInt uiStartCUAddr = pcSlice->getSliceSegmentCurStartCUAddr();116 117 UInt uiSliceStartCuAddr = pcSlice->getSliceCurStartCUAddr();118 if(uiSliceStartCuAddr == uiStartCUAddr)119 {120 m_sliceStartCUAddress.push_back(uiSliceStartCuAddr);121 }122 123 114 m_pcSbacDecoder->init( (TDecBinIf*)m_pcBinCABAC ); 124 115 m_pcEntropyDecoder->setEntropyDecoder (m_pcSbacDecoder); … … 147 138 m_pcEntropyDecoder->setBitstream ( ppcSubstreams[0] ); 148 139 m_pcEntropyDecoder->resetEntropy (pcSlice); 149 150 if(uiSliceStartCuAddr == uiStartCUAddr)151 {152 m_LFCrossSliceBoundaryFlag.push_back( pcSlice->getLFCrossSliceBoundaryFlag());153 }154 140 #if H_3D_NBDV 155 141 if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done. … … 199 185 m_pcLoopFilter->setCfg(bLFCrossTileBoundary); 200 186 m_pcLoopFilter->loopFilterPic( rpcPic ); 201 202 if(pcSlice->getSPS()->getUseSAO())203 {204 m_sliceStartCUAddress.push_back(rpcPic->getNumCUsInFrame()* rpcPic->getNumPartInCU());205 rpcPic->createNonDBFilterInfo(m_sliceStartCUAddress, 0, &m_LFCrossSliceBoundaryFlag, rpcPic->getPicSym()->getNumTiles(), bLFCrossTileBoundary);206 }207 208 187 if( pcSlice->getSPS()->getUseSAO() ) 209 188 { 210 { 211 SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam(); 212 saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag(); 213 saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma(); 214 m_pcSAO->setSaoLcuBasedOptimization(1); 215 m_pcSAO->createPicSaoInfo(rpcPic); 216 m_pcSAO->SAOProcess(saoParam); 217 m_pcSAO->PCMLFDisableProcess(rpcPic); 218 m_pcSAO->destroyPicSaoInfo(); 219 } 220 } 221 222 if(pcSlice->getSPS()->getUseSAO()) 223 { 224 rpcPic->destroyNonDBFilterInfo(); 189 m_pcSAO->reconstructBlkSAOParams(rpcPic, rpcPic->getPicSym()->getSAOBlkParam()); 190 m_pcSAO->SAOProcess(rpcPic); 191 m_pcSAO->PCMLFDisableProcess(rpcPic); 225 192 } 226 193 #if H_3D … … 284 251 rpcPic->setOutputMark(true); 285 252 rpcPic->setReconMark(true); 286 m_sliceStartCUAddress.clear();287 m_LFCrossSliceBoundaryFlag.clear();288 253 } 289 254 -
trunk/source/Lib/TLibDecoder/TDecGop.h
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 83 83 Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message 84 84 85 //! list that contains the CU address of each slice plus the end address86 std::vector<Int> m_sliceStartCUAddress;87 std::vector<Bool> m_LFCrossSliceBoundaryFlag;88 89 85 public: 90 86 TDecGop(); -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 78 78 , m_cCUAbsSCModel ( 1, 1, NUM_ABS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 79 79 , m_cMVPIdxSCModel ( 1, 1, NUM_MVP_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 80 , m_cCUAMPSCModel ( 1, 1, NUM_CU_AMP_CTX , m_contextModels + m_numContextModels, m_numContextModels)81 80 , m_cSaoMergeSCModel ( 1, 1, NUM_SAO_MERGE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 82 81 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 155 154 #endif 156 155 m_cCUPartSizeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PART_SIZE ); 157 m_cCUAMPSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );158 156 m_cCUPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PRED_MODE ); 159 157 m_cCUIntraPredSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRA_PRED_MODE ); … … 236 234 #endif 237 235 m_cCUPartSizeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PART_SIZE ); 238 m_cCUAMPSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );239 236 m_cCUPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PRED_MODE ); 240 237 m_cCUIntraPredSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_PRED_MODE ); … … 906 903 if (eMode == SIZE_2NxN) 907 904 { 908 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0));905 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 909 906 if (uiSymbol == 0) 910 907 { … … 915 912 else if (eMode == SIZE_Nx2N) 916 913 { 917 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0));914 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 918 915 if (uiSymbol == 0) 919 916 { … … 2009 2006 if (uiCode == 0) 2010 2007 { 2011 ruiVal = 5;2008 ruiVal = 1; 2012 2009 } 2013 2010 else 2014 2011 { 2015 ruiVal = 1; 2016 } 2017 } 2018 } 2019 2020 inline Void copySaoOneLcuParam(SaoLcuParam* psDst, SaoLcuParam* psSrc) 2021 { 2022 Int i; 2023 psDst->partIdx = psSrc->partIdx; 2024 psDst->typeIdx = psSrc->typeIdx; 2025 if (psDst->typeIdx != -1) 2026 { 2027 psDst->subTypeIdx = psSrc->subTypeIdx ; 2028 psDst->length = psSrc->length; 2029 for (i=0;i<psDst->length;i++) 2030 { 2031 psDst->offset[i] = psSrc->offset[i]; 2032 } 2033 } 2034 else 2035 { 2036 psDst->length = 0; 2037 for (i=0;i<SAO_BO_LEN;i++) 2038 { 2039 psDst->offset[i] = 0; 2040 } 2041 } 2042 } 2043 2044 Void TDecSbac::parseSaoOffset(SaoLcuParam* psSaoLcuParam, UInt compIdx) 2012 ruiVal = 2; 2013 } 2014 } 2015 } 2016 2017 Void TDecSbac::parseSaoSign(UInt& val) 2018 { 2019 m_pcTDecBinIf->decodeBinEP ( val ); 2020 } 2021 2022 Void TDecSbac::parseSAOBlkParam (SAOBlkParam& saoBlkParam 2023 , Bool* sliceEnabled 2024 , Bool leftMergeAvail 2025 , Bool aboveMergeAvail 2026 ) 2045 2027 { 2046 2028 UInt uiSymbol; 2047 static Int iTypeLength[MAX_NUM_SAO_TYPE] = 2048 { 2049 SAO_EO_LEN, 2050 SAO_EO_LEN, 2051 SAO_EO_LEN, 2052 SAO_EO_LEN, 2053 SAO_BO_LEN 2054 }; 2055 2056 if (compIdx==2) 2057 { 2058 uiSymbol = (UInt)( psSaoLcuParam->typeIdx + 1); 2059 } 2060 else 2061 { 2062 parseSaoTypeIdx(uiSymbol); 2063 } 2064 psSaoLcuParam->typeIdx = (Int)uiSymbol - 1; 2065 if (uiSymbol) 2066 { 2067 psSaoLcuParam->length = iTypeLength[psSaoLcuParam->typeIdx]; 2068 2069 Int bitDepth = compIdx ? g_bitDepthC : g_bitDepthY; 2070 Int offsetTh = 1 << min(bitDepth - 5,5); 2071 2072 if( psSaoLcuParam->typeIdx == SAO_BO ) 2073 { 2074 for(Int i=0; i< psSaoLcuParam->length; i++) 2075 { 2076 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); 2077 psSaoLcuParam->offset[i] = uiSymbol; 2029 2030 Bool isLeftMerge = false; 2031 Bool isAboveMerge= false; 2032 2033 if(leftMergeAvail) 2034 { 2035 parseSaoMerge(uiSymbol); //sao_merge_left_flag 2036 isLeftMerge = (uiSymbol?true:false); 2037 } 2038 2039 if( aboveMergeAvail && !isLeftMerge) 2040 { 2041 parseSaoMerge(uiSymbol); //sao_merge_up_flag 2042 isAboveMerge = (uiSymbol?true:false); 2043 } 2044 2045 if(isLeftMerge || isAboveMerge) //merge mode 2046 { 2047 saoBlkParam[SAO_Y].modeIdc = saoBlkParam[SAO_Cb].modeIdc = saoBlkParam[SAO_Cr].modeIdc = SAO_MODE_MERGE; 2048 saoBlkParam[SAO_Y].typeIdc = saoBlkParam[SAO_Cb].typeIdc = saoBlkParam[SAO_Cr].typeIdc = (isLeftMerge)?SAO_MERGE_LEFT:SAO_MERGE_ABOVE; 2078 2049 } 2079 for(Int i=0; i< psSaoLcuParam->length; i++) 2080 { 2081 if (psSaoLcuParam->offset[i] != 0) 2082 { 2083 m_pcTDecBinIf->decodeBinEP ( uiSymbol); 2084 if (uiSymbol) 2050 else //new or off mode 2051 { 2052 for(Int compIdx=0; compIdx < NUM_SAO_COMPONENTS; compIdx++) 2053 { 2054 SAOOffset& ctbParam = saoBlkParam[compIdx]; 2055 2056 if(!sliceEnabled[compIdx]) 2085 2057 { 2086 psSaoLcuParam->offset[i] = -psSaoLcuParam->offset[i] ; 2087 } 2088 } 2089 } 2090 parseSaoUflc(5, uiSymbol ); 2091 psSaoLcuParam->subTypeIdx = uiSymbol; 2092 } 2093 else if( psSaoLcuParam->typeIdx < 4 ) 2094 { 2095 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[0] = uiSymbol; 2096 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[1] = uiSymbol; 2097 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[2] = -(Int)uiSymbol; 2098 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[3] = -(Int)uiSymbol; 2099 if (compIdx != 2) 2058 //off 2059 ctbParam.modeIdc = SAO_MODE_OFF; 2060 continue; 2061 } 2062 2063 //type 2064 if(compIdx == SAO_Y || compIdx == SAO_Cb) 2065 { 2066 parseSaoTypeIdx(uiSymbol); //sao_type_idx_luma or sao_type_idx_chroma 2067 2068 assert(uiSymbol ==0 || uiSymbol ==1 || uiSymbol ==2); 2069 2070 if(uiSymbol ==0) //OFF 2100 2071 { 2101 parseSaoUflc(2, uiSymbol ); 2102 psSaoLcuParam->subTypeIdx = uiSymbol; 2103 psSaoLcuParam->typeIdx += psSaoLcuParam->subTypeIdx; 2104 } 2072 ctbParam.modeIdc = SAO_MODE_OFF; 2105 2073 } 2106 } 2107 else 2108 { 2109 psSaoLcuParam->length = 0; 2110 } 2111 } 2112 2113 Void TDecSbac::parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp) 2114 { 2115 Int iAddr = pcCU->getAddr(); 2116 UInt uiSymbol; 2117 for (Int iCompIdx=0; iCompIdx<3; iCompIdx++) 2118 { 2119 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0; 2120 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0; 2121 pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0; 2122 pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx = -1; 2123 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[0] = 0; 2124 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[1] = 0; 2125 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[2] = 0; 2126 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[3] = 0; 2127 2128 } 2129 if (pSaoParam->bSaoFlag[0] || pSaoParam->bSaoFlag[1] ) 2130 { 2131 if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft) 2132 { 2133 parseSaoMerge(uiSymbol); 2134 pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag = (Bool)uiSymbol; 2135 } 2136 if (pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag==0) 2137 { 2138 if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp) 2139 { 2140 parseSaoMerge(uiSymbol); 2141 pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag = (Bool)uiSymbol; 2142 } 2143 } 2144 } 2145 2146 for (Int iCompIdx=0; iCompIdx<3; iCompIdx++) 2147 { 2148 if ((iCompIdx == 0 && pSaoParam->bSaoFlag[0]) || (iCompIdx > 0 && pSaoParam->bSaoFlag[1]) ) 2149 { 2150 if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft) 2151 { 2152 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag; 2153 } 2154 else 2155 { 2156 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0; 2157 } 2158 2159 if (pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag==0) 2160 { 2161 if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp) 2162 { 2163 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag; 2074 else if(uiSymbol == 1) //BO 2075 { 2076 ctbParam.modeIdc = SAO_MODE_NEW; 2077 ctbParam.typeIdc = SAO_TYPE_START_BO; 2078 } 2079 else //2, EO 2080 { 2081 ctbParam.modeIdc = SAO_MODE_NEW; 2082 ctbParam.typeIdc = SAO_TYPE_START_EO; 2083 } 2084 2085 } 2086 else //Cr, follow Cb SAO type 2087 { 2088 ctbParam.modeIdc = saoBlkParam[SAO_Cb].modeIdc; 2089 ctbParam.typeIdc = saoBlkParam[SAO_Cb].typeIdc; 2090 } 2091 2092 if(ctbParam.modeIdc == SAO_MODE_NEW) 2093 { 2094 Int offset[4]; 2095 for(Int i=0; i< 4; i++) 2096 { 2097 parseSaoMaxUvlc(uiSymbol, g_saoMaxOffsetQVal[compIdx] ); //sao_offset_abs 2098 offset[i] = (Int)uiSymbol; 2099 } 2100 2101 if(ctbParam.typeIdc == SAO_TYPE_START_BO) 2102 { 2103 for(Int i=0; i< 4; i++) 2104 { 2105 if(offset[i] != 0) 2106 { 2107 parseSaoSign(uiSymbol); //sao_offset_sign 2108 if(uiSymbol) 2109 { 2110 offset[i] = -offset[i]; 2111 } 2112 } 2113 } 2114 parseSaoUflc(NUM_SAO_BO_CLASSES_LOG2, uiSymbol ); //sao_band_position 2115 ctbParam.typeAuxInfo = uiSymbol; 2116 2117 for(Int i=0; i<4; i++) 2118 { 2119 ctbParam.offset[(ctbParam.typeAuxInfo+i)%MAX_NUM_SAO_CLASSES] = offset[i]; 2120 } 2121 2122 } 2123 else //EO 2124 { 2125 ctbParam.typeAuxInfo = 0; 2126 2127 if(compIdx == SAO_Y || compIdx == SAO_Cb) 2128 { 2129 parseSaoUflc(NUM_SAO_EO_TYPES_LOG2, uiSymbol ); //sao_eo_class_luma or sao_eo_class_chroma 2130 ctbParam.typeIdc += uiSymbol; 2164 2131 } 2165 2132 else 2166 2133 { 2167 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0; 2168 } 2169 if (!pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag) 2170 { 2171 pSaoParam->saoLcuParam[2][iAddr].typeIdx = pSaoParam->saoLcuParam[1][iAddr].typeIdx; 2172 parseSaoOffset(&(pSaoParam->saoLcuParam[iCompIdx][iAddr]), iCompIdx); 2173 } 2174 else 2175 { 2176 copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-pSaoParam->numCuInWidth]); 2177 } 2178 } 2179 else 2180 { 2181 copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-1]); 2182 } 2183 } 2184 else 2185 { 2186 pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx = -1; 2187 pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0; 2134 ctbParam.typeIdc = saoBlkParam[SAO_Cb].typeIdc; 2135 } 2136 ctbParam.offset[SAO_CLASS_EO_FULL_VALLEY] = offset[0]; 2137 ctbParam.offset[SAO_CLASS_EO_HALF_VALLEY] = offset[1]; 2138 ctbParam.offset[SAO_CLASS_EO_PLAIN ] = 0; 2139 ctbParam.offset[SAO_CLASS_EO_HALF_PEAK ] = -offset[2]; 2140 ctbParam.offset[SAO_CLASS_EO_FULL_PEAK ] = -offset[3]; 2141 } 2142 } 2188 2143 } 2189 2144 } … … 2424 2379 #endif 2425 2380 2381 2382 2426 2383 //! \} -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 94 94 Void parseSaoTypeIdx ( UInt& ruiVal ); 95 95 Void parseSaoUflc ( UInt uiLength, UInt& ruiVal ); 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);96 Void parseSAOBlkParam (SAOBlkParam& saoBlkParam, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail); 97 Void parseSaoSign(UInt& val); 98 98 private: 99 99 Void xReadUnarySymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset ); … … 209 209 ContextModel3DBuffer m_cMVPIdxSCModel; 210 210 211 ContextModel3DBuffer m_cCUAMPSCModel;212 211 ContextModel3DBuffer m_cSaoMergeSCModel; 213 212 ContextModel3DBuffer m_cSaoTypeIdxSCModel; -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r608 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 313 313 g_bJustDoIt = g_bEncDecTraceEnable; 314 314 #endif 315 if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) ) 316 { 317 SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam(); 318 saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag(); 319 if (iCUAddr == iStartCUAddr) 320 { 321 saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma(); 322 } 323 Int numCuInWidth = saoParam->numCuInWidth; 324 Int cuAddrInSlice = iCUAddr - rpcPic->getPicSym()->getCUOrderMap(pcSlice->getSliceCurStartCUAddr()/rpcPic->getNumPartInCU()); 325 Int cuAddrUpInSlice = cuAddrInSlice - numCuInWidth; 326 Int rx = iCUAddr % numCuInWidth; 327 Int ry = iCUAddr / numCuInWidth; 328 Int allowMergeLeft = 1; 329 Int allowMergeUp = 1; 330 if (rx!=0) 331 { 332 if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-1) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)) 333 { 334 allowMergeLeft = 0; 335 } 336 } 337 if (ry!=0) 338 { 339 if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-numCuInWidth) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr)) 340 { 341 allowMergeUp = 0; 342 } 343 } 344 pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, saoParam,pcCU, cuAddrInSlice, cuAddrUpInSlice, allowMergeLeft, allowMergeUp); 345 } 346 else if ( pcSlice->getSPS()->getUseSAO() ) 347 { 348 Int addr = pcCU->getAddr(); 349 SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam(); 350 for (Int cIdx=0; cIdx<3; cIdx++) 351 { 352 SaoLcuParam *saoLcuParam = &(saoParam->saoLcuParam[cIdx][addr]); 353 if ( ((cIdx == 0) && !pcSlice->getSaoEnabledFlag()) || ((cIdx == 1 || cIdx == 2) && !pcSlice->getSaoEnabledFlagChroma())) 354 { 355 saoLcuParam->mergeUpFlag = 0; 356 saoLcuParam->mergeLeftFlag = 0; 357 saoLcuParam->subTypeIdx = 0; 358 saoLcuParam->typeIdx = -1; 359 saoLcuParam->offset[0] = 0; 360 saoLcuParam->offset[1] = 0; 361 saoLcuParam->offset[2] = 0; 362 saoLcuParam->offset[3] = 0; 363 } 315 316 if ( pcSlice->getSPS()->getUseSAO() ) 317 { 318 SAOBlkParam& saoblkParam = (rpcPic->getPicSym()->getSAOBlkParam())[iCUAddr]; 319 if (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) 320 { 321 Bool sliceEnabled[NUM_SAO_COMPONENTS]; 322 sliceEnabled[SAO_Y] = pcSlice->getSaoEnabledFlag(); 323 sliceEnabled[SAO_Cb]= sliceEnabled[SAO_Cr]= pcSlice->getSaoEnabledFlagChroma(); 324 325 Bool leftMergeAvail = false; 326 Bool aboveMergeAvail= false; 327 328 //merge left condition 329 Int rx = (iCUAddr % uiWidthInLCUs); 330 if(rx > 0) 331 { 332 leftMergeAvail = rpcPic->getSAOMergeAvailability(iCUAddr, iCUAddr-1); 333 } 334 //merge up condition 335 Int ry = (iCUAddr / uiWidthInLCUs); 336 if(ry > 0) 337 { 338 aboveMergeAvail = rpcPic->getSAOMergeAvailability(iCUAddr, iCUAddr-uiWidthInLCUs); 339 } 340 341 pcSbacDecoder->parseSAOBlkParam( saoblkParam, sliceEnabled, leftMergeAvail, aboveMergeAvail); 342 } 343 else 344 { 345 saoblkParam[SAO_Y ].modeIdc = SAO_MODE_OFF; 346 saoblkParam[SAO_Cb].modeIdc = SAO_MODE_OFF; 347 saoblkParam[SAO_Cr].modeIdc = SAO_MODE_OFF; 364 348 } 365 349 } -
trunk/source/Lib/TLibDecoder/TDecSlice.h
r655 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r773 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 51 51 m_aaiCodedOffset = new Int* [ MAX_NUM_LAYERS ]; 52 52 m_aaiCodedScale = new Int* [ MAX_NUM_LAYERS ]; 53 #if !FIX_CAM_PARS_COLLECTOR 53 54 m_aiViewId = new Int [ MAX_NUM_LAYERS ]; 54 55 55 56 m_bViewReceived = new Bool [ MAX_NUM_LAYERS ]; 57 #endif 56 58 for( UInt uiId = 0; uiId < MAX_NUM_LAYERS; uiId++ ) 57 59 { … … 63 65 m_iLog2Precision = LOG2_DISP_PREC_LUT; 64 66 m_uiBitDepthForLUT = 8; // fixed 67 #if FIX_CAM_PARS_COLLECTOR 68 m_receivedIdc = NULL; 69 m_vps = NULL; 70 #endif 65 71 } 66 72 … … 74 80 delete [] m_aaiCodedOffset; 75 81 delete [] m_aaiCodedScale; 82 #if !FIX_CAM_PARS_COLLECTOR 76 83 delete [] m_aiViewId; 77 84 delete [] m_bViewReceived; 85 #endif 78 86 79 87 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 80 88 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 81 } 82 89 #if FIX_CAM_PARS_COLLECTOR 90 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 ); 91 #endif 92 } 93 94 95 #if FIX_CAM_PARS_COLLECTOR 96 Void 97 CamParsCollector::init( FILE* pCodedScaleOffsetFile, TComVPS* vps) 98 { 99 assert( !isInitialized() ); // Only one initialization currently supported 100 m_bInitialized = true; 101 m_vps = vps; 102 m_bCamParsVaryOverTime = false; 103 m_pCodedScaleOffsetFile = pCodedScaleOffsetFile; 104 m_lastPoc = -1; 105 m_firstReceivedPoc = -2; 106 107 m_uiMaxViewIndex = -1; 108 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 109 { 110 Int curViewIdx = m_vps->getViewIndex( m_vps->getLayerIdInNuh( i )); 111 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->hasCamParInSliceHeader( curViewIdx ); 112 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx ) ; 113 } 114 115 assert( m_receivedIdc == NULL ); 116 m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1]; 117 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 118 { 119 m_receivedIdc[i] = new Int[ m_uiMaxViewIndex + 1 ]; 120 } 121 122 xResetReceivedIdc( true ); 123 124 for (Int viewIndex = 0; viewIndex <= m_uiMaxViewIndex ; viewIndex++ ) 125 { 126 if (m_vps->getCamParPresent( viewIndex ) ) 127 { 128 if( !m_vps->hasCamParInSliceHeader( viewIndex ) ) 129 { 130 for (Int baseViewIndex = 0; baseViewIndex < viewIndex ; baseViewIndex++ ) 131 { 132 m_receivedIdc [ baseViewIndex ][ viewIndex ] = -1; 133 m_aaiCodedScale [ baseViewIndex ][ viewIndex ] = m_vps->getCodedScale (viewIndex) [ baseViewIndex ]; 134 m_aaiCodedOffset[ baseViewIndex ][ viewIndex ] = m_vps->getCodedOffset (viewIndex) [ baseViewIndex ]; 135 136 m_receivedIdc [ viewIndex ][ baseViewIndex ] = -1; 137 m_aaiCodedScale [ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedScale (viewIndex) [ baseViewIndex ]; 138 m_aaiCodedOffset[ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedOffset(viewIndex) [ baseViewIndex ]; 139 xInitLUTs( baseViewIndex, viewIndex, m_aaiCodedScale[ baseViewIndex ][ viewIndex ], m_aaiCodedOffset[ baseViewIndex ][ viewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 140 xInitLUTs( viewIndex, baseViewIndex, m_aaiCodedScale[ viewIndex ][ baseViewIndex ], m_aaiCodedOffset[ viewIndex ][ baseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT ); 141 } 142 } 143 } 144 } 145 } 146 147 Void 148 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag ) 149 { 150 for (Int i = 0; i <= m_uiMaxViewIndex; i++) 151 { 152 for (Int j = 0; j <= m_uiMaxViewIndex; j++) 153 { 154 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 155 { 156 m_receivedIdc[i][j] = 0; 157 } 158 } 159 } 160 } 161 #else 83 162 Void 84 163 CamParsCollector::init( FILE* pCodedScaleOffsetFile ) … … 92 171 m_uiMaxViewIndex = 0; 93 172 } 173 #endif 174 175 94 176 95 177 Void … … 124 206 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 125 207 { 208 #if FIX_CAM_PARS_COLLECTOR 209 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 210 #else 126 211 Int iLog2DivLuma = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 212 #endif 127 213 Int iLog2DivChroma = iLog2DivLuma + 1; 128 214 … … 166 252 } 167 253 254 #if !FIX_CAM_PARS_COLLECTOR 168 255 Void 169 256 CamParsCollector::setSlice( TComSlice* pcSlice ) … … 284 371 } 285 372 373 #else 374 Void 375 CamParsCollector::setSlice( TComSlice* pcSlice ) 376 { 377 if( pcSlice == 0 ) 378 { 379 xOutput( m_lastPoc ); 380 return; 381 } 382 383 if ( pcSlice->getIsDepth()) 384 { 385 return; 386 } 387 388 Int curPoc = pcSlice->getPOC(); 389 if( m_firstReceivedPoc == -2 ) 390 { 391 m_firstReceivedPoc = curPoc; 392 } 393 394 Bool newPocFlag = ( m_lastPoc != curPoc ); 395 396 if ( newPocFlag ) 397 { 398 if( m_lastPoc != -1 ) 399 { 400 xOutput( m_lastPoc ); 401 } 402 403 xResetReceivedIdc( false ); 404 m_lastPoc = pcSlice->getPOC(); 405 } 406 407 UInt uiViewIndex = pcSlice->getViewIndex(); 408 if( m_vps->getCamParPresent( uiViewIndex ) ) 409 { 410 if( m_vps->hasCamParInSliceHeader( uiViewIndex ) ) // check consistency of slice parameters here 411 { 412 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ ) 413 { 414 if ( m_receivedIdc[ uiViewIndex ][ uiBaseViewIndex ] != 0 ) 415 { 416 AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] ); 417 AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] ); 418 } 419 else 420 { 421 m_receivedIdc [ uiViewIndex ][ uiBaseViewIndex ] = 1; 422 m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] = pcSlice->getInvCodedScale () [ uiBaseViewIndex ]; 423 m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] = pcSlice->getInvCodedOffset() [ uiBaseViewIndex ]; 424 xInitLUTs( uiViewIndex, uiBaseViewIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseViewIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 425 } 426 if ( m_receivedIdc[ uiBaseViewIndex ][ uiViewIndex ] != 0 ) 427 { 428 AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale () [ uiBaseViewIndex ] ); 429 AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset () [ uiBaseViewIndex ] ); 430 } 431 else 432 { 433 m_receivedIdc [ uiBaseViewIndex ][ uiViewIndex ] = 1; 434 m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] = pcSlice->getCodedScale () [ uiBaseViewIndex ]; 435 m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] = pcSlice->getCodedOffset () [ uiBaseViewIndex ]; 436 xInitLUTs( uiBaseViewIndex, uiViewIndex, m_aaiCodedScale[ uiBaseViewIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT); 437 } 438 } 439 } 440 } 441 } 442 #endif 443 444 286 445 #if H_3D_IV_MERGE 287 446 Void … … 295 454 #endif 296 455 456 #if !FIX_CAM_PARS_COLLECTOR 297 457 Bool 298 458 CamParsCollector::xIsComplete() … … 307 467 return true; 308 468 } 469 #endif 309 470 310 471 Void … … 313 474 if( m_pCodedScaleOffsetFile ) 314 475 { 476 #if FIX_CAM_PARS_COLLECTOR 477 if( iPOC == m_firstReceivedPoc ) 478 #else 315 479 if( iPOC == 0 ) 480 #endif 316 481 { 317 482 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" ); 318 483 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" ); 484 #if FIX_CAM_PARS_COLLECTOR 319 485 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 320 486 { 487 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) ); 488 #else 489 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ ) 490 { 321 491 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_aiViewId[ uiViewIndex ] ); 492 #endif 322 493 } 323 494 fprintf( m_pCodedScaleOffsetFile, "\n\n"); … … 325 496 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" ); 326 497 } 498 #if FIX_CAM_PARS_COLLECTOR 499 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime ) 500 #else 327 501 if( iPOC == 0 || m_bCamParsVaryOverTime ) 502 #endif 328 503 { 329 504 Int iS = iPOC; … … 335 510 if( uiViewIndex != uiBaseIndex ) 336 511 { 512 #if FIX_CAM_PARS_COLLECTOR 513 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 ) 514 { 515 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 516 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() ); 517 } 518 #else 337 519 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n", 338 520 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_uiCamParsCodedPrecision ); 521 #endif 522 339 523 } 340 524 } … … 457 641 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) 458 642 { 643 #if H_MV_HLS_7_SPS_P0155_16_32 644 numReorderPics[temporalLayer] = ( getLayerId() == 0 ) ? pcSlice->getSPS()->getNumReorderPics(temporalLayer) : pcSlice->getVPS()->getNumReorderPics(temporalLayer); 645 #else 459 646 numReorderPics[temporalLayer] = pcSlice->getSPS()->getNumReorderPics(temporalLayer); 460 } 461 647 #endif 648 } 649 #if H_MV_HLS_7_SPS_P0155_16_32 650 if ( getLayerId() == 0 ) 651 { 652 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); 653 } 654 else 655 { 656 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); 657 #if H_MV_HLS7_GEN 658 TComVPS* vps = pcSlice->getVPS(); 659 TComDpbSize* dpbSize = vps->getDpbSize(); 660 Int lsIdx = vps->getLayerSetIdxForOutputLayerSet( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec? 661 Int layerIdx = vps->getIdxInLayerSet ( lsIdx, getLayerId() ); 662 Int subDpbIdx = dpbSize->getSubDpbAssigned( lsIdx, layerIdx ); 663 m_iMaxRefPicNum = dpbSize->getMaxVpsDecPicBufferingMinus1(getTargetOutputLayerSetIdx(), subDpbIdx , vps->getSubLayersVpsMaxMinus1( vps->getLayerIdInVps( getLayerId() ) ) + 1 ) + 1 ; 664 #endif 665 } 666 #else 462 667 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 668 #endif 463 669 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 464 670 { … … 467 673 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 468 674 conformanceWindow, defaultDisplayWindow, numReorderPics, true); 469 rpcPic->getPicSym()->allocSaoParam(&m_cSAO);470 675 m_cListPic.pushBack( rpcPic ); 471 676 … … 505 710 rpcPic->create ( pcSlice->getSPS()->getPicWidthInLumaSamples(), pcSlice->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, 506 711 conformanceWindow, defaultDisplayWindow, numReorderPics, true); 507 rpcPic->getPicSym()->allocSaoParam(&m_cSAO);508 712 } 509 713 … … 662 866 663 867 m_cSAO.destroy(); 664 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );868 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() ); 665 869 m_cLoopFilter.create( sps->getMaxCUDepth() ); 666 870 } … … 670 874 { 671 875 assert( nalu.m_layerId == m_layerId ); 672 673 876 #else 674 877 Bool TDecTop::xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay ) … … 682 885 m_uiSliceIdx = 0; 683 886 } 887 else 888 { 889 m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) ); 890 } 684 891 m_apcSlicePilot->setSliceIdx(m_uiSliceIdx); 685 if (!m_bFirstSliceInPicture)686 {687 m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) );688 }689 892 690 893 m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType); … … 994 1197 #endif 995 1198 #else 996 #if FIX1071997 1199 pcSlice->setRefPicList( m_cListPic, true ); 998 #else999 pcSlice->setRefPicList( m_cListPic );1000 #endif1001 1002 1200 #endif 1003 1201 … … 1215 1413 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1216 1414 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1217 case NAL_UNIT_CODED_SLICE_T LA_R:1415 case NAL_UNIT_CODED_SLICE_TSA_R: 1218 1416 case NAL_UNIT_CODED_SLICE_TSA_N: 1219 1417 case NAL_UNIT_CODED_SLICE_STSA_R: … … 1235 1433 #endif 1236 1434 break; 1435 case NAL_UNIT_EOS: 1436 m_associatedIRAPType = NAL_UNIT_INVALID; 1437 m_pocCRA = 0; 1438 m_pocRandomAccess = MAX_INT; 1439 m_prevPOC = MAX_INT; 1440 m_bFirstSliceInPicture = true; 1441 m_bFirstSliceInSequence = true; 1442 m_prevSliceSkipped = false; 1443 m_skippedPOC = 0; 1444 return false; 1445 1446 case NAL_UNIT_ACCESS_UNIT_DELIMITER: 1447 // TODO: process AU delimiter 1448 return false; 1449 1450 case NAL_UNIT_EOB: 1451 return false; 1452 1453 1454 case NAL_UNIT_RESERVED_VCL_N10: 1455 case NAL_UNIT_RESERVED_VCL_R11: 1456 case NAL_UNIT_RESERVED_VCL_N12: 1457 case NAL_UNIT_RESERVED_VCL_R13: 1458 case NAL_UNIT_RESERVED_VCL_N14: 1459 case NAL_UNIT_RESERVED_VCL_R15: 1460 1461 case NAL_UNIT_RESERVED_IRAP_VCL22: 1462 case NAL_UNIT_RESERVED_IRAP_VCL23: 1463 1464 case NAL_UNIT_RESERVED_VCL24: 1465 case NAL_UNIT_RESERVED_VCL25: 1466 case NAL_UNIT_RESERVED_VCL26: 1467 case NAL_UNIT_RESERVED_VCL27: 1468 case NAL_UNIT_RESERVED_VCL28: 1469 case NAL_UNIT_RESERVED_VCL29: 1470 case NAL_UNIT_RESERVED_VCL30: 1471 case NAL_UNIT_RESERVED_VCL31: 1472 1473 case NAL_UNIT_FILLER_DATA: 1474 case NAL_UNIT_RESERVED_NVCL41: 1475 case NAL_UNIT_RESERVED_NVCL42: 1476 case NAL_UNIT_RESERVED_NVCL43: 1477 case NAL_UNIT_RESERVED_NVCL44: 1478 case NAL_UNIT_RESERVED_NVCL45: 1479 case NAL_UNIT_RESERVED_NVCL46: 1480 case NAL_UNIT_RESERVED_NVCL47: 1481 case NAL_UNIT_UNSPECIFIED_48: 1482 case NAL_UNIT_UNSPECIFIED_49: 1483 case NAL_UNIT_UNSPECIFIED_50: 1484 case NAL_UNIT_UNSPECIFIED_51: 1485 case NAL_UNIT_UNSPECIFIED_52: 1486 case NAL_UNIT_UNSPECIFIED_53: 1487 case NAL_UNIT_UNSPECIFIED_54: 1488 case NAL_UNIT_UNSPECIFIED_55: 1489 case NAL_UNIT_UNSPECIFIED_56: 1490 case NAL_UNIT_UNSPECIFIED_57: 1491 case NAL_UNIT_UNSPECIFIED_58: 1492 case NAL_UNIT_UNSPECIFIED_59: 1493 case NAL_UNIT_UNSPECIFIED_60: 1494 case NAL_UNIT_UNSPECIFIED_61: 1495 case NAL_UNIT_UNSPECIFIED_62: 1496 case NAL_UNIT_UNSPECIFIED_63: 1237 1497 default: 1238 assert ( 1);1498 assert (0); 1239 1499 } 1240 1500 -
trunk/source/Lib/TLibDecoder/TDecTop.h
r833 r872 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 71 71 ~CamParsCollector (); 72 72 73 #if FIX_CAM_PARS_COLLECTOR 74 Void init ( FILE* pCodedScaleOffsetFile, TComVPS* vps ); 75 #else 73 76 Void init ( FILE* pCodedScaleOffsetFile ); 77 #endif 78 74 79 Void uninit (); 75 80 Void setSlice ( TComSlice* pcSlice ); … … 85 90 Int getCodedScale( Int iBaseView, Int iCureView){ return m_aaiCodedScale[ iBaseView ][ iCureView ];} 86 91 Int getCodedOffset( Int iBaseView, Int iCureView){ return m_aaiCodedOffset[ iBaseView ][ iCureView ];} 87 UInt getCamParsCodedPrecision(){ return m_ uiCamParsCodedPrecision; }92 UInt getCamParsCodedPrecision(){ return m_vps->getCamParPrecision(); } 88 93 #endif 89 94 90 95 private: 96 #if FIX_CAM_PARS_COLLECTOR 97 Void xResetReceivedIdc( Bool overWriteFlag ); 98 #else 91 99 Bool xIsComplete (); 100 #endif 92 101 Void xOutput ( Int iPOC ); 93 102 … … 98 107 Int** m_aaiCodedOffset; 99 108 Int** m_aaiCodedScale; 109 110 #if !FIX_CAM_PARS_COLLECTOR 100 111 Int* m_aiViewId; 101 112 #else 113 TComVPS* m_vps; 114 Int** m_receivedIdc; 115 Int m_uiMaxViewIndex; 116 Int m_lastPoc; 117 Int m_firstReceivedPoc; 118 #endif 119 120 121 #if !FIX_CAM_PARS_COLLECTOR 102 122 Bool* m_bViewReceived; 103 123 UInt m_uiCamParsCodedPrecision; 124 #endif 104 125 Bool m_bCamParsVaryOverTime; 126 #if !FIX_CAM_PARS_COLLECTOR 105 127 Int m_iLastViewIndex; 106 128 Int m_iLastPOC; 107 129 UInt m_uiMaxViewIndex; 130 #endif 108 131 109 132
Note: See TracChangeset for help on using the changeset viewer.