Changeset 233 in SHVCSoftware for branches/SHM-2.1-dev/source


Ignore:
Timestamp:
23 May 2013, 21:02:18 (12 years ago)
Author:
seregin
Message:

merge with the trunk

Location:
branches/SHM-2.1-dev/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-dev/source

  • branches/SHM-2.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r214 r233  
    209209 
    210210#endif
    211  
     211
     212  if( widthEL == widthBL && heightEL == heightBL )
     213  {
     214    piSrcY = piSrcBufY - scalEL.getWindowLeftOffset() - scalEL.getWindowTopOffset() * strideEL;
     215    piDstY = piDstBufY;
     216    for( i = 0; i < heightEL; i++ )
     217    {
     218      memcpy( piDstY, piSrcY, sizeof(Pel) * widthBL );
     219      piSrcY += strideBL;
     220      piDstY += strideEL;
     221    }
     222
     223    widthEL  >>= 1;
     224    heightEL >>= 1;
     225
     226    widthBL  >>= 1;
     227    heightBL >>= 1;
     228
     229    strideBL  = pcBasePic->getCStride();
     230    strideEL  = pcUsPic->getCStride();
     231
     232    piSrcU = piSrcBufU - ( scalEL.getWindowLeftOffset() >> 1 ) - ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
     233    piSrcV = piSrcBufV - ( scalEL.getWindowLeftOffset() >> 1 ) - ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
     234
     235    piDstU = piDstBufU;
     236    piDstV = piDstBufV;
     237
     238    for( i = 0; i < heightEL; i++ )
     239    {
     240      memcpy( piDstU, piSrcU, sizeof(Pel) * widthBL );
     241      memcpy( piDstV, piSrcV, sizeof(Pel) * widthBL );
     242      piSrcU += strideBL;
     243      piSrcV += strideBL;
     244      piDstU += strideEL;
     245      piDstV += strideEL;
     246    }
     247  }
     248  else
     249  {
    212250#if PHASE_DERIVATION_IN_INTEGER
    213251  Int refPos16 = 0;
     
    345383#endif
    346384#if ILP_DECODED_PICTURE
    347   widthBL   = pcBasePic->getWidth ();
    348   heightBL  = pcBasePic->getHeight();
    349 
    350385  widthEL   = pcUsPic->getWidth ();
    351386  heightEL  = pcUsPic->getHeight();
     387
     388  widthBL   = pcBasePic->getWidth ();
     389  heightBL  = min<Int>( pcBasePic->getHeight(), heightEL );
    352390#endif
    353391#if SCALED_REF_LAYER_OFFSETS
     
    503541
    504542#if ILP_DECODED_PICTURE
    505   widthBL   = pcBasePic->getWidth () >> 1;
    506   heightBL  = pcBasePic->getHeight() >> 1;
    507 
    508543  widthEL   = pcUsPic->getWidth () >> 1;
    509544  heightEL  = pcUsPic->getHeight() >> 1;
     545
     546  widthBL   = pcBasePic->getWidth () >> 1;
     547  heightBL  = min<Int>( pcBasePic->getHeight(), heightEL );
    510548#endif
    511549
     
    720758  }
    721759#endif
     760  }
    722761}
    723762#endif //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.