Changeset 1090 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 1 Jul 2015, 00:53:31 (11 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibDecoder
- Files:
-
- 2 edited
-
TDecCAVLC.cpp (modified) (8 diffs)
-
TDecTop.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1086 r1090 411 411 #endif 412 412 413 #if REF_REGION_OFFSET414 413 READ_UVLC( uiCode, "num_ref_loc_offsets" ); pcPPS->setNumRefLayerLocationOffsets(uiCode); 415 414 for(Int k = 0; k < pcPPS->getNumRefLayerLocationOffsets(); k++) … … 424 423 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1); 425 424 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1); 426 #if P0312_VERT_PHASE_ADJ427 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcPPS->setVertPhasePositionEnableFlag( pcPPS->getScaledRefLayerId(i), uiCode);428 #endif429 425 } 430 426 READ_FLAG( uiCode, "ref_region_offset_present_flag" ); pcPPS->setRefRegionOffsetPresentFlag( k, uiCode ); … … 437 433 READ_SVLC( iCode, "ref_region_bottom_offset" ); refWindow.setWindowBottomOffset(iCode << 1); 438 434 } 439 #if R0209_GENERIC_PHASE440 435 READ_FLAG( uiCode, "resample_phase_set_present_flag" ); pcPPS->setResamplePhaseSetPresentFlag( k, uiCode ); 441 436 if (uiCode) … … 446 441 READ_UVLC( uiCode, "phase_ver_chroma_plus8" ); pcPPS->setPhaseVerChroma (k, uiCode - 8); 447 442 } 448 #endif449 443 } 450 #else451 #if MOVE_SCALED_OFFSET_TO_PPS452 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcPPS->setNumScaledRefLayerOffsets(uiCode);453 for(Int k = 0; k < pcPPS->getNumScaledRefLayerOffsets(); k++)454 {455 Window& scaledWindow = pcPPS->getScaledRefLayerWindow(k);456 #if O0098_SCALED_REF_LAYER_ID457 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcPPS->setScaledRefLayerId( k, uiCode );458 #endif459 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1);460 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1);461 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1);462 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1);463 #if P0312_VERT_PHASE_ADJ464 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcPPS->setVertPhasePositionEnableFlag( pcPPS->getScaledRefLayerId(k), uiCode);465 #endif466 }467 #endif468 #endif469 444 #if Q0048_CGS_3D_ASYMLUT 470 445 READ_FLAG( uiCode , "colour_mapping_enabled_flag" ); … … 1698 1673 #endif 1699 1674 } 1700 #if P0312_VERT_PHASE_ADJ1701 for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )1702 {1703 UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);1704 #if !MOVE_SCALED_OFFSET_TO_PPS1705 if( pcSlice->getSPS()->getVertPhasePositionEnableFlag(refLayerIdc) )1706 #else1707 if( pcSlice->getPPS()->getVertPhasePositionEnableFlag(refLayerIdc) )1708 #endif1709 {1710 READ_FLAG( uiCode, "vert_phase_position_flag" ); pcSlice->setVertPhasePositionFlag( uiCode? true : false, refLayerIdc );1711 }1712 }1713 #endif1714 1675 #endif //SVC_EXTENSION 1715 1676 … … 3539 3500 } 3540 3501 #endif 3541 #if O0215_PHASE_ALIGNMENT3542 READ_FLAG( uiCode, "cross_layer_phase_alignment_flag"); vps->setPhaseAlignFlag( uiCode == 1 ? true : false );3543 #endif3544 3502 3545 3503 #if !IRAP_ALIGN_FLAG_IN_VPS_VUI … … 4275 4233 } 4276 4234 #endif 4277 #endif4278 #if P0312_VERT_PHASE_ADJ4279 READ_FLAG( uiCode, "vps_vui_vert_phase_in_use_flag" ); vps->setVpsVuiVertPhaseInUseFlag(uiCode);4280 4235 #endif 4281 4236 #if N0160_VUI_EXT_ILP_REF … … 4465 4420 // Vertical MV component restriction is not used in SHVC CTC 4466 4421 assert( uiCode == 0 ); 4467 4468 #if !MOVE_SCALED_OFFSET_TO_PPS4469 if( pcSPS->getLayerId() > 0 )4470 {4471 Int iCode;4472 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets(uiCode);4473 for(Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets(); i++)4474 {4475 Window& scaledWindow = pcSPS->getScaledRefLayerWindow(i);4476 #if O0098_SCALED_REF_LAYER_ID4477 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcSPS->setScaledRefLayerId( i, uiCode );4478 #endif4479 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); scaledWindow.setWindowLeftOffset (iCode << 1);4480 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); scaledWindow.setWindowTopOffset (iCode << 1);4481 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); scaledWindow.setWindowRightOffset (iCode << 1);4482 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); scaledWindow.setWindowBottomOffset(iCode << 1);4483 #if P0312_VERT_PHASE_ADJ4484 READ_FLAG( uiCode, "vert_phase_position_enable_flag" ); scaledWindow.setVertPhasePositionEnableFlag(uiCode); pcSPS->setVertPhasePositionEnableFlag( pcSPS->getScaledRefLayerId(i), uiCode);4485 #endif4486 }4487 }4488 #endif4489 4422 } 4490 4423 #endif -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1086 r1090 615 615 #endif 616 616 617 #if P0312_VERT_PHASE_ADJ618 #if MOVE_SCALED_OFFSET_TO_PPS619 if( activeVPS->getVpsVuiVertPhaseInUseFlag() == 0 )620 {621 for(Int i = 0; i < activePPS->getNumScaledRefLayerOffsets(); i++)622 {623 UInt scaledRefLayerId = activePPS->getScaledRefLayerId(i);624 if( activePPS->getVertPhasePositionEnableFlag( scaledRefLayerId ) )625 {626 printf("\nWarning: LayerId = %d: vert_phase_position_enable_flag[%d] = 1, however indication vert_phase_position_in_use_flag = 0\n", m_layerId, scaledRefLayerId );627 break;628 }629 }630 }631 #else632 if( activeVPS->getVpsVuiVertPhaseInUseFlag() == 0 )633 {634 for(Int i = 0; i < activeSPS->getNumScaledRefLayerOffsets(); i++)635 {636 UInt scaledRefLayerId = activeSPS->getScaledRefLayerId(i);637 if( activeSPS->getVertPhasePositionEnableFlag( scaledRefLayerId ) )638 {639 printf("\nWarning: LayerId = %d: vert_phase_position_enable_flag[%d] = 1, however indication vert_phase_position_in_use_flag = 0\n", m_layerId, scaledRefLayerId );640 break;641 }642 }643 }644 #endif645 #endif646 647 617 #if SPS_DPB_PARAMS 648 618 if( m_layerId > 0 ) … … 1912 1882 #endif 1913 1883 1914 #if MOVE_SCALED_OFFSET_TO_PPS1915 1884 #if O0098_SCALED_REF_LAYER_ID 1916 1885 const Window &scalEL = pcSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId); … … 1918 1887 const Window &scalEL = pcSlice->getPPS()->getScaledRefLayerWindow(refLayerIdc); 1919 1888 #endif 1920 #else 1921 #if O0098_SCALED_REF_LAYER_ID 1922 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindowForLayer(refLayerId); 1923 #else 1924 const Window &scalEL = pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc); 1925 #endif 1926 #endif 1927 1928 #if REF_REGION_OFFSET 1889 1929 1890 const Window &windowRL = pcSlice->getPPS()->getRefLayerWindowForLayer(pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc)); 1930 1891 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(COMPONENT_Y) - windowRL.getWindowLeftOffset() - windowRL.getWindowRightOffset(); 1931 1892 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(COMPONENT_Y) - windowRL.getWindowTopOffset() - windowRL.getWindowBottomOffset(); 1932 #else1933 Int widthBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getWidth(COMPONENT_Y);1934 Int heightBL = pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec()->getHeight(COMPONENT_Y);1935 #if Q0200_CONFORMANCE_BL_SIZE1936 Int chromaFormatIdc = pcSlice->getBaseColPic(refLayerIdc)->getSlice(0)->getChromaFormatIdc();1937 const Window &confBL = pcSlice->getBaseColPic(refLayerIdc)->getConformanceWindow();1938 widthBL -= ( confBL.getWindowLeftOffset() + confBL.getWindowRightOffset() ) * TComSPS::getWinUnitX( chromaFormatIdc );1939 heightBL -= ( confBL.getWindowTopOffset() + confBL.getWindowBottomOffset() ) * TComSPS::getWinUnitY( chromaFormatIdc );1940 #endif1941 #endif1942 1893 Int widthEL = m_pcPic->getPicYuvRec()->getWidth(COMPONENT_Y) - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 1943 1894 Int heightEL = m_pcPic->getPicYuvRec()->getHeight(COMPONENT_Y) - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 1944 1895 1945 #if RESAMPLING_FIX1946 #if REF_REGION_OFFSET1947 1896 // conformance check: the values of RefLayerRegionWidthInSamplesY, RefLayerRegionHeightInSamplesY, ScaledRefRegionWidthInSamplesY and ScaledRefRegionHeightInSamplesY shall be greater than 0 1948 1897 assert(widthEL > 0 && heightEL > 0 && widthBL > 0 && widthEL > 0); … … 1951 1900 assert(widthEL >= widthBL && heightEL >= heightBL); 1952 1901 1953 #if R0209_GENERIC_PHASE1954 1902 // conformance check: when ScaledRefRegionWidthInSamplesY is equal to RefLayerRegionWidthInSamplesY, PhaseHorY shall be equal to 0, when ScaledRefRegionWidthInSamplesC is equal to RefLayerRegionWidthInSamplesC, PhaseHorC shall be equal to 0, when ScaledRefRegionHeightInSamplesY is equal to RefLayerRegionHeightInSamplesY, PhaseVerY shall be equal to 0, and when ScaledRefRegionHeightInSamplesC is equal to RefLayerRegionHeightInSamplesC, PhaseVerC shall be equal to 0. 1955 1903 Bool phaseSetPresentFlag; … … 1959 1907 assert( ( (widthEL != widthBL) || (phaseHorLuma == 0 && phaseHorChroma == 0) ) 1960 1908 && ( (heightEL != heightBL) || (phaseVerLuma == 0 && phaseVerChroma == 0) ) ); 1961 #endif1962 #endif1963 #endif1964 1909 1965 1910 g_mvScalingFactor[refLayerIdc][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); … … 1991 1936 } 1992 1937 #endif 1993 #if SVC_EXTENSION1994 1938 if( m_pcPic->isSpatialEnhLayer(refLayerIdc) ) 1995 1939 { … … 1997 1941 if( pcSlice->getVPS()->isSamplePredictionType( pcSlice->getVPS()->getLayerIdxInVps(m_layerId), pcSlice->getVPS()->getLayerIdxInVps(refLayerId) ) ) 1998 1942 { 1999 #if O0215_PHASE_ALIGNMENT_REMOVAL2000 1943 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec()); 2001 #else2002 #if O0215_PHASE_ALIGNMENT2003 #if O0194_JOINT_US_BITSHIFT2004 #if Q0048_CGS_3D_ASYMLUT2005 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getVPS()->getPhaseAlignFlag() );2006 #else2007 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pcPic->getPicYuvRec(), pcSlice->getVPS()->getPhaseAlignFlag() );2008 #endif2009 #else2010 #if Q0048_CGS_3D_ASYMLUT2011 #if MOVE_SCALED_OFFSET_TO_PPS2012 m_cPrediction.upsampleBasePic( refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getPPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );2013 #else2014 m_cPrediction.upsampleBasePic( refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), pcSlice->getSPS()->getScaledRefLayerWindow(refLayerIdc), pcSlice->getVPS()->getPhaseAlignFlag() );2015 #endif2016 #else2017 m_cPrediction.upsampleBasePic( refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pcPic->getPicYuvRec(), scalEL, pcSlice->getVPS()->getPhaseAlignFlag() );2018 #endif2019 #endif2020 #else2021 #if O0194_JOINT_US_BITSHIFT2022 #if Q0048_CGS_3D_ASYMLUT2023 #if REF_REGION_OFFSET2024 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), scalEL, altRL );2025 #else2026 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), scalEL );2027 #endif2028 #else2029 m_cPrediction.upsampleBasePic( pcSlice, refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pcPic->getPicYuvRec(), scalEL );2030 #endif2031 #else2032 #if Q0048_CGS_3D_ASYMLUT2033 m_cPrediction.upsampleBasePic( refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pBaseColRec, m_pcPic->getPicYuvRec(), scalEL );2034 #else2035 m_cPrediction.upsampleBasePic( refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc), pcSlice->getBaseColPic(refLayerIdc)->getPicYuvRec(), m_pcPic->getPicYuvRec(), scalEL );2036 #endif2037 #endif2038 #endif2039 #endif2040 1944 } 2041 1945 } … … 2045 1949 } 2046 1950 pcSlice->setFullPelBaseRec ( refLayerIdc, m_pcPic->getFullPelBaseRec(refLayerIdc) ); 2047 #endif //SVC_EXTENSION2048 1951 } 2049 1952 }
Note: See TracChangeset for help on using the changeset viewer.