Skip to content

Ensuring the mvdLX is compliant - #939

Merged
kirithika7 merged 1 commit into
Multicorewareinc:masterfrom
Mr-Z-2697:fix-mvd-range
Aug 12, 2026
Merged

Ensuring the mvdLX is compliant#939
kirithika7 merged 1 commit into
Multicorewareinc:masterfrom
Mr-Z-2697:fix-mvd-range

Conversation

@Mr-Z-2697

Copy link
Copy Markdown
Contributor

The value of the mvdLX should be in the range of [-2^15, 2^15-1], as specified in H.265 7.4.9.9 Motion vector difference semantics. However there was no safety check in this area, the mvdLX have been observed to exceed the range, under some rare circumstances.

This casting will cause overflow and underflow, should the mvd exceeds the int16_t range. But because of the decoding process Equation 8-94 to 8-97, and the MV itself having the range of [-2^15, 2^15-1], the decoded MV will still be correct, and mvdLX will be in the legal range.

The value of the mvdLX should be in the range of [-2^15, 2^15-1], as specified in H.265 7.4.9.9 Motion vector difference semantics.
However there was no safety check in this area, the mvdLX have been observed to exceed the range, under some rare circumstances.

This casting will cause overflow and underflow, should the mvd exceeds the int16_t range.
But because of the decoding process Equation 8-94 to 8-97, and the MV itself having the range of [-2^15, 2^15-1], the decoded MV will still be correct, and mvdLX will be in the legal range.
@kirithika7
kirithika7 requested a review from mcw-Lavanya August 7, 2026 11:25
@kirithika7
kirithika7 merged commit 62728cd into Multicorewareinc:master Aug 12, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants