diff options
author | Frank Plowman <post@frankplowman.com> | 2024-06-25 18:02:02 +0100 |
---|---|---|
committer | Nuo Mi <nuomi2021@gmail.com> | 2024-06-27 20:38:34 +0800 |
commit | d79c926ab6282f225de8d1a39a5234ebc4d38451 (patch) | |
tree | 11c8f6c1c358fd3644abf0342b0d0ee85b44569e /libavcodec/vvc/mvs.h | |
parent | c917c423e07075862311f930786c924290f84430 (diff) | |
download | ffmpeg-d79c926ab6282f225de8d1a39a5234ebc4d38451.tar.gz |
lavc/vvc: Validate IBC block vector
From H.266 (V3) (09/2023) p. 321:
It is a requirement of bitstream conformance that the luma block
vector bvL shall obey the following constraints:
- CtbSizeY is greater than or equal to
((yCb + (bvL[ 1 ] >> 4)) & (CtbSizeY − 1)) + cbHeight
This patch checks this is true, which fixes crashes on fuzzed
bitstreams.
Signed-off-by: Frank Plowman <post@frankplowman.com>
Diffstat (limited to 'libavcodec/vvc/mvs.h')
-rw-r--r-- | libavcodec/vvc/mvs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vvc/mvs.h b/libavcodec/vvc/mvs.h index 3f0c8b08e9..b2242b2a4d 100644 --- a/libavcodec/vvc/mvs.h +++ b/libavcodec/vvc/mvs.h @@ -30,9 +30,9 @@ void ff_vvc_clip_mv(Mv *mv); void ff_vvc_mv_scale(Mv *dst, const Mv *src, int td, int tb); void ff_vvc_luma_mv_merge_mode(VVCLocalContext *lc, int merge_idx, int ciip_flag, MvField *mv); void ff_vvc_luma_mv_merge_gpm(VVCLocalContext *lc, const int merge_gpm_idx[2], MvField *mv); -void ff_vvc_luma_mv_merge_ibc(VVCLocalContext *lc, int merge_idx, Mv *mv); +int ff_vvc_luma_mv_merge_ibc(VVCLocalContext *lc, int merge_idx, Mv *mv); void ff_vvc_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi); -void ff_vvc_mvp_ibc(VVCLocalContext *lc, int mvp_l0_flag, int amvr_shift, Mv *mv); +int ff_vvc_mvp_ibc(VVCLocalContext *lc, int mvp_l0_flag, int amvr_shift, Mv *mv); void ff_vvc_sb_mv_merge_mode(VVCLocalContext *lc, int merge_subblock_idx, PredictionUnit *pu); void ff_vvc_affine_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo* mi); void ff_vvc_store_sb_mvs(const VVCLocalContext *lc, PredictionUnit *pu); |