Skip to content

Commit d224a25

Browse files
author
Isaac
committed
feat: gate MV range cap on bSubcodecMode
1 parent 96daaaa commit d224a25

File tree

1 file changed

+7
-0
lines changed
  • third-party/openh264/third_party/openh264/src/codec/encoder/core/src

1 file changed

+7
-0
lines changed

third-party/openh264/third_party/openh264/src/codec/encoder/core/src/encoder_ext.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,13 @@ void GetMvMvdRange (SWelsSvcCodingParam* pParam, int32_t& iMvRange, int32_t& iMv
15261526

15271527
iMvRange = WELS_MIN (iMvRange, iFixMvRange);
15281528

1529+
// [subcodec] Limit MV range to 16 pixels for sprite compositing.
1530+
// Sprites use a 16px padded canvas; tighter MV range prevents referencing
1531+
// pixels outside the padding that will differ in the composite frame.
1532+
if (pParam->bSubcodecMode) {
1533+
iMvRange = WELS_MIN (iMvRange, 16);
1534+
}
1535+
15291536
iMvdRange = (iMvRange + 1) << 1;
15301537

15311538
iMvdRange = WELS_MIN (iMvdRange, iFixMvdRange);

0 commit comments

Comments
 (0)