Skip to content
Snippets Groups Projects
Commit 3b6edd83 authored by Yan Zhang's avatar Yan Zhang Committed by Frank Bossen
Browse files

JVET-L0377 AMVR Rounding Align

parent 51ce2f5b
No related branches found
No related tags found
No related merge requests found
......@@ -47,9 +47,13 @@ void roundMV( Mv & rMV, unsigned imvShift )
if (rMV.highPrec) imvShift += VCEG_AZ07_MV_ADD_PRECISION_BIT_FOR_STORE;
#endif
int offset = 1 << ( imvShift - 1 );
#if JVET_L0377_AMVR_ROUNDING_ALIGN
rMV.setHor(rMV.getHor() >= 0 ? ((rMV.getHor() + offset) >> imvShift) << imvShift : -(((-rMV.getHor() + offset) >> imvShift)) << imvShift);
rMV.setVer(rMV.getVer() >= 0 ? ((rMV.getVer() + offset) >> imvShift) << imvShift : -(((-rMV.getVer() + offset) >> imvShift)) << imvShift);
#else
rMV.setHor( ( ( rMV.getHor() + offset ) >> imvShift ) << imvShift );
rMV.setVer( ( ( rMV.getVer() + offset ) >> imvShift ) << imvShift );
#endif
}
void roundAffineMv( int& mvx, int& mvy, int nShift )
......
......@@ -50,6 +50,8 @@
#include <assert.h>
#include <cassert>
#define JVET_L0377_AMVR_ROUNDING_ALIGN 1 // Align AMVR rounding for AMVP candidate
#define JVET_L0285_8BIT_TRANSFORM_CORE 1 // Primary transform using 8-bit cores
#define JVET_L0081_VPDU_SPLIT_CONSTRAINTS 1 // VPDU constraints for binary and ternary partitions
......
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