[MPlayer-dev-eng] [PATCH] altivec unscaled planar YV12 to packed YUY2 conversion.
Romain Dolbeau
romain at dolbeau.org
Sun Jun 26 10:42:13 CEST 2005
Nicolas Plourde <nicolas.plourde at gmail.com> wrote:
> I knew Michael commited it. I just wonder why he did it since the code was
> obviously not finished. And since he know everything and never made a
> single mistake in is entire life, why did he let it go.
Maybe the assumption was right back then. If I proposed that code for
inclusion, that means it didn't fail on any of my test cases. But then,
I probably only checked MPEG-4 :-/ where width is quite often a multiple
of 16 (I learned my lessons ;-)
> It work but i just noticed the problem because my new vo_macosx is not
> supporting yv12 unlike vo_quartz.
Huh ? What will it use not to support YV12 ? Both QuickTime and OpenGL
can handle it. Is it that new Apple stuff in Tiger whose name escape me
at the moment ? That'd be nice (... except I don't have Tiger :-)
> Since you are the expert here can you suggest a fix? I would really like
> to do it but its beyond my knowledge.
To test the workaround suggested by others (calling the C function if
(width % 16 != 0) ) should be enough ; on the long-term, finishing the
lines with pure C is probably a better solution.
Dunno if it's preferable to finish each line with a test inside the
for(y) loop, or to duplicate the for(y) loop. Better locality in the
first case but many control flow checks, single control flow check but
bad locality in the second case. Opinions ?
#pragma sarcastic_mode on
Or just wait a year or two and use the SSE3 version in MacOS X also.
#pragma sarcastic_mode reset
--
Romain Dolbeau
<romain at dolbeau.org>
More information about the MPlayer-dev-eng
mailing list