Changeset 823 in SHVCSoftware for branches/SHM-dev
- Timestamp:
- 9 Jul 2014, 03:42:42 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r820 r823 70 70 #endif 71 71 , m_maxTidRefPresentFlag(1) 72 , m_pColumnWidth()73 , m_pRowHeight()74 72 , m_scalingListFile() 75 73 , m_elRapSliceBEnabled(0) … … 87 85 , m_pchReconFile() 88 86 , m_pchdQPFile() 89 , m_pColumnWidth()90 , m_pRowHeight()91 87 , m_scalingListFile() 92 88 { … … 129 125 free(m_pchdQPFile); 130 126 #endif 131 free(m_pColumnWidth);132 free(m_pRowHeight);133 127 free(m_scalingListFile); 134 128 } … … 519 513 string cfg_dQPFile; 520 514 #endif //SVC_EXTENSION 521 string cfg _ColumnWidth;522 string cfg _RowHeight;515 string cfgColumnWidth; 516 string cfgRowHeight; 523 517 string cfg_ScalingListFile; 524 518 string cfg_startOfCodedInterval; … … 648 642 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 649 643 #endif 650 ("ConformanceMode", m_conformanceMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 651 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") 652 ("VerticalPadding,-pdy", m_aiPad[1], 0, "Vertical source padding for conformance window mode 2") 653 ("ConfLeft", m_confLeft, 0, "Left offset for window conformance mode 3") 654 ("ConfRight", m_confRight, 0, "Right offset for window conformance mode 3") 655 ("ConfTop", m_confTop, 0, "Top offset for window conformance mode 3") 656 ("ConfBottom", m_confBottom, 0, "Bottom offset for window conformance mode 3") 644 ("ConformanceMode", m_conformanceWindowMode, 0, "Deprecated alias of ConformanceWindowMode") 645 ("ConformanceWindowMode", m_conformanceWindowMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 646 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") 647 ("VerticalPadding,-pdy", m_aiPad[1], 0, "Vertical source padding for conformance window mode 2") 648 ("ConfLeft", m_confWinLeft, 0, "Deprecated alias of ConfWinLeft") 649 ("ConfRight", m_confWinRight, 0, "Deprecated alias of ConfWinRight") 650 ("ConfTop", m_confWinTop, 0, "Deprecated alias of ConfWinTop") 651 ("ConfBottom", m_confWinBottom, 0, "Deprecated alias of ConfWinBottom") 652 ("ConfWinLeft", m_confWinLeft, 0, "Left offset for window conformance mode 3") 653 ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") 654 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") 655 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") 657 656 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 658 657 #endif //SVC_EXTENSION … … 815 814 ("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices") 816 815 ("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region") 817 ("UniformSpacingIdc", m_iUniformSpacingIdr, 0, "Indicates if the column and row boundaries are distributed uniformly") 818 ("NumTileColumnsMinus1", m_iNumColumnsMinus1, 0, "Number of columns in a picture minus 1") 819 ("ColumnWidthArray", cfg_ColumnWidth, string(""), "Array containing ColumnWidth values in units of LCU") 820 ("NumTileRowsMinus1", m_iNumRowsMinus1, 0, "Number of rows in a picture minus 1") 821 ("RowHeightArray", cfg_RowHeight, string(""), "Array containing RowHeight values in units of LCU") 816 817 //deprecated copies of renamed tile parameters 818 ("UniformSpacingIdc", m_tileUniformSpacingFlag, false, "deprecated alias of TileUniformSpacing") 819 ("ColumnWidthArray", cfgColumnWidth, string(""), "deprecated alias of TileColumnWidthArray") 820 ("RowHeightArray", cfgRowHeight, string(""), "deprecated alias of TileRowHeightArray") 821 822 ("TileUniformSpacing", m_tileUniformSpacingFlag, false, "Indicates that tile columns and rows are distributed uniformly") 823 ("NumTileColumnsMinus1", m_numTileColumnsMinus1, 0, "Number of tile columns in a picture minus 1") 824 ("NumTileRowsMinus1", m_numTileRowsMinus1, 0, "Number of rows in a picture minus 1") 825 ("TileColumnWidthArray", cfgColumnWidth, string(""), "Array containing tile column width values in units of LCU") 826 ("TileRowHeightArray", cfgRowHeight, string(""), "Array containing tile row height values in units of LCU") 822 827 ("LFCrossTileBoundaryFlag", m_bLFCrossTileBoundaryFlag, true, "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering") 823 828 ("WaveFrontSynchro", m_iWaveFrontSynchro, 0, "0: no synchro; 1 synchro with TR; 2 TRR etc") … … 878 883 ("ColourDescriptionPresent", m_colourDescriptionPresentFlag, false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present") 879 884 ("ColourPrimaries", m_colourPrimaries, 2, "Indicates chromaticity coordinates of the source primaries") 880 ("TransferChara teristics",m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source")885 ("TransferCharacteristics", m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source") 881 886 ("MatrixCoefficients", m_matrixCoefficients, 2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries") 882 887 ("ChromaLocInfoPresent", m_chromaLocInfoPresentFlag, false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present") … … 1096 1101 #endif //SVC_EXTENSION 1097 1102 1098 Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); 1099 Char* pRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); 1100 if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) 1101 { 1102 char *columnWidth; 1103 Char* pColumnWidth = cfgColumnWidth.empty() ? NULL: strdup(cfgColumnWidth.c_str()); 1104 Char* pRowHeight = cfgRowHeight.empty() ? NULL : strdup(cfgRowHeight.c_str()); 1105 1106 if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 ) 1107 { 1108 char *str; 1103 1109 int i=0; 1104 m_ pColumnWidth = new UInt[m_iNumColumnsMinus1];1105 columnWidth= strtok(pColumnWidth, " ,-");1106 while( columnWidth!=NULL)1107 { 1108 if( i >=m_iNumColumnsMinus1 )1110 m_tileColumnWidth.resize( m_numTileColumnsMinus1 ); 1111 str = strtok(pColumnWidth, " ,-"); 1112 while(str!=NULL) 1113 { 1114 if( i >= m_numTileColumnsMinus1 ) 1109 1115 { 1110 1116 printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1111 1117 exit( EXIT_FAILURE ); 1112 1118 } 1113 *( m_pColumnWidth + i ) = atoi( columnWidth);1114 columnWidth= strtok(NULL, " ,-");1119 m_tileColumnWidth[i] = atoi( str ); 1120 str = strtok(NULL, " ,-"); 1115 1121 i++; 1116 1122 } 1117 if( i <m_iNumColumnsMinus1 )1123 if( i < m_numTileColumnsMinus1 ) 1118 1124 { 1119 1125 printf( "The width of some columns is not defined.\n" ); … … 1123 1129 else 1124 1130 { 1125 m_ pColumnWidth = NULL;1126 } 1127 1128 if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 )1129 { 1130 char * rowHeight;1131 m_tileColumnWidth.clear(); 1132 } 1133 1134 if( !m_tileUniformSpacingFlag && m_numTileRowsMinus1 > 0 ) 1135 { 1136 char *str; 1131 1137 int i=0; 1132 m_ pRowHeight = new UInt[m_iNumRowsMinus1];1133 rowHeight= strtok(pRowHeight, " ,-");1134 while( rowHeight!=NULL)1135 { 1136 if( i>=m_ iNumRowsMinus1 )1138 m_tileRowHeight.resize(m_numTileRowsMinus1); 1139 str = strtok(pRowHeight, " ,-"); 1140 while(str!=NULL) 1141 { 1142 if( i>=m_numTileRowsMinus1 ) 1137 1143 { 1138 1144 printf( "The number of rows whose height are defined is larger than the allowed number of rows.\n" ); 1139 1145 exit( EXIT_FAILURE ); 1140 1146 } 1141 *( m_pRowHeight + i ) = atoi( rowHeight);1142 rowHeight= strtok(NULL, " ,-");1147 m_tileRowHeight[i] = atoi( str ); 1148 str = strtok(NULL, " ,-"); 1143 1149 i++; 1144 1150 } 1145 if( i <m_iNumRowsMinus1 )1151 if( i < m_numTileRowsMinus1 ) 1146 1152 { 1147 1153 printf( "The height of some rows is not defined.\n" ); … … 1151 1157 else 1152 1158 { 1153 m_ pRowHeight = NULL;1159 m_tileRowHeight.clear(); 1154 1160 } 1155 1161 #if SVC_EXTENSION … … 1433 1439 #if !SVC_EXTENSION 1434 1440 // TODO:ChromaFmt assumes 4:2:0 below 1435 switch (m_conformance Mode)1441 switch (m_conformanceWindowMode) 1436 1442 { 1437 1443 case 0: 1438 1444 { 1439 1445 // no conformance or padding 1440 m_conf Left = m_confRight = m_confTop = m_confBottom = 0;1446 m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0; 1441 1447 m_aiPad[1] = m_aiPad[0] = 0; 1442 1448 break; … … 1448 1454 if (m_iSourceWidth % minCuSize) 1449 1455 { 1450 m_aiPad[0] = m_conf Right = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;1451 m_iSourceWidth += m_conf Right;1456 m_aiPad[0] = m_confWinRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 1457 m_iSourceWidth += m_confWinRight; 1452 1458 } 1453 1459 if (m_iSourceHeight % minCuSize) 1454 1460 { 1455 m_aiPad[1] = m_conf Bottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;1456 m_iSourceHeight += m_conf Bottom;1461 m_aiPad[1] = m_confWinBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight; 1462 m_iSourceHeight += m_confWinBottom; 1457 1463 if ( m_isField ) 1458 1464 { 1459 m_iSourceHeightOrg += m_conf Bottom << 1;1460 m_aiPad[1] = m_conf Bottom << 1;1465 m_iSourceHeightOrg += m_confWinBottom << 1; 1466 m_aiPad[1] = m_confWinBottom << 1; 1461 1467 } 1462 1468 } … … 1478 1484 m_iSourceWidth += m_aiPad[0]; 1479 1485 m_iSourceHeight += m_aiPad[1]; 1480 m_conf Right = m_aiPad[0];1481 m_conf Bottom = m_aiPad[1];1486 m_confWinRight = m_aiPad[0]; 1487 m_confWinBottom = m_aiPad[1]; 1482 1488 break; 1483 1489 } … … 1485 1491 { 1486 1492 // conformance 1487 if ((m_conf Left == 0) && (m_confRight == 0) && (m_confTop == 0) && (m_confBottom == 0))1493 if ((m_confWinLeft == 0) && (m_confWinRight == 0) && (m_confWinTop == 0) && (m_confWinBottom == 0)) 1488 1494 { 1489 1495 fprintf(stderr, "Warning: Conformance window enabled, but all conformance window parameters set to zero\n"); … … 1623 1629 if (m_interLayerConstrainedTileSetsSEIEnabled) 1624 1630 { 1625 if (m_ iNumColumnsMinus1 == 0 && m_iNumRowsMinus1 == 0)1631 if (m_numTileColumnsMinus1 == 0 && m_numTileRowsMinus1 == 0) 1626 1632 { 1627 1633 printf( "Tiles are not defined (needed for inter-layer comnstrained tile sets SEI).\n" ); … … 1828 1834 } 1829 1835 1830 Bool tileFlag = (m_ iNumColumnsMinus1 > 0 || m_iNumRowsMinus1 > 0 );1836 Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 ); 1831 1837 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together"); 1832 1838 … … 1839 1845 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 1840 1846 1841 xConfirmPara( m_confLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 1842 xConfirmPara( m_confRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 1843 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 1844 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 1847 xConfirmPara( m_confWinLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 1848 xConfirmPara( m_confWinRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 1849 xConfirmPara( m_confWinTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 1850 xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 1851 1852 xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window"); 1853 1854 if (m_defaultDisplayWindowFlag) 1855 { 1856 xConfirmPara( m_defDispWinLeftOffset % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left default display window offset must be an integer multiple of the specified chroma subsampling"); 1857 xConfirmPara( m_defDispWinRightOffset % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right default display window offset must be an integer multiple of the specified chroma subsampling"); 1858 xConfirmPara( m_defDispWinTopOffset % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top default display window offset must be an integer multiple of the specified chroma subsampling"); 1859 xConfirmPara( m_defDispWinBottomOffset % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom default display window offset must be an integer multiple of the specified chroma subsampling"); 1860 } 1845 1861 #endif 1846 1862 … … 2594 2610 Int widthInCU = (m_iSourceWidth % m_uiMaxCUWidth) ? m_iSourceWidth/m_uiMaxCUWidth + 1: m_iSourceWidth/m_uiMaxCUWidth; 2595 2611 Int heightInCU = (m_iSourceHeight % m_uiMaxCUHeight) ? m_iSourceHeight/m_uiMaxCUHeight + 1: m_iSourceHeight/m_uiMaxCUHeight; 2596 if(m_ iUniformSpacingIdr)2597 { 2598 maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_ iNumColumnsMinus1)/(m_iNumColumnsMinus1+1));2599 maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_ iNumRowsMinus1)/(m_iNumRowsMinus1+1));2612 if(m_tileUniformSpacingFlag) 2613 { 2614 maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_numTileColumnsMinus1)/(m_numTileColumnsMinus1+1)); 2615 maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_numTileRowsMinus1)/(m_numTileRowsMinus1+1)); 2600 2616 // if only the last tile-row is one treeblock higher than the others 2601 2617 // the maxTileHeight becomes smaller if the last row of treeblocks has lower height than the others 2602 if(!((heightInCU-1)%(m_ iNumRowsMinus1+1)))2618 if(!((heightInCU-1)%(m_numTileRowsMinus1+1))) 2603 2619 { 2604 2620 maxTileHeight = maxTileHeight - m_uiMaxCUHeight + (m_iSourceHeight % m_uiMaxCUHeight); … … 2606 2622 // if only the last tile-column is one treeblock wider than the others 2607 2623 // the maxTileWidth becomes smaller if the last column of treeblocks has lower width than the others 2608 if(!((widthInCU-1)%(m_ iNumColumnsMinus1+1)))2624 if(!((widthInCU-1)%(m_numTileColumnsMinus1+1))) 2609 2625 { 2610 2626 maxTileWidth = maxTileWidth - m_uiMaxCUWidth + (m_iSourceWidth % m_uiMaxCUWidth); … … 2613 2629 else // not uniform spacing 2614 2630 { 2615 if(m_ iNumColumnsMinus1<1)2631 if(m_numTileColumnsMinus1<1) 2616 2632 { 2617 2633 maxTileWidth = m_iSourceWidth; … … 2620 2636 { 2621 2637 Int accColumnWidth = 0; 2622 for(Int col=0; col<(m_ iNumColumnsMinus1); col++)2638 for(Int col=0; col<(m_numTileColumnsMinus1); col++) 2623 2639 { 2624 maxTileWidth = m_ pColumnWidth[col]>maxTileWidth ? m_pColumnWidth[col]:maxTileWidth;2625 accColumnWidth += m_ pColumnWidth[col];2640 maxTileWidth = m_tileColumnWidth[col]>maxTileWidth ? m_tileColumnWidth[col]:maxTileWidth; 2641 accColumnWidth += m_tileColumnWidth[col]; 2626 2642 } 2627 2643 maxTileWidth = (widthInCU-accColumnWidth)>maxTileWidth ? m_uiMaxCUWidth*(widthInCU-accColumnWidth):m_uiMaxCUWidth*maxTileWidth; 2628 2644 } 2629 if(m_ iNumRowsMinus1<1)2645 if(m_numTileRowsMinus1<1) 2630 2646 { 2631 2647 maxTileHeight = m_iSourceHeight; … … 2634 2650 { 2635 2651 Int accRowHeight = 0; 2636 for(Int row=0; row<(m_ iNumRowsMinus1); row++)2652 for(Int row=0; row<(m_numTileRowsMinus1); row++) 2637 2653 { 2638 maxTileHeight = m_ pRowHeight[row]>maxTileHeight ? m_pRowHeight[row]:maxTileHeight;2639 accRowHeight += m_ pRowHeight[row];2654 maxTileHeight = m_tileRowHeight[row]>maxTileHeight ? m_tileRowHeight[row]:maxTileHeight; 2655 accRowHeight += m_tileRowHeight[row]; 2640 2656 } 2641 2657 maxTileHeight = (heightInCU-accRowHeight)>maxTileHeight ? m_uiMaxCUHeight*(heightInCU-accRowHeight):m_uiMaxCUHeight*maxTileHeight; … … 2933 2949 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 2934 2950 printf("Reconstruction File : %s\n", m_pchReconFile ); 2935 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_conf Left - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );2951 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 2936 2952 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 2937 2953 #endif //SVC_EXTENSION -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r820 r823 46 46 #endif 47 47 #include <sstream> 48 #include <vector> 48 49 //! \ingroup TAppEncoder 49 50 //! \{ … … 93 94 94 95 95 Int m_conformance Mode;96 Int m_conf Left;97 Int m_conf Right;98 Int m_conf Top;99 Int m_conf Bottom;96 Int m_conformanceWindowMode; 97 Int m_confWinLeft; 98 Int m_confWinRight; 99 Int m_confWinTop; 100 Int m_confWinBottom; 100 101 Int m_framesToBeEncoded; ///< number of encoded frames 101 102 Int m_aiPad[2]; ///< number of padded pixels for width and height … … 240 241 Bool m_bLFCrossSliceBoundaryFlag; ///< 1: filter across slice boundaries 0: do not filter across slice boundaries 241 242 Bool m_bLFCrossTileBoundaryFlag; ///< 1: filter across tile boundaries 0: do not filter across tile boundaries 242 Int m_iUniformSpacingIdr; 243 Int m_iNumColumnsMinus1; 244 Char* m_pchColumnWidth; 245 Int m_iNumRowsMinus1; 246 Char* m_pchRowHeight; 247 UInt* m_pColumnWidth; 248 UInt* m_pRowHeight; 243 Bool m_tileUniformSpacingFlag; 244 Int m_numTileColumnsMinus1; 245 Int m_numTileRowsMinus1; 246 std::vector<Int> m_tileColumnWidth; 247 std::vector<Int> m_tileRowHeight; 249 248 Int m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 250 249 #if !SVC_EXTENSION -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r820 r823 50 50 #endif 51 51 { 52 m_conf Left = m_confRight = m_confTop = m_confBottom = 0;52 m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0; 53 53 m_aiPad[1] = m_aiPad[0] = 0; 54 54 m_numScaledRefLayerOffsets = 0; … … 114 114 ("ChromaFormatIDC", tmpChromaFormat, 420, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 115 115 #endif 116 ("CropLeft", m_confLeft, 0, "Left cropping/padding for cropping mode 3") 117 ("CropRight", m_confRight, 0, "Right cropping/padding for cropping mode 3") 118 ("CropTop", m_confTop, 0, "Top cropping/padding for cropping mode 3") 119 ("CropBottom", m_confBottom, 0, "Bottom cropping/padding for cropping mode 3") 116 ("ConfLeft", m_confWinLeft, 0, "Deprecated alias of ConfWinLeft") 117 ("ConfRight", m_confWinRight, 0, "Deprecated alias of ConfWinRight") 118 ("ConfTop", m_confWinTop, 0, "Deprecated alias of ConfWinTop") 119 ("ConfBottom", m_confWinBottom, 0, "Deprecated alias of ConfWinBottom") 120 ("ConfWinLeft", m_confWinLeft, 0, "Left offset for window conformance mode 3") 121 ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") 122 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") 123 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") 120 124 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "horizontal source padding for cropping mode 2") 121 125 ("VerticalPadding,-pdy", m_aiPad[1], 0, "vertical source padding for cropping mode 2") … … 162 166 printf("Reconstruction File : %s\n", m_cReconFile.c_str() ); 163 167 #if REPN_FORMAT_IN_VPS 164 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_conf Left + m_confRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confTop + m_confBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate );168 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confWinLeft + m_confWinRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confWinTop + m_confWinBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate ); 165 169 #else 166 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_conf Left - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );170 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 167 171 #endif 168 172 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); … … 207 211 { 208 212 // no cropping or padding 209 m_conf Left = m_confRight = m_confTop = m_confBottom = 0;213 m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0; 210 214 m_aiPad[1] = m_aiPad[0] = 0; 211 215 break; … … 221 225 if (m_iSourceWidth % minCuSize) 222 226 { 223 m_aiPad[0] = m_conf Right = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;224 m_iSourceWidth += m_conf Right;225 #if REPN_FORMAT_IN_VPS 226 m_conf Right /= TComSPS::getWinUnitX( m_chromaFormatIDC );227 m_aiPad[0] = m_confWinRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 228 m_iSourceWidth += m_confWinRight; 229 #if REPN_FORMAT_IN_VPS 230 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 227 231 #endif 228 232 } 229 233 if (m_iSourceHeight % minCuSize) 230 234 { 231 m_aiPad[1] = m_conf Bottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;232 m_iSourceHeight += m_conf Bottom;235 m_aiPad[1] = m_confWinBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight; 236 m_iSourceHeight += m_confWinBottom; 233 237 if ( isField ) 234 238 { 235 m_iSourceHeightOrg += m_conf Bottom << 1;236 m_aiPad[1] = m_conf Bottom << 1;239 m_iSourceHeightOrg += m_confWinBottom << 1; 240 m_aiPad[1] = m_confWinBottom << 1; 237 241 } 238 242 #if REPN_FORMAT_IN_VPS 239 m_conf Bottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );243 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 240 244 #endif 241 245 } … … 247 251 m_iSourceWidth += m_aiPad[0]; 248 252 m_iSourceHeight += m_aiPad[1]; 249 m_conf Right = m_aiPad[0];250 m_conf Bottom = m_aiPad[1];251 #if REPN_FORMAT_IN_VPS 252 m_conf Right /= TComSPS::getWinUnitX( m_chromaFormatIDC );253 m_conf Bottom /= TComSPS::getWinUnitY( m_chromaFormatIDC );253 m_confWinRight = m_aiPad[0]; 254 m_confWinBottom = m_aiPad[1]; 255 #if REPN_FORMAT_IN_VPS 256 m_confWinRight /= TComSPS::getWinUnitX( m_chromaFormatIDC ); 257 m_confWinBottom /= TComSPS::getWinUnitY( m_chromaFormatIDC ); 254 258 #endif 255 259 break; … … 258 262 { 259 263 // conformance 260 if ((m_conf Left == 0) && (m_confRight == 0) && (m_confTop == 0) && (m_confBottom == 0))264 if ((m_confWinLeft == 0) && (m_confWinRight == 0) && (m_confWinTop == 0) && (m_confWinBottom == 0)) 261 265 { 262 266 fprintf(stderr, "Warning: Cropping enabled, but all cropping parameters set to zero\n"); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r820 r823 35 35 Int m_iSourceHeightOrg; ///< original source height in pixel (when interlaced = frame height) 36 36 Int m_conformanceMode; 37 Int m_conf Left;38 Int m_conf Right;39 Int m_conf Top;40 Int m_conf Bottom;37 Int m_confWinLeft; 38 Int m_confWinRight; 39 Int m_confWinTop; 40 Int m_confWinBottom; 41 41 Int m_aiPad[2]; ///< number of padded pixels for width and height 42 42 Int m_iIntraPeriod; ///< period of I-slice (random access period) … … 136 136 Int* getPad() {return m_aiPad; } 137 137 Double getFloatQP() {return m_fQP; } 138 Int getConf Left() {return m_confLeft; }139 Int getConf Right() {return m_confRight; }140 Int getConf Top() {return m_confTop; }141 Int getConf Bottom() {return m_confBottom; }138 Int getConfWinLeft() {return m_confWinLeft; } 139 Int getConfWinRight() {return m_confWinRight; } 140 Int getConfWinTop() {return m_confWinTop; } 141 Int getConfWinBottom() {return m_confWinBottom; } 142 142 #if AUXILIARY_PICTURES 143 143 ChromaFormat getInputChromaFormat() {return m_InputChromaFormat;} -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r820 r823 213 213 m_acTEncTop[layer].setSourceWidth ( m_acLayerCfg[layer].getSourceWidth() ); 214 214 m_acTEncTop[layer].setSourceHeight ( m_acLayerCfg[layer].getSourceHeight() ); 215 m_acTEncTop[layer].setConformanceMode ( m_acLayerCfg[layer].getConformanceMode() ); 216 m_acTEncTop[layer].setConformanceWindow ( m_acLayerCfg[layer].m_confLeft, m_acLayerCfg[layer].m_confRight, m_acLayerCfg[layer].m_confTop, m_acLayerCfg[layer].m_confBottom ); 215 m_acTEncTop[layer].setConformanceWindow ( m_acLayerCfg[layer].m_confWinLeft, m_acLayerCfg[layer].m_confWinRight, m_acLayerCfg[layer].m_confWinTop, m_acLayerCfg[layer].m_confWinBottom ); 217 216 m_acTEncTop[layer].setFramesToBeEncoded ( m_framesToBeEncoded ); 218 217 … … 542 541 m_acTEncTop[layer].setIlcIdc( m_ilcIdc ); 543 542 #endif 544 m_acTEncTop[layer].set UniformSpacingIdr ( m_iUniformSpacingIdr);545 m_acTEncTop[layer].setNumColumnsMinus1 ( m_ iNumColumnsMinus1 );546 m_acTEncTop[layer].setNumRowsMinus1 ( m_ iNumRowsMinus1 );547 if( m_iUniformSpacingIdr==0)548 { 549 m_acTEncTop[layer].setColumnWidth ( m_ pColumnWidth );550 m_acTEncTop[layer].setRowHeight ( m_ pRowHeight );543 m_acTEncTop[layer].setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); 544 m_acTEncTop[layer].setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); 545 m_acTEncTop[layer].setNumRowsMinus1 ( m_numTileRowsMinus1 ); 546 if(!m_tileUniformSpacingFlag) 547 { 548 m_acTEncTop[layer].setColumnWidth ( m_tileColumnWidth ); 549 m_acTEncTop[layer].setRowHeight ( m_tileRowHeight ); 551 550 } 552 551 m_acTEncTop[layer].xCheckGSParameters(); 553 Int uiTilesCount = (m_iNumRowsMinus1+1) * (m_iNumColumnsMinus1+1);552 Int uiTilesCount = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1); 554 553 if(uiTilesCount == 1) 555 554 { … … 586 585 m_acTEncTop[layer].setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 587 586 m_acTEncTop[layer].setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 587 m_acTEncTop[layer].setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag); 588 588 m_acTEncTop[layer].setAspectRatioIdc( m_aspectRatioIdc ); 589 589 m_acTEncTop[layer].setSarWidth( m_sarWidth ); … … 685 685 m_cTEncTop.setSourceWidth ( m_iSourceWidth ); 686 686 m_cTEncTop.setSourceHeight ( m_iSourceHeight ); 687 m_cTEncTop.setConformanceWindow ( m_conf Left, m_confRight, m_confTop, m_confBottom );687 m_cTEncTop.setConformanceWindow ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 688 688 m_cTEncTop.setFramesToBeEncoded ( m_framesToBeEncoded ); 689 689 … … 870 870 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 871 871 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 872 m_cTEncTop.set UniformSpacingIdr ( m_iUniformSpacingIdr);873 m_cTEncTop.setNumColumnsMinus1 ( m_ iNumColumnsMinus1 );874 m_cTEncTop.setNumRowsMinus1 ( m_ iNumRowsMinus1 );875 if( m_iUniformSpacingIdr==0)876 { 877 m_cTEncTop.setColumnWidth ( m_ pColumnWidth );878 m_cTEncTop.setRowHeight ( m_ pRowHeight );872 m_cTEncTop.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); 873 m_cTEncTop.setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); 874 m_cTEncTop.setNumRowsMinus1 ( m_numTileRowsMinus1 ); 875 if(!m_tileUniformSpacingFlag) 876 { 877 m_cTEncTop.setColumnWidth ( m_tileColumnWidth ); 878 m_cTEncTop.setRowHeight ( m_tileRowHeight ); 879 879 } 880 880 m_cTEncTop.xCheckGSParameters(); 881 Int uiTilesCount = (m_ iNumRowsMinus1+1) * (m_iNumColumnsMinus1+1);881 Int uiTilesCount = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1); 882 882 if(uiTilesCount == 1) 883 883 { … … 904 904 m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 905 905 m_cTEncTop.setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 906 m_cTEncTop.setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag); 906 907 m_cTEncTop.setAspectRatioIdc( m_aspectRatioIdc ); 907 908 m_cTEncTop.setSarWidth( m_sarWidth ); … … 2128 2129 { 2129 2130 #if REPN_FORMAT_IN_VPS 2130 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConf Left() * xScal, m_acLayerCfg[layer].getConfRight() * xScal,2131 m_acLayerCfg[layer].getConf Top() * yScal, m_acLayerCfg[layer].getConfBottom() * yScal, m_isTopFieldFirst );2132 #else 2133 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConf Left(), m_acLayerCfg[layer].getConfRight(), m_acLayerCfg[layer].getConfTop(), m_acLayerCfg[layer].getConfBottom(), m_isTopFieldFirst );2131 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal, 2132 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, m_isTopFieldFirst ); 2133 #else 2134 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom(), m_isTopFieldFirst ); 2134 2135 #endif 2135 2136 } … … 2157 2158 { 2158 2159 #if REPN_FORMAT_IN_VPS 2159 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConf Left() * xScal, m_acLayerCfg[layer].getConfRight() * xScal,2160 m_acLayerCfg[layer].getConf Top() * yScal, m_acLayerCfg[layer].getConfBottom() * yScal );2161 #else 2162 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConf Left(), m_acLayerCfg[layer].getConfRight(),2163 m_acLayerCfg[layer].getConf Top(), m_acLayerCfg[layer].getConfBottom() );2160 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal, 2161 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal ); 2162 #else 2163 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), 2164 m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom() ); 2164 2165 #endif 2165 2166 } … … 2269 2270 if (m_pchReconFile) 2270 2271 { 2271 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_conf Left, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );2272 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst ); 2272 2273 } 2273 2274 … … 2284 2285 { 2285 2286 Int i; 2286 2287 2287 TComList<TComPicYuv*>::iterator iterPicYuvRec = m_cListPicYuvRec.end(); 2288 2288 list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin(); … … 2298 2298 if (m_pchReconFile) 2299 2299 { 2300 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_conf Left, m_confRight, m_confTop, m_confBottom );2300 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 2301 2301 } 2302 2302 -
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r815 r823 58 58 #if SVC_EXTENSION 59 59 #include <vector> 60 #define NV_VERSION "6.1 (HM-1 4.0)" ///< Current software version60 #define NV_VERSION "6.1 (HM-15.0)" ///< Current software version 61 61 #else 62 #define NV_VERSION "1 4.0" ///< Current software version62 #define NV_VERSION "15.0" ///< Current software version 63 63 #endif 64 64 -
branches/SHM-dev/source/Lib/TLibCommon/SEI.h
r815 r823 199 199 UInt m_bpSeqParameterSetId; 200 200 Bool m_rapCpbParamsPresentFlag; 201 Boolm_cpbDelayOffset;202 Boolm_dpbDelayOffset;201 UInt m_cpbDelayOffset; 202 UInt m_dpbDelayOffset; 203 203 UInt m_initialCpbRemovalDelay [MAX_CPB_CNT][2]; 204 204 UInt m_initialCpbRemovalDelayOffset [MAX_CPB_CNT][2]; -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.cpp
r595 r823 38 38 #include "TComPicSym.h" 39 39 #include "TComSampleAdaptiveOffset.h" 40 #include "TComSlice.h" 40 41 41 42 //! \ingroup TLibCommon … … 63 64 ,m_iNumColumnsMinus1 (0) 64 65 ,m_iNumRowsMinus1(0) 65 ,m_apcTComTile(NULL)66 66 ,m_puiCUOrderMap(0) 67 67 ,m_puiTileIdxMap(NULL) … … 101 101 delete [] m_apcTComSlice; 102 102 } 103 m_apcTComSlice = new TComSlice*[m_uiNumCUsInFrame *m_uiNumPartitions];103 m_apcTComSlice = new TComSlice*[m_uiNumCUsInFrame]; 104 104 m_apcTComSlice[0] = new TComSlice; 105 105 m_uiNumAllocatedSlice = 1; … … 152 152 delete [] m_apcTComDataCU; 153 153 m_apcTComDataCU = NULL; 154 155 #if SVC_EXTENSION156 if( m_apcTComTile )157 {158 #endif159 for(Int i = 0; i < (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )160 {161 delete m_apcTComTile[i];162 }163 delete [] m_apcTComTile;164 #if SVC_EXTENSION165 }166 #endif167 168 m_apcTComTile = NULL;169 154 170 155 delete [] m_puiCUOrderMap; … … 193 178 Void TComPicSym::allocateNewSlice() 194 179 { 180 assert ((m_uiNumAllocatedSlice + 1) <= m_uiNumCUsInFrame); 195 181 m_apcTComSlice[m_uiNumAllocatedSlice ++] = new TComSlice; 196 182 if (m_uiNumAllocatedSlice>=2) … … 225 211 } 226 212 227 Void TComPicSym::xCreateTComTileArray() 228 { 229 m_apcTComTile = new TComTile*[(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)]; 230 for( UInt i=0; i<(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ ) 231 { 232 m_apcTComTile[i] = new TComTile; 233 } 234 } 235 236 Void TComPicSym::xInitTiles() 237 { 238 UInt uiTileIdx; 239 UInt uiColumnIdx = 0; 240 UInt uiRowIdx = 0; 241 UInt uiRightEdgePosInCU; 242 UInt uiBottomEdgePosInCU; 243 Int i, j; 213 Void TComPicSym::initTiles(TComPPS *pps) 214 { 215 //set NumColumnsMinus1 and NumRowsMinus1 216 setNumColumnsMinus1( pps->getNumTileColumnsMinus1() ); 217 setNumRowsMinus1( pps->getTileNumRowsMinus1() ); 218 219 const Int numCols = pps->getNumTileColumnsMinus1() + 1; 220 const Int numRows = pps->getTileNumRowsMinus1() + 1; 221 const Int numTiles = numRows * numCols; 222 223 // allocate memory for tile parameters 224 m_tileParameters.resize(numTiles); 225 226 if( pps->getTileUniformSpacingFlag() ) 227 { 228 //set width and height for each (uniform) tile 229 for(Int row=0; row < numRows; row++) 230 { 231 for(Int col=0; col < numCols; col++) 232 { 233 const Int tileIdx = row * numCols + col; 234 m_tileParameters[tileIdx].setTileWidth( (col+1)*getFrameWidthInCU()/numCols 235 - (col*getFrameWidthInCU())/numCols ); 236 m_tileParameters[tileIdx].setTileHeight( (row+1)*getFrameHeightInCU()/numRows 237 - (row*getFrameHeightInCU())/numRows ); 238 } 239 } 240 } 241 else 242 { 243 //set the width for each tile 244 for(Int row=0; row < numRows; row++) 245 { 246 Int cumulativeTileWidth = 0; 247 for(Int col=0; col < getNumColumnsMinus1(); col++) 248 { 249 m_tileParameters[row * numCols + col].setTileWidth( pps->getTileColumnWidth(col) ); 250 cumulativeTileWidth += pps->getTileColumnWidth(col); 251 } 252 m_tileParameters[row * numCols + getNumColumnsMinus1()].setTileWidth( getFrameWidthInCU()-cumulativeTileWidth ); 253 } 254 255 //set the height for each tile 256 for(Int col=0; col < numCols; col++) 257 { 258 Int cumulativeTileHeight = 0; 259 for(Int row=0; row < getNumRowsMinus1(); row++) 260 { 261 m_tileParameters[row * numCols + col].setTileHeight( pps->getTileRowHeight(row) ); 262 cumulativeTileHeight += pps->getTileRowHeight(row); 263 } 264 m_tileParameters[getNumRowsMinus1() * numCols + col].setTileHeight( getFrameHeightInCU()-cumulativeTileHeight ); 265 } 266 } 267 268 #if TILE_SIZE_CHECK 269 Int minWidth = 1; 270 Int minHeight = 1; 271 const Int profileIdc = pps->getSPS()->getPTL()->getGeneralPTL()->getProfileIdc(); 272 if ( profileIdc == Profile::MAIN || profileIdc == Profile::MAIN10) 273 { 274 if (pps->getTilesEnabledFlag()) 275 { 276 minHeight = 64 / g_uiMaxCUHeight; 277 minWidth = 256 / g_uiMaxCUWidth; 278 } 279 } 280 for(Int row=0; row < numRows; row++) 281 { 282 for(Int col=0; col < numCols; col++) 283 { 284 const Int tileIdx = row * numCols + col; 285 assert (m_tileParameters[tileIdx].getTileWidth() >= minWidth); 286 assert (m_tileParameters[tileIdx].getTileHeight() >= minHeight); 287 } 288 } 289 #endif 244 290 245 291 //initialize each tile of the current picture 246 for( uiRowIdx=0; uiRowIdx < m_iNumRowsMinus1+1; uiRowIdx++ )247 { 248 for( uiColumnIdx=0; uiColumnIdx < m_iNumColumnsMinus1+1; uiColumnIdx++ )249 { 250 uiTileIdx = uiRowIdx * (m_iNumColumnsMinus1+1) + uiColumnIdx;292 for( Int row=0; row < numRows; row++ ) 293 { 294 for( Int col=0; col < numCols; col++ ) 295 { 296 const Int tileIdx = row * numCols + col; 251 297 252 298 //initialize the RightEdgePosInCU for each tile 253 uiRightEdgePosInCU = 0;254 for( i=0; i <= uiColumnIdx; i++ )255 { 256 uiRightEdgePosInCU += this->getTComTile(uiRowIdx * (m_iNumColumnsMinus1+1) + i)->getTileWidth();257 } 258 this->getTComTile(uiTileIdx)->setRightEdgePosInCU(uiRightEdgePosInCU-1);299 Int rightEdgePosInCTU = 0; 300 for( Int i=0; i <= col; i++ ) 301 { 302 rightEdgePosInCTU += m_tileParameters[row * numCols + i].getTileWidth(); 303 } 304 m_tileParameters[tileIdx].setRightEdgePosInCU(rightEdgePosInCTU-1); 259 305 260 306 //initialize the BottomEdgePosInCU for each tile 261 uiBottomEdgePosInCU = 0;262 for( i=0; i <= uiRowIdx; i++ )263 { 264 uiBottomEdgePosInCU += this->getTComTile(i * (m_iNumColumnsMinus1+1) + uiColumnIdx)->getTileHeight();265 } 266 this->getTComTile(uiTileIdx)->setBottomEdgePosInCU(uiBottomEdgePosInCU-1);307 Int bottomEdgePosInCTU = 0; 308 for( Int i=0; i <= row; i++ ) 309 { 310 bottomEdgePosInCTU += m_tileParameters[i * numCols + col].getTileHeight(); 311 } 312 m_tileParameters[tileIdx].setBottomEdgePosInCU(bottomEdgePosInCTU-1); 267 313 268 314 //initialize the FirstCUAddr for each tile 269 this->getTComTile(uiTileIdx)->setFirstCUAddr( (this->getTComTile(uiTileIdx)->getBottomEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileHeight() +1)*m_uiWidthInCU + 270 this->getTComTile(uiTileIdx)->getRightEdgePosInCU() - this->getTComTile(uiTileIdx)->getTileWidth() + 1); 271 } 272 } 315 m_tileParameters[tileIdx].setFirstCUAddr( (m_tileParameters[tileIdx].getBottomEdgePosInCU() - m_tileParameters[tileIdx].getTileHeight() + 1) * getFrameWidthInCU() + 316 m_tileParameters[tileIdx].getRightEdgePosInCU() - m_tileParameters[tileIdx].getTileWidth() + 1); 317 } 318 } 319 320 Int columnIdx = 0; 321 Int rowIdx = 0; 273 322 274 323 //initialize the TileIdxMap 275 for( i=0; i<m_uiNumCUsInFrame; i++) 276 { 277 for(j=0; j < m_iNumColumnsMinus1+1; j++) 278 { 279 if(i % m_uiWidthInCU <= this->getTComTile(j)->getRightEdgePosInCU()) 280 { 281 uiColumnIdx = j; 282 j = m_iNumColumnsMinus1+1; 283 } 284 } 285 for(j=0; j < m_iNumRowsMinus1+1; j++) 286 { 287 if(i/m_uiWidthInCU <= this->getTComTile(j*(m_iNumColumnsMinus1 + 1))->getBottomEdgePosInCU()) 288 { 289 uiRowIdx = j; 290 j = m_iNumRowsMinus1 + 1; 291 } 292 } 293 m_puiTileIdxMap[i] = uiRowIdx * (m_iNumColumnsMinus1 + 1) + uiColumnIdx; 294 } 295 324 for( Int i=0; i<m_uiNumCUsInFrame; i++) 325 { 326 for( Int col=0; col < numCols; col++) 327 { 328 if(i % getFrameWidthInCU() <= m_tileParameters[col].getRightEdgePosInCU()) 329 { 330 columnIdx = col; 331 break; 332 } 333 } 334 for(Int row=0; row < numRows; row++) 335 { 336 if(i / getFrameWidthInCU() <= m_tileParameters[row*numCols].getBottomEdgePosInCU()) 337 { 338 rowIdx = row; 339 break; 340 } 341 } 342 m_puiTileIdxMap[i] = rowIdx * numCols + columnIdx; 343 } 296 344 } 297 345 … … 441 489 442 490 TComTile::TComTile() 491 : m_uiTileWidth (0) 492 , m_uiTileHeight (0) 493 , m_uiRightEdgePosInCU (0) 494 , m_uiBottomEdgePosInCU (0) 495 , m_uiFirstCUAddr (0) 496 443 497 { 444 498 } -
branches/SHM-dev/source/Lib/TLibCommon/TComPicSym.h
r820 r823 45 45 #include "TComDataCU.h" 46 46 class TComSampleAdaptiveOffset; 47 class TComPPS; 47 48 48 49 //! \ingroup TLibCommon … … 102 103 Int m_iNumColumnsMinus1; 103 104 Int m_iNumRowsMinus1; 104 TComTile** m_apcTComTile;105 std::vector<TComTile> m_tileParameters; 105 106 UInt* m_puiCUOrderMap; //the map of LCU raster scan address relative to LCU encoding order 106 107 UInt* m_puiTileIdxMap; //the map of the tile index relative to LCU raster scan address … … 142 143 Int getNumRowsMinus1() { return m_iNumRowsMinus1; } 143 144 Int getNumTiles() { return (m_iNumRowsMinus1+1)*(m_iNumColumnsMinus1+1); } 144 TComTile* getTComTile ( UInt tileIdx ) { return *(m_apcTComTile + tileIdx); }145 TComTile* getTComTile ( UInt tileIdx ) { return &(m_tileParameters[tileIdx]); } 145 146 Void setCUOrderMap( Int encCUOrder, Int cuAddr ) { *(m_puiCUOrderMap + encCUOrder) = cuAddr; } 146 147 UInt getCUOrderMap( Int encCUOrder ) { return *(m_puiCUOrderMap + (encCUOrder>=m_uiNumCUsInFrame ? m_uiNumCUsInFrame : encCUOrder)); } … … 150 151 UInt getPicSCUEncOrder( UInt SCUAddr ); 151 152 UInt getPicSCUAddr( UInt SCUEncOrder ); 152 Void xCreateTComTileArray(); 153 Void xInitTiles(); 153 Void initTiles(TComPPS *pps); 154 154 UInt xCalculateNxtCUAddr( UInt uiCurrCUAddr ); 155 155 SAOBlkParam* getSAOBlkParam() { return m_saoBlkParams;} -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r821 r823 3220 3220 , m_entropyCodingSyncEnabledFlag (false) 3221 3221 , m_loopFilterAcrossTilesEnabledFlag (true) 3222 , m_uniformSpacingFlag (0) 3223 , m_iNumColumnsMinus1 (0) 3224 , m_puiColumnWidth (NULL) 3225 , m_iNumRowsMinus1 (0) 3226 , m_puiRowHeight (NULL) 3227 , m_iNumSubstreams (1) 3222 , m_uniformSpacingFlag (false) 3223 , m_numTileColumnsMinus1 (0) 3224 , m_numTileRowsMinus1 (0) 3225 , m_numSubstreams (1) 3228 3226 , m_signHideFlag(0) 3229 3227 , m_cabacInitPresentFlag (false) … … 3255 3253 TComPPS::~TComPPS() 3256 3254 { 3257 if( m_iNumColumnsMinus1 > 0 && m_uniformSpacingFlag == 0 )3258 {3259 if (m_puiColumnWidth) delete [] m_puiColumnWidth;3260 m_puiColumnWidth = NULL;3261 }3262 if( m_iNumRowsMinus1 > 0 && m_uniformSpacingFlag == 0 )3263 {3264 if (m_puiRowHeight) delete [] m_puiRowHeight;3265 m_puiRowHeight = NULL;3266 }3267 3268 3255 #if SCALINGLIST_INFERRING 3269 3256 if( !m_inferScalingListFlag ) -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r821 r823 1761 1761 1762 1762 Bool m_loopFilterAcrossTilesEnabledFlag; 1763 Intm_uniformSpacingFlag;1764 Int m_iNumColumnsMinus1;1765 UInt* m_puiColumnWidth;1766 Int m_iNumRowsMinus1;1767 UInt* m_puiRowHeight;1768 1769 Int m_ iNumSubstreams;1763 Bool m_uniformSpacingFlag; 1764 Int m_numTileColumnsMinus1; 1765 Int m_numTileRowsMinus1; 1766 std::vector<Int> m_tileColumnWidth; 1767 std::vector<Int> m_tileRowHeight; 1768 1769 Int m_numSubstreams; 1770 1770 1771 1771 Int m_signHideFlag; … … 1855 1855 Bool getDependentSliceSegmentsEnabledFlag() const { return m_dependentSliceSegmentsEnabledFlag; } 1856 1856 Void setDependentSliceSegmentsEnabledFlag(Bool val) { m_dependentSliceSegmentsEnabledFlag = val; } 1857 Bool getTilesEnabledFlag() const { return m_tilesEnabledFlag; }1858 Void setTilesEnabledFlag(Bool val) { m_tilesEnabledFlag = val; }1859 1857 Bool getEntropyCodingSyncEnabledFlag() const { return m_entropyCodingSyncEnabledFlag; } 1860 1858 Void setEntropyCodingSyncEnabledFlag(Bool val) { m_entropyCodingSyncEnabledFlag = val; } 1861 Void setUniformSpacingFlag ( Bool b ) { m_uniformSpacingFlag = b; } 1862 Bool getUniformSpacingFlag () { return m_uniformSpacingFlag; } 1863 Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } 1864 Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } 1865 Void setColumnWidth ( UInt* columnWidth ) 1866 { 1867 if( m_uniformSpacingFlag == 0 && m_iNumColumnsMinus1 > 0 ) 1868 { 1869 m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; 1870 1871 for(Int i=0; i<m_iNumColumnsMinus1; i++) 1872 { 1873 m_puiColumnWidth[i] = columnWidth[i]; 1874 } 1875 } 1876 } 1877 UInt getColumnWidth (UInt columnIdx) { return *( m_puiColumnWidth + columnIdx ); } 1878 Void setNumRowsMinus1( Int i ) { m_iNumRowsMinus1 = i; } 1879 Int getNumRowsMinus1() { return m_iNumRowsMinus1; } 1880 Void setRowHeight ( UInt* rowHeight ) 1881 { 1882 if( m_uniformSpacingFlag == 0 && m_iNumRowsMinus1 > 0 ) 1883 { 1884 m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; 1885 1886 for(Int i=0; i<m_iNumRowsMinus1; i++) 1887 { 1888 m_puiRowHeight[i] = rowHeight[i]; 1889 } 1890 } 1891 } 1892 UInt getRowHeight (UInt rowIdx) { return *( m_puiRowHeight + rowIdx ); } 1893 Void setNumSubstreams(Int iNumSubstreams) { m_iNumSubstreams = iNumSubstreams; } 1894 Int getNumSubstreams() { return m_iNumSubstreams; } 1859 1860 Void setTilesEnabledFlag (Bool val) { m_tilesEnabledFlag = val; } 1861 Bool getTilesEnabledFlag () const { return m_tilesEnabledFlag; } 1862 Void setTileUniformSpacingFlag (Bool b) { m_uniformSpacingFlag = b; } 1863 Bool getTileUniformSpacingFlag () const { return m_uniformSpacingFlag; } 1864 Void setNumTileColumnsMinus1 (Int i) { m_numTileColumnsMinus1 = i; } 1865 Int getNumTileColumnsMinus1 () const { return m_numTileColumnsMinus1; } 1866 Void setTileColumnWidth (const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } 1867 UInt getTileColumnWidth (UInt columnIdx) const { return m_tileColumnWidth[columnIdx]; } 1868 Void setNumTileRowsMinus1 (Int i) { m_numTileRowsMinus1 = i; } 1869 Int getTileNumRowsMinus1 () const { return m_numTileRowsMinus1; } 1870 Void setTileRowHeight (const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } 1871 UInt getTileRowHeight (UInt rowIdx) const { return m_tileRowHeight[rowIdx]; } 1872 1873 Void setNumSubstreams (Int numSubstreams) { m_numSubstreams = numSubstreams; } 1874 Int getNumSubstreams () { return m_numSubstreams; } 1895 1875 1896 1876 Void setSignHideFlag( Int signHideFlag ) { m_signHideFlag = signHideFlag; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r820 r823 271 271 272 272 #define SAO_SGN_FUNC 1 273 274 #define TILE_SIZE_CHECK 1 273 275 274 276 #define FIX1172 1 ///< fix ticket #1172 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r815 r823 255 255 if( pcPPS->getTilesEnabledFlag() ) 256 256 { 257 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); pcPPS->setNum ColumnsMinus1( uiCode );258 READ_UVLC ( uiCode, "num_tile_rows_minus1" ); pcPPS->setNum RowsMinus1( uiCode );259 READ_FLAG ( uiCode, "uniform_spacing_flag" ); pcPPS->set UniformSpacingFlag( uiCode);260 261 if( !pcPPS->get UniformSpacingFlag())262 { 263 UInt* columnWidth = (UInt*)malloc(pcPPS->getNumColumnsMinus1()*sizeof(UInt));264 for(UInt i=0; i<pcPPS->getNum ColumnsMinus1(); i++)257 READ_UVLC ( uiCode, "num_tile_columns_minus1" ); pcPPS->setNumTileColumnsMinus1( uiCode ); 258 READ_UVLC ( uiCode, "num_tile_rows_minus1" ); pcPPS->setNumTileRowsMinus1( uiCode ); 259 READ_FLAG ( uiCode, "uniform_spacing_flag" ); pcPPS->setTileUniformSpacingFlag( uiCode == 1 ); 260 261 if( !pcPPS->getTileUniformSpacingFlag()) 262 { 263 std::vector<Int> columnWidth(pcPPS->getNumTileColumnsMinus1()); 264 for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++) 265 265 { 266 266 READ_UVLC( uiCode, "column_width_minus1" ); 267 267 columnWidth[i] = uiCode+1; 268 268 } 269 pcPPS->setColumnWidth(columnWidth); 270 free(columnWidth); 271 272 UInt* rowHeight = (UInt*)malloc(pcPPS->getNumRowsMinus1()*sizeof(UInt)); 273 for(UInt i=0; i<pcPPS->getNumRowsMinus1(); i++) 269 pcPPS->setTileColumnWidth(columnWidth); 270 271 std::vector<Int> rowHeight (pcPPS->getTileNumRowsMinus1()); 272 for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++) 274 273 { 275 274 READ_UVLC( uiCode, "row_height_minus1" ); 276 275 rowHeight[i] = uiCode + 1; 277 276 } 278 pcPPS->setRowHeight(rowHeight); 279 free(rowHeight); 280 } 281 282 if(pcPPS->getNumColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0) 277 pcPPS->setTileRowHeight(rowHeight); 278 } 279 280 if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0) 283 281 { 284 282 READ_FLAG ( uiCode, "loop_filter_across_tiles_enabled_flag" ); pcPPS->setLoopFilterAcrossTilesEnabledFlag( uiCode ? true : false ); … … 1025 1023 READ_FLAG( uiCode, "cprms_present_flag[i]" ); pcVPS->setCprmsPresentFlag( uiCode == 1 ? true : false, i ); 1026 1024 } 1025 else 1026 { 1027 pcVPS->setCprmsPresentFlag( true, i ); 1028 } 1029 1027 1030 parseHrdParameters(pcVPS->getHrdParameters(i), pcVPS->getCprmsPresentFlag( i ), pcVPS->getMaxTLayers() - 1); 1028 1031 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r822 r823 854 854 pps->setSPS(sps); 855 855 #if REPN_FORMAT_IN_VPS 856 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNum ColumnsMinus1() + 1) : 1);857 #else 858 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNum ColumnsMinus1() + 1) : 1);856 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1); 857 #else 858 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1); 859 859 #endif 860 860 pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) ); … … 1651 1651 Bool bNextSlice = pcSlice->isNextSlice(); 1652 1652 1653 UInt uiCummulativeTileWidth; 1654 UInt uiCummulativeTileHeight; 1655 UInt i, j, p; 1656 1657 //set NumColumnsMins1 and NumRowsMinus1 1658 pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() ); 1659 pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() ); 1660 1661 //create the TComTileArray 1662 pcPic->getPicSym()->xCreateTComTileArray(); 1663 1664 if( pcSlice->getPPS()->getUniformSpacingFlag() ) 1665 { 1666 //set the width for each tile 1667 for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++) 1668 { 1669 for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++) 1670 { 1671 pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )-> 1672 setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1) 1673 - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) ); 1674 } 1675 } 1676 1677 //set the height for each tile 1678 for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++) 1679 { 1680 for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++) 1681 { 1682 pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )-> 1683 setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1) 1684 - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) ); 1685 } 1686 } 1687 } 1688 else 1689 { 1690 //set the width for each tile 1691 for(j=0; j < pcSlice->getPPS()->getNumRowsMinus1()+1; j++) 1692 { 1693 uiCummulativeTileWidth = 0; 1694 for(i=0; i < pcSlice->getPPS()->getNumColumnsMinus1(); i++) 1695 { 1696 pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcSlice->getPPS()->getColumnWidth(i) ); 1697 uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(i); 1698 } 1699 pcPic->getPicSym()->getTComTile(j * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + i)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth ); 1700 } 1701 1702 //set the height for each tile 1703 for(j=0; j < pcSlice->getPPS()->getNumColumnsMinus1()+1; j++) 1704 { 1705 uiCummulativeTileHeight = 0; 1706 for(i=0; i < pcSlice->getPPS()->getNumRowsMinus1(); i++) 1707 { 1708 pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcSlice->getPPS()->getRowHeight(i) ); 1709 uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(i); 1710 } 1711 pcPic->getPicSym()->getTComTile(i * (pcSlice->getPPS()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight ); 1712 } 1713 } 1714 1715 pcPic->getPicSym()->xInitTiles(); 1653 UInt i; 1654 pcPic->getPicSym()->initTiles(pcSlice->getPPS()); 1716 1655 1717 1656 //generate the Coding Order Map and Inverse Coding Order Map -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r815 r823 193 193 if( pcPPS->getTilesEnabledFlag() ) 194 194 { 195 WRITE_UVLC( pcPPS->getNum ColumnsMinus1(), "num_tile_columns_minus1" );196 WRITE_UVLC( pcPPS->get NumRowsMinus1(), "num_tile_rows_minus1" );197 WRITE_FLAG( pcPPS->get UniformSpacingFlag(), "uniform_spacing_flag" );198 if( pcPPS->getUniformSpacingFlag() == 0)199 { 200 for(UInt i=0; i<pcPPS->getNum ColumnsMinus1(); i++)201 { 202 WRITE_UVLC( pcPPS->get ColumnWidth(i)-1, "column_width_minus1" );203 } 204 for(UInt i=0; i<pcPPS->get NumRowsMinus1(); i++)205 { 206 WRITE_UVLC( pcPPS->get RowHeight(i)-1, "row_height_minus1" );207 } 208 } 209 if(pcPPS->getNum ColumnsMinus1() !=0 || pcPPS->getNumRowsMinus1() !=0)195 WRITE_UVLC( pcPPS->getNumTileColumnsMinus1(), "num_tile_columns_minus1" ); 196 WRITE_UVLC( pcPPS->getTileNumRowsMinus1(), "num_tile_rows_minus1" ); 197 WRITE_FLAG( pcPPS->getTileUniformSpacingFlag(), "uniform_spacing_flag" ); 198 if( !pcPPS->getTileUniformSpacingFlag() ) 199 { 200 for(UInt i=0; i<pcPPS->getNumTileColumnsMinus1(); i++) 201 { 202 WRITE_UVLC( pcPPS->getTileColumnWidth(i)-1, "column_width_minus1" ); 203 } 204 for(UInt i=0; i<pcPPS->getTileNumRowsMinus1(); i++) 205 { 206 WRITE_UVLC( pcPPS->getTileRowHeight(i)-1, "row_height_minus1" ); 207 } 208 } 209 if(pcPPS->getNumTileColumnsMinus1() !=0 || pcPPS->getTileNumRowsMinus1() !=0) 210 210 { 211 211 WRITE_FLAG( pcPPS->getLoopFilterAcrossTilesEnabledFlag()?1 : 0, "loop_filter_across_tiles_enabled_flag"); … … 340 340 if( defaultDisplayWindow.getWindowEnabledFlag() ) 341 341 { 342 WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset() ,"def_disp_win_left_offset");343 WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset() ,"def_disp_win_right_offset");344 WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset() ,"def_disp_win_top_offset");345 WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset() ,"def_disp_win_bottom_offset");342 WRITE_UVLC(defaultDisplayWindow.getWindowLeftOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_left_offset"); 343 WRITE_UVLC(defaultDisplayWindow.getWindowRightOffset() / TComSPS::getWinUnitX(pcSPS->getChromaFormatIdc()), "def_disp_win_right_offset"); 344 WRITE_UVLC(defaultDisplayWindow.getWindowTopOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_top_offset"); 345 WRITE_UVLC(defaultDisplayWindow.getWindowBottomOffset()/ TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc()), "def_disp_win_bottom_offset"); 346 346 } 347 347 TimingInfo *timingInfo = pcVUI->getTimingInfo(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r815 r823 107 107 Int m_iSourceWidth; 108 108 Int m_iSourceHeight; 109 Int m_conformanceMode;110 109 Window m_conformanceWindow; 111 110 Int m_framesToBeEncoded; … … 208 207 Bool m_bPCMFilterDisableFlag; 209 208 Bool m_loopFilterAcrossTilesEnabledFlag; 210 Int m_iUniformSpacingIdr;209 Bool m_tileUniformSpacingFlag; 211 210 Int m_iNumColumnsMinus1; 212 UInt* m_puiColumnWidth;213 211 Int m_iNumRowsMinus1; 214 UInt* m_puiRowHeight; 212 std::vector<Int> m_tileColumnWidth; 213 std::vector<Int> m_tileRowHeight; 215 214 216 215 Int m_iWaveFrontSynchro; … … 248 247 Int* m_codedPivotValue; 249 248 Int* m_targetPivotValue; 250 #if P0050_KNEE_FUNCTION_SEI251 Bool m_kneeSEIEnabled;252 Int m_kneeSEIId;253 Bool m_kneeSEICancelFlag;254 Bool m_kneeSEIPersistenceFlag;255 Bool m_kneeSEIMappingFlag;256 Int m_kneeSEIInputDrange;257 Int m_kneeSEIInputDispLuminance;258 Int m_kneeSEIOutputDrange;259 Int m_kneeSEIOutputDispLuminance;260 Int m_kneeSEINumKneePointsMinus1;261 Int* m_kneeSEIInputKneePoint;262 Int* m_kneeSEIOutputKneePoint;263 #endif264 #if Q0074_SEI_COLOR_MAPPING265 Char* m_seiColorMappingFile;266 #endif267 249 Int m_framePackingSEIEnabled; 268 250 Int m_framePackingSEIType; … … 276 258 Int m_SOPDescriptionSEIEnabled; 277 259 Int m_scalableNestingSEIEnabled; 278 #if Q0189_TMVP_CONSTRAINTS279 Int m_TMVPConstraintsSEIEnabled;280 #endif281 260 //====== Weighted Prediction ======== 282 261 Bool m_useWeightedPred; //< Use of Weighting Prediction (P_SLICE) … … 389 368 Int m_nCGSLUTBit; 390 369 #endif 370 #if P0050_KNEE_FUNCTION_SEI 371 Bool m_kneeSEIEnabled; 372 Int m_kneeSEIId; 373 Bool m_kneeSEICancelFlag; 374 Bool m_kneeSEIPersistenceFlag; 375 Bool m_kneeSEIMappingFlag; 376 Int m_kneeSEIInputDrange; 377 Int m_kneeSEIInputDispLuminance; 378 Int m_kneeSEIOutputDrange; 379 Int m_kneeSEIOutputDispLuminance; 380 Int m_kneeSEINumKneePointsMinus1; 381 Int* m_kneeSEIInputKneePoint; 382 Int* m_kneeSEIOutputKneePoint; 383 #endif 384 #if Q0074_SEI_COLOR_MAPPING 385 Char* m_seiColorMappingFile; 386 #endif 387 #if Q0189_TMVP_CONSTRAINTS 388 Int m_TMVPConstraintsSEIEnabled; 389 #endif 391 390 #endif //SVC_EXTENSION 392 391 393 392 public: 394 393 TEncCfg() 395 : m_ puiColumnWidth()396 , m_ puiRowHeight()394 : m_tileColumnWidth() 395 , m_tileRowHeight() 397 396 {} 398 397 399 398 virtual ~TEncCfg() 400 { 401 delete[] m_puiColumnWidth; 402 delete[] m_puiRowHeight; 403 } 399 {} 404 400 405 401 Void setProfile(Profile::Name profile) { m_profile = profile; } … … 437 433 Void setMaxRefPicNum ( Int iMaxRefPicNum ) { m_iMaxRefPicNum = iMaxRefPicNum; } 438 434 439 BoolgetMaxTempLayer () { return m_maxTempLayer; }435 Int getMaxTempLayer () { return m_maxTempLayer; } 440 436 Void setMaxTempLayer ( Int maxTempLayer ) { m_maxTempLayer = maxTempLayer; } 441 437 //======== Transform ============= … … 582 578 Void setLFCrossTileBoundaryFlag ( Bool val ) { m_loopFilterAcrossTilesEnabledFlag = val; } 583 579 Bool getLFCrossTileBoundaryFlag () { return m_loopFilterAcrossTilesEnabledFlag; } 584 Void set UniformSpacingIdr ( Int i ) { m_iUniformSpacingIdr = i; }585 Int getUniformSpacingIdr () { return m_iUniformSpacingIdr; }580 Void setTileUniformSpacingFlag ( Bool b ) { m_tileUniformSpacingFlag = b; } 581 Bool getTileUniformSpacingFlag () { return m_tileUniformSpacingFlag; } 586 582 Void setNumColumnsMinus1 ( Int i ) { m_iNumColumnsMinus1 = i; } 587 583 Int getNumColumnsMinus1 () { return m_iNumColumnsMinus1; } 588 Void setColumnWidth ( UInt* columnWidth ) 589 { 590 if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) 591 { 592 Int m_iWidthInCU = ( m_iSourceWidth%g_uiMaxCUWidth ) ? m_iSourceWidth/g_uiMaxCUWidth + 1 : m_iSourceWidth/g_uiMaxCUWidth; 593 m_puiColumnWidth = new UInt[ m_iNumColumnsMinus1 ]; 594 595 for(Int i=0; i<m_iNumColumnsMinus1; i++) 596 { 597 m_puiColumnWidth[i] = columnWidth[i]; 598 printf("col: m_iWidthInCU= %4d i=%4d width= %4d\n",m_iWidthInCU,i,m_puiColumnWidth[i]); //AFU 599 } 600 } 601 } 602 UInt getColumnWidth ( UInt columnidx ) { return *( m_puiColumnWidth + columnidx ); } 584 Void setColumnWidth ( const std::vector<Int>& columnWidth ) { m_tileColumnWidth = columnWidth; } 585 UInt getColumnWidth ( UInt columnIdx ) { return m_tileColumnWidth[columnIdx]; } 603 586 Void setNumRowsMinus1 ( Int i ) { m_iNumRowsMinus1 = i; } 604 587 Int getNumRowsMinus1 () { return m_iNumRowsMinus1; } 605 Void setRowHeight (UInt* rowHeight) 606 { 607 if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 ) 608 { 609 Int m_iHeightInCU = ( m_iSourceHeight%g_uiMaxCUHeight ) ? m_iSourceHeight/g_uiMaxCUHeight + 1 : m_iSourceHeight/g_uiMaxCUHeight; 610 m_puiRowHeight = new UInt[ m_iNumRowsMinus1 ]; 611 612 for(Int i=0; i<m_iNumRowsMinus1; i++) 613 { 614 m_puiRowHeight[i] = rowHeight[i]; 615 printf("row: m_iHeightInCU=%4d i=%4d height=%4d\n",m_iHeightInCU,i,m_puiRowHeight[i]); //AFU 616 } 617 } 618 } 619 UInt getRowHeight ( UInt rowIdx ) { return *( m_puiRowHeight + rowIdx ); } 588 Void setRowHeight ( const std::vector<Int>& rowHeight) { m_tileRowHeight = rowHeight; } 589 UInt getRowHeight ( UInt rowIdx ) { return m_tileRowHeight[rowIdx]; } 620 590 Void xCheckGSParameters(); 621 591 Void setWaveFrontSynchro(Int iWaveFrontSynchro) { m_iWaveFrontSynchro = iWaveFrontSynchro; } … … 865 835 UInt getNumLayer () { return m_numLayer; } 866 836 Void setNumLayer (UInt uiNum) { m_numLayer = uiNum; } 867 Void setConformanceMode (Int mode) { m_conformanceMode = mode; }868 837 Void setConformanceWindow(Window& conformanceWindow ) { m_conformanceWindow = conformanceWindow; } 869 838 Void setElRapSliceTypeB(Int bEnabled) {m_elRapSliceBEnabled = bEnabled;} -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r821 r823 1392 1392 if(pcSlice->isTemporalLayerSwitchingPoint(rcListPic) || pcSlice->getSPS()->getTemporalIdNestingFlag()) 1393 1393 { 1394 #if !Q0108_TSA_STSA1394 #if SVC_EXTENSION && !Q0108_TSA_STSA 1395 1395 if( pcSlice->getLayerId() > 0 ) 1396 1396 { … … 1491 1491 if(isSTSA==true) 1492 1492 { 1493 #if !Q0108_TSA_STSA1493 #if SVC_EXTENSION && !Q0108_TSA_STSA 1494 1494 if( pcSlice->getLayerId() > 0 ) 1495 1495 { … … 2054 2054 UInt uiRealEndAddress = uiExternalAddress*pcPic->getNumPartInCU()+uiInternalAddress; 2055 2055 2056 UInt uiCummulativeTileWidth;2057 UInt uiCummulativeTileHeight;2058 2056 Int p, j; 2059 2057 UInt uiEncCUAddr; 2060 2058 2061 //set NumColumnsMinus1 and NumRowsMinus1 2062 pcPic->getPicSym()->setNumColumnsMinus1( pcSlice->getPPS()->getNumColumnsMinus1() ); 2063 pcPic->getPicSym()->setNumRowsMinus1( pcSlice->getPPS()->getNumRowsMinus1() ); 2064 2065 //create the TComTileArray 2066 pcPic->getPicSym()->xCreateTComTileArray(); 2067 2068 if( pcSlice->getPPS()->getUniformSpacingFlag() == 1 ) 2069 { 2070 //set the width for each tile 2071 for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++) 2072 { 2073 for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1()+1; p++) 2074 { 2075 pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )-> 2076 setTileWidth( (p+1)*pcPic->getPicSym()->getFrameWidthInCU()/(pcPic->getPicSym()->getNumColumnsMinus1()+1) 2077 - (p*pcPic->getPicSym()->getFrameWidthInCU())/(pcPic->getPicSym()->getNumColumnsMinus1()+1) ); 2078 } 2079 } 2080 2081 //set the height for each tile 2082 for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++) 2083 { 2084 for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1()+1; p++) 2085 { 2086 pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )-> 2087 setTileHeight( (p+1)*pcPic->getPicSym()->getFrameHeightInCU()/(pcPic->getPicSym()->getNumRowsMinus1()+1) 2088 - (p*pcPic->getPicSym()->getFrameHeightInCU())/(pcPic->getPicSym()->getNumRowsMinus1()+1) ); 2089 } 2090 } 2091 } 2092 else 2093 { 2094 //set the width for each tile 2095 for(j=0; j < pcPic->getPicSym()->getNumRowsMinus1()+1; j++) 2096 { 2097 uiCummulativeTileWidth = 0; 2098 for(p=0; p < pcPic->getPicSym()->getNumColumnsMinus1(); p++) 2099 { 2100 pcPic->getPicSym()->getTComTile( j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p )->setTileWidth( pcSlice->getPPS()->getColumnWidth(p) ); 2101 uiCummulativeTileWidth += pcSlice->getPPS()->getColumnWidth(p); 2102 } 2103 pcPic->getPicSym()->getTComTile(j * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + p)->setTileWidth( pcPic->getPicSym()->getFrameWidthInCU()-uiCummulativeTileWidth ); 2104 } 2105 2106 //set the height for each tile 2107 for(j=0; j < pcPic->getPicSym()->getNumColumnsMinus1()+1; j++) 2108 { 2109 uiCummulativeTileHeight = 0; 2110 for(p=0; p < pcPic->getPicSym()->getNumRowsMinus1(); p++) 2111 { 2112 pcPic->getPicSym()->getTComTile( p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j )->setTileHeight( pcSlice->getPPS()->getRowHeight(p) ); 2113 uiCummulativeTileHeight += pcSlice->getPPS()->getRowHeight(p); 2114 } 2115 pcPic->getPicSym()->getTComTile(p * (pcPic->getPicSym()->getNumColumnsMinus1()+1) + j)->setTileHeight( pcPic->getPicSym()->getFrameHeightInCU()-uiCummulativeTileHeight ); 2116 } 2117 } 2118 //intialize each tile of the current picture 2119 pcPic->getPicSym()->xInitTiles(); 2059 pcPic->getPicSym()->initTiles(pcSlice->getPPS()); 2120 2060 2121 2061 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI … … 2783 2723 2784 2724 #if SETTING_NO_OUT_PIC_PRIOR 2725 pcSlice->setNoRaslOutputFlag(false); 2785 2726 if (pcSlice->isIRAP()) 2786 2727 { … … 2790 2731 } 2791 2732 //the inference for NoOutputPriorPicsFlag 2733 // KJS: This cannot happen at the encoder 2792 2734 if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag()) 2793 2735 { … … 3679 3621 assert (m_iGopSize > 0); 3680 3622 3681 return;3682 }3683 3684 Void TEncGOP::xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut )3685 {3686 assert( iNumPicRcvd > 0 );3687 // Exception for the first frame3688 if ( iPOCLast == 0 )3689 {3690 m_iGopSize = 1;3691 }3692 else3693 m_iGopSize = m_pcCfg->getGOPSize();3694 3695 assert (m_iGopSize > 0);3696 3697 3623 return; 3698 3624 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r815 r823 207 207 protected: 208 208 209 Void xInitGOP( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Bool isField ); 210 Void xInitGOP ( Int iPOC, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut ); 211 Void xGetBuffer ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, Int pocCurr, Bool isField ); 209 Void xInitGOP ( Int iPOCLast, Int iNumPicRcvd, TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, bool isField ); 210 Void xGetBuffer ( TComList<TComPic*>& rcListPic, TComList<TComPicYuv*>& rcListPicYuvRecOut, Int iNumPicRcvd, Int iTimeOffset, TComPic*& rpcPic, TComPicYuv*& rpcPicYuvRecOut, Int pocCurr, bool isField ); 212 211 213 212 Void xCalculateAddPSNR ( TComPic* pcPic, TComPicYuv* pcPicD, const AccessUnit&, Double dEncTime ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r815 r823 4896 4896 if( bCodeChroma ) 4897 4897 { 4898 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 4899 m_pcEntropyCoder->resetBits(); 4898 4900 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode ); 4899 4901 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U ); 4900 uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsY;4902 uiSingleBitsU = m_pcEntropyCoder->getNumberOfWrittenBits(); 4901 4903 4904 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 4905 m_pcEntropyCoder->resetBits(); 4902 4906 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode ); 4903 4907 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V ); 4904 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - ( uiSingleBitsY + uiSingleBitsU );4908 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits(); 4905 4909 } 4906 4910 … … 4939 4943 { 4940 4944 const Double singleCostY = m_pcRdCost->calcRdCost( uiSingleBitsY, uiNonzeroDistY ); 4945 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 4941 4946 m_pcEntropyCoder->resetBits(); 4942 4947 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA, uiTrMode ); … … 4964 4969 else if( checkTransformSkipY ) 4965 4970 { 4971 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 4966 4972 m_pcEntropyCoder->resetBits(); 4967 4973 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_LUMA, uiTrMode ); … … 5015 5021 { 5016 5022 const Double dSingleCostU = m_pcRdCost->calcRdCost( uiSingleBitsU, uiNonzeroDistU ); 5023 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 5017 5024 m_pcEntropyCoder->resetBits(); 5018 5025 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U, uiTrMode ); … … 5040 5047 else if( checkTransformSkipUV ) 5041 5048 { 5049 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 5042 5050 m_pcEntropyCoder->resetBits(); 5043 5051 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_U, uiTrMode ); … … 5084 5092 { 5085 5093 const Double dSingleCostV = m_pcRdCost->calcRdCost( uiSingleBitsV, uiNonzeroDistV ); 5094 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 5086 5095 m_pcEntropyCoder->resetBits(); 5087 5096 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V, uiTrMode ); … … 5109 5118 else if( checkTransformSkipUV ) 5110 5119 { 5120 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 5111 5121 m_pcEntropyCoder->resetBits(); 5112 5122 m_pcEntropyCoder->encodeQtCbfZero( pcCU, TEXT_CHROMA_V, uiTrMode ); … … 5287 5297 pcCU->setCbfSubParts( uiAbsSumTransformSkipV ? uiSetCbf : 0, TEXT_CHROMA_V, uiAbsPartIdx, pcCU->getDepth(0)+uiTrModeC ); 5288 5298 5289 m_pcEntropyCoder->resetBits();5290 5299 uiSingleBitsU = 0; 5291 5300 uiSingleBitsV = 0; … … 5293 5302 if( uiAbsSumTransformSkipU ) 5294 5303 { 5304 m_pcEntropyCoder->resetBits(); 5295 5305 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrMode ); 5296 5306 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrU, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_U ); … … 5335 5345 if( uiAbsSumTransformSkipV ) 5336 5346 { 5347 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 5348 m_pcEntropyCoder->resetBits(); 5337 5349 m_pcEntropyCoder->encodeQtCbf ( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrMode ); 5338 5350 m_pcEntropyCoder->encodeCoeffNxN( pcCU, pcCoeffCurrV, uiAbsPartIdx, trWidthC, trHeightC, uiDepth, TEXT_CHROMA_V ); 5339 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits() - uiSingleBitsU;5351 uiSingleBitsV = m_pcEntropyCoder->getNumberOfWrittenBits(); 5340 5352 5341 5353 curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r815 r823 1041 1041 { 1042 1042 TComVUI* pcVUI = m_cSPS.getVuiParameters(); 1043 pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioI dc() != -1);1043 pcVUI->setAspectRatioInfoPresentFlag(getAspectRatioInfoPresentFlag()); 1044 1044 pcVUI->setAspectRatioIdc(getAspectRatioIdc()); 1045 1045 pcVUI->setSarWidth(getSarWidth()); … … 1477 1477 Void TEncTop::xInitPPSforTiles() 1478 1478 { 1479 m_cPPS.set UniformSpacingFlag( m_iUniformSpacingIdr);1480 m_cPPS.setNum ColumnsMinus1( m_iNumColumnsMinus1 );1481 m_cPPS.setNum RowsMinus1( m_iNumRowsMinus1 );1482 if( m_iUniformSpacingIdr == 0)1483 { 1484 m_cPPS.set ColumnWidth( m_puiColumnWidth );1485 m_cPPS.set RowHeight( m_puiRowHeight );1479 m_cPPS.setTileUniformSpacingFlag( m_tileUniformSpacingFlag ); 1480 m_cPPS.setNumTileColumnsMinus1( m_iNumColumnsMinus1 ); 1481 m_cPPS.setNumTileRowsMinus1( m_iNumRowsMinus1 ); 1482 if( !m_tileUniformSpacingFlag ) 1483 { 1484 m_cPPS.setTileColumnWidth( m_tileColumnWidth ); 1485 m_cPPS.setTileRowHeight( m_tileRowHeight ); 1486 1486 } 1487 1487 m_cPPS.setLoopFilterAcrossTilesEnabledFlag( m_loopFilterAcrossTilesEnabledFlag ); 1488 1488 1489 1489 // # substreams is "per tile" when tiles are independent. 1490 if (m_iWaveFrontSynchro 1491 ) 1490 if (m_iWaveFrontSynchro ) 1492 1491 { 1493 1492 m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)); … … 1515 1514 } 1516 1515 1517 if( m_iNumColumnsMinus1 && m_iUniformSpacingIdr==0)1516 if( m_iNumColumnsMinus1 && !m_tileUniformSpacingFlag ) 1518 1517 { 1519 1518 for(Int i=0; i<m_iNumColumnsMinus1; i++) 1520 1519 { 1521 uiCummulativeColumnWidth += m_ puiColumnWidth[i];1520 uiCummulativeColumnWidth += m_tileColumnWidth[i]; 1522 1521 } 1523 1522 … … 1542 1541 } 1543 1542 1544 if( m_iNumRowsMinus1 && m_iUniformSpacingIdr==0)1543 if( m_iNumRowsMinus1 && !m_tileUniformSpacingFlag ) 1545 1544 { 1546 1545 for(Int i=0; i<m_iNumRowsMinus1; i++) 1547 { 1548 uiCummulativeRowHeight += m_puiRowHeight[i]; 1549 } 1546 uiCummulativeRowHeight += m_tileRowHeight[i]; 1550 1547 1551 1548 if( uiCummulativeRowHeight >= iHeightInCU ) -
branches/SHM-dev/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
r595 r823 470 470 Bool retval = true; 471 471 472 if ((width==0)||(height==0)) 473 { 474 printf ("\nWarning: writing %d x %d luma sample output picture!", width, height); 475 } 476 472 477 if (m_bitDepthShiftY != 0 || m_bitDepthShiftC != 0) 473 478 { … … 567 572 568 573 Bool retval = true; 574 575 if ((width==0)||(height==0)) 576 { 577 printf ("\nWarning: writing %d x %d luma sample output picture!", width, height); 578 } 569 579 570 580 if (m_bitDepthShiftY != 0 || m_bitDepthShiftC != 0)
Note: See TracChangeset for help on using the changeset viewer.