source/Lib/CommonLib/InterPrediction.cpp | 6 +++---
source/Lib/CommonLib/Picture.cpp | 2 ++
source/Lib/CommonLib/Picture.h | 8 ++++++--
source/Lib/CommonLib/Slice.cpp | 6 +++++-
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/source/Lib/CommonLib/InterPrediction.cpp b/source/Lib/CommonLib/InterPrediction.cpp
index e5f4322c..111ddb5a 100644
a
|
b
|
void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R |
305 | 305 | int fstStep = (!verMC ? puHeight : puWidth); |
306 | 306 | int secStep = (!verMC ? puWidth : puHeight); |
307 | 307 | |
308 | | pu.refIdx[0] = 0; pu.refIdx[1] = pu.cs->slice->getSliceType() == B_SLICE ? 0 : -1; |
309 | | bool scaled = !PU::isRefPicSameSize( pu ); |
310 | | |
311 | 308 | m_subPuMC = true; |
312 | 309 | |
313 | 310 | for (int fstDim = fstStart; fstDim < fstEnd; fstDim += fstStep) |
… |
… |
void InterPrediction::xSubPuMC( PredictionUnit& pu, PelUnitBuf& predBuf, const R |
324 | 321 | while (later < secEnd) |
325 | 322 | { |
326 | 323 | const MotionInfo &laterMi = !verMC ? pu.getMotionInfo(Position{ later, fstDim }) : pu.getMotionInfo(Position{ fstDim, later }); |
| 324 | |
| 325 | bool scaled = ( curMi.refIdx[0] < 0 ? false : pu.cs->slice->getScalingRatio( REF_PIC_LIST_0, curMi.refIdx[0] ) != SCALE_1X ) || ( curMi.refIdx[1] < 0 ? false : pu.cs->slice->getScalingRatio( REF_PIC_LIST_1, curMi.refIdx[1] ) != SCALE_1X ); |
| 326 | |
327 | 327 | if (!scaled && laterMi == curMi) |
328 | 328 | { |
329 | 329 | length += secStep; |
diff --git a/source/Lib/CommonLib/Picture.cpp b/source/Lib/CommonLib/Picture.cpp
index b722229d..e22d6e88 100644
a
|
b
|
void Picture::finalInit( const SPS& sps, const PPS& pps, APS** alfApss, APS* lmc |
982 | 982 | cs->scalinglistAps = scalingListAps; |
983 | 983 | cs->pcv = pps.pcv; |
984 | 984 | m_conformanceWindow = pps.getConformanceWindow(); |
| 985 | m_picWidthInLumaSamples = pps.getPicWidthInLumaSamples(); |
| 986 | m_picHeightInLumaSamples = pps.getPicHeightInLumaSamples(); |
985 | 987 | |
986 | 988 | brickMap = new BrickMap; |
987 | 989 | brickMap->create( sps, pps ); |
diff --git a/source/Lib/CommonLib/Picture.h b/source/Lib/CommonLib/Picture.h
index 3f966660..bf5031c5 100644
a
|
b
|
struct Picture : public UnitArea |
259 | 259 | |
260 | 260 | private: |
261 | 261 | Window m_conformanceWindow; |
| 262 | uint32_t m_picWidthInLumaSamples; |
| 263 | uint32_t m_picHeightInLumaSamples; |
262 | 264 | |
263 | 265 | public: |
264 | 266 | bool m_bIsBorderExtended; |
… |
… |
public: |
299 | 301 | std::deque<Slice*> slices; |
300 | 302 | SEIMessages SEIs; |
301 | 303 | |
302 | | uint32_t getPicWidthInLumaSamples() const { return getRecoBuf( COMPONENT_Y ).width; } |
303 | | uint32_t getPicHeightInLumaSamples() const { return getRecoBuf( COMPONENT_Y ).height; } |
| 304 | uint32_t getPicWidthInLumaSamples() const { return m_picWidthInLumaSamples; } |
| 305 | uint32_t getPicHeightInLumaSamples() const { return m_picHeightInLumaSamples; } |
| 306 | void setPicWidthInLumaSamples( uint32_t u ) { m_picWidthInLumaSamples = u; } |
| 307 | void setPicHeightInLumaSamples( uint32_t u ) { m_picHeightInLumaSamples = u; } |
304 | 308 | |
305 | 309 | Window& getConformanceWindow() { return m_conformanceWindow; } |
306 | 310 | const Window& getConformanceWindow() const { return m_conformanceWindow; } |
diff --git a/source/Lib/CommonLib/Slice.cpp b/source/Lib/CommonLib/Slice.cpp
index bb648125..ca413325 100644
a
|
b
|
void Slice::scaleRefPicList( Picture *scaledRefPic[ ], APS** apss, APS* lmcsAps, |
2887 | 2887 | scaledRefPic[j]->reconstructed = false; |
2888 | 2888 | scaledRefPic[j]->referenced = true; |
2889 | 2889 | |
2890 | | scaledRefPic[ j ]->finalInit( *sps, *pps, apss, lmcsAps, scalingListAps ); |
| 2890 | scaledRefPic[j]->finalInit( *sps, *pps, apss, lmcsAps, scalingListAps ); |
| 2891 | |
| 2892 | // set unscaled picture width and height, scaled reference picture should have unscaled ratio |
| 2893 | scaledRefPic[j]->setPicWidthInLumaSamples( m_apcRefPicList[refList][rIdx]->getPicWidthInLumaSamples() ); |
| 2894 | scaledRefPic[j]->setPicHeightInLumaSamples( m_apcRefPicList[refList][rIdx]->getPicHeightInLumaSamples() ); |
2891 | 2895 | |
2892 | 2896 | scaledRefPic[j]->poc = -1; |
2893 | 2897 | |