Hi : I have created a patch, but I'm not sure if the patch is correct because I don't have the spec of wmv2. The following code which is in ff_mspel_motion function seems to limit the mvx and mvy to be integer to make sure the prediction right and to void reading overflow. But I'm not sure, maybe this is just specified by the spec of wmv2. if (src_x <= -16 || src_x >= s->width) dxy &= ~3; if (src_y <= -16 || src_y >= s->height) dxy &= ~4;
If the goal of the up code is the former one, the following code can play the same role, So I'm confused. if (src_x < 1 || src_y < 1 || src_x + 17 >= s->h_edge_pos || src_y + h + 1 >= v_edge_pos) { s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr - 1 - s->linesize, s->linesize, s->linesize, 19, 19, src_x - 1, src_y - 1, s->h_edge_pos, s->v_edge_pos); ptr = s->edge_emu_buffer + 1 + s->linesize; emu = 1; } If this code is used to make sure the prediction right and to void reading overflow, I think my patch should applied or just remove this code. My patch is attached, please check it. Best Regards Di Wu
0001-wmv2-Limit-the-mvx-and-mvy-to-be-integer-in-some-con.patch
Description: Binary data
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel