mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vc1dec: Invoke edge_emulation regardless of MV precision
In VC-1 interlaced field pictures, chroma motion vectors can extend beyond picture boundary even if luma vectors are bounded. The problem shows up only for hpel interpolated MVs, and may be due to the way motion vectors are scaled / cropped. Thanks to Konstantin Shishkov for suggesting the fix. This fixes long-known segfaults in MC-VC1.ts from videolan streams archive. Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
This commit is contained in:
parent
ca844b7be9
commit
8379ea5e9f
@ -1880,8 +1880,8 @@ static void vc1_interp_mc(VC1Context *v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (v->rangeredfrm || s->h_edge_pos < 22 || v_edge_pos < 22
|
if (v->rangeredfrm || s->h_edge_pos < 22 || v_edge_pos < 22
|
||||||
|| (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx & 3) - 16 - s->mspel * 3
|
|| (unsigned)(src_x - 1) > s->h_edge_pos - (mx & 3) - 16 - 3
|
||||||
|| (unsigned)(src_y - s->mspel) > v_edge_pos - (my & 3) - 16 - s->mspel * 3) {
|
|| (unsigned)(src_y - 1) > v_edge_pos - (my & 3) - 16 - 3) {
|
||||||
uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize;
|
uint8_t *uvbuf = s->edge_emu_buffer + 19 * s->linesize;
|
||||||
|
|
||||||
srcY -= s->mspel * (1 + s->linesize);
|
srcY -= s->mspel * (1 + s->linesize);
|
||||||
|
Loading…
Reference in New Issue
Block a user