[MPlayer-dev-eng] [PATCH] raw filter (ve_raw.c) writing improper frame data

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Nov 30 17:23:55 CET 2005


Hi,
On Mon, Nov 21, 2005 at 12:27:33PM -0500, John Koleszar wrote:
> I've attached two patches, one to vf_expand.c and one to vf.c. Applying 
> either one fixes the problem, but it's possible that the one to 
> vf_expand may break other things. I've tested it and couldn't find any 
> regressions, but I don't make much use of this filter, either.
> 
> Either way, this is a first shot at a fix. Feedback?

Both are wrong, they can be a big performance hit.
The bug is in ve_raw, it ignores the mpi->stride values.
Even worse, for yuv it assumes the planes are located on behind the
other in memory which is an invalid assumption as well.
Shouldn't really be too hard to fix, just an annoying monkey-job, and
I'm too lazy right now.
Just as a hint:
the wrong code is in the put_image function. You must create your own
temporary buffer (best in config, for speed reasons) and point
mux_v->buffer to that.
Then use memcpy_pic to copy from mpi->planes to that buffer, removing
any overlong strides.

Greetings,
Reimar Döffinger




More information about the MPlayer-dev-eng mailing list