Stephane Marchesin wrote:
Andrey Nikitin wrote:
Stephane Marchesin wrote:
Hi,
I make self v4l player on SDL v1.2.8 / Linux 2.4 /
and found subj bug.
BUG conditional:
- ./configure … --enable-nasm …
- driver x11 and fbdev with bpp 16
- for test may be use
$ cd SDL-1.2.8/test/
$ make
$ ./testoverlay2 -format YV12
What problem do you have when doing this ?
Do you get an error of some kind or an error message ?
Stephane
Hi Stephane.
Problem:
If compile SDL with --enable-nasm options (compile with ASM and MMX
code) -
func. SDL_DisplayYUVOverlay(YV12 or IYUV format) success worked (no
error),
but OUTPUT PICTURE HAS BAD COLOR.
If overlay format 16bit, ie YUV2 - all right, bug found on only 12bit
planar YUV format.
If compile SDL with --disable-nasm options (compile without ASM and
MMX code) - all right.
For example you can try ‘testoverlay2 -format YV12’ application from
SDL source.
Ah, well, I’m probably the culprit for this breakage.
Does it work if you revert to an older version of
SDL12/src/video/SDL_yuv_mmx.c like these :
http://www.libsdl.org/cgi/cvsweb.cgi/~checkout~/SDL12/src/video/SDL_yuv_mmx.c?rev=1.9&content-type=text/plain
http://www.libsdl.org/cgi/cvsweb.cgi/~checkout~/SDL12/src/video/SDL_yuv_mmx.c?rev=1.8&content-type=text/plain
Stephane
SDL_yuv_mmx.c?rev=1.8 i’m have in my current SDL-1.2.8 (not CVS)
I changed SDL_yuv_mmx.c (1.8) on SDL_yuv_mmx.c?rev=1.9
Result: nothing changed.
( NASM version 0.98.38, gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) )
!!! FOUND NEW INTERESTING THING:
FBDEV and X11 - has different result for
SDL_DisplayYUVOverlay()===============================================================
X11 1280x1024 at 16
./testoverlay -format YV12 - Ok
./testoverlay -format IYUV - Ok, but SLOW
./testoverlay2 -format YV12 - Ok
./testoverlay2 -format IYUV - Bad color picture
===============================================================
fbdev 1024x768 at 16
./testoverlay -format YV12 - Ok
./testoverlay -format IYUV - Ok
./testoverlay2 -format YV12 - Bad color picture
./testoverlay2 -format IYUV - Bad color picture, but good view shape
contour
Result: SDL has different ASM(MMX) code for X11 and FBDEV driver.
Different Endian (LE, BE) for x11 and fbdev?? or … ??
I think that only developers of SDL drivers can solve this problem.
For “fast” video4linux TV-video players application more importance has
support 4.2.0 (YV12 or IYUV)
format in graphics lib.
My solve problem: configure & compile SDL with --disable-nasm,
but if use fullscreen mode with soft scale - CPU usage = 50%.
May be ASM MMX BLIT for YV12(IYUV) for FBDEV problem will be solve in
next SDLlib version.
I began to use SLDlib after DirectFB.
DirectFB does not realy supports (YV12 or IYUV) surface.
I.m.h.o SDLlib is fast good stable graphics lib for Linux.
More thanks, Stephane.
–
Best regard.
Andrey.