Skip to content
Snippets Groups Projects
Commit f79cf313 authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'fix_ticket_169' into 'master'

Fixed the bugs of Ticket #169 in IntraPrediction.cpp

See merge request jvet/VVCSoftware_VTM!251
parents 961ab87f 9b46cbe9
No related branches found
No related tags found
No related merge requests found
...@@ -311,8 +311,8 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co ...@@ -311,8 +311,8 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co
const int multiRefIdx = (compID == COMPONENT_Y) ? pu.multiRefIdx : 0; const int multiRefIdx = (compID == COMPONENT_Y) ? pu.multiRefIdx : 0;
#if JVET_M0102_INTRA_SUBPARTITIONS #if JVET_M0102_INTRA_SUBPARTITIONS
const bool useISP = pu.cu->ispMode && isLuma( compID ); const bool useISP = pu.cu->ispMode && isLuma( compID );
const int whRatio = useISP ? std::max( unsigned( 1 ), cuSize.width / cuSize.height ) : std::max( unsigned( 1 ), cuSize.width / cuSize.height ); const int whRatio = useISP ? std::max( unsigned( 1 ), cuSize.width / cuSize.height ) : std::max( 1, iWidth / iHeight );
const int hwRatio = useISP ? std::max( unsigned( 1 ), cuSize.height / cuSize.width ) : std::max( unsigned( 1 ), cuSize.height / cuSize.width ); const int hwRatio = useISP ? std::max( unsigned( 1 ), cuSize.height / cuSize.width ) : std::max( 1, iHeight / iWidth );
#else #else
int whRatio = std::max(1, iWidth / iHeight); int whRatio = std::max(1, iWidth / iHeight);
int hwRatio = std::max(1, iHeight / iWidth); int hwRatio = std::max(1, iHeight / iWidth);
...@@ -330,7 +330,7 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co ...@@ -330,7 +330,7 @@ void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, co
case(2): case(2):
case(DIA_IDX): case(DIA_IDX):
case(VDIA_IDX): case(VDIA_IDX):
if (getWideAngle(iWidth, iHeight, uiDirMode) == static_cast<int>(uiDirMode)) // check if uiDirMode is not wide-angle if (getWideAngle(useISP ? cuSize.width : iWidth, useISP ? cuSize.height : iHeight, uiDirMode) == static_cast<int>(uiDirMode)) // check if uiDirMode is not wide-angle
{ {
#if JVET_M0102_INTRA_SUBPARTITIONS #if JVET_M0102_INTRA_SUBPARTITIONS
xPredIntraAng(CPelBuf(ptrSrc, srcStride, srcHStride), piPred, channelType, uiDirMode, clpRng, *pu.cs->sps, multiRefIdx, useFilteredPredSamples, useISP, cuSize ); xPredIntraAng(CPelBuf(ptrSrc, srcStride, srcHStride), piPred, channelType, uiDirMode, clpRng, *pu.cs->sps, multiRefIdx, useFilteredPredSamples, useISP, cuSize );
...@@ -609,7 +609,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch ...@@ -609,7 +609,7 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
CHECK( !( dirMode > DC_IDX && dirMode < NUM_LUMA_MODE ), "Invalid intra dir" ); CHECK( !( dirMode > DC_IDX && dirMode < NUM_LUMA_MODE ), "Invalid intra dir" );
#if JVET_M0102_INTRA_SUBPARTITIONS #if JVET_M0102_INTRA_SUBPARTITIONS
int predMode = useISP ? getWideAngle( cuSize.width, cuSize.height, dirMode ) : getWideAngle( cuSize.width, cuSize.height, dirMode ); int predMode = useISP ? getWideAngle( cuSize.width, cuSize.height, dirMode ) : getWideAngle( width, height, dirMode );
#else #else
int predMode = getWideAngle(width, height, dirMode); int predMode = getWideAngle(width, height, dirMode);
#endif #endif
...@@ -637,8 +637,8 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch ...@@ -637,8 +637,8 @@ void IntraPrediction::xPredIntraAng( const CPelBuf &pSrc, PelBuf &pDst, const Ch
Pel refLeft [2 * MAX_CU_SIZE + 3 + 33 * MAX_REF_LINE_IDX]; Pel refLeft [2 * MAX_CU_SIZE + 3 + 33 * MAX_REF_LINE_IDX];
#if JVET_M0102_INTRA_SUBPARTITIONS #if JVET_M0102_INTRA_SUBPARTITIONS
const int whRatio = useISP ? std::max( unsigned( 1 ), cuSize.width / cuSize.height ) : std::max( unsigned( 1 ), cuSize.width / cuSize.height ); const int whRatio = useISP ? std::max( unsigned( 1 ), cuSize.width / cuSize.height ) : std::max( 1, width / height );
const int hwRatio = useISP ? std::max( unsigned( 1 ), cuSize.height / cuSize.width ) : std::max( unsigned( 1 ), cuSize.height / cuSize.width ); const int hwRatio = useISP ? std::max( unsigned( 1 ), cuSize.height / cuSize.width ) : std::max( 1, height / width );
#else #else
int whRatio = std::max(1, width / height); int whRatio = std::max(1, width / height);
int hwRatio = std::max(1, height / width); int hwRatio = std::max(1, height / width);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment