Changeset 223 in SHVCSoftware


Ignore:
Timestamp:
22 May 2013, 00:58:08 (12 years ago)
Author:
seregin
Message:

copy instead of filtering for ratio 1x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0avc-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r222 r223  
    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;
     
    720758  }
    721759#endif
     760  }
    722761}
    723762#endif //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.