History

avcodec/vvc/refs: fix negative pps_scaling_win offsets

The spec seems to allow these to be negative Fixes: left shift of negative value -15 Fixes: 392687035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-6559804532785152

Michael Niedermayer committed 1 year ago

Commit 33679f51 parent a750bcb1 file · +4 −4Browse files

Unified · Split

libavcodec/vvc/refs.c+4−4
@@ -147,10 +147,10 @@ static VVCFrame *alloc_frame(VVCContext *s, VVCFrameContext *fc) · 146 unmodified lines
147 for (int j = 0; j < frame->ctb_count; j++)147 for (int j = 0; j < frame->ctb_count; j++)
148 frame->rpl_tab[j] = frame->rpl;148 frame->rpl_tab[j] = frame->rpl;
149 149
150 win->left_offset = pps->r->pps_scaling_win_left_offset << sps->hshift[CHROMA];150 win->left_offset = pps->r->pps_scaling_win_left_offset * (1 << sps->hshift[CHROMA]);
151 win->right_offset = pps->r->pps_scaling_win_right_offset << sps->hshift[CHROMA];151 win->right_offset = pps->r->pps_scaling_win_right_offset * (1 << sps->hshift[CHROMA]);
152 win->top_offset = pps->r->pps_scaling_win_top_offset << sps->vshift[CHROMA];152 win->top_offset = pps->r->pps_scaling_win_top_offset * (1 << sps->vshift[CHROMA]);
153 win->bottom_offset = pps->r->pps_scaling_win_bottom_offset << sps->vshift[CHROMA];153 win->bottom_offset = pps->r->pps_scaling_win_bottom_offset * (1 << sps->vshift[CHROMA]);
154 frame->ref_width = pps->r->pps_pic_width_in_luma_samples - win->left_offset - win->right_offset;154 frame->ref_width = pps->r->pps_pic_width_in_luma_samples - win->left_offset - win->right_offset;
155 frame->ref_height = pps->r->pps_pic_height_in_luma_samples - win->bottom_offset - win->top_offset;155 frame->ref_height = pps->r->pps_pic_height_in_luma_samples - win->bottom_offset - win->top_offset;
156 156

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t